]>
Commit | Line | Data |
---|---|---|
29654253 A |
1 | |
2 | /* | |
3 | File: sslBER_Dummy.cpp | |
4 | ||
5 | Contains: stubs of routines in sslBER.cpp to enable standalone | |
5a719ac8 A |
6 | build for indexing purposes. Unlike the real sslBER.cpp, |
7 | this version does not require the SecurityANS1 files | |
8 | (which are not exported from Security.framework). | |
29654253 A |
9 | |
10 | Written by: Doug Mitchell | |
11 | ||
12 | Copyright: (c) 1999 by Apple Computer, Inc., all rights reserved. | |
13 | ||
14 | */ | |
15 | ||
16 | #include "ssl.h" | |
5a719ac8 | 17 | #include "sslMemory.h" |
29654253 A |
18 | #include "sslDebug.h" |
19 | #include "sslBER.h" | |
20 | ||
21 | #include <string.h> | |
22 | ||
23 | /* | |
24 | * Given a PKCS-1 encoded RSA public key, extract the | |
25 | * modulus and public exponent. | |
26 | * | |
27 | * RSAPublicKey ::= SEQUENCE { | |
28 | * modulus INTEGER, -- n | |
29 | * publicExponent INTEGER -- e } | |
30 | */ | |
31 | ||
5a719ac8 | 32 | OSStatus sslDecodeRsaBlob( |
29654253 A |
33 | const SSLBuffer *blob, /* PKCS-1 encoded */ |
34 | SSLBuffer *modulus, /* data mallocd and RETURNED */ | |
35 | SSLBuffer *exponent) /* data mallocd and RETURNED */ | |
36 | { | |
5a719ac8 | 37 | return errSSLBadCert; |
29654253 A |
38 | } |
39 | ||
40 | /* | |
41 | * Given a raw modulus and exponent, cook up a | |
42 | * BER-encoded RSA public key blob. | |
43 | */ | |
5a719ac8 | 44 | OSStatus sslEncodeRsaBlob( |
29654253 A |
45 | const SSLBuffer *modulus, |
46 | const SSLBuffer *exponent, | |
47 | SSLBuffer *blob) /* data mallocd and RETURNED */ | |
48 | { | |
5a719ac8 | 49 | return errSSLCrypto; |
29654253 A |
50 | } |
51 |