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)
39
39
{
40
40
EVP_PKEY * pkey = (EVP_PKEY * )arg ;
41
41
VALUE klass , obj ;
42
- int type ;
43
42
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 )) {
48
44
#if !defined(OPENSSL_NO_RSA )
49
45
case EVP_PKEY_RSA : klass = cRSA ; break ;
50
46
#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;
35
35
} \
36
36
} while (0)
37
37
38
+ /* Takes ownership of the EVP_PKEY */
38
39
VALUE ossl_pkey_new (EVP_PKEY * );
39
40
void ossl_pkey_check_public_key (const EVP_PKEY * );
40
41
EVP_PKEY * ossl_pkey_read_generic (BIO * , VALUE );
You can’t perform that action at this time.
0 commit comments