OLD | NEW |
1 /* | 1 /* |
2 * PKCS #11 FIPS Power-Up Self Test. | 2 * PKCS #11 FIPS Power-Up Self Test. |
3 * | 3 * |
4 * This Source Code Form is subject to the terms of the Mozilla Public | 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 | 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/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
7 | 7 |
8 #include "softoken.h" /* Required for RC2-ECB, RC2-CBC, RC4, DES-ECB, */ | 8 #include "softoken.h" /* Required for RC2-ECB, RC2-CBC, RC4, DES-ECB, */ |
9 /* DES-CBC, DES3-ECB, DES3-CBC, RSA */ | 9 /* DES-CBC, DES3-ECB, DES3-CBC, RSA */ |
10 /* and DSA. */ | 10 /* and DSA. */ |
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 | 1505 |
1506 /* RSA variables. */ | 1506 /* RSA variables. */ |
1507 #ifdef CREATE_TEMP_ARENAS | 1507 #ifdef CREATE_TEMP_ARENAS |
1508 PLArenaPool * rsa_public_arena; | 1508 PLArenaPool * rsa_public_arena; |
1509 PLArenaPool * rsa_private_arena; | 1509 PLArenaPool * rsa_private_arena; |
1510 #endif | 1510 #endif |
1511 NSSLOWKEYPublicKey * rsa_public_key; | 1511 NSSLOWKEYPublicKey * rsa_public_key; |
1512 NSSLOWKEYPrivateKey * rsa_private_key; | 1512 NSSLOWKEYPrivateKey * rsa_private_key; |
1513 SECStatus rsa_status; | 1513 SECStatus rsa_status; |
1514 | 1514 |
1515 NSSLOWKEYPublicKey low_public_key = { NULL, NSSLOWKEYRSAKey, }; | 1515 NSSLOWKEYPublicKey low_public_key = { NULL, NSSLOWKEYRSAKey }; |
1516 NSSLOWKEYPrivateKey low_private_key = { NULL, NSSLOWKEYRSAKey, }; | 1516 NSSLOWKEYPrivateKey low_private_key = { NULL, NSSLOWKEYRSAKey }; |
1517 PRUint8 rsa_computed_ciphertext[FIPS_RSA_ENCRYPT_LENGTH]; | 1517 PRUint8 rsa_computed_ciphertext[FIPS_RSA_ENCRYPT_LENGTH]; |
1518 PRUint8 rsa_computed_plaintext[FIPS_RSA_DECRYPT_LENGTH]; | 1518 PRUint8 rsa_computed_plaintext[FIPS_RSA_DECRYPT_LENGTH]; |
1519 | 1519 |
1520 /****************************************/ | 1520 /****************************************/ |
1521 /* Compose RSA Public/Private Key Pair. */ | 1521 /* Compose RSA Public/Private Key Pair. */ |
1522 /****************************************/ | 1522 /****************************************/ |
1523 | 1523 |
1524 low_public_key.u.rsa = bl_public_key; | 1524 low_public_key.u.rsa = bl_public_key; |
1525 low_private_key.u.rsa = bl_private_key; | 1525 low_private_key.u.rsa = bl_private_key; |
1526 | 1526 |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 /* Software/Firmware Integrity Test. */ | 2091 /* Software/Firmware Integrity Test. */ |
2092 rv = sftk_fipsSoftwareIntegrityTest(); | 2092 rv = sftk_fipsSoftwareIntegrityTest(); |
2093 | 2093 |
2094 if( rv != CKR_OK ) | 2094 if( rv != CKR_OK ) |
2095 return rv; | 2095 return rv; |
2096 | 2096 |
2097 /* Passed Power-Up SelfTest(s). */ | 2097 /* Passed Power-Up SelfTest(s). */ |
2098 return( CKR_OK ); | 2098 return( CKR_OK ); |
2099 } | 2099 } |
2100 | 2100 |
OLD | NEW |