]> git.saurik.com Git - apple/security.git/blob - SecureTransport/sslBER_Dummy.c
3829aef2941d5d7ca16320841b3e80306b328f52
[apple/security.git] / SecureTransport / sslBER_Dummy.c
1
2 /*
3 File: sslBER_Dummy.cpp
4
5 Contains: stubs of routines in sslBER.cpp to enable standalone
6 build for indexing purposes.
7
8 Written by: Doug Mitchell
9
10 Copyright: (c) 1999 by Apple Computer, Inc., all rights reserved.
11
12 */
13
14 #include "ssl.h"
15 #include "sslalloc.h"
16 #include "sslDebug.h"
17 #include "sslBER.h"
18
19 #include <string.h>
20
21 /*
22 * Given a PKCS-1 encoded RSA public key, extract the
23 * modulus and public exponent.
24 *
25 * RSAPublicKey ::= SEQUENCE {
26 * modulus INTEGER, -- n
27 * publicExponent INTEGER -- e }
28 */
29
30 SSLErr sslDecodeRsaBlob(
31 const SSLBuffer *blob, /* PKCS-1 encoded */
32 SSLBuffer *modulus, /* data mallocd and RETURNED */
33 SSLBuffer *exponent) /* data mallocd and RETURNED */
34 {
35 return SSLBadCert;
36 }
37
38 /*
39 * Given a raw modulus and exponent, cook up a
40 * BER-encoded RSA public key blob.
41 */
42 SSLErr sslEncodeRsaBlob(
43 const SSLBuffer *modulus,
44 const SSLBuffer *exponent,
45 SSLBuffer *blob) /* data mallocd and RETURNED */
46 {
47 return SSLMemoryErr;
48 }
49