$OpenBSD: patch-src_X509_cc,v 1.1 2010/10/12 20:12:52 robert Exp $
--- src/X509.cc.orig	Tue Oct 12 22:09:38 2010
+++ src/X509.cc	Tue Oct 12 22:10:21 2010
@@ -191,7 +191,7 @@ int X509_Cert::verifyChain(Contents_SSL* e, const u_ch
 	// but in chain format).
 
 	// Init the stack.
-	STACK_OF(X509)* untrustedCerts = sk_new_null();
+	STACK_OF(X509)* untrustedCerts = (STACK_OF(X509*)) sk_new_null();
 	if ( ! untrustedCerts )
 		{
 		// Internal error allocating stack of untrusted certs.
@@ -232,7 +232,7 @@ int X509_Cert::verifyChain(Contents_SSL* e, const u_ch
 		else
 			// The remaining certificates (if any) are put into
 			// the list of untrusted certificates
-			sk_push(untrustedCerts, (char*) pTemp);
+			sk_push((OPENSSL_STACK_TYPE*) untrustedCerts, (char*) pTemp);
 
 		tempLength += certLength + 3;
 		}
@@ -258,7 +258,7 @@ int X509_Cert::verifyChain(Contents_SSL* e, const u_ch
 	// Free the stack, incuding. contents.
 
 	// FIXME: could this break Bro's memory tracking?
-	sk_pop_free(untrustedCerts, free);
+	sk_pop_free((OPENSSL_STACK_TYPE*) untrustedCerts, free);
 
 	return ret;
 	}
