diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/openssl.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 @@ | |||
| 1 | /* ========================================================================== | 1 | /* ========================================================================== |
| 2 | * openssl.c - Lua OpenSSL | 2 | * openssl.c - Lua OpenSSL |
| 3 | * -------------------------------------------------------------------------- | 3 | * -------------------------------------------------------------------------- |
| 4 | * Copyright (c) 2012-2014 William Ahern | 4 | * Copyright (c) 2012-2015 William Ahern |
| 5 | * | 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * copy of this software and associated documentation files (the | 7 | * copy of this software and associated documentation files (the |
| @@ -831,8 +831,14 @@ static int compat_init(void) { | |||
| 831 | } else { | 831 | } else { |
| 832 | /* | 832 | /* |
| 833 | * Because our onfree callback was invoked, X509_STORE_free | 833 | * Because our onfree callback was invoked, X509_STORE_free |
| 834 | * appears not to obey reference counts. Ensure that our | 834 | * appears not to obey reference counts. Use our fixed |
| 835 | * fixed version is called on SSL_CTX destruction. | 835 | * version in our own code. |
| 836 | */ | ||
| 837 | compat.X509_STORE_free = &compat_X509_STORE_free; | ||
| 838 | |||
| 839 | /* | ||
| 840 | * Ensure that our fixed version is called on SSL_CTX | ||
| 841 | * destruction. | ||
| 836 | * | 842 | * |
| 837 | * NB: We depend on the coincidental order of operations in | 843 | * NB: We depend on the coincidental order of operations in |
| 838 | * SSL_CTX_free that user data destruction occurs before | 844 | * SSL_CTX_free that user data destruction occurs before |
