aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_pkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_pkey.c')
-rw-r--r--ext/openssl/ossl_pkey.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c
index 43942274a2..aa9b046d38 100644
--- a/ext/openssl/ossl_pkey.c
+++ b/ext/openssl/ossl_pkey.c
@@ -69,9 +69,23 @@ ossl_generate_cb_stop(void *ptr)
}
#endif
+static void
+ossl_evp_pkey_free(void *ptr)
+{
+ EVP_PKEY_free(ptr);
+}
+
/*
* Public
*/
+const rb_data_type_t ossl_evp_pkey_type = {
+ "OpenSSL/EVP_PKEY",
+ {
+ 0, ossl_evp_pkey_free,
+ },
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY,
+};
+
VALUE
ossl_pkey_new(EVP_PKEY *pkey)
{