]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix ParsedOptionsPointer for OpenSSL
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 13 Jan 2017 10:43:54 +0000 (23:43 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 13 Jan 2017 10:43:54 +0000 (23:43 +1300)
src/security/PeerOptions.cc
src/security/forward.h

index b5de37133ba2159f523c340245636c6fd8c589d2..a32826e857975d5be5444903a96846689ae7145b 100644 (file)
@@ -470,7 +470,7 @@ Security::PeerOptions::parseOptions(Security::ParsedOptionsPointer &theOut)
 {
 #if USE_OPENSSL
     ::Parser::Tokenizer tok(sslOptions);
-    long op;
+    long op = 0;
 
     do {
         enum {
@@ -531,7 +531,7 @@ Security::PeerOptions::parseOptions(Security::ParsedOptionsPointer &theOut)
     // compliance with RFC 6176: Prohibiting Secure Sockets Layer (SSL) Version 2.0
     op = op | SSL_OP_NO_SSLv2;
 #endif
-    theOut = new long(op);
+    theOut.reset(new long(op));
 
 #elif USE_GNUTLS
     const char *err = nullptr;
index c087a7b435db222c285ab65b5bfabd43fbdecb5d..d35510ec3671be38f058cfe9e431f924120899f6 100644 (file)
@@ -127,7 +127,7 @@ class KeyData;
 #if !USE_OPENSSL && USE_GNUTLS
 typedef std::unique_ptr<struct gnutls_priority_st, HardFun<void, gnutls_priority_t, &gnutls_priority_deinit>> ParsedOptionsPointer;
 #else
-typedef std::unique_ptr<uint32_t> ParsedOptionsPointer;
+typedef std::unique_ptr<long> ParsedOptionsPointer;
 #endif
 
 class PeerConnector;