diff options
| author | djm <> | 2012-10-13 21:23:50 +0000 |
|---|---|---|
| committer | djm <> | 2012-10-13 21:23:50 +0000 |
| commit | 228cae30b117c2493f69ad3c195341cd6ec8d430 (patch) | |
| tree | 29ff00b10d52c0978077c4fd83c33b065bade73e /src/lib/libcrypto/ec/ecp_nist.c | |
| parent | 731838c66b52c0ae5888333005b74115a620aa96 (diff) | |
| download | openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.gz openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.bz2 openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.zip | |
import OpenSSL-1.0.1c
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nist.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ecp_nist.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nist.c b/src/lib/libcrypto/ec/ecp_nist.c index 2a5682ea41..aad2d5f443 100644 --- a/src/lib/libcrypto/ec/ecp_nist.c +++ b/src/lib/libcrypto/ec/ecp_nist.c | |||
| @@ -67,9 +67,17 @@ | |||
| 67 | #include <openssl/obj_mac.h> | 67 | #include <openssl/obj_mac.h> |
| 68 | #include "ec_lcl.h" | 68 | #include "ec_lcl.h" |
| 69 | 69 | ||
| 70 | #ifdef OPENSSL_FIPS | ||
| 71 | #include <openssl/fips.h> | ||
| 72 | #endif | ||
| 73 | |||
| 70 | const EC_METHOD *EC_GFp_nist_method(void) | 74 | const EC_METHOD *EC_GFp_nist_method(void) |
| 71 | { | 75 | { |
| 76 | #ifdef OPENSSL_FIPS | ||
| 77 | return fips_ec_gfp_nist_method(); | ||
| 78 | #else | ||
| 72 | static const EC_METHOD ret = { | 79 | static const EC_METHOD ret = { |
| 80 | EC_FLAGS_DEFAULT_OCT, | ||
| 73 | NID_X9_62_prime_field, | 81 | NID_X9_62_prime_field, |
| 74 | ec_GFp_simple_group_init, | 82 | ec_GFp_simple_group_init, |
| 75 | ec_GFp_simple_group_finish, | 83 | ec_GFp_simple_group_finish, |
| @@ -88,9 +96,7 @@ const EC_METHOD *EC_GFp_nist_method(void) | |||
| 88 | ec_GFp_simple_get_Jprojective_coordinates_GFp, | 96 | ec_GFp_simple_get_Jprojective_coordinates_GFp, |
| 89 | ec_GFp_simple_point_set_affine_coordinates, | 97 | ec_GFp_simple_point_set_affine_coordinates, |
| 90 | ec_GFp_simple_point_get_affine_coordinates, | 98 | ec_GFp_simple_point_get_affine_coordinates, |
| 91 | ec_GFp_simple_set_compressed_coordinates, | 99 | 0,0,0, |
| 92 | ec_GFp_simple_point2oct, | ||
| 93 | ec_GFp_simple_oct2point, | ||
| 94 | ec_GFp_simple_add, | 100 | ec_GFp_simple_add, |
| 95 | ec_GFp_simple_dbl, | 101 | ec_GFp_simple_dbl, |
| 96 | ec_GFp_simple_invert, | 102 | ec_GFp_simple_invert, |
| @@ -110,6 +116,7 @@ const EC_METHOD *EC_GFp_nist_method(void) | |||
| 110 | 0 /* field_set_to_one */ }; | 116 | 0 /* field_set_to_one */ }; |
| 111 | 117 | ||
| 112 | return &ret; | 118 | return &ret; |
| 119 | #endif | ||
| 113 | } | 120 | } |
| 114 | 121 | ||
| 115 | int ec_GFp_nist_group_copy(EC_GROUP *dest, const EC_GROUP *src) | 122 | int ec_GFp_nist_group_copy(EC_GROUP *dest, const EC_GROUP *src) |
