Bug 1468222 Consolidate nsISSLStatus info nsITransportSecurityInfo r=snorp,ato,sfraser,keeler,baku,mcmanus,Gijs
Move all fields of nsISSLStatus to nsITransportSecurityProvider Remove nsISSLStatus interface and definition Update all code and test references to nsISSLStatus Maintain ability to read in older version of serialized nsISSLStatus. This is verified with psm_DeserializeCert gtest. Differential Revision: https://phabricator.services.mozilla.com/D3704
This commit is contained in:
@@ -2964,7 +2964,6 @@ var BrowserOnClick = {
|
||||
onCertError(browser, elementId, isTopFrame, location, securityInfoAsString, frameId) {
|
||||
let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
|
||||
let securityInfo;
|
||||
let sslStatus;
|
||||
|
||||
switch (elementId) {
|
||||
case "exceptionDialogButton":
|
||||
@@ -2973,24 +2972,23 @@ var BrowserOnClick = {
|
||||
}
|
||||
|
||||
securityInfo = getSecurityInfo(securityInfoAsString);
|
||||
sslStatus = securityInfo.SSLStatus;
|
||||
let params = { exceptionAdded: false,
|
||||
sslStatus };
|
||||
securityInfo };
|
||||
if (Services.prefs.getBoolPref("browser.security.newcerterrorpage.enabled", false)) {
|
||||
let overrideService = Cc["@mozilla.org/security/certoverride;1"]
|
||||
.getService(Ci.nsICertOverrideService);
|
||||
let flags = 0;
|
||||
if (sslStatus.isUntrusted) {
|
||||
if (securityInfo.isUntrusted) {
|
||||
flags |= overrideService.ERROR_UNTRUSTED;
|
||||
}
|
||||
if (sslStatus.isDomainMismatch) {
|
||||
if (securityInfo.isDomainMismatch) {
|
||||
flags |= overrideService.ERROR_MISMATCH;
|
||||
}
|
||||
if (sslStatus.isNotValidAtThisTime) {
|
||||
if (securityInfo.isNotValidAtThisTime) {
|
||||
flags |= overrideService.ERROR_TIME;
|
||||
}
|
||||
let uri = Services.uriFixup.createFixupURI(location, 0);
|
||||
let cert = sslStatus.serverCert;
|
||||
let cert = securityInfo.serverCert;
|
||||
overrideService.rememberValidityOverride(
|
||||
uri.asciiHost, uri.port,
|
||||
cert,
|
||||
@@ -3038,25 +3036,24 @@ var BrowserOnClick = {
|
||||
}
|
||||
|
||||
securityInfo = getSecurityInfo(securityInfoAsString);
|
||||
sslStatus = securityInfo.SSLStatus;
|
||||
let errorInfo = getDetailedCertErrorInfo(location,
|
||||
securityInfo);
|
||||
let validityInfo = {
|
||||
notAfter: sslStatus.serverCert.validity.notAfter,
|
||||
notBefore: sslStatus.serverCert.validity.notBefore,
|
||||
notAfterLocalTime: sslStatus.serverCert.validity.notAfterLocalTime,
|
||||
notBeforeLocalTime: sslStatus.serverCert.validity.notBeforeLocalTime,
|
||||
notAfter: securityInfo.serverCert.validity.notAfter,
|
||||
notBefore: securityInfo.serverCert.validity.notBefore,
|
||||
notAfterLocalTime: securityInfo.serverCert.validity.notAfterLocalTime,
|
||||
notBeforeLocalTime: securityInfo.serverCert.validity.notBeforeLocalTime,
|
||||
};
|
||||
browser.messageManager.sendAsyncMessage("CertErrorDetails", {
|
||||
code: securityInfo.errorCode,
|
||||
info: errorInfo,
|
||||
codeString: securityInfo.errorCodeString,
|
||||
certIsUntrusted: sslStatus.isUntrusted,
|
||||
certSubjectAltNames: sslStatus.serverCert.subjectAltNames,
|
||||
certIsUntrusted: securityInfo.isUntrusted,
|
||||
certSubjectAltNames: securityInfo.serverCert.subjectAltNames,
|
||||
validity: validityInfo,
|
||||
url: location,
|
||||
isDomainMismatch: sslStatus.isDomainMismatch,
|
||||
isNotValidAtThisTime: sslStatus.isNotValidAtThisTime,
|
||||
isDomainMismatch: securityInfo.isDomainMismatch,
|
||||
isNotValidAtThisTime: securityInfo.isNotValidAtThisTime,
|
||||
frameId,
|
||||
});
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user