diff options
author | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 17:52:36 +0000 |
---|---|---|
committer | davidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 17:52:36 +0000 |
commit | 0fc38a8f43112aff71abb46805c0900446b5cfad (patch) | |
tree | b93d5fd21148c57212d4f240dafc042ea73f2b8c /chrome | |
parent | 7e7989bdf42a6fc3dad7348e2a39a96dfcb6b929 (diff) | |
download | chromium_src-0fc38a8f43112aff71abb46805c0900446b5cfad.zip chromium_src-0fc38a8f43112aff71abb46805c0900446b5cfad.tar.gz chromium_src-0fc38a8f43112aff71abb46805c0900446b5cfad.tar.bz2 |
Display the error code when certificates fail to add
We really want to make error strings, but this is a start.
BUG=43906
TEST=none
Review URL: http://codereview.chromium.org/2859026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 4 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_add_cert_handler.cc | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 6c423a8..ea31152 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -3116,10 +3116,10 @@ each locale. --> Client Certificate Error </message> <message name="IDS_ADD_CERT_ERR_INVALID_CERT" desc="Error message when the server returns an invalid client certificate after key generation"> - The server returned an invalid client certificate. + The server returned an invalid client certificate. Error <ph name="ERROR_number">$1<ex>207</ex></ph> (<ph name="ERROR_NAME">$2<ex>net::ERR_CERT_INVALID</ex></ph>). </message> <message name="IDS_ADD_CERT_ERR_FAILED" desc="Generic error message for a failure to add the generated certificate to the cert store/keychain"> - There was an error while trying to store the client certificate. + There was an error while trying to store the client certificate. Error <ph name="ERROR_number">$1<ex>207</ex></ph> (<ph name="ERROR_NAME">$2<ex>net::ERR_CERT_INVALID</ex></ph>). </message> <!-- Basic Auth Dialog --> diff --git a/chrome/browser/ssl/ssl_add_cert_handler.cc b/chrome/browser/ssl/ssl_add_cert_handler.cc index dafc78f..691e8773 100644 --- a/chrome/browser/ssl/ssl_add_cert_handler.cc +++ b/chrome/browser/ssl/ssl_add_cert_handler.cc @@ -5,6 +5,7 @@ #include "chrome/browser/ssl/ssl_add_cert_handler.h" #include "app/l10n_util.h" +#include "base/string_util.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_window.h" @@ -34,7 +35,10 @@ void SSLAddCertHandler::RunUI() { } if (cert_error != net::OK) { // TODO(snej): Map cert_error to a more specific error message. - ShowError(l10n_util::GetStringUTF16(IDS_ADD_CERT_ERR_INVALID_CERT)); + ShowError(l10n_util::GetStringFUTF16( + IDS_ADD_CERT_ERR_INVALID_CERT, + IntToString16(-cert_error), + ASCIIToUTF16(net::ErrorToString(cert_error)))); Finished(false); return; } @@ -54,7 +58,10 @@ void SSLAddCertHandler::Finished(bool add_cert) { int cert_error = db.AddUserCert(cert_); if (cert_error != net::OK) { // TODO(snej): Map cert_error to a more specific error message. - ShowError(l10n_util::GetStringUTF16(IDS_ADD_CERT_ERR_FAILED)); + ShowError(l10n_util::GetStringFUTF16( + IDS_ADD_CERT_ERR_FAILED, + IntToString16(-cert_error), + ASCIIToUTF16(net::ErrorToString(cert_error)))); } } Release(); |