From 846237a280e2fd0fc9483b7c7e956b2120ba8a15 Mon Sep 17 00:00:00 2001 From: Seth Hall Date: Mon, 6 Dec 2010 15:43:32 -0500 Subject: [PATCH] Applied Gregor's patch from ticket #247 to fix compile time errors with OpenSSL support. --- src/X509.cc | 6 +++--- src/ssl-analyzer.pac | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/X509.cc b/src/X509.cc index c8975cc581..9de73d2a9d 100644 --- a/src/X509.cc +++ b/src/X509.cc @@ -192,7 +192,7 @@ int X509_Cert::verifyChain(Contents_SSL* e, const u_char* data, uint32 len) // but in chain format). // Init the stack. - STACK_OF(X509)* untrustedCerts = sk_new_null(); + STACK_OF(X509)* untrustedCerts = sk_X509_new_null(); if ( ! untrustedCerts ) { // Internal error allocating stack of untrusted certs. @@ -233,7 +233,7 @@ int X509_Cert::verifyChain(Contents_SSL* e, const u_char* data, uint32 len) else // The remaining certificates (if any) are put into // the list of untrusted certificates - sk_push(untrustedCerts, (char*) pTemp); + sk_X509_push(untrustedCerts, pTemp); tempLength += certLength + 3; } @@ -259,7 +259,7 @@ int X509_Cert::verifyChain(Contents_SSL* e, const u_char* data, uint32 len) // Free the stack, incuding. contents. // FIXME: could this break Bro's memory tracking? - sk_pop_free(untrustedCerts, free); + sk_X509_pop_free(untrustedCerts, X509_free); return ret; } diff --git a/src/ssl-analyzer.pac b/src/ssl-analyzer.pac index d08be0c886..78baecc5cc 100644 --- a/src/ssl-analyzer.pac +++ b/src/ssl-analyzer.pac @@ -370,7 +370,7 @@ refine analyzer SSLAnalyzer += { STACK_OF(X509)* untrusted_certs = 0; if ( certificates->size() > 1 ) { - untrusted_certs = sk_new_null(); + untrusted_certs = sk_X509_new_null(); if ( ! untrusted_certs ) { // X509_V_ERR_OUT_OF_MEM; @@ -393,7 +393,7 @@ refine analyzer SSLAnalyzer += { return false; } - sk_push(untrusted_certs, (char*) pTemp); + sk_X509_push(untrusted_certs, pTemp); } } @@ -405,7 +405,7 @@ refine analyzer SSLAnalyzer += { certificate_error(csc.error); X509_STORE_CTX_cleanup(&csc); - sk_pop_free(untrusted_certs, free_X509); + sk_X509_pop_free(untrusted_certs, X509_free); } X509_free(pCert);