diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c index d24115463024d1ffebb51ae07e99392217477d3e..f7948ccab2aa4fbcd5419f44f3de46b64cdb7a9e 100644 --- a/crypto/ec/ec_key.c +++ b/crypto/ec/ec_key.c @@ -607,7 +607,7 @@ size_t ec_key_simple_priv2oct(const EC_KEY *eckey, { size_t buf_len; - buf_len = (EC_GROUP_get_degree(eckey->group) + 7) / 8; + buf_len = (EC_GROUP_order_bits(eckey->group) + 7) / 8; if (eckey->priv_key == NULL) return 0; if (buf == NULL)