aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_pkey_dh.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_dh.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_dh.c')
-rw-r--r--ext/openssl/ossl_pkey_dh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c
index 938efe1a..dd85b7b9 100644
--- a/ext/openssl/ossl_pkey_dh.c
+++ b/ext/openssl/ossl_pkey_dh.c
@@ -460,7 +460,7 @@ ossl_dh_to_public_key(VALUE self)
GetDH(self, orig_dh);
dh = DHparams_dup(orig_dh); /* err check perfomed by dh_instance */
- obj = dh_instance(CLASS_OF(self), dh);
+ obj = dh_instance(rb_obj_class(self), dh);
if (obj == Qfalse) {
DH_free(dh);
ossl_raise(eDHError, NULL);