Skip to content

Commit b207b95

Browse files
rheniummatzbot
authored andcommitted
[ruby/openssl] pkey/ec: fix exception class in OpenSSL::PKey::EC.new
Fix a copy-and-paste error introduced in commit ruby/openssl@74f6c6175688 (pkey: allocate EVP_PKEY on #initialize, 2021-04-12). It should raise OpenSSL::PKey::ECError instead of OpenSSL::PKey::DSAError. ruby/openssl@b1f6a04abf
1 parent 5444885 commit b207b95

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)