Loading fips-1.0/dsa/fips_dsa_key.c +2 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ #include <openssl/err.h> #include <openssl/evp.h> #include <openssl/fips.h> #include "fips_locl.h" #ifdef OPENSSL_FIPS Loading @@ -81,6 +82,7 @@ int fips_check_dsa(DSA *dsa) NULL, 0, EVP_dss1(), 0, NULL)) { FIPSerr(FIPS_F_FIPS_CHECK_DSA,FIPS_R_PAIRWISE_TEST_FAILED); fips_set_selftest_fail(); return 0; } return 1; Loading fips-1.0/fips.c +5 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,11 @@ void FIPS_selftest_check(void) } } void fips_set_selftest_fail(void) { fips_selftest_fail = 1; } int FIPS_selftest() { Loading fips-1.0/fips_locl.h +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ int fips_is_started(void); void fips_set_started(void); int fips_is_owning_thread(void); int fips_set_owning_thread(void); void fips_set_selftest_fail(void); int fips_clear_owning_thread(void); unsigned char *fips_signature_witness(void); Loading fips-1.0/fips_test_suite.c +2 −2 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ static int FIPS_dsa_test() dsa = FIPS_dsa_new(); if (!dsa) goto end; if (!DSA_generate_parameters_ex(dsa, 512,NULL,0,NULL,NULL,NULL)) if (!DSA_generate_parameters_ex(dsa, 1024,NULL,0,NULL,NULL,NULL)) goto end; if (!DSA_generate_key(dsa)) goto end; Loading Loading @@ -354,7 +354,7 @@ static int dh_test() dh = FIPS_dh_new(); if (!dh) return 0; if (!DH_generate_parameters_ex(dh, 256, 2, NULL)) if (!DH_generate_parameters_ex(dh, 1024, 2, NULL)) return 0; FIPS_dh_free(dh); return 1; Loading fips-1.0/rand/fips_rand.c +3 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ #endif #include <string.h> #include <openssl/fips.h> #include "fips_locl.h" #ifdef OPENSSL_FIPS Loading Loading @@ -294,12 +295,14 @@ static int fips_rand(FIPS_PRNG_CTX *ctx, for (i = 0; i < AES_BLOCK_LENGTH; i++) tmp[i] = R[i] ^ I[i]; AES_encrypt(tmp, ctx->V, &ctx->ks); /* Continuouse PRNG test */ if (ctx->second) { if (!memcmp(R, ctx->last, AES_BLOCK_LENGTH)) { RANDerr(RAND_F_FIPS_RAND,RAND_R_PRNG_STUCK); ctx->error = 1; fips_set_selftest_fail(); return 0; } } Loading Loading
fips-1.0/dsa/fips_dsa_key.c +2 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ #include <openssl/err.h> #include <openssl/evp.h> #include <openssl/fips.h> #include "fips_locl.h" #ifdef OPENSSL_FIPS Loading @@ -81,6 +82,7 @@ int fips_check_dsa(DSA *dsa) NULL, 0, EVP_dss1(), 0, NULL)) { FIPSerr(FIPS_F_FIPS_CHECK_DSA,FIPS_R_PAIRWISE_TEST_FAILED); fips_set_selftest_fail(); return 0; } return 1; Loading
fips-1.0/fips.c +5 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,11 @@ void FIPS_selftest_check(void) } } void fips_set_selftest_fail(void) { fips_selftest_fail = 1; } int FIPS_selftest() { Loading
fips-1.0/fips_locl.h +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ int fips_is_started(void); void fips_set_started(void); int fips_is_owning_thread(void); int fips_set_owning_thread(void); void fips_set_selftest_fail(void); int fips_clear_owning_thread(void); unsigned char *fips_signature_witness(void); Loading
fips-1.0/fips_test_suite.c +2 −2 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ static int FIPS_dsa_test() dsa = FIPS_dsa_new(); if (!dsa) goto end; if (!DSA_generate_parameters_ex(dsa, 512,NULL,0,NULL,NULL,NULL)) if (!DSA_generate_parameters_ex(dsa, 1024,NULL,0,NULL,NULL,NULL)) goto end; if (!DSA_generate_key(dsa)) goto end; Loading Loading @@ -354,7 +354,7 @@ static int dh_test() dh = FIPS_dh_new(); if (!dh) return 0; if (!DH_generate_parameters_ex(dh, 256, 2, NULL)) if (!DH_generate_parameters_ex(dh, 1024, 2, NULL)) return 0; FIPS_dh_free(dh); return 1; Loading
fips-1.0/rand/fips_rand.c +3 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ #endif #include <string.h> #include <openssl/fips.h> #include "fips_locl.h" #ifdef OPENSSL_FIPS Loading Loading @@ -294,12 +295,14 @@ static int fips_rand(FIPS_PRNG_CTX *ctx, for (i = 0; i < AES_BLOCK_LENGTH; i++) tmp[i] = R[i] ^ I[i]; AES_encrypt(tmp, ctx->V, &ctx->ks); /* Continuouse PRNG test */ if (ctx->second) { if (!memcmp(R, ctx->last, AES_BLOCK_LENGTH)) { RANDerr(RAND_F_FIPS_RAND,RAND_R_PRNG_STUCK); ctx->error = 1; fips_set_selftest_fail(); return 0; } } Loading