diff options
Diffstat (limited to 'lang/ruby18-base/patches/patch-dr')
-rw-r--r-- | lang/ruby18-base/patches/patch-dr | 53 |
1 files changed, 48 insertions, 5 deletions
diff --git a/lang/ruby18-base/patches/patch-dr b/lang/ruby18-base/patches/patch-dr index eecb5fb7ffd..ff57725f6f1 100644 --- a/lang/ruby18-base/patches/patch-dr +++ b/lang/ruby18-base/patches/patch-dr @@ -1,15 +1,58 @@ -$NetBSD: patch-dr,v 1.1 2009/08/11 14:26:59 taca Exp $ +$NetBSD: patch-dr,v 1.2 2010/09/10 03:29:00 taca Exp $ -* Constify. +* r18172: suppress warnings. +* r18943: (ossl_ocspreq_initialize): fix for initialization of r18168. +* r26838: backport the commit from trunk. ---- ext/openssl/ossl_x509attr.c.orig 2007-06-09 00:02:04.000000000 +0900 +--- ext/openssl/ossl_x509attr.c.orig 2010-06-21 09:18:59.000000000 +0000 +++ ext/openssl/ossl_x509attr.c -@@ -93,7 +93,7 @@ ossl_x509attr_initialize(int argc, VALUE +@@ -92,16 +92,17 @@ static VALUE + ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self) { VALUE oid, value; - X509_ATTRIBUTE *attr; +- X509_ATTRIBUTE *attr; - unsigned char *p; ++ X509_ATTRIBUTE *attr, *x; + const unsigned char *p; GetX509Attr(self, attr); if(rb_scan_args(argc, argv, "11", &oid, &value) == 1){ + oid = ossl_to_der_if_possible(oid); + StringValue(oid); +- p = RSTRING_PTR(oid); +- if(!d2i_X509_ATTRIBUTE((X509_ATTRIBUTE**)&DATA_PTR(self), +- &p, RSTRING_LEN(oid))){ ++ p = (unsigned char *)RSTRING_PTR(oid); ++ x = d2i_X509_ATTRIBUTE(&attr, &p, RSTRING_LEN(oid)); ++ DATA_PTR(self) = attr; ++ if(!x){ + ossl_raise(eX509AttrError, NULL); + } + return self; +@@ -212,7 +213,7 @@ ossl_x509attr_get_value(VALUE self) + if(OSSL_X509ATTR_IS_SINGLE(attr)){ + length = i2d_ASN1_TYPE(attr->value.single, NULL); + str = rb_str_new(0, length); +- p = RSTRING_PTR(str); ++ p = (unsigned char *)RSTRING_PTR(str); + i2d_ASN1_TYPE(attr->value.single, &p); + ossl_str_adjust(str, p); + } +@@ -221,7 +222,7 @@ ossl_x509attr_get_value(VALUE self) + (unsigned char **) NULL, i2d_ASN1_TYPE, + V_ASN1_SET, V_ASN1_UNIVERSAL, 0); + str = rb_str_new(0, length); +- p = RSTRING_PTR(str); ++ p = (unsigned char *)RSTRING_PTR(str); + i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, &p, + i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0); + ossl_str_adjust(str, p); +@@ -247,7 +248,7 @@ ossl_x509attr_to_der(VALUE self) + if((len = i2d_X509_ATTRIBUTE(attr, NULL)) <= 0) + ossl_raise(eX509AttrError, NULL); + str = rb_str_new(0, len); +- p = RSTRING_PTR(str); ++ p = (unsigned char *)RSTRING_PTR(str); + if(i2d_X509_ATTRIBUTE(attr, &p) <= 0) + ossl_raise(eX509AttrError, NULL); + rb_str_set_len(str, p - (unsigned char*)RSTRING_PTR(str)); |