diff options
author | steve <steve> | 2011-10-22 17:24:25 +0000 |
---|---|---|
committer | steve <steve> | 2011-10-22 17:24:25 +0000 |
commit | 29969e0dadda7491eefc1ce583409a1d9010ec4b (patch) | |
tree | b68a4ba02eb89923e5731adadd82b8aafbaf5920 /fips | |
parent | 74172306089d751ec46d83051d5f746ef5d0fb24 (diff) | |
download | openssl-29969e0dadda7491eefc1ce583409a1d9010ec4b.tar.gz |
Check for selftest failure in various places.
Diffstat (limited to 'fips')
-rw-r--r-- | fips/fips.h | 4 | ||||
-rw-r--r-- | fips/rand/fips_drbg_lib.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/fips/fips.h b/fips/fips.h index 06809c7dc..4cadbd26f 100644 --- a/fips/fips.h +++ b/fips/fips.h @@ -349,6 +349,10 @@ void ERR_load_FIPS_strings(void); #define FIPS_F_DSA_BUILTIN_PARAMGEN2 102 #define FIPS_F_DSA_DO_SIGN 103 #define FIPS_F_DSA_DO_VERIFY 104 +#define FIPS_F_ECDH_COMPUTE_KEY 163 +#define FIPS_F_ECDSA_DO_SIGN 164 +#define FIPS_F_ECDSA_DO_VERIFY 165 +#define FIPS_F_EC_KEY_GENERATE_KEY 166 #define FIPS_F_FIPS_CHECK_DSA 105 #define FIPS_F_FIPS_CHECK_DSA_PRNG 151 #define FIPS_F_FIPS_CHECK_EC 106 diff --git a/fips/rand/fips_drbg_lib.c b/fips/rand/fips_drbg_lib.c index 32e4b83c5..1596977fd 100644 --- a/fips/rand/fips_drbg_lib.c +++ b/fips/rand/fips_drbg_lib.c @@ -386,6 +386,12 @@ int FIPS_drbg_generate(DRBG_CTX *dctx, unsigned char *out, size_t outlen, { int r = 0; + if (FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_FIPS_DRBG_GENERATE, FIPS_R_SELFTEST_FAILED); + return 0; + } + if (!fips_drbg_check(dctx)) return 0; |