aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ocsp.c
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-20 19:18:22 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-20 19:18:22 +0000
commitca8be43f0e1d20bb569fda156baf2410286ddc7e (patch)
tree8040c2e38f3be0f8478f3066a97f74d7a0644c33 /ext/openssl/ossl_ocsp.c
parent879944aa32c235f99fc67ec6fadd7864a0a97580 (diff)
downloadruby-ca8be43f0e1d20bb569fda156baf2410286ddc7e.tar.gz
* ext/openssl/ossl_ocsp.c (ossl_ocspreq_initialize): the argument
should be a String. * ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): ditt. * ext/openssl/ossl_x509attr.c (ossl_x509attr_initialize): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): ditto. * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_ocsp.c')
-rw-r--r--ext/openssl/ossl_ocsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c
index 836bacfbc1..d1f1b84127 100644
--- a/ext/openssl/ossl_ocsp.c
+++ b/ext/openssl/ossl_ocsp.c
@@ -108,6 +108,7 @@ ossl_ocspreq_initialize(int argc, VALUE *argv, VALUE self)
rb_scan_args(argc, argv, "01", &arg);
if(!NIL_P(arg)){
arg = ossl_to_der_if_possible(arg);
+ StringValue(arg);
p = (unsigned char*)RSTRING(arg)->ptr;
if(!d2i_OCSP_REQUEST((OCSP_REQUEST**)&DATA_PTR(self), &p,
RSTRING(arg)->len)){
@@ -312,6 +313,7 @@ ossl_ocspres_initialize(int argc, VALUE *argv, VALUE self)
rb_scan_args(argc, argv, "01", &arg);
if(!NIL_P(arg)){
arg = ossl_to_der_if_possible(arg);
+ StringValue(arg);
p = RSTRING(arg)->ptr;
if(!d2i_OCSP_RESPONSE((OCSP_RESPONSE**)&DATA_PTR(self), &p,
RSTRING(arg)->len)){