crypto/ec: harmonize new code with FIPS module.

RT: 3149
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
This commit is contained in:
Andy Polyakov
2014-09-22 00:05:46 +02:00
parent 2e31c47adb
commit 27918b7c25
4 changed files with 46 additions and 9 deletions

View File

@@ -69,6 +69,10 @@
*
*/
#ifdef OPENSSL_FIPS
#include <openssl/fips.h>
#endif
#include <string.h>
#include "ec_lcl.h"
#include <openssl/err.h>
@@ -2508,6 +2512,10 @@ EC_GROUP *EC_GROUP_new_by_curve_name(int nid)
size_t i;
EC_GROUP *ret = NULL;
#ifdef OPENSSL_FIPS
if (FIPS_mode())
return FIPS_ec_group_new_by_curve_name(nid);
#endif
if (nid <= 0)
return NULL;