Loading fips/fips.c +11 −9 Original line number Original line Diff line number Diff line Loading @@ -449,14 +449,20 @@ int fips_pkey_signature_test(EVP_PKEY *pkey, if (!esig) if (!esig) goto error; goto error; } } #if 0 else if (!EVP_SignFinal(&mctx, sig, &siglen, pkey)) goto error; #endif if (kat && ((siglen != katlen) || memcmp(kat, sig, katlen))) if (kat && ((siglen != katlen) || memcmp(kat, sig, katlen))) goto error; goto error; #if 0 { /* Debug code to print out self test KAT discrepancies */ unsigned int i; fprintf(stderr, "%s=", fail_str); for (i = 0; i < siglen; i++) fprintf(stderr, "%02X", sig[i]); fprintf(stderr, "\n"); goto error; } #endif if (!FIPS_digestinit(&mctx, digest)) if (!FIPS_digestinit(&mctx, digest)) goto error; goto error; if (!FIPS_digestupdate(&mctx, tbs, tbslen)) if (!FIPS_digestupdate(&mctx, tbs, tbslen)) Loading @@ -474,10 +480,6 @@ int fips_pkey_signature_test(EVP_PKEY *pkey, { { ret = FIPS_ecdsa_verify_ctx(pkey->pkey.ec, &mctx, esig); ret = FIPS_ecdsa_verify_ctx(pkey->pkey.ec, &mctx, esig); } } #if 0 else ret = EVP_VerifyFinal(&mctx, sig, siglen, pkey); #endif error: error: if (dsig != NULL) if (dsig != NULL) Loading fips/fips_locl.h +5 −1 Original line number Original line Diff line number Diff line /* ==================================================================== /* ==================================================================== * Copyright (c) 2003 The OpenSSL Project. All rights reserved. * Copyright (c) 2011 The OpenSSL Project. All rights reserved. * * * Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions Loading Loading @@ -54,6 +54,10 @@ extern "C" { #endif #endif #define FIPS_MAX_CIPHER_TEST_SIZE 16 #define FIPS_MAX_CIPHER_TEST_SIZE 16 #define fips_load_key_component(key, comp, pre) \ key->comp = BN_bin2bn(pre##_##comp, sizeof(pre##_##comp), key->comp); \ if (!key->comp) \ goto err #ifdef __cplusplus #ifdef __cplusplus } } Loading fips/rsa/fips_rsa_selftest.c +156 −335 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
fips/fips.c +11 −9 Original line number Original line Diff line number Diff line Loading @@ -449,14 +449,20 @@ int fips_pkey_signature_test(EVP_PKEY *pkey, if (!esig) if (!esig) goto error; goto error; } } #if 0 else if (!EVP_SignFinal(&mctx, sig, &siglen, pkey)) goto error; #endif if (kat && ((siglen != katlen) || memcmp(kat, sig, katlen))) if (kat && ((siglen != katlen) || memcmp(kat, sig, katlen))) goto error; goto error; #if 0 { /* Debug code to print out self test KAT discrepancies */ unsigned int i; fprintf(stderr, "%s=", fail_str); for (i = 0; i < siglen; i++) fprintf(stderr, "%02X", sig[i]); fprintf(stderr, "\n"); goto error; } #endif if (!FIPS_digestinit(&mctx, digest)) if (!FIPS_digestinit(&mctx, digest)) goto error; goto error; if (!FIPS_digestupdate(&mctx, tbs, tbslen)) if (!FIPS_digestupdate(&mctx, tbs, tbslen)) Loading @@ -474,10 +480,6 @@ int fips_pkey_signature_test(EVP_PKEY *pkey, { { ret = FIPS_ecdsa_verify_ctx(pkey->pkey.ec, &mctx, esig); ret = FIPS_ecdsa_verify_ctx(pkey->pkey.ec, &mctx, esig); } } #if 0 else ret = EVP_VerifyFinal(&mctx, sig, siglen, pkey); #endif error: error: if (dsig != NULL) if (dsig != NULL) Loading
fips/fips_locl.h +5 −1 Original line number Original line Diff line number Diff line /* ==================================================================== /* ==================================================================== * Copyright (c) 2003 The OpenSSL Project. All rights reserved. * Copyright (c) 2011 The OpenSSL Project. All rights reserved. * * * Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions Loading Loading @@ -54,6 +54,10 @@ extern "C" { #endif #endif #define FIPS_MAX_CIPHER_TEST_SIZE 16 #define FIPS_MAX_CIPHER_TEST_SIZE 16 #define fips_load_key_component(key, comp, pre) \ key->comp = BN_bin2bn(pre##_##comp, sizeof(pre##_##comp), key->comp); \ if (!key->comp) \ goto err #ifdef __cplusplus #ifdef __cplusplus } } Loading
fips/rsa/fips_rsa_selftest.c +156 −335 File changed.Preview size limit exceeded, changes collapsed. Show changes