Commit b11c016b authored by Martin Thomson's avatar Martin Thomson

Bug 1318561 - Free CA name list, r=ttaubert

Differential Revision: https://nss-review.dev.mozaws.net/D79

--HG--
extra : rebase_source : 84563286e99fada93eff0afb54f2a5809bad3754
extra : amend_source : e2de2650b3bf163671c4683e04a662132e69c1ea
parent b7545f4f
......@@ -19,6 +19,9 @@ struct ScopedDelete {
void operator()(CERTCertificateList* list) {
CERT_DestroyCertificateList(list);
}
void operator()(CERTCertList* list) {
CERT_DestroyCertList(list);
}
void operator()(CERTSubjectPublicKeyInfo* spki) {
SECKEY_DestroySubjectPublicKeyInfo(spki);
}
......@@ -44,6 +47,7 @@ struct ScopedMaybeDelete {
SCOPED(CERTCertificate);
SCOPED(CERTCertificateList);
SCOPED(CERTCertList);
SCOPED(CERTSubjectPublicKeyInfo);
SCOPED(PK11SlotInfo);
SCOPED(PK11SymKey);
......
......@@ -150,6 +150,10 @@ bool TlsAgent::EnsureTlsSetup(PRFileDesc* modelSocket) {
rv = SSL_SNISocketConfigHook(ssl_fd_, SniHook, this);
EXPECT_EQ(SECSuccess, rv);
if (rv != SECSuccess) return false;
ScopedCERTCertList anchors(CERT_NewCertList());
rv = SSL_SetTrustAnchors(ssl_fd_, anchors.get());
if (rv != SECSuccess) return false;
} else {
rv = SSL_SetURL(ssl_fd_, "server");
EXPECT_EQ(SECSuccess, rv);
......
......@@ -13195,6 +13195,9 @@ ssl3_DestroySSL3Info(sslSocket *ss)
CERT_DestroyCertificateList(ss->ssl3.clientCertChain);
ss->ssl3.clientCertChain = NULL;
}
if (ss->ssl3.ca_list) {
CERT_FreeDistNames(ss->ssl3.ca_list);
}
/* clean up handshake */
if (ss->ssl3.hs.md5) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment