]> git.saurik.com Git - apple/security.git/blob - libsecurity_ssl/lib/sslPriv.h
Security-55179.1.tar.gz
[apple/security.git] / libsecurity_ssl / lib / sslPriv.h
1 /*
2 * Copyright (c) 1999-2001,2005-2008,2010-2012 Apple Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 /*
25 * sslPriv.h - Misc. private SSL typedefs
26 */
27
28 #ifndef _SSL_PRIV_H_
29 #define _SSL_PRIV_H_ 1
30
31 #include "sslBuildFlags.h"
32 #include "SecureTransportPriv.h"
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /* Diffie-Hellman support */
39 #define APPLE_DH 1
40
41 /*
42 * Flags support for ECDSA on the server side.
43 * Not implemented as of 6 Aug 2008.
44 */
45 #define SSL_ECDSA_SERVER 0
46
47 /*
48 * For ease of porting, we'll keep this around for internal use.
49 * It's used extensively; eventually we'll convert over to
50 * CFData, as in the public API.
51 */
52 typedef struct
53 { size_t length;
54 uint8_t *data;
55 } SSLBuffer;
56
57 /*
58 * We can make this more Mac-like as well...
59 */
60 typedef struct
61 { uint32_t high;
62 uint32_t low;
63 } sslUint64;
64
65
66 typedef enum
67 {
68 /* This value never appears in the actual protocol */
69 SSL_Version_Undetermined = 0,
70 /* actual protocol values */
71 SSL_Version_2_0 = 0x0002,
72 SSL_Version_3_0 = 0x0300,
73 TLS_Version_1_0 = 0x0301, /* TLS 1.0 == SSL 3.1 */
74 TLS_Version_1_1 = 0x0302,
75 TLS_Version_1_2 = 0x0303,
76 DTLS_Version_1_0 = 0xfeff,
77 } SSLProtocolVersion;
78
79 /*
80 * Clients see an opaque SSLContextRef; internal code uses the
81 * following typedef.
82 */
83 typedef struct SSLContext SSLContext;
84
85 #ifdef __cplusplus
86 }
87 #endif
88
89 #endif /* _SSL_PRIV_H */