aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--ext/openssl/ossl_ocsp.c2
-rw-r--r--ext/openssl/ossl_x509attr.c1
-rw-r--r--ext/openssl/ossl_x509ext.c2
4 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 227e1a0799..f3a3896754 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Sun Sep 21 04:12:36 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * 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.
+
Mon Sep 20 11:49:05 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* lib/logger.rb: typo fixed.
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)){
diff --git a/ext/openssl/ossl_x509attr.c b/ext/openssl/ossl_x509attr.c
index 3309a070b4..572215d607 100644
--- a/ext/openssl/ossl_x509attr.c
+++ b/ext/openssl/ossl_x509attr.c
@@ -94,6 +94,7 @@ ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self)
if(rb_scan_args(argc, argv, "11", &oid, &value) == 1){
GetX509Attr(self, attr);
oid = ossl_to_der_if_possible(oid);
+ StringValue(oid);
p = RSTRING(oid)->ptr;
if(!d2i_X509_ATTRIBUTE(&attr, &p, RSTRING(oid)->len)){
ossl_raise(eX509AttrError, NULL);
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index 495c18049a..eddc7b4470 100644
--- a/ext/openssl/ossl_x509ext.c
+++ b/ext/openssl/ossl_x509ext.c
@@ -256,6 +256,7 @@ ossl_x509ext_initialize(int argc, VALUE *argv, VALUE self)
if(rb_scan_args(argc, argv, "12", &oid, &value, &critical) == 1){
/* evaluate oid as a DER string */
oid = ossl_to_der_if_possible(oid);
+ StringValue(oid);
GetX509Ext(self, ext);
p = RSTRING(oid)->ptr;
if(!d2i_X509_EXTENSION(&ext, &p, RSTRING(oid)->len))
@@ -295,6 +296,7 @@ ossl_x509ext_set_value(VALUE self, VALUE data)
GetX509Ext(self, ext);
data = ossl_to_der_if_possible(data);
+ StringValue(data);
if(!(s = OPENSSL_malloc(RSTRING(data)->len)))
ossl_raise(eX509ExtError, "malloc error");
memcpy(s, RSTRING(data)->ptr, RSTRING(data)->len);