]> git.saurik.com Git - apple/security.git/blob - SecureTransport/privateInc/SecureTransportPriv.h
Security-54.1.3.tar.gz
[apple/security.git] / SecureTransport / privateInc / SecureTransportPriv.h
1 /*
2 * Copyright (c) 2000-2001 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
19 /*
20 File: SecureTransportPriv.h
21
22 Contains: Apple-private exported routines
23
24 Copyright: (c) 1999 by Apple Computer, Inc., all rights reserved.
25
26 */
27
28 #ifndef _SECURE_TRANSPORT_PRIV_H_
29 #define _SECURE_TRANSPORT_PRIV_H_ 1
30
31 #include <Security/SecureTransport.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /* The size of of client- and server-generated random numbers in hello messages. */
38 #define SSL_CLIENT_SRVR_RAND_SIZE 32
39
40 /* The size of the pre-master and master secrets. */
41 #define SSL_RSA_PREMASTER_SECRET_SIZE 48
42 #define SSL_MASTER_SECRET_SIZE 48
43
44 /*
45 * For the following three functions, *size is the available
46 * buffer size on entry and the actual size of the data returned
47 * on return. The above consts are for convenience.
48 */
49 OSStatus SSLInternalMasterSecret(
50 SSLContextRef context,
51 void *secret, // mallocd by caller, SSL_MASTER_SECRET_SIZE
52 size_t *secretSize); // in/out
53
54 OSStatus SSLInternalServerRandom(
55 SSLContextRef context,
56 void *rand, // mallocd by caller, SSL_CLIENT_SRVR_RAND_SIZE
57 size_t *randSize); // in/out
58
59 OSStatus SSLInternalClientRandom(
60 SSLContextRef context,
61 void *rand, // mallocd by caller, SSL_CLIENT_SRVR_RAND_SIZE
62 size_t *randSize); // in/out
63
64 OSStatus SSLInternal_PRF(
65 SSLContextRef context,
66 const void *secret,
67 size_t secretLen,
68 const void *label,
69 size_t labelLen,
70 const void *seed,
71 size_t seedLen,
72 void *out, // mallocd by caller, length >= outLen
73 size_t outLen);
74
75 #ifdef __cplusplus
76 }
77 #endif
78
79 #endif /* _SECURE_TRANSPORT_PRIV_H_ */