2 * This file contains prototypes for the public SSL functions.
4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 * for the specific language governing rights and limitations under the
17 * The Original Code is the Netscape security libraries.
19 * The Initial Developer of the Original Code is
20 * Netscape Communications Corporation.
21 * Portions created by the Initial Developer are Copyright (C) 1994-2000
22 * the Initial Developer. All Rights Reserved.
25 * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
40 /* $Id: sslt.h,v 1.10 2007/02/28 19:47:38 rrelyea%redhat.com Exp $ */
47 typedef struct SSL3StatisticsStr
{
48 /* statistics from ssl3_SendClientHello (sch) */
49 long sch_sid_cache_hits
;
50 long sch_sid_cache_misses
;
51 long sch_sid_cache_not_ok
;
53 /* statistics from ssl3_HandleServerHello (hsh) */
54 long hsh_sid_cache_hits
;
55 long hsh_sid_cache_misses
;
56 long hsh_sid_cache_not_ok
;
58 /* statistics from ssl3_HandleClientHello (hch) */
59 long hch_sid_cache_hits
;
60 long hch_sid_cache_misses
;
61 long hch_sid_cache_not_ok
;
64 /* Key Exchange algorithm values */
69 ssl_kea_fortezza
= 3, /* deprecated, now unused */
71 ssl_kea_size
/* number of ssl_kea_ algorithms */
74 /* The following defines are for backwards compatibility.
75 ** They will be removed in a forthcoming release to reduce namespace pollution.
76 ** programs that use the kt_ symbols should convert to the ssl_kt_ symbols
79 #define kt_null ssl_kea_null
80 #define kt_rsa ssl_kea_rsa
81 #define kt_dh ssl_kea_dh
82 #define kt_fortezza ssl_kea_fortezza /* deprecated, now unused */
83 #define kt_ecdh ssl_kea_ecdh
84 #define kt_kea_size ssl_kea_size
108 ssl_calg_fortezza
= 6, /* deprecated, now unused */
109 ssl_calg_aes
= 7, /* coming soon */
110 ssl_calg_camellia
= 8
111 } SSLCipherAlgorithm
;
117 ssl_hmac_md5
= 3, /* TLS HMAC version of mac_md5 */
118 ssl_hmac_sha
= 4 /* TLS HMAC version of mac_sha */
121 typedef struct SSLChannelInfoStr
{
123 PRUint16 protocolVersion
;
124 PRUint16 cipherSuite
;
126 /* server authentication info */
127 PRUint32 authKeyBits
;
129 /* key exchange algorithm info */
133 PRUint32 creationTime
; /* seconds since Jan 1, 1970 */
134 PRUint32 lastAccessTime
; /* seconds since Jan 1, 1970 */
135 PRUint32 expirationTime
; /* seconds since Jan 1, 1970 */
136 PRUint32 sessionIDLength
; /* up to 32 */
137 PRUint8 sessionID
[32];
140 typedef struct SSLCipherSuiteInfoStr
{
142 PRUint16 cipherSuite
;
144 /* Cipher Suite Name */
145 const char * cipherSuiteName
;
147 /* server authentication info */
148 const char * authAlgorithmName
;
149 SSLAuthType authAlgorithm
;
151 /* key exchange algorithm info */
152 const char * keaTypeName
;
155 /* symmetric encryption info */
156 const char * symCipherName
;
157 SSLCipherAlgorithm symCipher
;
159 PRUint16 symKeySpace
;
160 PRUint16 effectiveKeyBits
;
163 const char * macAlgorithmName
;
164 SSLMACAlgorithm macAlgorithm
;
168 PRUintn isExportable
: 1;
169 PRUintn nonStandard
: 1;
170 PRUintn reservedBits
:29;
172 } SSLCipherSuiteInfo
;
174 #endif /* __sslt_h_ */