From nobody@FreeBSD.org  Mon Apr 12 06:34:59 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AE7591065672
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Apr 2010 06:34:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 9D2978FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Apr 2010 06:34:59 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o3C6YxPR047958
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Apr 2010 06:34:59 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o3C6Yx01047957;
	Mon, 12 Apr 2010 06:34:59 GMT
	(envelope-from nobody)
Message-Id: <201004120634.o3C6Yx01047957@www.freebsd.org>
Date: Mon, 12 Apr 2010 06:34:59 GMT
From: "Vladimir I. Pushkar" <vladimir.pushkar@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bacula-client-5.0.0 does not compile with openssl-1.0.0
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         145642
>Category:       ports
>Synopsis:       sysutils/bacula-client: bacula-client-5.0.0 does not compile with openssl-1.0.0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    stefan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 12 06:40:00 UTC 2010
>Closed-Date:    Sat Jul 17 01:02:11 UTC 2010
>Last-Modified:  Sat Jul 17 01:02:11 UTC 2010
>Originator:     Vladimir I. Pushkar
>Release:        8.0-STABLE
>Organization:
CAD Department of NTUU 
>Environment:
FreeBSD dream.cad.ntu-kpi.kiev.ua 8.0-STABLE FreeBSD 8.0-STABLE #2: Fri Apr  9 14:19:39 EEST 2010     root@dream.cad.ntu-kpi.kiev.ua:/usr/obj/usr/src/sys/DREAM  i386

>Description:
bacula-client-5.0.0 does not compile with openssl-1.0.0
>How-To-Repeat:
Compile bacula-client with OpenSSL enabled:
===>  Building for bacula-client-5.0.0
==>Entering directory /usr/ports/sysutils/bacula-client/work/bacula-5.0.0/src
==>Entering directory /usr/ports/sysutils/bacula-client/work/bacula-5.0.0/src/lib
Compiling crypto.c
crypto.c: In function 'ASN1_OCTET_STRING* openssl_cert_keyid(X509*)':
crypto.c:333: error: invalid conversion from 'const X509V3_EXT_METHOD*' to 'X509V3_EXT_METHOD*'
crypto.c: In function 'CRYPTO_SESSION* crypto_session_new(crypto_cipher_t, alist*)':
crypto.c:1102: error: cannot convert 'unsigned char*' to 'EVP_PKEY_CTX*' for argument '1' to 'int EVP_PKEY_encrypt(EVP_PKEY_CTX*, unsigned char*, size_t*, const unsigned char*, size_t)'
crypto.c: In function 'crypto_error_t crypto_session_decode(const u_int8_t*, u_int32_t, alist*, CRYPTO_SESSION**)':
crypto.c:1226: error: cannot convert 'unsigned char*' to 'EVP_PKEY_CTX*' for argument '1' to 'int EVP_PKEY_decrypt(EVP_PKEY_CTX*, unsigned char*, size_t*, const unsigned char*, size_t)'
*** Error code 1

Stop in /usr/ports/sysutils/bacula-client/work/bacula-5.0.0/src/lib.

>Fix:


>Release-Note:
>Audit-Trail:

From: Vladimir Pushkar <vladimir.pushkar@gmail.com>
To: bug-followup@freebsd.org, vladimir.pushkar@gmail.com
Cc:  
Subject: Re: ports/145642: sysutils/bacula-client: bacula-client-5.0.0 does 
	not compile with openssl-1.0.0
Date: Tue, 13 Apr 2010 15:34:45 +0300

 FIX:
 
 patch-lib-crypto.c:
 --- src/lib/crypto.c.orig       2010-01-25 09:56:28.000000000 +0200
 +++ src/lib/crypto.c    2010-04-13 15:12:17.000000000 +0300
 @@ -309,7 +309,11 @@
   */
  static ASN1_OCTET_STRING *openssl_cert_keyid(X509 *cert) {
     X509_EXTENSION *ext;
 +#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
     X509V3_EXT_METHOD *method;
 +#else
 +   const X509V3_EXT_METHOD *method;
 +#endif
     ASN1_OCTET_STRING *keyid;
     int i;
  #if (OPENSSL_VERSION_NUMBER >= 0x0090800FL)
 @@ -973,6 +977,10 @@
     free (sig);
  }
 
 +#if OPENSSL_VERSION_NUMBER >= 0x10000000L
 +#define EVP_PKEY_decrypt EVP_PKEY_decrypt_old
 +#define EVP_PKEY_encrypt EVP_PKEY_encrypt_old
 +#endif
  /*
   * Create a new encryption session.
   *  Returns: A pointer to a CRYPTO_SESSION object on success.
 
 patch-lib-tls.c:
 --- src/lib/tls.c.orig  2010-01-25 09:56:28.000000000 +0200
 +++ src/lib/tls.c       2010-04-13 15:20:20.000000000 +0300
 @@ -315,7 +315,11 @@
           extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
 
           if (strcmp(extname, "subjectAltName") == 0) {
 +#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
 +            const X509V3_EXT_METHOD *method;
 +#else
              X509V3_EXT_METHOD *method;
 +#endif
              STACK_OF(CONF_VALUE) *val;
              CONF_VALUE *nval;
              void *extstr = NULL;
State-Changed-From-To: open->feedback 
State-Changed-By: stefan 
State-Changed-When: Mon May 17 11:08:49 UTC 2010 
State-Changed-Why:  
Awaiting maintainer's feedback. 


Responsible-Changed-From-To: freebsd-ports-bugs->stefan 
Responsible-Changed-By: stefan 
Responsible-Changed-When: Mon May 17 11:08:49 UTC 2010 
Responsible-Changed-Why:  
Track this for now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145642 

From: Stefan Walter <stefan@freebsd.org>
To: Dan Langille <dan@langille.org>
Cc: GNATS <FreeBSD-gnats-submit@FreeBSD.org>
Subject: Re: ports/145642: sysutils/bacula-client: bacula-client-5.0.0 does
 not compile with openssl-1.0.0
Date: Mon, 17 May 2010 13:08:28 +0200

 Dear maintainer of sysutils/bacula-client,
 
 a problem report has been submitted for your port for which your 
 feedback might be required; its contents can be found at [1]. If it 
 contains a patch or suggestions for a change, please send a followup to 
 the PR explaining whether or not you approve it and want it to be 
 committed.
 
 Regards,
 Stefan
 
 [1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145642

From: Stefan Walter <stefan@FreeBSD.org>
To: Vladimir Pushkar <vladimir.pushkar@gmail.com>
Cc: GNATS <FreeBSD-gnats-submit@FreeBSD.org>,
	Dan Langille <dan@langille.org>
Subject: Re: ports/145642: sysutils/bacula-client: bacula-client-5.0.0 does
 not compile with openssl-1.0.0
Date: Thu, 20 May 2010 10:48:21 +0200

 Hi Vladimir,
 
 while we're waiting for Dan's feedback on this PR, could you resend your
 patch as an attachment so it can be downloaded and tested easier?
 
 Thanks,
 Stefan

From: Stefan Walter <stefan@freebsd.org>
To: GNATS <FreeBSD-gnats-submit@FreeBSD.org>
Cc: Dan Langille <dan@langille.org>
Subject: Re: ports/145642: sysutils/bacula-client: bacula-client-5.0.0 does
 not compile with openssl-1.0.0
Date: Thu, 20 May 2010 13:07:01 +0200

 --45Z9DzgjV8m4Oswq
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Vladimir's patches attached for the sake of a complete PR history and for
 Dan to check out.
 
 --45Z9DzgjV8m4Oswq
 Content-Type: text/x-csrc; charset=us-ascii
 Content-Disposition: attachment; filename="patch-lib-crypto.c"
 
 --- src/lib/crypto.c.orig	2010-01-25 09:56:28.000000000 +0200
 +++ src/lib/crypto.c	2010-04-13 15:12:17.000000000 +0300
 @@ -309,7 +309,11 @@
   */
  static ASN1_OCTET_STRING *openssl_cert_keyid(X509 *cert) {
     X509_EXTENSION *ext;
 +#if (OPENSSL_VERSION_NUMBER < 0x10000000L)
     X509V3_EXT_METHOD *method;
 +#else
 +   const X509V3_EXT_METHOD *method;
 +#endif
     ASN1_OCTET_STRING *keyid;
     int i;
  #if (OPENSSL_VERSION_NUMBER >= 0x0090800FL)
 @@ -973,6 +977,10 @@
     free (sig);
  }
  
 +#if OPENSSL_VERSION_NUMBER >= 0x10000000L
 +#define EVP_PKEY_decrypt EVP_PKEY_decrypt_old
 +#define EVP_PKEY_encrypt EVP_PKEY_encrypt_old
 +#endif
  /*
   * Create a new encryption session.
   *  Returns: A pointer to a CRYPTO_SESSION object on success.
 
 --45Z9DzgjV8m4Oswq
 Content-Type: text/x-csrc; charset=us-ascii
 Content-Disposition: attachment; filename="patch-lib-tls.c"
 
 --- src/lib/tls.c.orig	2010-01-25 09:56:28.000000000 +0200
 +++ src/lib/tls.c	2010-04-13 15:20:20.000000000 +0300
 @@ -315,7 +315,11 @@
           extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
  
           if (strcmp(extname, "subjectAltName") == 0) {
 +#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
 +            const X509V3_EXT_METHOD *method;
 +#else
              X509V3_EXT_METHOD *method;
 +#endif
              STACK_OF(CONF_VALUE) *val;
              CONF_VALUE *nval;
              void *extstr = NULL;
 
 --45Z9DzgjV8m4Oswq--
State-Changed-From-To: feedback->closed 
State-Changed-By: wxs 
State-Changed-When: Sat Jul 17 01:02:10 UTC 2010 
State-Changed-Why:  
Superseded by ports/146766 which I just committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145642 
>Unformatted:
