Skip to content

Commit

Permalink
Change connection info strings (e.g. SHA-1 cert warnings) to be more
Browse files Browse the repository at this point in the history
clear to developers.

This commit includes 5 changes that make OIB connection info strings
more clear to developers (and advanced users). Since it has become
impractical to target "normal" users with these strings, the focus is on
using exact terminology instead of "friendly" alternatives. This should
help developers to understand the page's issues at a glance:

https://docs.google.com/document/d/1YgavRvC7_6PoOYHjUuKQL1Mlc718z7F1AnTNGrM92W4/edit#heading=h.kldzb7b775ri

Changes in this commit:

1. The identity section explicitly mentions when an error was caused by
   SHA-1 in the certificate chain, instead of referencing "outdated
   security settings" (there are no such settings apart from SHA-1
   signatures right now). (https://crbug.com/437466)

2. Mentions of "public audit records" have been replaced with mentions
   of "Certificate Transparency". The phrase "Public audit records" was
   hinging at the implications of CT, but a full understanding the
   string requires knowledge of CT.
   Also, the mention of CT has been split into a separate sentence. The
   presence of "but" had a strong but incorrect implication that this
   affects the lock icon (which will not be the case for non-EV sites in
   the near future).

3. The phrase "modern cryptography" is now "modern cipher suite" in
   order to distinguish the kind of cryptography in question. (Similarly
   for "obsolete cryptography".) This technically doesn't mention the
   protocol; however, the main problem usually lies with the cipher
   suite rather than the protocol, and all the cipher suites we
   currently consider good require TLS 1.2 (or, say, QUIC) as a
   prerequisite.

4. Mixed content message: Instead of "However", the sentence now starts
   with "Further" so that it still makes sense when the protocol/cipher
   suite is obsolete (https://crbug.com/434617).

5. The "SHA1 for message authentication" string (for ciphers with a MAC)
   now displays SHA1 as HMAC-SHA1, to be more suggestive that this a
   different use of SHA-1 than for cert signatures. (Similarly for other
   TLS MACs.)

Design constraint: In order to make this change as simple as possible,
the code logic has not been touched. The string contents have been
changed, but all strings keep their identifiers and semantics. Also,
these changes are definitely meant as a band-aid. In the medium-long
term, the plan is to remove the connection tab from the OIB and offer
the information in DevTools. (However, we have yet to decide on a plan
to supplant it on mobile.)

Test pages:
#1: https://sha1.badssl.com/
#2:
  - DV, no SCT: https://garron.net/
  - DV, SCT: https://embed.ct.digicert.com/
  - EV, no SCT: https://www.mozilla.org/
  - EV, SCT: https://www.bankofamerica.com/
#3:
  - "modern": https://garron.net/
  - "obsolete": https://rc4.badssl.com/
#4: https://mixed.badssl.com/
#5: https://rc4.badssl.com/

Note that this commit roughly coincides with the reintroduction of
connection info on Android:
- https://crbug.com/425158#c41
- https://chromium.googlesource.com/chromium/src/+/f21c52aeafa701b18ed505347ee0e7a7d07e5d53
Android Chrome users haven't been able to access this information for
the last half year, and will see these new strings directly.

BUG=461045, 434617, 437466
TEST=Visit the test pages (listed above).

Review URL: https://codereview.chromium.org/1109283003

Cr-Commit-Position: refs/heads/master@{#328502}
  • Loading branch information
lgarron authored and Commit bot committed May 6, 2015
1 parent ae5f78b commit 46bd40a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion chrome/app/chromium_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ Chromium is unable to recover your settings.
You are viewing a secure Chromium page.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM" desc="The text of the identity section when the site is using a certificate that will stop working in future versions of Chrome.">
The site is using outdated security settings that may prevent future versions of Chromium from being able to safely access it.
The certificate chain for this website contains at least one certificate that was signed using a deprecated signature algorithm based on SHA-1.
</message>

<!-- Print Preview -->
Expand Down
26 changes: 13 additions & 13 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -9737,16 +9737,16 @@ I don't think this site should be blocked!
</message>

<message name="IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_NO_CT" desc="The text of the identity section when the page is secure and no Certificate Transparency information is present.">
The identity of this website has been verified by <ph name="ISSUER">$1<ex>VeriSign</ex></ph> but does not have public audit records.
The identity of this website has been verified by <ph name="ISSUER">$1<ex>VeriSign</ex></ph>. No Certificate Transparency information was supplied by the server.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_CT_VERIFIED" desc="The text of the identity section when the page is secure and a Signed Certificate Timestamp from a known Certificate Transparency log is present and valid.">
The identity of this website has been verified by <ph name="ISSUER">$1<ex>VeriSign</ex></ph> and is publicly auditable.
The identity of this website has been verified by <ph name="ISSUER">$1<ex>VeriSign</ex></ph>. Valid Certificate Transparency information was supplied by the server.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_CT_UNVERIFIED" desc="The text of the identity section when the page is secure and contains a Signed Certificate Timestamp from an unknown Certificate Transparency log.">
The identity of this website has been verified by <ph name="ISSUER">$1<ex>VeriSign</ex></ph>, it claims to have public audit records, but the records cannot be verified.
The identity of this website has been verified by <ph name="ISSUER">$1<ex>VeriSign</ex></ph>. Certificate Transparency information was supplied by the server, but one or more of the Certificate Transparency logs were not recognized.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_CT_INVALID" desc="The text of the identity section when the page is secure, but it contains a Signed Certificate Timestamp from a known Certificate Transparency log that failed to verify.">
The identity of this website has been verified by <ph name="ISSUER">$1<ex>VeriSign</ex></ph>, but its public audit records failed verification.
The identity of this website has been verified by <ph name="ISSUER">$1<ex>VeriSign</ex></ph>. Certificate Transparency information was supplied by the server, but it was invalid.
</message>

<message name="IDS_PAGEINFO_ADDRESS" desc="Locality as reported in the EV identity text.">
Expand All @@ -9758,16 +9758,16 @@ I don't think this site should be blocked!
</message>

<message name="IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_EV_NO_CT" desc="The text of the identity section when the page is secured with an EV cert and no Certificate Transparency information is present.">
The identity of <ph name="ORGANIZATION">$1<ex>Google</ex></ph> at <ph name="LOCALITY">$2<ex>Mountain View, CA US</ex></ph> has been verified by <ph name="ISSUER">$3<ex>VeriSign</ex></ph> but does not have public audit records.
The identity of <ph name="ORGANIZATION">$1<ex>Google</ex></ph> at <ph name="LOCALITY">$2<ex>Mountain View, CA US</ex></ph> has been verified by <ph name="ISSUER">$3<ex>VeriSign</ex></ph>. No Certificate Transparency information was supplied by the server.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_EV_CT_VERIFIED" desc="The text of the identity section when the page is secured with an EV cert and a Signed Certificate Timestamp from a known Certificate Transparency log is present and valid.">
The identity of <ph name="ORGANIZATION">$1<ex>Google</ex></ph> at <ph name="LOCALITY">$2<ex>Mountain View, CA US</ex></ph> has been verified by <ph name="ISSUER">$3<ex>VeriSign</ex></ph> and is publicly auditable.
The identity of <ph name="ORGANIZATION">$1<ex>Google</ex></ph> at <ph name="LOCALITY">$2<ex>Mountain View, CA US</ex></ph> has been verified by <ph name="ISSUER">$3<ex>VeriSign</ex></ph>. Valid Certificate Transparency information was supplied by the server.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_EV_CT_UNVERIFIED" desc="The text of the identity section when the page is secured with an EV cert and contains a Signed Certificate Timestamp from an unknown Certificate Transparency log.">
The identity of <ph name="ORGANIZATION">$1<ex>Google</ex></ph> at <ph name="LOCALITY">$2<ex>Mountain View, CA US</ex></ph> has been verified by <ph name="ISSUER">$3<ex>VeriSign</ex></ph>, it claims to have public audit records, but the records cannot be verified.
The identity of <ph name="ORGANIZATION">$1<ex>Google</ex></ph> at <ph name="LOCALITY">$2<ex>Mountain View, CA US</ex></ph> has been verified by <ph name="ISSUER">$3<ex>VeriSign</ex></ph>. Certificate Transparency information was supplied by the server, but one or more of the Certificate Transparency logs were not recognized.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY_EV_CT_INVALID" desc="The text of the identity section when the page is secured with an EV cert, but it contains a Signed Certificate Timestamp from a known Certificate Transparency log that failed to verify.">
The identity of <ph name="ORGANIZATION">$1<ex>Google</ex></ph> at <ph name="LOCALITY">$2<ex>Mountain View, CA US</ex></ph> has been verified by <ph name="ISSUER">$3<ex>VeriSign</ex></ph>, but its public audit records failed verification.
The identity of <ph name="ORGANIZATION">$1<ex>Google</ex></ph> at <ph name="LOCALITY">$2<ex>Mountain View, CA US</ex></ph> has been verified by <ph name="ISSUER">$3<ex>VeriSign</ex></ph>. Certificate Transparency information was supplied by the server, but it was invalid.
</message>

<message name="IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY" desc="The default name used when we did not find a principal name.">
Expand All @@ -9788,19 +9788,19 @@ I don't think this site should be blocked!
</message>

<message name="IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT" desc="The text of the connection section when the connection is encrypted.">
Your connection to <ph name="DOMAIN">$1<ex>www.google.com</ex></ph> is encrypted with modern cryptography.
Your connection to <ph name="DOMAIN">$1<ex>www.google.com</ex></ph> is encrypted using a modern cipher suite.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_WEAK_ENCRYPTION_CONNECTION_TEXT" desc="The text of the connection section when the connection uses weak encryption.">
Your connection to <ph name="DOMAIN">$1<ex>www.google.com</ex></ph> is encrypted with obsolete cryptography.
Your connection to <ph name="DOMAIN">$1<ex>www.google.com</ex></ph> is encrypted using an obsolete cipher suite.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT" desc="The text of the connection section when the connection is not encrypted.">
Your connection to <ph name="DOMAIN">$1<ex>www.google.com</ex></ph> is not encrypted.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING" desc="Some extra text of the connection section when the connection is encrypted and the page contains insecure content which has been displayed (e.g. images, CSS).">
However, this page includes other resources which are not secure. These resources can be viewed by others while in transit, and can be modified by an attacker to change the look of the page.
Further, this page includes other resources which are not secure. These resources can be viewed by others while in transit, and can be modified by an attacker to change the look of the page.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_ERROR" desc="Some extra text of the connection section when the connection is encrypted and the page contains insecure content which has been run (e.g. script).">
However, this page includes other resources which are not secure. These resources can be viewed by others while in transit, and can be modified by an attacker to change the behavior of the page.
Further, this page includes other resources which are not secure. These resources can be viewed by others while in transit, and can be modified by an attacker to change the behavior of the page.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK" desc="Linking 2 sentences in 1 paragraph.">
<ph name="SENTENCE1">$1<ex>Your connection is encrypted.</ex></ph> <ph name="SENTENCE2">$2<ex>However, this page includes resources from other pages whose identity cannot be verified.</ex></ph>
Expand All @@ -9809,7 +9809,7 @@ I don't think this site should be blocked!
The connection uses <ph name="SSL_VERSION">$1<ex>TLS 1.0</ex></ph>.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS" desc="This message gives details of the cryptographic primitives used to protect the HTTPS connection.">
The connection is encrypted using <ph name="CIPHER">$1<ex>AES_128</ex></ph>, with <ph name="MAC">$2<ex>SHA1</ex></ph> for message authentication and <ph name="KX">$3<ex>RSA</ex></ph> as the key exchange mechanism.
The connection is encrypted using <ph name="CIPHER">$1<ex>AES_128</ex></ph>, with <ph name="MAC">$2<ex>HMAC-SHA1</ex></ph> for message authentication and <ph name="KX">$3<ex>RSA</ex></ph> as the key exchange mechanism.
</message>
<message name="IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS_AEAD" desc="This message gives details of the cryptographic primitives used to protect the HTTPS connection. It should be translated in a similar manner as IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS">
The connection is encrypted and authenticated using <ph name="CIPHER">$1<ex>AES_128_GCM</ex></ph> and uses <ph name="KX">$2<ex>RSA</ex></ph> as the key exchange mechanism.
Expand Down
10 changes: 5 additions & 5 deletions net/ssl/ssl_cipher_suite_names.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ const struct {
};

const struct {
char name[7];
char name[12];
} kMacNames[5] = {
{"NULL"}, // 0
{"MD5"}, // 1
{"SHA1"}, // 2
{"SHA256"}, // 3
{"SHA384"}, // 4
{"HMAC-MD5"}, // 1
{"HMAC-SHA1"}, // 2
{"HMAC-SHA256"}, // 3
{"HMAC-SHA384"}, // 4
// 7 is reserved to indicate an AEAD cipher suite.
};

Expand Down
2 changes: 1 addition & 1 deletion net/ssl/ssl_cipher_suite_names_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TEST(CipherSuiteNamesTest, Basic) {
SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 0xc001);
EXPECT_STREQ("ECDH_ECDSA", key_exchange);
EXPECT_STREQ("NULL", cipher);
EXPECT_STREQ("SHA1", mac);
EXPECT_STREQ("HMAC-SHA1", mac);
EXPECT_FALSE(is_aead);

SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, 0x009f);
Expand Down

0 comments on commit 46bd40a

Please sign in to comment.