]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix assertion String.cc:221: "str"
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 5 Jun 2015 23:46:42 +0000 (16:46 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 5 Jun 2015 23:46:42 +0000 (16:46 -0700)
commit167588a0e373cec91a632cc5ec82b0badb85ed1f
treea1874735472c3912be0792e81a8f0cc33c6af782
parent3e62416fbeefa026333658950f44d75bf890059b
Fix assertion String.cc:221: "str"

This bug can be caused by certificates does not contain a CN field. In this
case the Ssl::ErrorDetail::cn method may return NULL causing this assertion
somewhere inside Ssl::ErrorDetail::buildDetail method, which expects always
a non NULL value from Ssl::ErrorDetail::cn and similar methods.

This patch try to hardening the Ssl::ErrorDetail error formating functions to
avoid always check for NULL values and also avoid sending wrong information
for various certificate fields in the case of an error while extracting the
information from certificate..

This is a Measurement Factory project
src/ssl/ErrorDetail.cc