Back to index

lightning-sunbird  0.9+nobinonly
ldvector.c
Go to the documentation of this file.
00001 /*
00002  * ldvector.c - platform dependent DSO containing freebl implementation.
00003  *
00004  * ***** BEGIN LICENSE BLOCK *****
00005  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00006  *
00007  * The contents of this file are subject to the Mozilla Public License Version
00008  * 1.1 (the "License"); you may not use this file except in compliance with
00009  * the License. You may obtain a copy of the License at
00010  * http://www.mozilla.org/MPL/
00011  *
00012  * Software distributed under the License is distributed on an "AS IS" basis,
00013  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00014  * for the specific language governing rights and limitations under the
00015  * License.
00016  *
00017  * The Original Code is the Netscape security libraries.
00018  *
00019  * The Initial Developer of the Original Code is
00020  * Netscape Communications Corporation.
00021  * Portions created by the Initial Developer are Copyright (C) 2000
00022  * the Initial Developer. All Rights Reserved.
00023  *
00024  * Contributor(s):
00025  *   Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories
00026  *
00027  * Alternatively, the contents of this file may be used under the terms of
00028  * either the GNU General Public License Version 2 or later (the "GPL"), or
00029  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00030  * in which case the provisions of the GPL or the LGPL are applicable instead
00031  * of those above. If you wish to allow use of your version of this file only
00032  * under the terms of either the GPL or the LGPL, and not to allow others to
00033  * use your version of this file under the terms of the MPL, indicate your
00034  * decision by deleting the provisions above and replace them with the notice
00035  * and other provisions required by the GPL or the LGPL. If you do not delete
00036  * the provisions above, a recipient may use your version of this file under
00037  * the terms of any one of the MPL, the GPL or the LGPL.
00038  *
00039  * ***** END LICENSE BLOCK ***** */
00040 /* $Id: ldvector.c,v 1.13.2.1 2006/02/01 21:24:45 wtchang%redhat.com Exp $ */
00041 
00042 #include "loader.h"
00043 #include "alghmac.h"
00044 
00045 static const struct FREEBLVectorStr vector = 
00046 {
00047 
00048     sizeof vector,
00049     FREEBL_VERSION,
00050 
00051     RSA_NewKey,
00052     RSA_PublicKeyOp,
00053     RSA_PrivateKeyOp,
00054     DSA_NewKey,
00055     DSA_SignDigest,
00056     DSA_VerifyDigest,
00057     DSA_NewKeyFromSeed,
00058     DSA_SignDigestWithSeed,
00059     DH_GenParam,
00060     DH_NewKey,
00061     DH_Derive,
00062     KEA_Derive,
00063     KEA_Verify,
00064     RC4_CreateContext,
00065     RC4_DestroyContext,
00066     RC4_Encrypt,
00067     RC4_Decrypt,
00068     RC2_CreateContext,
00069     RC2_DestroyContext,
00070     RC2_Encrypt,
00071     RC2_Decrypt,
00072     RC5_CreateContext,
00073     RC5_DestroyContext,
00074     RC5_Encrypt,
00075     RC5_Decrypt,
00076     DES_CreateContext,
00077     DES_DestroyContext,
00078     DES_Encrypt,
00079     DES_Decrypt,
00080     AES_CreateContext,
00081     AES_DestroyContext,
00082     AES_Encrypt,
00083     AES_Decrypt,
00084     MD5_Hash,
00085     MD5_HashBuf,
00086     MD5_NewContext,
00087     MD5_DestroyContext,
00088     MD5_Begin,
00089     MD5_Update,
00090     MD5_End,
00091     MD5_FlattenSize,
00092     MD5_Flatten,
00093     MD5_Resurrect,
00094     MD5_TraceState,
00095     MD2_Hash,
00096     MD2_NewContext,
00097     MD2_DestroyContext,
00098     MD2_Begin,
00099     MD2_Update,
00100     MD2_End,
00101     MD2_FlattenSize,
00102     MD2_Flatten,
00103     MD2_Resurrect,
00104     SHA1_Hash,
00105     SHA1_HashBuf,
00106     SHA1_NewContext,
00107     SHA1_DestroyContext,
00108     SHA1_Begin,
00109     SHA1_Update,
00110     SHA1_End,
00111     SHA1_TraceState,
00112     SHA1_FlattenSize,
00113     SHA1_Flatten,
00114     SHA1_Resurrect,
00115     RNG_RNGInit,
00116     RNG_RandomUpdate,
00117     RNG_GenerateGlobalRandomBytes,
00118     RNG_RNGShutdown,
00119     PQG_ParamGen,
00120     PQG_ParamGenSeedLen,
00121     PQG_VerifyParams,
00122 
00123     /* End of Version 3.001. */
00124 
00125     RSA_PrivateKeyOpDoubleChecked,
00126     RSA_PrivateKeyCheck,
00127     BL_Cleanup,
00128 
00129     /* End of Version 3.002. */
00130 
00131     SHA256_NewContext,
00132     SHA256_DestroyContext,
00133     SHA256_Begin,
00134     SHA256_Update,
00135     SHA256_End,
00136     SHA256_HashBuf,
00137     SHA256_Hash,
00138     SHA256_TraceState,
00139     SHA256_FlattenSize,
00140     SHA256_Flatten,
00141     SHA256_Resurrect,
00142 
00143     SHA512_NewContext,
00144     SHA512_DestroyContext,
00145     SHA512_Begin,
00146     SHA512_Update,
00147     SHA512_End,
00148     SHA512_HashBuf,
00149     SHA512_Hash,
00150     SHA512_TraceState,
00151     SHA512_FlattenSize,
00152     SHA512_Flatten,
00153     SHA512_Resurrect,
00154 
00155     SHA384_NewContext,
00156     SHA384_DestroyContext,
00157     SHA384_Begin,
00158     SHA384_Update,
00159     SHA384_End,
00160     SHA384_HashBuf,
00161     SHA384_Hash,
00162     SHA384_TraceState,
00163     SHA384_FlattenSize,
00164     SHA384_Flatten,
00165     SHA384_Resurrect,
00166 
00167     /* End of Version 3.003. */
00168 
00169     AESKeyWrap_CreateContext,
00170     AESKeyWrap_DestroyContext,
00171     AESKeyWrap_Encrypt,
00172     AESKeyWrap_Decrypt,
00173 
00174     /* End of Version 3.004. */
00175 
00176     BLAPI_SHVerify,
00177     BLAPI_VerifySelf,
00178 
00179     /* End of Version 3.005. */
00180 
00181     EC_NewKey,
00182     EC_NewKeyFromSeed,
00183     EC_ValidatePublicKey,
00184     ECDH_Derive,
00185     ECDSA_SignDigest,
00186     ECDSA_VerifyDigest,
00187     ECDSA_SignDigestWithSeed,
00188 
00189     /* End of Version 3.006. */
00190     /* End of Version 3.007. */
00191 
00192     AES_InitContext,
00193     AESKeyWrap_InitContext,
00194     DES_InitContext,
00195     RC2_InitContext,
00196     RC4_InitContext,
00197 
00198     AES_AllocateContext,
00199     AESKeyWrap_AllocateContext,
00200     DES_AllocateContext,
00201     RC2_AllocateContext,
00202     RC4_AllocateContext,
00203 
00204     MD2_Clone,
00205     MD5_Clone,
00206     SHA1_Clone,
00207     SHA256_Clone,
00208     SHA384_Clone,
00209     SHA512_Clone,
00210 
00211     TLS_PRF,
00212     HASH_GetRawHashObject,
00213 
00214     HMAC_Create,
00215     HMAC_Init,
00216     HMAC_Begin,
00217     HMAC_Update,
00218     HMAC_Clone,
00219     HMAC_Finish,
00220     HMAC_Destroy,
00221 
00222     RNG_SystemInfoForRNG,
00223 
00224     /* End of Version 3.008. */
00225 
00226     FIPS186Change_GenerateX,
00227     FIPS186Change_ReduceModQForDSA,
00228 
00229     /* End of Version 3.009. */
00230 };
00231 
00232 const FREEBLVector * 
00233 FREEBL_GetVector(void)
00234 {
00235     extern const char __nss_freebl_rcsid[];
00236     extern const char __nss_freebl_sccsid[];
00237 
00238     /* force a reference that won't get optimized away */
00239     volatile char c = __nss_freebl_rcsid[0] + __nss_freebl_sccsid[0]; 
00240 
00241     return &vector;
00242 }
00243