~ubuntu-branches/ubuntu/trusty/xulrunner/trusty

« back to all changes in this revision

Viewing changes to security/nss-fips/tests/pkcs11/netscape/suites/security/ssl/sslt.h

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2008-08-25 13:04:18 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080825130418-ck1i2ms384tzb9m0
Tags: 1.8.1.16+nobinonly-0ubuntu1
* New upstream release (taken from upstream CVS), LP: #254618.
* Fix MFSA 2008-35, MFSA 2008-34, MFSA 2008-33, MFSA 2008-32, MFSA 2008-31,
  MFSA 2008-30, MFSA 2008-29, MFSA 2008-28, MFSA 2008-27, MFSA 2008-25,
  MFSA 2008-24, MFSA 2008-23, MFSA 2008-22, MFSA 2008-21, MFSA 2008-26 also
  known as CVE-2008-2933, CVE-2008-2785, CVE-2008-2811, CVE-2008-2810,
  CVE-2008-2809, CVE-2008-2808, CVE-2008-2807, CVE-2008-2806, CVE-2008-2805,
  CVE-2008-2803, CVE-2008-2802, CVE-2008-2801, CVE-2008-2800, CVE-2008-2798.
* Drop 89_bz419350_attachment_306066 patch, merged upstream.
* Bump Standards-Version to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ***** BEGIN LICENSE BLOCK *****
 
2
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
3
 *
 
4
 * The contents of this file are subject to the Mozilla Public License Version
 
5
 * 1.1 (the "License"); you may not use this file except in compliance with
 
6
 * the License. You may obtain a copy of the License at
 
7
 * http://www.mozilla.org/MPL/
 
8
 *
 
9
 * Software distributed under the License is distributed on an "AS IS" basis,
 
10
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
11
 * for the specific language governing rights and limitations under the
 
12
 * License.
 
13
 *
 
14
 * The Original Code is the Netscape security libraries.
 
15
 *
 
16
 * The Initial Developer of the Original Code is
 
17
 * Netscape Communications Corporation.
 
18
 * Portions created by the Initial Developer are Copyright (C) 1994-2000
 
19
 * the Initial Developer. All Rights Reserved.
 
20
 *
 
21
 * Contributor(s):
 
22
 *
 
23
 * Alternatively, the contents of this file may be used under the terms of
 
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
 
27
 * of those above. If you wish to allow use of your version of this file only
 
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
 
29
 * use your version of this file under the terms of the MPL, indicate your
 
30
 * decision by deleting the provisions above and replace them with the notice
 
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
 
32
 * the provisions above, a recipient may use your version of this file under
 
33
 * the terms of any one of the MPL, the GPL or the LGPL.
 
34
 *
 
35
 * ***** END LICENSE BLOCK ***** */
 
36
#ifndef SSLT_H
 
37
#define SSLT_H
 
38
 
 
39
 
 
40
extern int Error(int);
 
41
#ifndef DEBUG_stevep
 
42
#define dbmsg(x) if (debug) PR_fprintf x ;
 
43
#else
 
44
#define dbmsg(x) ;
 
45
#endif
 
46
extern PRInt32 debug;
 
47
 
 
48
#ifdef INSERT_TABLES
 
49
int testId = 0;
 
50
 
 
51
int ClientCert[] = {
 
52
        NO_CERT,
 
53
        CLIENT_CERT_HARDCOREII_1024
 
54
};
 
55
 
 
56
int ServerCert[] = {
 
57
        SERVER_CERT_HARDCOREII_512
 
58
};
 
59
 
 
60
int Policy[] = {
 
61
        POLICY_EXPORT,
 
62
        POLICY_DOMESTIC
 
63
};
 
64
 
 
65
int SSLVersion2[] = {
 
66
        PR_TRUE,
 
67
        PR_FALSE
 
68
};
 
69
 
 
70
int SSLVersion3[] = {
 
71
        PR_TRUE,
 
72
        PR_FALSE
 
73
};
 
74
 
 
75
int ClientIOSessionLength[] = {
 
76
        0,
 
77
        1024
 
78
};
 
79
 
 
80
int ServerIOSessionLength[] = {
 
81
        0,
 
82
        1024
 
83
};
 
84
 
 
85
int ServerDoClientAuth[] = {
 
86
        SSLT_CLIENTAUTH_OFF
 
87
};
 
88
 
 
89
PRBool ClientForceHandshake[] = {
 
90
        PR_FALSE
 
91
};
 
92
 
 
93
PRBool ServerForceHandshake[] = {
 
94
        PR_TRUE
 
95
};
 
96
 
 
97
PRBool ClientRedoHandshake[] = {
 
98
        PR_FALSE
 
99
};
 
100
 
 
101
PRBool ServerRedoHandshake[] = {
 
102
        PR_FALSE
 
103
};
 
104
 
 
105
PRBool Cipher_EN_RC4_128_WITH_MD5[] = {
 
106
        PR_TRUE,
 
107
        PR_FALSE
 
108
};
 
109
 
 
110
PRBool Cipher_EN_RC4_128_EXPORT40_WITH_MD5[] = {
 
111
        PR_TRUE,
 
112
        PR_FALSE
 
113
};
 
114
 
 
115
PRBool Cipher_EN_RC2_128_CBC_WITH_MD5[] = {
 
116
        PR_TRUE,
 
117
        PR_FALSE
 
118
};
 
119
 
 
120
PRBool Cipher_EN_DES_192_EDE3_CBC_WITH_MD5[] = {
 
121
        PR_TRUE,
 
122
        PR_FALSE
 
123
};
 
124
 
 
125
PRBool Cipher_RSA_EXPORT_WITH_RC4_40_MD5[] = {
 
126
        PR_TRUE,
 
127
        PR_FALSE
 
128
};
 
129
 
 
130
PRBool Cipher_RSA_WITH_RC4_128_MD5[] = {
 
131
        PR_TRUE,
 
132
        PR_FALSE
 
133
};
 
134
 
 
135
PRBool Cipher_RSA_EXPORT_WITH_RC2_CBC_40_MD5[] = {
 
136
        PR_TRUE,
 
137
        PR_FALSE
 
138
};
 
139
 
 
140
PRBool Cipher_RSA_WITH_DES_CBC_SHA[] = {
 
141
        PR_TRUE,
 
142
        PR_FALSE
 
143
};
 
144
 
 
145
PRBool Cipher_RSA_WITH_3DES_EDE_CBC_SHA[] = {
 
146
        PR_TRUE,
 
147
        PR_FALSE
 
148
};
 
149
 
 
150
 
 
151
#else
 
152
extern int ClientCert[];
 
153
extern int ServerCert[];
 
154
extern int Policy[];
 
155
extern int SSLVersion2[];
 
156
extern int SSLVersion3[];
 
157
extern int ClientIOSessionLength[];
 
158
extern int ServerIOSessionLength[];
 
159
extern int ServerDoClientAuth[];
 
160
extern PRBool ClientForceHandshake[];
 
161
extern PRBool ServerForceHandshake[];
 
162
extern PRBool ClientRedoHandshake[];
 
163
extern PRBool ServerRedoHandshake[];
 
164
extern PRBool Cipher_EN_RC4_128_WITH_MD5[];
 
165
extern PRBool Cipher_EN_RC4_128_EXPORT40_WITH_MD5[];
 
166
extern PRBool Cipher_EN_RC2_128_CBC_WITH_MD5[];
 
167
extern PRBool Cipher_EN_DES_192_EDE3_CBC_WITH_MD5[];
 
168
extern PRBool Cipher_RSA_EXPORT_WITH_RC4_40_MD5[];
 
169
extern PRBool Cipher_RSA_WITH_RC4_128_MD5[];
 
170
extern PRBool Cipher_RSA_EXPORT_WITH_RC2_CBC_40_MD5[];
 
171
extern PRBool Cipher_RSA_WITH_DES_CBC_SHA[];
 
172
extern PRBool Cipher_RSA_WITH_3DES_EDE_CBC_SHA[];
 
173
extern int testId;
 
174
#endif
 
175
 
 
176
 
 
177
#define REP_ClientCert            ClientCert[testId%2]
 
178
#define REP_ServerCert            ServerCert[testId/2%1]
 
179
#define REP_Policy                Policy[testId/2/1%2]
 
180
#define REP_SSLVersion2           SSLVersion2[testId/2/1/2%2]
 
181
#define REP_SSLVersion3           SSLVersion3[testId/2/1/2/2%2]
 
182
#define REP_ClientIOSessionLength ClientIOSessionLength[testId/2/1/2/2/2%2]
 
183
#define REP_ServerIOSessionLength ServerIOSessionLength[testId/2/1/2/2/2/2%2]
 
184
#define REP_ServerDoClientAuth    ServerDoClientAuth[testId/2/1/2/2/2/2/2%1]
 
185
#define REP_ClientForceHandshake  ClientForceHandshake[testId/2/1/2/2/2/2/2/1%1]
 
186
#define REP_ServerForceHandshake  ServerForceHandshake[testId/2/1/2/2/2/2/2/1/1%1]
 
187
#define REP_ClientRedoHandshake   ClientRedoHandshake[testId/2/1/2/2/2/2/2/1/1/1%1]
 
188
#define REP_ServerRedoHandshake   ServerRedoHandshake[testId/2/1/2/2/2/2/2/1/1/1/1%1]
 
189
 
 
190
 
 
191
#define REP_Cipher_EN_RC4_128_WITH_MD5                    Cipher_EN_RC4_128_WITH_MD5[testId/2/1/2/2/2/2/2/1/1/1/1/1%2]
 
192
#define REP_Cipher_EN_RC4_128_EXPORT40_WITH_MD5           Cipher_EN_RC4_128_EXPORT40_WITH_MD5[testId/2/1/2/2/2/2/2/1/1/1/1/1/2%2]
 
193
#define REP_Cipher_EN_RC2_128_CBC_WITH_MD5                Cipher_EN_RC2_128_CBC_WITH_MD5[testId/2/1/2/2/2/2/2/1/1/1/1/1/2/2%2]
 
194
#ifdef undef
 
195
#define REP_Cipher_EN_RC2_128_CBC_EXPORT40_WITH_MD5       $[Cipher_EN_RC2_128_CBC_EXPORT40_WITH_MD5]
 
196
#define REP_Cipher_EN_IDEA_128_CBC_WITH_MD5               $[Cipher_EN_IDEA_128_CBC_WITH_MD5]
 
197
#define REP_Cipher_EN_DES_64_CBC_WITH_MD5                 $[Cipher_EN_DES_64_CBC_WITH_MD5
 
198
#define REP_Cipher_RSA_WITH_NULL_SHA                      $[Cipher_RSA_WITH_NULL_SHA]
 
199
#define REP_Cipher_RSA_WITH_RC4_128_SHA                   $[Cipher_RSA_WITH_RC4_128_SHA]
 
200
#define REP_Cipher_RSA_WITH_IDEA_CBC_SHA                  $[Cipher_RSA_WITH_IDEA_CBC_SHA]
 
201
#define REP_Cipher_NULL_WITH_NULL_NULL                    $[Cipher_NULL_WITH_NULL_NULL]
 
202
#define REP_Cipher_RSA_WITH_NULL_MD5                      $[Cipher_RSA_WITH_NULL_MD5]
 
203
#endif
 
204
#define REP_Cipher_EN_DES_192_EDE3_CBC_WITH_MD5           Cipher_EN_DES_192_EDE3_CBC_WITH_MD5[testId/2/1/2/2/2/2/2/1/1/1/1/1/2/2/2%2]
 
205
#define REP_Cipher_RSA_EXPORT_WITH_RC4_40_MD5             Cipher_RSA_EXPORT_WITH_RC4_40_MD5[testId/2/1/2/2/2/2/2/1/1/1/1/1/2/2/2/2%2]
 
206
#define REP_Cipher_RSA_WITH_RC4_128_MD5                   Cipher_RSA_WITH_RC4_128_MD5[testId/2/1/2/2/2/2/2/1/1/1/1/1/2/2/2/2/2%2]
 
207
#define REP_Cipher_RSA_EXPORT_WITH_RC2_CBC_40_MD5         Cipher_RSA_EXPORT_WITH_RC2_CBC_40_MD5[testId/2/1/2/2/2/2/2/1/1/1/1/1/2/2/2/2/2/2%2]
 
208
#define REP_Cipher_RSA_WITH_DES_CBC_SHA                   Cipher_RSA_WITH_DES_CBC_SHA[testId/2/1/2/2/2/2/2/1/1/1/1/1/2/2/2/2/2/2/2%2]
 
209
#define REP_Cipher_RSA_WITH_3DES_EDE_CBC_SHA              Cipher_RSA_WITH_3DES_EDE_CBC_SHA[testId/2/1/2/2/2/2/2/1/1/1/1/1/2/2/2/2/2/2/2/2%2]
 
210
 
 
211
#ifdef undef
 
212
#define REP_Cipher_RSA_EXPORT_WITH_DES40_CBC_SHA          $[Cipher_RSA_EXPORT_WITH_DES40_CBC_SHA]
 
213
 
 
214
#define REP_Cipher_DH_DSS_EXPORT_WITH_DES40_CBC_SHA       [Cipher_DH_DSS_EXPORT_WITH_DES40_CBC_SHA]
 
215
#define REP_Cipher_DH_DSS_WITH_DES_CBC_SHA                [Cipher_DH_DSS_WITH_DES_CBC_SHA]
 
216
#define REP_Cipher_DH_DSS_WITH_3DES_EDE_CBC_SHA           [Cipher_DH_DSS_WITH_3DES_EDE_CBC_SHA]
 
217
#define REP_Cipher_DH_RSA_EXPORT_WITH_DES40_CBC_SHA       [Cipher_DH_RSA_EXPORT_WITH_DES40_CBC_SHA]
 
218
#define REP_Cipher_DH_RSA_WITH_DES_CBC_SHA                [Cipher_DH_RSA_WITH_DES_CBC_SHA]
 
219
#define REP_Cipher_DH_RSA_WITH_3DES_EDE_CBC_SHA           [Cipher_DH_RSA_WITH_3DES_EDE_CBC_SHA]
 
220
#define REP_Cipher_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA      [Cipher_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
 
221
#define REP_Cipher_DHE_DSS_WITH_DES_CBC_SHA               [Cipher_DHE_DSS_WITH_DES_CBC_SHA]
 
222
#define REP_Cipher_DHE_DSS_WITH_3DES_EDE_CBC_SHA          [Cipher_DHE_DSS_WITH_3DES_EDE_CBC_SHA]
 
223
#define REP_Cipher_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA      [Cipher_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA]
 
224
#define REP_Cipher_DHE_RSA_WITH_DES_CBC_SHA               [Cipher_DHE_RSA_WITH_DES_CBC_SHA]
 
225
#define REP_Cipher_DHE_RSA_WITH_3DES_EDE_CBC_SHA          [Cipher_DHE_RSA_WITH_3DES_EDE_CBC_SHA]
 
226
#define REP_Cipher_DH_ANON_EXPORT_WITH_RC4_40_MD5         [Cipher_DH_ANON_EXPORT_WITH_RC4_40_MD5]
 
227
#define REP_Cipher_DH_ANON_WITH_RC4_128_MD5               [Cipher_DH_ANON_WITH_RC4_128_MD5]
 
228
#define REP_Cipher_DH_ANON_WITH_DES_CBC_SHA               [Cipher_DH_ANON_WITH_DES_CBC_SHA]
 
229
#define REP_Cipher_DH_ANON_WITH_3DES_EDE_CBC_SHA          [Cipher_DH_ANON_WITH_3DES_EDE_CBC_SHA]
 
230
#define REP_Cipher_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA     $[Cipher_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA]
 
231
#define REP_Cipher_FORTEZZA_DMS_WITH_RC4_128_SHA          $[Cipher_FORTEZZA_DMS_WITH_RC4_128_SHA]
 
232
#endif
 
233
#define REP_Cipher_RSA_FIPS_WITH_3DES_EDE_CBC_SHA         $[Cipher_RSA_FIPS_WITH_3DES_EDE_CBC_SHA]
 
234
#define REP_Cipher_RSA_FIPS_WITH_DES_CBC_SHA              $[Cipher_RSA_FIPS_WITH_DES_CBC_SHA]
 
235
 
 
236
 
 
237
#endif
 
238
 
 
239
 
 
240
 
 
241