]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
ssl_crtd: set new certificate serial number to zero
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 13 Oct 2012 06:03:00 +0000 (00:03 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 13 Oct 2012 06:03:00 +0000 (00:03 -0600)
Initialize new BN value to zero instead of simply testing and ignoring
the result.

Detected by Jenkins running clang on FreeBSD 9.

src/ssl/gadgets.cc

index 9e0215d7a0c786cbe78292f7f3629bef19c304b1..ac94bc165ce918db349ca5ece50d8fc5eb419d02 100644 (file)
@@ -435,7 +435,7 @@ static bool createSerial(Ssl::BIGNUM_Pointer &serial, Ssl::CertificateProperties
     serial.reset(x509Pubkeydigest(properties.signWithX509));
     if (!serial.get()) {
         serial.reset(BN_new());
-        BN_is_zero(serial.get());
+        BN_zero(serial.get());
     }
 
     if (!generateFakeSslCertificate(fakeCert, fakePkey, properties, serial))