]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SSL_SESSION::master_key cannot be falsy (#848)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 24 Jun 2021 22:13:23 +0000 (22:13 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 25 Jun 2021 01:56:04 +0000 (01:56 +0000)
SSL_SESSION::master_key data member is an array. It cannot be falsy.

This fixes clang -Wpointer-bool-conversion.

compat/openssl.h

index a3b2c1b5def5a70e323e72fe67468902d1fee181..ccfcf78df64622b01a2e2fc3b67b72911cd87543 100644 (file)
@@ -175,7 +175,7 @@ extern "C" {
     inline size_t
     SSL_SESSION_get_master_key(const SSL_SESSION *session, unsigned char *outStart, size_t outSizeMax)
     {
-        if (!session || !session->master_key || session->master_key_length <= 0)
+        if (!session || session->master_key_length <= 0)
             return 0;
 
         const auto sourceSize = static_cast<size_t>(session->master_key_length);