зеркало из https://github.com/mozilla/gecko-dev.git
Fix for Bug 90641 Checking in for Rangan Sen
r=ddrinan, sr=hewitt Fix the title for certificate expired/certificate not yet valid dialog
This commit is contained in:
Родитель
e1abe2c919
Коммит
70eb7611bd
|
@ -35,6 +35,8 @@ function onLoad()
|
|||
pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock);
|
||||
dialogParams = pkiParams.QueryInterface(nsIDialogParamBlock);
|
||||
|
||||
var title = dialogParams.GetString(2);
|
||||
window.title = title;
|
||||
var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties");
|
||||
var message1 = dialogParams.GetString(1);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<!DOCTYPE window SYSTEM "chrome://pippki/locale/pippki.dtd">
|
||||
|
||||
<window
|
||||
id="serverCertExpired" title="&serverCertExpired.title;"
|
||||
id="serverCertExpired"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
debug="false"
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
<!ENTITY examineCert.label "View Certificate">
|
||||
|
||||
<!-- Strings for the Server cert expired dialog -->
|
||||
<!ENTITY serverCertExpired.title "Security Error: Security Certificate Expired">
|
||||
<!ENTITY serverCertExpired.continue "Would you like to continue anyway?">
|
||||
|
||||
<!-- Strings for the SSL client auth ask dialog -->
|
||||
|
|
|
@ -42,7 +42,9 @@ mismatchDomainMsg2=If you suspect the certificate shown does not belong to "%S",
|
|||
|
||||
#Server Cert expired
|
||||
serverCertExpiredMsg1="%S" is a site that uses a security certificate to encrypt data during transmission, but its certificate expired on %S.
|
||||
serverCertExpiredTitle=Server Certificate Expired
|
||||
serverCertNotYetValedMsg1="%S" is a site that uses a security certificate to encrypt data during transmission, but its certificate will not be valid until %S.
|
||||
serverCertNotYetValidTitle=Server Certificate Not Yet Valid
|
||||
serverCertExpiredMsg2=You should check to make sure that your computer's time (currently set to %S) is correct.
|
||||
|
||||
#Preferences
|
||||
|
|
|
@ -322,6 +322,7 @@ nsNSSDialogs::CertExpired(nsITransportSecurityInfo *socketInfo,
|
|||
PRTime notAfter, notBefore, timeToUse;
|
||||
nsCOMPtr<nsIX509CertValidity> validity;
|
||||
const char *key;
|
||||
const char *titleKey;
|
||||
|
||||
*_retval = PR_FALSE;
|
||||
|
||||
|
@ -343,13 +344,16 @@ nsNSSDialogs::CertExpired(nsITransportSecurityInfo *socketInfo,
|
|||
|
||||
if (LL_CMP(now, >, notAfter)) {
|
||||
key = "serverCertExpiredMsg1";
|
||||
titleKey = "serverCertExpiredTitle";
|
||||
timeToUse = notAfter;
|
||||
} else {
|
||||
key = "serverCertNotYetValedMsg1";
|
||||
titleKey = "serverCertNotYetValidTitle";
|
||||
timeToUse = notBefore;
|
||||
}
|
||||
|
||||
nsXPIDLString message1;
|
||||
nsXPIDLString title;
|
||||
PRUnichar *commonName=nsnull;
|
||||
nsString formattedDate;
|
||||
|
||||
|
@ -366,14 +370,18 @@ nsNSSDialogs::CertExpired(nsITransportSecurityInfo *socketInfo,
|
|||
PRUnichar *formattedDatePR = formattedDate.ToNewUnicode();
|
||||
const PRUnichar *formatStrings[2] = { commonName, formattedDatePR };
|
||||
nsString keyString = NS_ConvertASCIItoUCS2(key);
|
||||
nsString titleKeyString = NS_ConvertASCIItoUCS2(titleKey);
|
||||
mPIPStringBundle->FormatStringFromName(keyString.get(), formatStrings,
|
||||
2, getter_Copies(message1));
|
||||
mPIPStringBundle->FormatStringFromName(titleKeyString.get(), formatStrings,
|
||||
2, getter_Copies(title));
|
||||
|
||||
Recycle(commonName);
|
||||
Recycle(formattedDatePR);
|
||||
|
||||
nsCOMPtr<nsIDialogParamBlock> dialogBlock = do_QueryInterface(block);
|
||||
rv = dialogBlock->SetString(1,message1);
|
||||
rv = dialogBlock->SetString(2,title);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче