]> git.saurik.com Git - apple/security.git/blob - Keychain/SecCertificateRequest.cpp
Security-176.tar.gz
[apple/security.git] / Keychain / SecCertificateRequest.cpp
1 /*
2 * Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18 #include <Security/SecCertificateRequest.h>
19
20 #include "SecBridge.h"
21
22
23 CFTypeID
24 SecCertificateRequestGetTypeID(void)
25 {
26 BEGIN_SECAPI
27
28 return gTypes().CertificateRequest.typeID;
29
30 END_SECAPI1(_kCFRuntimeNotATypeID)
31 }
32
33
34 OSStatus
35 SecCertificateRequestCreate(
36 SecPolicyRef policy,
37 CSSM_CERT_TYPE certificateType,
38 CSSM_TP_AUTHORITY_REQUEST_TYPE requestType,
39 SecCertificateRequestRef* certRequest)
40 {
41 BEGIN_SECAPI
42
43 MacOSError::throwMe(unimpErr);//%%%for now
44
45 END_SECAPI
46 }
47
48
49 OSStatus
50 SecCertificateRequestSetPrivateKey(
51 SecCertificateRequestRef certRequest,
52 SecKeychainItemRef privateKeyItemRef)
53 {
54 BEGIN_SECAPI
55
56 MacOSError::throwMe(unimpErr);//%%%for now
57
58 END_SECAPI
59 }
60
61
62 OSStatus
63 SecCertificateRequestSetAttribute(
64 SecCertificateRequestRef certRequest,
65 const CSSM_OID* oid,
66 const CSSM_DATA* value)
67 {
68 BEGIN_SECAPI
69
70 MacOSError::throwMe(unimpErr);//%%%for now
71
72 END_SECAPI
73 }
74
75
76 OSStatus
77 SecCertificateRequestSubmit(
78 SecCertificateRequestRef certRequest,
79 SecKeychainRef keychain,
80 sint32* estimatedTime,
81 SecKeychainItemRef* certRequestItemRef)
82 {
83 BEGIN_SECAPI
84
85 MacOSError::throwMe(unimpErr);//%%%for now
86
87 END_SECAPI
88 }
89
90
91 OSStatus
92 SecCertificateRequestCreateFromItem(
93 SecKeychainItemRef certRequestItemRef,
94 SecCertificateRequestRef* certRequestRef)
95 {
96 BEGIN_SECAPI
97
98 MacOSError::throwMe(unimpErr);//%%%for now
99
100 END_SECAPI
101 }
102
103
104 OSStatus
105 SecCertificateRequestGetType(
106 SecCertificateRequestRef certRequestRef,
107 CSSM_TP_AUTHORITY_REQUEST_TYPE* requestType)
108 {
109 BEGIN_SECAPI
110
111 MacOSError::throwMe(unimpErr);//%%%for now
112
113 END_SECAPI
114 }
115
116
117 OSStatus
118 SecCertificateRequestGetResult(
119 SecCertificateRequestRef certRequestRef,
120 sint32* estimatedTime,
121 SecCertificateRef* certificateRef)
122 {
123 BEGIN_SECAPI
124
125 MacOSError::throwMe(unimpErr);//%%%for now
126
127 END_SECAPI
128 }