Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2005 23:20:28 GMT
From:      Andrew <andrew@iconsultant.biz>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/88397: Ruby does not upgrade properly from 1.8.2_4 to 1.8.2_5: bad C++ code)
Message-ID:  <200511152320.jAFNKSJt029234@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/88397; it has been noted by GNATS.

From: Andrew <andrew@iconsultant.biz>
To: bug-followup@FreeBSD.org,  yann@kierun.org
Cc:  
Subject: Re: ports/88397: Ruby does not upgrade properly from 1.8.2_4 to 1.8.2_5:
 bad C++ code)
Date: Wed, 16 Nov 2005 01:18:46 +0200

 This is a multi-part message in MIME format.
 --------------030709060406090905010804
 Content-Type: text/plain; charset=KOI8-R; format=flowed
 Content-Transfer-Encoding: 7bit
 
 This problem can be fixed with the enclosed patch.
 
 Tested on 4.11-STABLE with gcc-3.4.5
 
 
 --
 Andrew Novikov
 iConsultant.biz
 
 --------------030709060406090905010804
 Content-Type: text/plain;
  name="openssl.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="openssl.patch"
 
 --- ext/openssl/ossl_x509store.c.orig   2004/12/19 08:28:32     1.2.2.2
 +++ ext/openssl/ossl_x509store.c        2005/05/27 20:20:29     1.2.2.4
 @@ -1,5 +1,5 @@
  /*
 - * $Id: ossl_x509store.c,v 1.2.2.2 2004/12/19 08:28:32 gotoyuzo Exp $
 + * $Id: ossl_x509store.c,v 1.2.2.4 2005/05/27 20:20:29 gotoyuzo Exp $
   * 'OpenSSL for Ruby' project
   * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
   * All rights reserved.
 @@ -358,7 +358,7 @@ static VALUE ossl_x509stctx_set_time(VAL
  static VALUE
  ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self)
  {
 -    VALUE store, cert, chain;
 +    VALUE store, cert, chain, t;
      X509_STORE_CTX *ctx;
      X509_STORE *x509st;
      X509 *x509 = NULL;
 @@ -380,7 +380,8 @@ ossl_x509stctx_initialize(int argc, VALU
      ossl_x509stctx_set_purpose(self, rb_iv_get(store, "@purpose"));
      ossl_x509stctx_set_trust(self, rb_iv_get(store, "@trust"));
  #endif
 -    ossl_x509stctx_set_time(self, rb_iv_get(store, "@time"));
 +    if (!NIL_P(t = rb_iv_get(store, "@time")))
 +       ossl_x509stctx_set_time(self, t);
      rb_iv_set(self, "@verify_callback", rb_iv_get(store, "@verify_callback"));
      rb_iv_set(self, "@cert", cert);
 
 @@ -546,17 +547,11 @@ static VALUE
  ossl_x509stctx_set_time(VALUE self, VALUE time)
  {
      X509_STORE_CTX *store;
 +    long t;
 
 -    if(NIL_P(time)) {
 -       GetX509StCtx(self, store);
 -       store->flags &= ~X509_V_FLAG_USE_CHECK_TIME;
 -    }
 -    else {
 -       long t = NUM2LONG(rb_Integer(time));
 -
 -       GetX509StCtx(self, store);
 -       X509_STORE_CTX_set_time(store, 0, t);
 -    }
 +    t = NUM2LONG(rb_Integer(time));
 +    GetX509StCtx(self, store);
 +    X509_STORE_CTX_set_time(store, 0, t);
 
      return time;
  }
 --- ext/digest/md5/md5ossl.h.orig       Wed Nov 16 00:57:54 2005
 +++ ext/digest/md5/md5ossl.h    Wed Nov 16 00:45:56 2005
 @@ -3,6 +3,7 @@
  #ifndef MD5OSSL_H_INCLUDED
  #define MD5OSSL_H_INCLUDED
 
 +#include <stdlib.h>
  #include <openssl/md5.h>
 
  void MD5_End(MD5_CTX *pctx, unsigned char *hexdigest);
 --- ext/digest/rmd160/rmd160ossl.h.orig Wed Nov 16 00:58:17 2005
 +++ ext/digest/rmd160/rmd160ossl.h      Wed Nov 16 00:46:54 2005
 @@ -3,6 +3,7 @@
  #ifndef RMD160OSSL_H_INCLUDED
  #define RMD160OSSL_H_INCLUDED
 
 +#include <stdlib.h>
  #include <openssl/ripemd.h>
 
  #define RMD160_CTX     RIPEMD160_CTX
 --- ext/digest/sha1/sha1ossl.h.orig     Wed Nov 16 00:58:40 2005
 +++ ext/digest/sha1/sha1ossl.h  Wed Nov 16 00:47:18 2005
 @@ -3,6 +3,7 @@
  #ifndef SHA1OSSL_H_INCLUDED
  #define SHA1OSSL_H_INCLUDED
 
 +#include <stdlib.h>
  #include <openssl/sha.h>
 
  #define SHA1_CTX       SHA_CTX
 
 --------------030709060406090905010804--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511152320.jAFNKSJt029234>