summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/openssl/openssl_ec_private_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/openssl/openssl_ec_private_key.c')
-rw-r--r--src/libstrongswan/plugins/openssl/openssl_ec_private_key.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_ec_private_key.c b/src/libstrongswan/plugins/openssl/openssl_ec_private_key.c
index 12f264267..bc7884c99 100644
--- a/src/libstrongswan/plugins/openssl/openssl_ec_private_key.c
+++ b/src/libstrongswan/plugins/openssl/openssl_ec_private_key.c
@@ -181,17 +181,7 @@ METHOD(private_key_t, decrypt, bool,
METHOD(private_key_t, get_keysize, int,
private_openssl_ec_private_key_t *this)
{
- switch (EC_GROUP_get_curve_name(EC_KEY_get0_group(this->ec)))
- {
- case NID_X9_62_prime256v1:
- return 256;
- case NID_secp384r1:
- return 384;
- case NID_secp521r1:
- return 521;
- default:
- return 0;
- }
+ return EC_GROUP_get_degree(EC_KEY_get0_group(this->ec));
}
METHOD(private_key_t, get_type, key_type_t,