nss: clear session cache if a client cert from file is used
authorKamil Dudka <kdudka@redhat.com>
Fri, 11 Jan 2013 09:24:21 +0000 (10:24 +0100)
committerKamil Dudka <kdudka@redhat.com>
Fri, 11 Jan 2013 09:59:11 +0000 (10:59 +0100)
commitb36f1d26f830453ebaa17238f9bd1e396f618720
treed803e5989178204c65b6d67ad763f1184b7ee4f7
parentd17f536688bea2e5e5696b741055dde4474152e9
nss: clear session cache if a client cert from file is used

This commit fixes a regression introduced in 052a08ff.

NSS caches certs/keys returned by the SSL_GetClientAuthDataHook callback
and if we connect second time to the same server, the cached cert/key
pair is used.  If we use multiple client certificates for different
paths on the same server, we need to clear the session cache to force
NSS to call the hook again.  The commit 052a08ff prevented the session
cache from being cleared if a client certificate from file was used.

The condition is now fixed to cover both cases: consssl->client_nickname
is not NULL if a client certificate from the NSS database is used and
connssl->obj_clicert is not NULL if a client certificate from file is
used.

Review by: Kai Engert
RELEASE-NOTES
lib/nss.c