Subject: pkg/32254: qca-tls-1.0 build problems
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <tonnerre@thundrix.ch>
List: pkgsrc-bugs
Date: 12/05/2005 19:25:00
>Number:         32254
>Category:       pkg
>Synopsis:       qca-tls-1.0 build problems
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 05 19:25:00 +0000 2005
>Originator:     Tonnerre Lombard
>Release:        NetBSD 3.99.13
>Organization:
/chaos/control
>Environment:
NetBSD jules.home.thundrix.ch 3.99.13 NetBSD 3.99.13 (JULES) #2: Fri Dec  2 20:58:37 CET 2005 root@jules:/usr/obj/sys/arch/macppc/compile/JULES macppc
>Description:
security/qca-tls fails to build because of const/non-const cast errors.
>How-To-Repeat:
cd /usr/pkgsrc/security/qca-tls && make install
>Fix:
--- qca-tls.cpp.orig	2005-12-05 21:14:17.000000000 +0100
+++ qca-tls.cpp	2005-12-05 21:15:12.000000000 +0100
@@ -454,7 +454,7 @@
 			if(!r) {
 				// try this other public function, for whatever reason
 				p = (void *)in;
-				r = d2i_RSA_PUBKEY(NULL, (unsigned char **)&p, len);
+				r = d2i_RSA_PUBKEY(NULL, (const unsigned char **)&p, len);
 			}
 			if(r) {
 				if(pub) {
@@ -798,7 +798,7 @@
 
 	bool createFromDER(const char *in, unsigned int len)
 	{
-		unsigned char *p = (unsigned char *)in;
+		const unsigned char *p = (const unsigned char *)in;
 		X509 *t = d2i_X509(NULL, &p, len);
 		if(!t)
 			return false;