File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,8 @@ pkey_new0(VALUE arg)
3939{
4040 EVP_PKEY * pkey = (EVP_PKEY * )arg ;
4141 VALUE klass , obj ;
42- int type ;
4342
44- if (!pkey || (type = EVP_PKEY_base_id (pkey )) == EVP_PKEY_NONE )
45- ossl_raise (rb_eRuntimeError , "pkey is empty" );
46-
47- switch (type ) {
43+ switch (EVP_PKEY_base_id (pkey )) {
4844#if !defined(OPENSSL_NO_RSA )
4945 case EVP_PKEY_RSA : klass = cRSA ; break ;
5046#endif
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ extern const rb_data_type_t ossl_evp_pkey_type;
3535 } \
3636} while (0)
3737
38+ /* Takes ownership of the EVP_PKEY */
3839VALUE ossl_pkey_new (EVP_PKEY * );
3940void ossl_pkey_check_public_key (const EVP_PKEY * );
4041EVP_PKEY * ossl_pkey_read_generic (BIO * , VALUE );
You can’t perform that action at this time.
0 commit comments