summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2014-10-30 18:25:11 +0000
committerMark Spruiell <mes@zeroc.com>2014-10-30 18:25:11 +0000
commit58b5e09bb1c0a85998c5eb504f6786d6c1ba0ba6 (patch)
tree32993413050e9a751cf107217133878ccd3a35d7 /cpp/src
parentPossible fix for gradle build warning (diff)
downloadice-58b5e09bb1c0a85998c5eb504f6786d6c1ba0ba6.tar.bz2
ice-58b5e09bb1c0a85998c5eb504f6786d6c1ba0ba6.tar.xz
ice-58b5e09bb1c0a85998c5eb504f6786d6c1ba0ba6.zip
IceSSL bug fix
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceSSL/OpenSSLEngine.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/IceSSL/OpenSSLEngine.cpp b/cpp/src/IceSSL/OpenSSLEngine.cpp
index 75c58f50cf5..35d83dc2a5e 100644
--- a/cpp/src/IceSSL/OpenSSLEngine.cpp
+++ b/cpp/src/IceSSL/OpenSSLEngine.cpp
@@ -506,8 +506,8 @@ OpenSSLEngine::initialize()
fclose(f);
if(p12)
{
- X509* cert = 0;
EVP_PKEY* key = 0;
+ X509* cert = 0;
STACK_OF(X509)* chain = 0;
int count = 0;
@@ -516,6 +516,13 @@ OpenSSLEngine::initialize()
while(count < passwordRetryMax)
{
ERR_clear_error();
+ //
+ // chain may have a bogus value from a previous call to PKCS12_parse, so we
+ // reset it prior to each call.
+ //
+ key = 0;
+ cert = 0;
+ chain = 0;
if(!(success = PKCS12_parse(p12, password(false).c_str(), &key, &cert, &chain)))
{
if(passwordError())