pkgsrc/lang/ruby18-base/patches/patch-dr
taca 6a15ee56b6 Update ruby18-base to 1.8.7.302 (Ruby 1.8.7 patchlevel 302).
Since many changes from previous release, please refer
http://www.ruby-lang.org/en/news/2010/08/16/ruby-1-8-7-p302-is-released/.

Note: Since all security updates are already in previous package,
This update dosen't include any securify fix.
2010-09-10 03:29:00 +00:00

58 lines
2 KiB
Text

$NetBSD: patch-dr,v 1.2 2010/09/10 03:29:00 taca Exp $
* r18172: suppress warnings.
* r18943: (ossl_ocspreq_initialize): fix for initialization of r18168.
* r26838: backport the commit from trunk.
--- ext/openssl/ossl_x509attr.c.orig 2010-06-21 09:18:59.000000000 +0000
+++ ext/openssl/ossl_x509attr.c
@@ -92,16 +92,17 @@ static VALUE
ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self)
{
VALUE oid, value;
- 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));