aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto/crypto_openssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/crypto_openssl.c')
-rw-r--r--src/crypto/crypto_openssl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c
index a2b5c5f..593cf6f 100644
--- a/src/crypto/crypto_openssl.c
+++ b/src/crypto/crypto_openssl.c
@@ -917,6 +917,9 @@ struct crypto_ec * crypto_ec_init(int group)
case 20:
nid = NID_secp384r1;
break;
+ case 21:
+ nid = NID_secp521r1;
+ break;
case 25:
nid = NID_X9_62_prime192v1;
break;
@@ -972,6 +975,12 @@ size_t crypto_ec_prime_len(struct crypto_ec *e)
}
+size_t crypto_ec_prime_len_bits(struct crypto_ec *e)
+{
+ return BN_num_bits(e->prime);
+}
+
+
const struct crypto_bignum * crypto_ec_get_prime(struct crypto_ec *e)
{
return (const struct crypto_bignum *) e->prime;