Skip to content

Commit b1f6a04

Browse files
committed
pkey/ec: fix exception class in OpenSSL::PKey::EC.new
Fix a copy-and-paste error introduced in commit 74f6c61 (pkey: allocate EVP_PKEY on #initialize, 2021-04-12). It should raise OpenSSL::PKey::ECError instead of OpenSSL::PKey::DSAError.
1 parent 0e2698a commit b1f6a04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/openssl/ossl_pkey_ec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static VALUE ossl_ec_key_initialize(int argc, VALUE *argv, VALUE self)
174174
type = EVP_PKEY_base_id(pkey);
175175
if (type != EVP_PKEY_EC) {
176176
EVP_PKEY_free(pkey);
177-
rb_raise(eDSAError, "incorrect pkey type: %s", OBJ_nid2sn(type));
177+
rb_raise(eECError, "incorrect pkey type: %s", OBJ_nid2sn(type));
178178
}
179179
RTYPEDDATA_DATA(self) = pkey;
180180
return self;

0 commit comments

Comments
 (0)