aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_pkey_rsa.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-09-08 18:11:12 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-09-08 18:21:39 +0900
commit34e7fe34ee326d8d0ceb594d0fe5a90c22d91c63 (patch)
tree5d0d5aa2bdca8d8e7363c6acbb7aecccf23d9ea4 /ext/openssl/ossl_pkey_rsa.c
parenta7940a22e0a5caeab4f0d8b96b9a977f6bf31133 (diff)
downloadruby-openssl-34e7fe34ee326d8d0ceb594d0fe5a90c22d91c63.tar.gz
Use rb_obj_class() instead of CLASS_OF()
CLASS_OF() (or, rb_class_of()) may return the singleton class of the object; so avoid using it and replace with rb_obj_class() that returns the actual class of the object.
Diffstat (limited to 'ext/openssl/ossl_pkey_rsa.c')
-rw-r--r--ext/openssl/ossl_pkey_rsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c
index 17a74949..f969638a 100644
--- a/ext/openssl/ossl_pkey_rsa.c
+++ b/ext/openssl/ossl_pkey_rsa.c
@@ -620,7 +620,7 @@ ossl_rsa_to_public_key(VALUE self)
GetPKeyRSA(self, pkey);
/* err check performed by rsa_instance */
rsa = RSAPublicKey_dup(EVP_PKEY_get0_RSA(pkey));
- obj = rsa_instance(CLASS_OF(self), rsa);
+ obj = rsa_instance(rb_obj_class(self), rsa);
if (obj == Qfalse) {
RSA_free(rsa);
ossl_raise(eRSAError, NULL);