From e9ccf58e2f75557e4cc014c05bf3813d0cab456c Mon Sep 17 00:00:00 2001 From: Ryo Kajiwara Date: Fri, 7 Jul 2023 14:37:12 +0900 Subject: [PATCH] Fix error message to match actual operation --- ext/openssl/ossl_pkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c index f0ac6d3ce..a55959fe7 100644 --- a/ext/openssl/ossl_pkey.c +++ b/ext/openssl/ossl_pkey.c @@ -656,7 +656,7 @@ ossl_pkey_initialize_private(VALUE self, VALUE type, VALUE key) pkey = EVP_PKEY_new_raw_private_key(pkey_id, NULL, (unsigned char *)RSTRING_PTR(key), keylen); if (!pkey) - ossl_raise(ePKeyError, "Could not parse PKey"); + ossl_raise(ePKeyError, "EVP_PKEY_new_raw_private_key"); return ossl_pkey_new(pkey); } @@ -689,7 +689,7 @@ ossl_pkey_initialize_public(VALUE self, VALUE type, VALUE key) pkey = EVP_PKEY_new_raw_public_key(pkey_id, NULL, (unsigned char *)RSTRING_PTR(key), keylen); if (!pkey) - ossl_raise(ePKeyError, "Could not parse PKey"); + ossl_raise(ePKeyError, "EVP_PKEY_new_raw_public_key"); return ossl_pkey_new(pkey); }