Bug 1238001 - Allow TLS info to be updated on renegotiation, r=keeler

MozReview-Commit-ID: KJaPgEwTvhv

--HG--
extra : rebase_source : f7d0025eca46e191d23aee182c9ace58b7d59b8b
extra : amend_source : 7e98ef0aa34b0c2def205644e1ab9e576417930d
This commit is contained in:
Martin Thomson 2016-02-23 08:00:00 -08:00
Родитель 0ab404928f
Коммит 83f1770c2c
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -835,11 +835,6 @@ PreliminaryHandshakeDone(PRFileDesc* fd)
if (!infoObject)
return;
if (infoObject->IsPreliminaryHandshakeDone())
return;
infoObject->SetPreliminaryHandshakeDone();
SSLChannelInfo channelInfo;
if (SSL_GetChannelInfo(fd, &channelInfo, sizeof(channelInfo)) == SECSuccess) {
infoObject->SetSSLVersionUsed(channelInfo.protocolVersion);
@ -863,6 +858,11 @@ PreliminaryHandshakeDone(PRFileDesc* fd)
}
}
// Don't update NPN details on renegotiation.
if (infoObject->IsPreliminaryHandshakeDone()) {
return;
}
// Get the NPN value.
SSLNextProtoState state;
unsigned char npnbuf[256];
@ -881,6 +881,8 @@ PreliminaryHandshakeDone(PRFileDesc* fd)
else {
infoObject->SetNegotiatedNPN(nullptr, 0);
}
infoObject->SetPreliminaryHandshakeDone();
}
SECStatus