Back to index

lightning-sunbird  0.9+nobinonly
pk11test.h
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the Netscape security libraries.
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Netscape Communications Corporation.
00018  * Portions created by the Initial Developer are Copyright (C) 1994-2000
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 #ifndef PK11TEST_H
00037 #define PK11TEST_H
00038 
00039 #define REP_SYMKEY_MECHANISM CKM_DES_KEY_GEN
00040 
00041 /* symmetric key size in bytes */
00042 #define REP_SYMKEY_SIZE 8
00043 
00044 #define REP_PK_KEY_SIZE 1024
00045 #define REP_PLAINTEXT_LEN 8
00046 #define REP_MECHANISM mechanism[testId/2/2%46]
00047 #define REP_USE_CORRECT_PIN UseCorrectPin[testId%2]
00048 #define REP_KEYGEN_ON_TARGET KeyGenOnTarget[testId/2%2]
00049 #define CKM_NO_OP 0x80001111
00050 
00051 int testId = 0;
00052 
00053 PRBool UseCorrectPin[] = {
00054        PR_TRUE,
00055        PR_FALSE
00056 };
00057 
00058 PRBool KeyGenOnTarget[] = {
00059        PR_TRUE,
00060        PR_FALSE
00061 };
00062 
00063 CK_MECHANISM_TYPE mechanism[] = {
00064        CKM_NO_OP,
00065        CKM_RSA_PKCS,
00066        CKM_RSA_9796,
00067        CKM_RSA_X_509,
00068        CKM_MD2_RSA_PKCS,
00069        CKM_MD5_RSA_PKCS,
00070        CKM_SHA1_RSA_PKCS,
00071        CKM_DSA,
00072        CKM_DSA_SHA1,
00073        CKM_ECDSA,
00074        CKM_ECDSA_SHA1,
00075        CKM_RC2_ECB,
00076        CKM_RC2_CBC,
00077        CKM_RC4,
00078        CKM_RC5_ECB,
00079        CKM_RC5_CBC,
00080        CKM_DES_ECB,
00081        CKM_DES_CBC,
00082        CKM_DES3_ECB,
00083        CKM_DES3_CBC,
00084        CKM_CAST_ECB,
00085        CKM_CAST_CBC,
00086        CKM_CAST3_ECB,
00087        CKM_CAST3_CBC,
00088        CKM_CAST5_ECB,
00089        CKM_CAST5_CBC,
00090        CKM_IDEA_ECB,
00091        CKM_IDEA_CBC,
00092        CKM_CDMF_ECB,
00093        CKM_CDMF_CBC,
00094        CKM_SKIPJACK_ECB64,
00095        CKM_SKIPJACK_CBC64,
00096        CKM_SKIPJACK_OFB64,
00097        CKM_SKIPJACK_CFB64,
00098        CKM_SKIPJACK_CFB32,
00099        CKM_SKIPJACK_CFB16,
00100        CKM_SKIPJACK_CFB8,
00101        CKM_BATON_ECB128,
00102        CKM_BATON_ECB96,
00103        CKM_BATON_CBC128,
00104        CKM_BATON_COUNTER,
00105        CKM_BATON_SHUFFLE,
00106        CKM_JUNIPER_ECB128,
00107        CKM_JUNIPER_CBC128,
00108        CKM_JUNIPER_COUNTER,
00109        CKM_JUNIPER_SHUFFLE
00110 };
00111 
00112 
00113 
00114 #endif