diff options
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/ossl_pkcs7.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/openssl/ossl_pkcs7.c b/ext/openssl/ossl_pkcs7.c index 66c20538d8..8b1a51903c 100644 --- a/ext/openssl/ossl_pkcs7.c +++ b/ext/openssl/ossl_pkcs7.c @@ -376,7 +376,10 @@ ossl_pkcs7_sym2typeid(VALUE sym) { NULL, 0 }, }; - if (RB_TYPE_P(sym, T_SYMBOL)) s = rb_id2name(SYM2ID(sym)); + if (RB_TYPE_P(sym, T_SYMBOL)) { + sym = rb_sym2str(sym); + s = RSTRING_PTR(sym); + } else s = StringValuePtr(sym); for(i = 0; i < numberof(p7_type_tab); i++){ if(p7_type_tab[i].name == NULL) |