From 551ef0b4d84767eaf0c9a88b7a297f19052218e1 Mon Sep 17 00:00:00 2001 From: william Date: Fri, 17 Apr 2015 16:54:40 -0700 Subject: forgot to install our X509_STORE_free replacement --- src/openssl.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/openssl.c b/src/openssl.c index 03cc3f7..5872197 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -1,7 +1,7 @@ /* ========================================================================== * openssl.c - Lua OpenSSL * -------------------------------------------------------------------------- - * Copyright (c) 2012-2014 William Ahern + * Copyright (c) 2012-2015 William Ahern * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the @@ -831,8 +831,14 @@ static int compat_init(void) { } else { /* * Because our onfree callback was invoked, X509_STORE_free - * appears not to obey reference counts. Ensure that our - * fixed version is called on SSL_CTX destruction. + * appears not to obey reference counts. Use our fixed + * version in our own code. + */ + compat.X509_STORE_free = &compat_X509_STORE_free; + + /* + * Ensure that our fixed version is called on SSL_CTX + * destruction. * * NB: We depend on the coincidental order of operations in * SSL_CTX_free that user data destruction occurs before -- cgit v1.2.3-59-g8ed1b