openssl version

This commit is contained in:
David Rose 2010-02-22 00:17:59 +00:00
parent 786124f898
commit 5150c70bfa
3 changed files with 16 additions and 5 deletions

View File

@ -164,7 +164,7 @@
#define USE_PACKAGES wx openssl
#define TARGET p3dcert
#define SOURCES p3dCert.cxx
#define SOURCES p3dCert.cxx p3dCert.h
#define OSX_SYS_FRAMEWORKS Carbon
#end bin_target

View File

@ -177,7 +177,7 @@ AuthDialog::
_cert = NULL;
}
if (_stack != NULL) {
sk_free(_stack);
sk_X509_free(_stack);
_stack = NULL;
}
}
@ -273,10 +273,10 @@ read_cert_file(const wxString &cert_filename) {
}
// Build up a STACK of the remaining certificates in the file.
_stack = sk_new(NULL);
_stack = sk_X509_new(NULL);
X509 *c = PEM_read_X509(fp, NULL, NULL, (void *)"");
while (c != NULL) {
sk_push(_stack, (char *)c);
sk_X509_push(_stack, c);
c = PEM_read_X509(fp, NULL, NULL, (void *)"");
}

View File

@ -29,6 +29,17 @@ using namespace std;
class ViewCertDialog;
#ifndef STACK_OF
// At some point, presumably in 1.0.0, openssl went to the
// STACK_OF() macro system to typedef the contents of a stack.
// Unfortunately, that new API is different. We define some macros
// here here for backward compatiblity.
#define STACK_OF(type) STACK
#define sk_X509_push(stack, item) sk_push((stack), (char *)(item))
#define sk_X509_free(stack) sk_free(stack)
#define sk_X509_new(cmp) sk_new(cmp)
#endif
////////////////////////////////////////////////////////////////////
// Class : P3DCertApp
// Description : This is the wxApp that drives this application.
@ -84,7 +95,7 @@ private:
wxString _cert_dir;
X509 *_cert;
STACK *_stack;
STACK_OF(X509) *_stack;
wxString _friendly_name;
int _verify_result;