Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /*
2 * ldvector.c - platform dependent DSO containing freebl implementation.
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifdef FREEBL_NO_DEPEND
9 extern int FREEBL_InitStubs(void);
10 #endif
12 #include "loader.h"
13 #include "alghmac.h"
14 #include "hmacct.h"
17 static const struct FREEBLVectorStr vector =
18 {
20 sizeof vector,
21 FREEBL_VERSION,
23 RSA_NewKey,
24 RSA_PublicKeyOp,
25 RSA_PrivateKeyOp,
26 DSA_NewKey,
27 DSA_SignDigest,
28 DSA_VerifyDigest,
29 DSA_NewKeyFromSeed,
30 DSA_SignDigestWithSeed,
31 DH_GenParam,
32 DH_NewKey,
33 DH_Derive,
34 KEA_Derive,
35 KEA_Verify,
36 RC4_CreateContext,
37 RC4_DestroyContext,
38 RC4_Encrypt,
39 RC4_Decrypt,
40 RC2_CreateContext,
41 RC2_DestroyContext,
42 RC2_Encrypt,
43 RC2_Decrypt,
44 RC5_CreateContext,
45 RC5_DestroyContext,
46 RC5_Encrypt,
47 RC5_Decrypt,
48 DES_CreateContext,
49 DES_DestroyContext,
50 DES_Encrypt,
51 DES_Decrypt,
52 AES_CreateContext,
53 AES_DestroyContext,
54 AES_Encrypt,
55 AES_Decrypt,
56 MD5_Hash,
57 MD5_HashBuf,
58 MD5_NewContext,
59 MD5_DestroyContext,
60 MD5_Begin,
61 MD5_Update,
62 MD5_End,
63 MD5_FlattenSize,
64 MD5_Flatten,
65 MD5_Resurrect,
66 MD5_TraceState,
67 MD2_Hash,
68 MD2_NewContext,
69 MD2_DestroyContext,
70 MD2_Begin,
71 MD2_Update,
72 MD2_End,
73 MD2_FlattenSize,
74 MD2_Flatten,
75 MD2_Resurrect,
76 SHA1_Hash,
77 SHA1_HashBuf,
78 SHA1_NewContext,
79 SHA1_DestroyContext,
80 SHA1_Begin,
81 SHA1_Update,
82 SHA1_End,
83 SHA1_TraceState,
84 SHA1_FlattenSize,
85 SHA1_Flatten,
86 SHA1_Resurrect,
87 RNG_RNGInit,
88 RNG_RandomUpdate,
89 RNG_GenerateGlobalRandomBytes,
90 RNG_RNGShutdown,
91 PQG_ParamGen,
92 PQG_ParamGenSeedLen,
93 PQG_VerifyParams,
95 /* End of Version 3.001. */
97 RSA_PrivateKeyOpDoubleChecked,
98 RSA_PrivateKeyCheck,
99 BL_Cleanup,
101 /* End of Version 3.002. */
103 SHA256_NewContext,
104 SHA256_DestroyContext,
105 SHA256_Begin,
106 SHA256_Update,
107 SHA256_End,
108 SHA256_HashBuf,
109 SHA256_Hash,
110 SHA256_TraceState,
111 SHA256_FlattenSize,
112 SHA256_Flatten,
113 SHA256_Resurrect,
115 SHA512_NewContext,
116 SHA512_DestroyContext,
117 SHA512_Begin,
118 SHA512_Update,
119 SHA512_End,
120 SHA512_HashBuf,
121 SHA512_Hash,
122 SHA512_TraceState,
123 SHA512_FlattenSize,
124 SHA512_Flatten,
125 SHA512_Resurrect,
127 SHA384_NewContext,
128 SHA384_DestroyContext,
129 SHA384_Begin,
130 SHA384_Update,
131 SHA384_End,
132 SHA384_HashBuf,
133 SHA384_Hash,
134 SHA384_TraceState,
135 SHA384_FlattenSize,
136 SHA384_Flatten,
137 SHA384_Resurrect,
139 /* End of Version 3.003. */
141 AESKeyWrap_CreateContext,
142 AESKeyWrap_DestroyContext,
143 AESKeyWrap_Encrypt,
144 AESKeyWrap_Decrypt,
146 /* End of Version 3.004. */
148 BLAPI_SHVerify,
149 BLAPI_VerifySelf,
151 /* End of Version 3.005. */
153 EC_NewKey,
154 EC_NewKeyFromSeed,
155 EC_ValidatePublicKey,
156 ECDH_Derive,
157 ECDSA_SignDigest,
158 ECDSA_VerifyDigest,
159 ECDSA_SignDigestWithSeed,
161 /* End of Version 3.006. */
162 /* End of Version 3.007. */
164 AES_InitContext,
165 AESKeyWrap_InitContext,
166 DES_InitContext,
167 RC2_InitContext,
168 RC4_InitContext,
170 AES_AllocateContext,
171 AESKeyWrap_AllocateContext,
172 DES_AllocateContext,
173 RC2_AllocateContext,
174 RC4_AllocateContext,
176 MD2_Clone,
177 MD5_Clone,
178 SHA1_Clone,
179 SHA256_Clone,
180 SHA384_Clone,
181 SHA512_Clone,
183 TLS_PRF,
184 HASH_GetRawHashObject,
186 HMAC_Create,
187 HMAC_Init,
188 HMAC_Begin,
189 HMAC_Update,
190 HMAC_Clone,
191 HMAC_Finish,
192 HMAC_Destroy,
194 RNG_SystemInfoForRNG,
196 /* End of Version 3.008. */
198 FIPS186Change_GenerateX,
199 FIPS186Change_ReduceModQForDSA,
201 /* End of Version 3.009. */
202 Camellia_InitContext,
203 Camellia_AllocateContext,
204 Camellia_CreateContext,
205 Camellia_DestroyContext,
206 Camellia_Encrypt,
207 Camellia_Decrypt,
209 PQG_DestroyParams,
210 PQG_DestroyVerify,
212 /* End of Version 3.010. */
214 SEED_InitContext,
215 SEED_AllocateContext,
216 SEED_CreateContext,
217 SEED_DestroyContext,
218 SEED_Encrypt,
219 SEED_Decrypt,
221 BL_Init,
222 BL_SetForkState,
224 PRNGTEST_Instantiate,
225 PRNGTEST_Reseed,
226 PRNGTEST_Generate,
228 PRNGTEST_Uninstantiate,
230 /* End of Version 3.011. */
232 RSA_PopulatePrivateKey,
234 DSA_NewRandom,
236 JPAKE_Sign,
237 JPAKE_Verify,
238 JPAKE_Round2,
239 JPAKE_Final,
241 /* End of Version 3.012 */
243 TLS_P_hash,
244 SHA224_NewContext,
245 SHA224_DestroyContext,
246 SHA224_Begin,
247 SHA224_Update,
248 SHA224_End,
249 SHA224_HashBuf,
250 SHA224_Hash,
251 SHA224_TraceState,
252 SHA224_FlattenSize,
253 SHA224_Flatten,
254 SHA224_Resurrect,
255 SHA224_Clone,
256 BLAPI_SHVerifyFile,
258 /* End of Version 3.013 */
260 PQG_ParamGenV2,
261 PRNGTEST_RunHealthTests,
263 /* End of Version 3.014 */
265 HMAC_ConstantTime,
266 SSLv3_MAC_ConstantTime,
268 /* End of Version 3.015 */
270 RSA_SignRaw,
271 RSA_CheckSignRaw,
272 RSA_CheckSignRecoverRaw,
273 RSA_EncryptRaw,
274 RSA_DecryptRaw,
275 RSA_EncryptOAEP,
276 RSA_DecryptOAEP,
277 RSA_EncryptBlock,
278 RSA_DecryptBlock,
279 RSA_SignPSS,
280 RSA_CheckSignPSS,
281 RSA_Sign,
282 RSA_CheckSign,
283 RSA_CheckSignRecover,
285 /* End of Version 3.016 */
287 EC_FillParams,
288 EC_DecodeParams,
289 EC_CopyParams
291 /* End of Version 3.017 */
292 };
294 const FREEBLVector *
295 FREEBL_GetVector(void)
296 {
297 extern const char __nss_freebl_rcsid[];
298 extern const char __nss_freebl_sccsid[];
300 /* force a reference that won't get optimized away */
301 volatile char c;
303 c = __nss_freebl_rcsid[0] + __nss_freebl_sccsid[0];
304 #ifdef FREEBL_NO_DEPEND
305 FREEBL_InitStubs();
306 #endif
307 return &vector;
308 }