]> git.saurik.com Git - apple/security.git/blob - SecureTransport/sslBER_Dummy.cpp
Security-179.tar.gz
[apple/security.git] / SecureTransport / sslBER_Dummy.cpp
1
2 /*
3 File: sslBER_Dummy.cpp
4
5 Contains: stubs of routines in sslBER.cpp to enable standalone
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).
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"
17 #include "sslMemory.h"
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
32 OSStatus sslDecodeRsaBlob(
33 const SSLBuffer *blob, /* PKCS-1 encoded */
34 SSLBuffer *modulus, /* data mallocd and RETURNED */
35 SSLBuffer *exponent) /* data mallocd and RETURNED */
36 {
37 return errSSLBadCert;
38 }
39
40 /*
41 * Given a raw modulus and exponent, cook up a
42 * BER-encoded RSA public key blob.
43 */
44 OSStatus sslEncodeRsaBlob(
45 const SSLBuffer *modulus,
46 const SSLBuffer *exponent,
47 SSLBuffer *blob) /* data mallocd and RETURNED */
48 {
49 return errSSLCrypto;
50 }
51