aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_pkey.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_pkey.h')
-rw-r--r--ext/openssl/ossl_pkey.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/openssl/ossl_pkey.h b/ext/openssl/ossl_pkey.h
index 6c115179dc..6eb51a76bd 100644
--- a/ext/openssl/ossl_pkey.h
+++ b/ext/openssl/ossl_pkey.h
@@ -114,7 +114,10 @@ static VALUE ossl_##keytype##_get_##name(VALUE self) \
GetPKey(self, pkey); \
obj = EVP_PKEY_get0_##type(pkey); \
get; \
- return ossl_bn_new(name); \
+ if (name) \
+ return ossl_bn_new(name); \
+ else \
+ return Qnil; \
} \
/* \
* call-seq: \