diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-10-22 17:24:27 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-10-22 17:24:27 +0000 |
commit | 5fd722600b3c53f31900442b9a0f9d0ce7dfc629 (patch) | |
tree | 9cb09c51162dc8cf98c21a283a9598ea54d45607 /crypto/ecdh | |
parent | 5b198d5eea726b68925d5487a9c28b66b6d6a717 (diff) | |
download | openssl-5fd722600b3c53f31900442b9a0f9d0ce7dfc629.tar.gz |
Check for selftest failure in various places.
Diffstat (limited to 'crypto/ecdh')
-rw-r--r-- | crypto/ecdh/ech_ossl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/ecdh/ech_ossl.c b/crypto/ecdh/ech_ossl.c index f93dfcb4f7..94a8f4b696 100644 --- a/crypto/ecdh/ech_ossl.c +++ b/crypto/ecdh/ech_ossl.c @@ -119,6 +119,14 @@ static int ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, size_t buflen, len; unsigned char *buf=NULL; +#ifdef OPENSSL_FIPS + if(FIPS_selftest_failed()) + { + FIPSerr(FIPS_F_ECDH_COMPUTE_KEY,FIPS_R_FIPS_SELFTEST_FAILED); + return -1; + } +#endif + if (outlen > INT_MAX) { ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_MALLOC_FAILURE); /* sort of, anyway */ |