security/nss/lib/freebl/ldvector.c

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/freebl/ldvector.c	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,309 @@
     1.4 +/*
     1.5 + * ldvector.c - platform dependent DSO containing freebl implementation.
     1.6 + *
     1.7 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +#ifdef FREEBL_NO_DEPEND
    1.12 +extern int FREEBL_InitStubs(void);
    1.13 +#endif
    1.14 +
    1.15 +#include "loader.h"
    1.16 +#include "alghmac.h"
    1.17 +#include "hmacct.h"
    1.18 +
    1.19 +
    1.20 +static const struct FREEBLVectorStr vector = 
    1.21 +{
    1.22 +
    1.23 +    sizeof vector,
    1.24 +    FREEBL_VERSION,
    1.25 +
    1.26 +    RSA_NewKey,
    1.27 +    RSA_PublicKeyOp,
    1.28 +    RSA_PrivateKeyOp,
    1.29 +    DSA_NewKey,
    1.30 +    DSA_SignDigest,
    1.31 +    DSA_VerifyDigest,
    1.32 +    DSA_NewKeyFromSeed,
    1.33 +    DSA_SignDigestWithSeed,
    1.34 +    DH_GenParam,
    1.35 +    DH_NewKey,
    1.36 +    DH_Derive,
    1.37 +    KEA_Derive,
    1.38 +    KEA_Verify,
    1.39 +    RC4_CreateContext,
    1.40 +    RC4_DestroyContext,
    1.41 +    RC4_Encrypt,
    1.42 +    RC4_Decrypt,
    1.43 +    RC2_CreateContext,
    1.44 +    RC2_DestroyContext,
    1.45 +    RC2_Encrypt,
    1.46 +    RC2_Decrypt,
    1.47 +    RC5_CreateContext,
    1.48 +    RC5_DestroyContext,
    1.49 +    RC5_Encrypt,
    1.50 +    RC5_Decrypt,
    1.51 +    DES_CreateContext,
    1.52 +    DES_DestroyContext,
    1.53 +    DES_Encrypt,
    1.54 +    DES_Decrypt,
    1.55 +    AES_CreateContext,
    1.56 +    AES_DestroyContext,
    1.57 +    AES_Encrypt,
    1.58 +    AES_Decrypt,
    1.59 +    MD5_Hash,
    1.60 +    MD5_HashBuf,
    1.61 +    MD5_NewContext,
    1.62 +    MD5_DestroyContext,
    1.63 +    MD5_Begin,
    1.64 +    MD5_Update,
    1.65 +    MD5_End,
    1.66 +    MD5_FlattenSize,
    1.67 +    MD5_Flatten,
    1.68 +    MD5_Resurrect,
    1.69 +    MD5_TraceState,
    1.70 +    MD2_Hash,
    1.71 +    MD2_NewContext,
    1.72 +    MD2_DestroyContext,
    1.73 +    MD2_Begin,
    1.74 +    MD2_Update,
    1.75 +    MD2_End,
    1.76 +    MD2_FlattenSize,
    1.77 +    MD2_Flatten,
    1.78 +    MD2_Resurrect,
    1.79 +    SHA1_Hash,
    1.80 +    SHA1_HashBuf,
    1.81 +    SHA1_NewContext,
    1.82 +    SHA1_DestroyContext,
    1.83 +    SHA1_Begin,
    1.84 +    SHA1_Update,
    1.85 +    SHA1_End,
    1.86 +    SHA1_TraceState,
    1.87 +    SHA1_FlattenSize,
    1.88 +    SHA1_Flatten,
    1.89 +    SHA1_Resurrect,
    1.90 +    RNG_RNGInit,
    1.91 +    RNG_RandomUpdate,
    1.92 +    RNG_GenerateGlobalRandomBytes,
    1.93 +    RNG_RNGShutdown,
    1.94 +    PQG_ParamGen,
    1.95 +    PQG_ParamGenSeedLen,
    1.96 +    PQG_VerifyParams,
    1.97 +
    1.98 +    /* End of Version 3.001. */
    1.99 +
   1.100 +    RSA_PrivateKeyOpDoubleChecked,
   1.101 +    RSA_PrivateKeyCheck,
   1.102 +    BL_Cleanup,
   1.103 +
   1.104 +    /* End of Version 3.002. */
   1.105 +
   1.106 +    SHA256_NewContext,
   1.107 +    SHA256_DestroyContext,
   1.108 +    SHA256_Begin,
   1.109 +    SHA256_Update,
   1.110 +    SHA256_End,
   1.111 +    SHA256_HashBuf,
   1.112 +    SHA256_Hash,
   1.113 +    SHA256_TraceState,
   1.114 +    SHA256_FlattenSize,
   1.115 +    SHA256_Flatten,
   1.116 +    SHA256_Resurrect,
   1.117 +
   1.118 +    SHA512_NewContext,
   1.119 +    SHA512_DestroyContext,
   1.120 +    SHA512_Begin,
   1.121 +    SHA512_Update,
   1.122 +    SHA512_End,
   1.123 +    SHA512_HashBuf,
   1.124 +    SHA512_Hash,
   1.125 +    SHA512_TraceState,
   1.126 +    SHA512_FlattenSize,
   1.127 +    SHA512_Flatten,
   1.128 +    SHA512_Resurrect,
   1.129 +
   1.130 +    SHA384_NewContext,
   1.131 +    SHA384_DestroyContext,
   1.132 +    SHA384_Begin,
   1.133 +    SHA384_Update,
   1.134 +    SHA384_End,
   1.135 +    SHA384_HashBuf,
   1.136 +    SHA384_Hash,
   1.137 +    SHA384_TraceState,
   1.138 +    SHA384_FlattenSize,
   1.139 +    SHA384_Flatten,
   1.140 +    SHA384_Resurrect,
   1.141 +
   1.142 +    /* End of Version 3.003. */
   1.143 +
   1.144 +    AESKeyWrap_CreateContext,
   1.145 +    AESKeyWrap_DestroyContext,
   1.146 +    AESKeyWrap_Encrypt,
   1.147 +    AESKeyWrap_Decrypt,
   1.148 +
   1.149 +    /* End of Version 3.004. */
   1.150 +
   1.151 +    BLAPI_SHVerify,
   1.152 +    BLAPI_VerifySelf,
   1.153 +
   1.154 +    /* End of Version 3.005. */
   1.155 +
   1.156 +    EC_NewKey,
   1.157 +    EC_NewKeyFromSeed,
   1.158 +    EC_ValidatePublicKey,
   1.159 +    ECDH_Derive,
   1.160 +    ECDSA_SignDigest,
   1.161 +    ECDSA_VerifyDigest,
   1.162 +    ECDSA_SignDigestWithSeed,
   1.163 +
   1.164 +    /* End of Version 3.006. */
   1.165 +    /* End of Version 3.007. */
   1.166 +
   1.167 +    AES_InitContext,
   1.168 +    AESKeyWrap_InitContext,
   1.169 +    DES_InitContext,
   1.170 +    RC2_InitContext,
   1.171 +    RC4_InitContext,
   1.172 +
   1.173 +    AES_AllocateContext,
   1.174 +    AESKeyWrap_AllocateContext,
   1.175 +    DES_AllocateContext,
   1.176 +    RC2_AllocateContext,
   1.177 +    RC4_AllocateContext,
   1.178 +
   1.179 +    MD2_Clone,
   1.180 +    MD5_Clone,
   1.181 +    SHA1_Clone,
   1.182 +    SHA256_Clone,
   1.183 +    SHA384_Clone,
   1.184 +    SHA512_Clone,
   1.185 +
   1.186 +    TLS_PRF,
   1.187 +    HASH_GetRawHashObject,
   1.188 +
   1.189 +    HMAC_Create,
   1.190 +    HMAC_Init,
   1.191 +    HMAC_Begin,
   1.192 +    HMAC_Update,
   1.193 +    HMAC_Clone,
   1.194 +    HMAC_Finish,
   1.195 +    HMAC_Destroy,
   1.196 +
   1.197 +    RNG_SystemInfoForRNG,
   1.198 +
   1.199 +    /* End of Version 3.008. */
   1.200 +
   1.201 +    FIPS186Change_GenerateX,
   1.202 +    FIPS186Change_ReduceModQForDSA,
   1.203 +
   1.204 +    /* End of Version 3.009. */
   1.205 +    Camellia_InitContext,
   1.206 +    Camellia_AllocateContext,
   1.207 +    Camellia_CreateContext,
   1.208 +    Camellia_DestroyContext,
   1.209 +    Camellia_Encrypt,
   1.210 +    Camellia_Decrypt,
   1.211 +
   1.212 +    PQG_DestroyParams,
   1.213 +    PQG_DestroyVerify,
   1.214 +
   1.215 +    /* End of Version 3.010. */
   1.216 +
   1.217 +    SEED_InitContext,
   1.218 +    SEED_AllocateContext,
   1.219 +    SEED_CreateContext,
   1.220 +    SEED_DestroyContext,
   1.221 +    SEED_Encrypt,
   1.222 +    SEED_Decrypt,
   1.223 +
   1.224 +    BL_Init,
   1.225 +    BL_SetForkState,
   1.226 +
   1.227 +    PRNGTEST_Instantiate,
   1.228 +    PRNGTEST_Reseed,
   1.229 +    PRNGTEST_Generate,
   1.230 +
   1.231 +    PRNGTEST_Uninstantiate,
   1.232 +
   1.233 +    /* End of Version 3.011. */
   1.234 +
   1.235 +    RSA_PopulatePrivateKey,
   1.236 +
   1.237 +    DSA_NewRandom,
   1.238 +
   1.239 +    JPAKE_Sign,
   1.240 +    JPAKE_Verify,
   1.241 +    JPAKE_Round2,
   1.242 +    JPAKE_Final,
   1.243 +
   1.244 +    /* End of Version 3.012 */
   1.245 +
   1.246 +    TLS_P_hash,
   1.247 +    SHA224_NewContext,
   1.248 +    SHA224_DestroyContext,
   1.249 +    SHA224_Begin,
   1.250 +    SHA224_Update,
   1.251 +    SHA224_End,
   1.252 +    SHA224_HashBuf,
   1.253 +    SHA224_Hash,
   1.254 +    SHA224_TraceState,
   1.255 +    SHA224_FlattenSize,
   1.256 +    SHA224_Flatten,
   1.257 +    SHA224_Resurrect,
   1.258 +    SHA224_Clone,
   1.259 +    BLAPI_SHVerifyFile,
   1.260 +
   1.261 +    /* End of Version 3.013 */
   1.262 +
   1.263 +    PQG_ParamGenV2,
   1.264 +    PRNGTEST_RunHealthTests,
   1.265 +
   1.266 +    /* End of Version 3.014 */
   1.267 +
   1.268 +    HMAC_ConstantTime,
   1.269 +    SSLv3_MAC_ConstantTime,
   1.270 +
   1.271 +    /* End of Version 3.015 */
   1.272 +
   1.273 +    RSA_SignRaw,
   1.274 +    RSA_CheckSignRaw,
   1.275 +    RSA_CheckSignRecoverRaw,
   1.276 +    RSA_EncryptRaw,
   1.277 +    RSA_DecryptRaw,
   1.278 +    RSA_EncryptOAEP,
   1.279 +    RSA_DecryptOAEP,
   1.280 +    RSA_EncryptBlock,
   1.281 +    RSA_DecryptBlock,
   1.282 +    RSA_SignPSS,
   1.283 +    RSA_CheckSignPSS,
   1.284 +    RSA_Sign,
   1.285 +    RSA_CheckSign,
   1.286 +    RSA_CheckSignRecover,
   1.287 +
   1.288 +    /* End of Version 3.016 */
   1.289 +
   1.290 +    EC_FillParams,
   1.291 +    EC_DecodeParams,
   1.292 +    EC_CopyParams
   1.293 +
   1.294 +    /* End of Version 3.017 */
   1.295 +};
   1.296 +
   1.297 +const FREEBLVector *
   1.298 +FREEBL_GetVector(void)
   1.299 +{
   1.300 +    extern const char __nss_freebl_rcsid[];
   1.301 +    extern const char __nss_freebl_sccsid[];
   1.302 +
   1.303 +    /* force a reference that won't get optimized away */
   1.304 +    volatile char c;
   1.305 +
   1.306 +    c = __nss_freebl_rcsid[0] + __nss_freebl_sccsid[0];
   1.307 +#ifdef FREEBL_NO_DEPEND
   1.308 +    FREEBL_InitStubs();
   1.309 +#endif
   1.310 +    return &vector;
   1.311 +}
   1.312 +

mercurial