Commit Graph
88 Commits
Author SHA1 Message Date
EKR ddb1d69b90 Bug 1340854 - Properly report TLS handshake telemetry for 0 length reads. r=mt 2017-02-18 11:27:21 -08:00
Vedant Sareen a85a2ad339 Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter
Changed |print("enum ID : uint32_t {", file=output)| to |print("enum HistogramID : uint32_t {", file=output)| at line 53 of the file |toolkit/components/telemetry/gen-histogram-enum.py|, and then replaced all the textual occurrences of |Telemetry::ID| to |Telemetry::HistogramID| and |ID| to |HistogramID| in 43 other files.
2017-02-16 00:45:15 +05:30
EKR 933ba79743 Bug 1331280 - Generic telemetry probe for TLS handshake status. r=keeler 2017-02-14 13:12:00 -05:00
Cykesiopka e99d55a74b Bug 1331983 - Avoid non-smart string IDL types in nsIX509CertDB.idl. r=gcp,keeler,nwgh
Smart string classes like nsCString are safer to use than raw |char*| strings,
and are typically easier to deal with as well.

MozReview-Commit-ID: 2PdrCa6cbpe
2017-02-09 23:11:29 +08:00
Andrea Marchesini 46a9207d60 Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Dragana Damjanovic 58b363c3ad Bug 1320252 - Send early-data even without alpn. r=keeler 2017-01-06 11:51:00 -05:00
Cykesiopka c29834836b Bug 1325107 - Stop using NS_NOTREACHED() in PSM. r=mgoodwin
MOZ_ASSERT_UNREACHABLE() is basically equivalent to NS_NOTREACHED().
PSM already uses MOZ_ASSERT_UNREACHABLE() for new code, so there's no need to use
NS_NOTREACHED() as well.

MozReview-Commit-ID: 9k2z9a1oIqe
2017-01-02 14:11:51 +08:00
Cykesiopka 2ea082a548 Bug 1325107 - Stop using NS_ASSERTION() in PSM. r=mgoodwin
MOZ_ASSERT() is basically equivalent to NS_ASSERTION().
PSM already uses MOZ_ASSERT() for new code, so there's no need to use
NS_ASSERTION() as well.

MozReview-Commit-ID: JHDsbDkYvHf
2017-01-02 14:11:39 +08:00
Masatoshi Kimura 67dd9a08f7 Bug 1316300 - Remove ECDSA_CBC cipher suites from TLS 1.3 ClientHello. r=keeler
Because we enabled TLS 1.3 by default and removed the weak cipher suite fallback machinary, this is the simplest change to hide ECDSA_CBC behind fallback and measure the impact of removal.

MozReview-Commit-ID: G5gDKEid5XB
2016-12-17 12:32:58 +09:00
Jonathan Hao 8b96b95493 Bug 1282279 - Make user certificates Origin Attribute aware. r=keeler 2016-11-25 17:28:22 +08:00
Masatoshi Kimura bc7cc7c96e Bug 1321909 - Remove the "security.ssl.false_start.require-npn" pref. r=keeler
MozReview-Commit-ID: 1RQlxQb2IJJ
2016-12-03 10:04:49 +09:00
Patrick McManus 1889ab84d2 Bug 1321783 - Make updater be networking conservative r=dkeeler r=rstrong r=dragana 2016-12-02 16:49:23 -05:00
Masatoshi Kimura 7588e8a167 Bug 1130670 - Remove vestigial RC4 fallback backend. r=keeler
MozReview-Commit-ID: 9YRVgnymndI
2016-12-02 22:09:38 +09:00
Jonathan Hao e40bd07e14 Bug 1316283 - Isolate SSL session cache by origin attributes. r=keeler 2016-11-25 20:07:57 +08:00
Jonathan Hao c8d995ab01 Bug 1315143 - Make OCSP use Origin Attribute framework (PSM). r=Cykesiopka,keeler 2016-11-14 18:26:15 +08:00
Carsten "Tomcat" Book 016b5ef571 Backed out changeset 81a11a25d25d (bug 1315143) 2016-11-14 12:52:16 +01:00
Jonathan Hao c0f6a74c60 Bug 1315143 - Make OCSP use Origin Attribute framework (PSM). r=mayhemer 2016-11-14 18:26:15 +08:00
David Keeler 5a4dc9e117 bug 1195434 - specify what signature schemes the platform will actually accept in TLS handshakes r=mt
MozReview-Commit-ID: A3T4EgEfcfy
2016-11-03 12:53:23 -07:00
David Keeler bd1bf8e6e8 bug 1227638 - deterministically load EV information r=Cykesiopka,mgoodwin
Previously PSM would load EV information on-demand (i.e. just before verifying a
certificate). This simplifies this operation, removes a dubious optimization
(loading the EV information on another thread while opening a network
connection), and relocates the loading operation to when we are likely to have
good disk locality (i.e. when we've just loaded the built-in roots module).

This also removes the now-unused MOZ_NO_EV_CERTS build flag.

MozReview-Commit-ID: 8Rnl4ozF95V
2016-09-30 18:08:08 -07:00
Jonathan Hao 648ab99b32 Bug 1264562 - Part 3: Store the firstPartyDomain in TransportSecurityInfo (adapted from Tor Browser patch 13670) r=keeler 2016-10-18 16:45:23 +08:00
Wes Kocher 685852562e Backed out changeset 003ec40aa484 (bug 1227638) for android Cpp failures a=backout 2016-10-17 15:08:41 -07:00
David Keeler 4e24de833f bug 1227638 - deterministically load EV information r=Cykesiopka,mgoodwin
Previously PSM would load EV information on-demand (i.e. just before verifying a
certificate). This simplifies this operation, removes a dubious optimization
(loading the EV information on another thread while opening a network
connection), and relocates the loading operation to when we are likely to have
good disk locality (i.e. when we've just loaded the built-in roots module).

This also removes the now-unused MOZ_NO_EV_CERTS build flag.

MozReview-Commit-ID: 8Rnl4ozF95V
2016-09-30 18:08:08 -07:00
Franziskus Kiefer 73ef2984a4 Bug 1309859 - Send two key shares in tls1.3 client hello, r=mt,keeler 2016-10-13 14:15:51 +02:00
Cykesiopka 1eefbe0772 Bug 1296317 - Stop calling PR_SetError() in VerifyCert() and VerifySSLServerCert(). r=keeler
The PR_SetError() + PR_GetError() pattern currently used is error prone and
unnecessary. The functions involved can instead return mozilla::pkix::Result,
which is equally expressive and more robust.

MozReview-Commit-ID: Hkd39eqTvds
2016-10-10 15:44:41 +08:00
Cykesiopka fa71efd085 Bug 1142350 - Remove nsIUserCertPicker, nsICertPickDialogs and associated code from mozilla-central. r=keeler
The code is used in comm-central, but is unused in mozilla-central. It will be
imported into comm-central in Bug 1297368.

MozReview-Commit-ID: BEY9BR0YRiD
2016-09-21 19:34:12 +08:00
Martin Thomson d9acdab09c Bug 1306003 - Enable P-521, r=ekr,rbarnes
MozReview-Commit-ID: 1oF98CACtQV
2016-09-29 10:40:40 +10:00
Sergei Chernov 8eb3e4e402 Bug 1293231 - Certificate Transparency - basic telemetry reports; r=Cykesiopka,keeler
MozReview-Commit-ID: EGvuZADObJo
2016-08-11 13:41:50 +03:00
Martin Thomson 4aa502d04f Bug 1304926 - Enable specific named groups, r=keeler
MozReview-Commit-ID: KIe6D9iRAXt
2016-09-26 15:06:42 +10:00
Dragana Damjanovic ac872e009d Bug 1264578 - NSS support for http with TLS 1.3. r=keeler 2016-08-19 05:01:00 -04:00
Sebastian Hengst bb51903126 Backed out changeset 80942fb9a0f1 (bug 1264578) 2016-08-18 17:28:09 +02:00
Dragana Damjanovic 95b59cdad4 Bug 1264578 - NSS support for http with TLS 1.3. r=keeler 2016-08-17 13:57:00 -04:00
Cykesiopka 9016fedb8f Bug 1281665 - Change nsIClientAuthDialogs.chooseCertificate() to use hostname instead of CN. r=keeler
chooseCertificate() currently uses a concatenation of the Common Name of the
server cert and the port of the server to allow the user to identify the server
requesting client authentication. Unfortunately, this approach is flawed, since
it doesn't take into account things like SAN entries, which might be very
different from the CN.

Using the hostname instead avoids this problem.

MozReview-Commit-ID: 6XjGCknWNi9
2016-07-26 20:16:58 +08:00
David Keeler 5d8fc3b198 backout changeset 1a1d7ef3cb0e (bug 1279479) for causing WebRTC compatibility issues
The WebRTC implementation inherits cipher suite preferences from PSM and then
enables a few mandatory ones and disables a number of undesirable ones. If PSM
makes a change to a cipher suite preference that isn't in WebRTC's whitelist or
blacklist, compatibility issues can arise. See bug 1288246 for an example.
2016-07-22 10:31:34 -07:00
Masatoshi Kimura a6156b43d5 Bug 1250582 - Remove SSL_FALLBACK_LIMIT_REACHED telemetry. r=keeler
Bug 1084025 added this telemetry to measure the impact of bumping the fallback limit.
But we already bumped the fallback limit to TLS 1.2 long before. We will not need this kind of telemetry until we bump the fallback limit to TLS 1.3 that will not happen in the near future. So let's just remove wasting resource for now.

MozReview-Commit-ID: 22o8FirlYql
2016-07-16 14:16:06 +09:00
Masatoshi Kimura 55ead26189 Bug 1279479 - Hide DHE cipher suites from the first handshake. r=keeler
MozReview-Commit-ID: BXZm6EMaLy2
2016-06-23 03:48:02 +09:00
Cykesiopka 2a32e054e0 Bug 307081 - Make nsIClientAuthDialogs::ChooseCertificate() pass an nsIArray of nsIX509Certs, not strings. r=kats,keeler
This provides implementations of ChooseCertificate() with more flexibility, and
allows callers of ChooseCertificate() to be less complex.

A portion of this work involves reimplementing
nsNSSCertificate::FormatUIStrings() in JS and improving UI strings for l10n.

MozReview-Commit-ID: CE7Uc2ntwmZ
2016-06-24 00:12:16 -07:00
Cykesiopka 1493f80bcb Bug 307081 - Clean up nsIClientAuthDialogs.idl and implementations. r=kats,keeler
This fixes the following in the IDL:
1. Misleading or unclear parameter names in the IDL. |cn| in practice is the
   concatenation of the CN of the server cert and the port of the server, and
   |issuer| is the Organization of the issuer cert of the server cert.
2. Use of the |wstring| type. |AString| is generally preferred, and has the
   benefit of letting implementations skip null checks due to the use of
   references.
3. Using an explicit |canceled| outparam instead of just setting a return type.
   There is no need for the outparam if the return type can be used.
4. Using |long| (int32_t) for |selectedIndex|. |unsigned long| (uint32_t) is
   more logical, and paves the way for future changes.

This fixes the following in the Android implementation:
1. Lack of checks to ensure the QueryInterface() call succeeded. In practice,
   the call will always succeed, but it's good practice to check anyways.
2. Setting a variable to an nsIPrefService instance initially, then later
   setting it to a pref branch instance later on. This is confusing and
   unnecessary.

This fixes the following in the desktop implementation:
1. Lack of null pointer checking.
2. Trying to get a parent window ref off a context that doesn't actually support
   doing so.
3. Setting a variable to an nsIPrefService instance initially, then later
   setting it to a pref branch instance later on. This is confusing and
   unnecessary.
4. Abusal of the CAPS bundle.
5. Unnecessary variables.
6. Variables declared far away from where they are used.
7. Variable shadowing.
8. Style issues.
9. Lack of documentation.

This also fixes the following:
1. Lack of localisation notes.

MozReview-Commit-ID: FTc6XecJd6h
2016-06-24 00:12:11 -07:00
Chris Peterson b789db0655 Bug 1277014 - Fix -Wstring-conversion warnings in security/manager/ssl/. r=keeler
security/manager/ssl/nsNSSComponent.cpp:1694:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [31]' to 'bool'
security/manager/ssl/nsNSSIOLayer.cpp:1333:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [22]' to 'bool'
security/manager/ssl/nsNSSIOLayer.cpp:1341:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [22]' to 'bool'
security/manager/ssl/nsNSSIOLayer.cpp:1349:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [22]' to 'bool'
security/manager/ssl/nsNSSIOLayer.cpp:1357:16 [-Wstring-conversion] implicit conversion turns string literal into bool: 'const char [22]' to 'bool'
2016-05-31 21:51:50 -07:00
Masatoshi Kimura 4551205cc6 Bug 1274953 - Bump the lowest valid TLS insecure fallback limit to 3 (TLS 1.2). r=keeler 2016-05-24 19:08:13 +09:00
Masatoshi Kimura b26738176b Bug 1275252 - Deal with some TLS 1.3 intolerance. r=keeler 2016-05-25 19:36:57 +09:00
Cykesiopka e82de86c37 Bug 1271501 - Use mozilla::BitwiseCast instead of reinterpret_cast in PSM. r=keeler
mozilla::BitwiseCast does the same thing, but provides static asserts that
mitigate some of the risk of using reinterpret_cast.

MozReview-Commit-ID: ENQ8QC6Nl9o
2016-05-18 21:20:56 -07:00
Martin Thomson d1deeae754 Bug 1250568 - Add support for TLS1.3 in prefs and telemetry, r=keeler
MozReview-Commit-ID: AH8SO3fRUp4
2016-04-19 14:29:36 +10:00
Cykesiopka c481191bd2 Bug 1267905 - Replace uses of ScopedCERTCertList with UniqueCERTCertList. r=keeler
ScopedCERTCertList is based on Scoped.h, which is deprecated in favour of the
standardised UniquePtr.

Also changes CERTCertList parameters of various functions to make ownership more
explicit.

MozReview-Commit-ID: EXqxTK6inqy
2016-05-05 14:56:36 -07:00
Cykesiopka cc29e694eb Bug 1265164 - Always use nsCOMPtrs with getNSSDialogs(). r=keeler
MozReview-Commit-ID: 430uuWHIZjC
2016-04-27 18:16:48 -07:00
Kyle Huey a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Cykesiopka 0bfd71da46 Bug 1260643 - Convert most uses of ScopedCERTCertificate in PSM to UniqueCERTCertificate. r=keeler
MozReview-Commit-ID: JnjoUd7d2M0
2016-04-20 01:14:22 -07:00
Cykesiopka 2de066e0a6 Bug 1262645 - Address misc issues with nsGetUserCertChoice(). r=keeler
The follow issues are fixed:
  - Returning a failure result when failing to get a pref value instead of more
    gracefully falling back to a default.
  - Using an enum instead of a more strongly typed enum class.
  - Using a pref branch instead of the preferred Preferences.h API.
  - Manual memory management.
  - Unnecessary use of pointers.

MozReview-Commit-ID: FKw5kBhnwxL
2016-04-15 16:51:41 -07:00
Cykesiopka 76085e6777 Bug 1259909 - Obviate char PORT_Free() calls in PSM. r=keeler
Also converts the longer |UniquePtr<char, void(&)(void*)> foo(..., PORT_Free)|
to the shorter and equivalent |UniquePORTString foo(...)|.

MozReview-Commit-ID: LlrTNUYBP4V
2016-04-09 01:03:59 -07:00
Cykesiopka 81666b03fa Bug 1260644 - Use UniquePLArenaPool to manage PLArenaPools in PSM. r=keeler
MozReview-Commit-ID: HyLXbWoHMGz
2016-04-04 17:35:24 -07:00
Cykesiopka 40e35edded Bug 1258298 - Switch more Scoped.h templates in PSM to UniquePtr equivalents. r=keeler
MozReview-Commit-ID: 8VOhiuNOlBX
2016-03-24 18:30:37 -07:00