Commit Graph

112 Commits

Author SHA1 Message Date
J.C. Jones
4180c3dd47 Bug 1434300 - Add the DigiCert whitelisted SPKIs r=keeler
This adds the 4 digicert CAs to our whitelist as specified in Google's details
on the Chromium version of this plan [1].

[1] c022914eb2/net/data/ssl/symantec/README.md

MozReview-Commit-ID: BR7t1UheKeS
2018-02-21 14:08:59 -05:00
J.C. Jones
be3182717e Bug 1434300 - Change Symantec Distrust Algorithm's whitelist to SPKI-matching r=fkiefer,keeler
Because of the DigiCert-controlled sub-CAs and managed-CAs identified as also
needing to be whitelisted [1], and that those CAs are using an increasing number
of certificates all with different Subjects (but identical public keys) [2][3],
we will have to whitelist on SPKI rather than subject DN.

This makes the security/manager/ssl/tests/unit/test_symantec_apple_google.js
integration test different, as it now uses a real Google certificate that is
in the whitelist with only a cert verification rather than a full connection
test.

This patch does not add the DigiCert SPKIs to the list; I will do that in its
own patch.


[1] https://chromium.googlesource.com/chromium/src/+/master/net/data/ssl/symantec/README.md
[2] https://chromium-review.googlesource.com/c/chromium/src/+/916730
[3] https://crt.sh/?spkisha256=ac50b5fb738aed6cb781cc35fbfff7786f77109ada7c08867c04a573fd5cf9ee

MozReview-Commit-ID: 4qVeogDbSb
2018-02-21 14:08:47 -05:00
J.C. Jones
694c059d3b Bug 1434300 - Implement the Symantec distrust plan from Bug 1409257 r=fkiefer,keeler
The algorithm from https://hg.mozilla.org/mozilla-central/rev/595e27212723
(Bug 1409259) is adapted in this patch from nsNSSCallbacks into the TrustDomain
decisions.

This patch does not change the algorithm to use SPKI matching, nor add the
additional whitelisted intermediates from DigiCert; that will be done in a
separate commit.

This patch also does not update the pre-existing browser chrome test.

MozReview-Commit-ID: 1PdCAqo71bI
2018-02-21 14:08:18 -05:00
J.C. Jones
0318041b58 Bug 1434300 - Update Imminent Distrust status for future Symantec sanctions r=fkiefer,keeler
This patch does a few things:

1) It adds a permament test mechanism for the "imminent distrust" trust status
in nsNSSCallbacks: a simple xpcshell test to exercise a clause in the imminent
distrust logic in nsNSSCallbacks' IsCertificateDistrustImminent method.

2) This test removes test_symantec_apple_google_unaffected.js as its
functionality is rolled into the new test_imminent_distrust.js.

3) It updates the Symantec imminent distrust warning algorithm to remove the
validity date exception; this warns of the upcoming distrust for those affected
certs in Firefox 63.

This patch does not attempt to edit the browser chrome test that checks the
console; that is a subsequent patch.

MozReview-Commit-ID: 1HyVLfmEOP7
2018-02-21 07:39:36 -05:00
Sebastian Hengst
3e1039fec2 Backed out 6 changesets (bug 1434300) for frequent GTest in AllocReplacement.malloc_check
Backed out changeset 23485791d3e1 (bug 1434300)
Backed out changeset 73a952303cae (bug 1434300)
Backed out changeset 61b168663a54 (bug 1434300)
Backed out changeset ea372af453ef (bug 1434300)
Backed out changeset d8517bfe9eb2 (bug 1434300)
Backed out changeset 603b92a0ebd5 (bug 1434300)
2018-02-21 02:35:23 +02:00
J.C. Jones
2d97f0d2fa Bug 1434300 - Add the DigiCert whitelisted SPKIs r=keeler
This adds the 4 digicert CAs to our whitelist as specified in Google's details
on the Chromium version of this plan [1].

[1] c022914eb2/net/data/ssl/symantec/README.md

MozReview-Commit-ID: BR7t1UheKeS
2018-02-20 16:27:14 -05:00
J.C. Jones
ba8323eb3a Bug 1434300 - Change Symantec Distrust Algorithm's whitelist to SPKI-matching r=fkiefer,keeler
Because of the DigiCert-controlled sub-CAs and managed-CAs identified as also
needing to be whitelisted [1], and that those CAs are using an increasing number
of certificates all with different Subjects (but identical public keys) [2][3],
we will have to whitelist on SPKI rather than subject DN.

This makes the security/manager/ssl/tests/unit/test_symantec_apple_google.js
integration test different, as it now uses a real Google certificate that is
in the whitelist with only a cert verification rather than a full connection
test.

This patch does not add the DigiCert SPKIs to the list; I will do that in its
own patch.


[1] https://chromium.googlesource.com/chromium/src/+/master/net/data/ssl/symantec/README.md
[2] https://chromium-review.googlesource.com/c/chromium/src/+/916730
[3] https://crt.sh/?spkisha256=ac50b5fb738aed6cb781cc35fbfff7786f77109ada7c08867c04a573fd5cf9ee

MozReview-Commit-ID: 4qVeogDbSb
2018-02-20 16:27:14 -05:00
J.C. Jones
f4de3bbe6c Bug 1434300 - Implement the Symantec distrust plan from Bug 1409257 r=fkiefer,keeler
The algorithm from https://hg.mozilla.org/mozilla-central/rev/595e27212723
(Bug 1409259) is adapted in this patch from nsNSSCallbacks into the TrustDomain
decisions.

This patch does not change the algorithm to use SPKI matching, nor add the
additional whitelisted intermediates from DigiCert; that will be done in a
separate commit.

This patch also does not update the pre-existing browser chrome test.

MozReview-Commit-ID: 1PdCAqo71bI
2018-02-20 16:27:04 -05:00
J.C. Jones
f984cf85e5 Bug 1434300 - Update Imminent Distrust status for future Symantec sanctions r=fkiefer,keeler
This patch does a few things:

1) It adds a permament test mechanism for the "imminent distrust" trust status
in nsNSSCallbacks: a simple xpcshell test to exercise a clause in the imminent
distrust logic in nsNSSCallbacks' IsCertificateDistrustImminent method.

2) This test removes test_symantec_apple_google_unaffected.js as its
functionality is rolled into the new test_imminent_distrust.js.

3) It updates the Symantec imminent distrust warning algorithm to remove the
validity date exception; this warns of the upcoming distrust for those affected
certs in Firefox 63.

This patch does not attempt to edit the browser chrome test that checks the
console; that is a subsequent patch.

MozReview-Commit-ID: 1HyVLfmEOP7
2018-02-19 09:33:36 -07:00
David Keeler
ff8d932eb1 bug 1231203 - ensure OCSP responses to requests from private contexts aren't cached on disk r=jcj
MozReview-Commit-ID: 374f7hERLee
2018-02-08 17:16:03 -08:00
Dorel Luca
e497a1661c Backed out changeset 06f87ee5bbbb (bug 1231203) for xpcshell and TV failures on security/manager/ssl/tests/unit/test_ocsp_private_caching.js on a CLOSED TREE 2018-02-10 05:34:40 +02:00
David Keeler
0733089b1d bug 1231203 - ensure OCSP responses to requests from private contexts aren't cached on disk r=jcj
MozReview-Commit-ID: 374f7hERLee
2018-02-08 17:16:03 -08:00
David Keeler
bedf904433 bug 1421084 - part 4/4 - remove nsNSSShutDown.h and (hopefully) all references to it r=mt,ttaubert
MozReview-Commit-ID: 2mhvHsC5Nil
2018-01-24 14:44:01 -08:00
David Keeler
f592ab3550 bug 1421084 - part 3/4 - remove nsNSSShutDownObject::shutdown and virtualDestroyNSSReference r=mt,ttaubert
MozReview-Commit-ID: ErL7ZjAGVVC
2018-01-24 14:29:08 -08:00
David Keeler
96fbe77852 bug 1421084 - part 2/4 - remove nsNSSShutDownObject::isAlreadyShutDown() r=mt,ttaubert
MozReview-Commit-ID: DlS16pHE0Ik
2018-01-23 12:22:56 -08:00
David Keeler
ef94d8cd22 bug 1421084 - part 1/4 - remove now-unnecessary nsNSSShutDownPreventionLock r=mt,ttaubert
As of bug 1417680, the NSS shutdown tracking infrastructure is unnecessary (and
does nothing anyway). This series of changesets removes the remaining pieces in
a way that is hopefully easy to confirm is correct.

MozReview-Commit-ID: 8Y5wpsyNlGc
2018-01-23 10:37:47 -08:00
Chris Peterson
677bf4030c Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe
2017-11-05 19:37:28 -08:00
David Keeler
651b363b86 bug 1424392 - remove unnecessary nsINSSComponent usage in nsNSSCallbacks r=mgoodwin
PK11PasswordPromptRunnable::RunOnTargetThread instantiates nsINSSComponent and
calls GetPIPNSSBundleString/PIPBundleFormatStringFromName to get some localized
strings. Since that runs on the main thread, we can call the helpers in
nsNSSCertHelper instead.

MozReview-Commit-ID: GsHoGDKBKdB
2017-12-08 14:07:04 -08:00
Andrea Marchesini
4cdec3b5e8 Bug 1424809 - Get rid of NS_NewPostDataStream, r=valentin 2017-12-12 06:01:17 -06:00
David Keeler
c874075692 bug 1424085 - add owning handles so cert references don't leak in IsCertificateDistrustImminent r=jcj
nsIX509Cert::GetCert() returns a CERTCertificate whose reference count has
already been increased. Before this patch, when IsCertificateDistrustImminent
called CertDNIsInList(rootCert->GetCert(), RootSymantecDNs) and
CertDNIsInList(aCert->GetCert(), RootAppleAndGoogleDNs), the reference count on
those certificates would never get a corresponding decrement, so we would keep
those certificates alive until shut down. A reasonable and consistent solution
is to introduce a UniqueCERTCertificate handle in each case to own the
reference.

The status of this fix can be verified by setting MOZ_LOG="pipnss:4", running
Firefox, connecting to any host, and then shutting down. If an NSS resource
reference has been leaked, "[Main Thread]: E/pipnss NSS SHUTDOWN FAILURE" will
be in the console output. Otherwise,
"[Main Thread]: D/pipnss NSS shutdown =====>> OK <<=====" will be in the console
output.

This patch also removes nsIX509CertList::DeleteCert because it would also leak a
reference. Luckily, nothing was using it.

This patch also clarifies the implementation of nsIX509CertList::AddCert by
making the ownership transfers explicit.

MozReview-Commit-ID: 2qHo3DmhTPz
2017-12-07 15:08:43 -08:00
Tristan Bourvon
01cf3d8a39 Bug 1412646 - Initialize some uninitialized fields in security/manager/ r=keeler
MozReview-Commit-ID: HGj8xw5Uq6j
2017-10-31 11:04:40 +01:00
J.C. Jones
f263a78289 Bug 1409259 - Add a console warning for soon-to-be-distrusted roots r=keeler,ttaubert
This patch adds a new diagnostic status flag to nsIWebProgressListener,
STATE_CERT_DISTRUST_IMMINENT, which indicates that the certificate chain is
going to change validity due to an upcoming distrust event. The first of
these events is this bug, affecting various roots from Symantec.

The STATE_CERT_DISTRUST_IMMINENT flag is set by nsNSSCallbacks and passed,
via nsSecureBrowserUIImpl, to browser.js where it is used to alert the console.

Adding this sort of diagnostic printing to be accessible to browser.js is a
long-desired goal, as future functionality can start doing more decision-making
there. We may, for example, also want to degrade the lock icon, which will be
straightforward with this flag.

This commit does not implement the IsCertificateDistrustImminent method. That is
follow-on work.

MozReview-Commit-ID: 75IOdc24XIV
2017-10-18 22:29:42 -07:00
David Keeler
f50044dd9d bug 1357815 - 1/4: move VerifyCMSDetachedSignatureIncludingCertificate to where it's used r=jcj
MozReview-Commit-ID: JsBPGhDxQoS
2017-10-24 13:18:14 -07:00
Mark Goodwin
15a3f45db3 Bug 1406856 - Re-plumb nsISSLStatus.idl to carry with it the whole nsIX509CertList r=jcj,keeler
MozReview-Commit-ID: 2YDmCzqdm26
2017-10-26 17:52:11 +01:00
Sebastian Hengst
79a4e6d228 Backed out changeset 51eaba841505 (bug 1406856) for failing eslint at security/manager/ssl/tests/unit/head_psm.js:732:53 | Multiple spaces found before '='. r=backout 2017-10-28 12:49:09 +02:00
Mark Goodwin
2f1de4d489 Bug 1406856 - Re-plumb nsISSLStatus.idl to carry with it the whole nsIX509CertList r=keeler
MozReview-Commit-ID: 2YDmCzqdm26
2017-10-26 17:52:11 +01:00
David Keeler
e53b8eabd4 bug 1400913 - back out the functionality changes from bug 1364159 (but keep the test) r=jcj
Bug 1364159 introduced an optimization that attempted to avoid reading from the
user's cached certificate database as much as possible when building a verified
certificate chain. Unfortunately this had the side-effect of not preferring root
certificates in path building, which can result in unnecessarily long chains
(which rather defeats the purpose, since it means more signature verifications).
This patch reverts the functionality changes from that bug but keeps the test
that was added (the test didn't directly test the functionality changes - it's
more of a check that path building will query the cached certificate db when
necessary).

MozReview-Commit-ID: I56THTLUytH
2017-09-18 10:28:58 -07:00
Matthew Noorenberghe
aa0b100f59 Bug 306730 - Do not include the token name in prompts for the internal key slot. r=keeler
MozReview-Commit-ID: 3TPZrTQxQC5
2017-09-12 14:42:19 -07:00
Franziskus Kiefer
4b920b23df Bug 1397833 - don't assert on custom TLS key-exchange groups, r=keeler
MozReview-Commit-ID: 8oztPlzw3PB
2017-09-08 11:53:11 +02:00
Franziskus Kiefer
26f5b161a3 Bug 1396463 - add ssl_sig_rsa_pkcs1_sha1md5 case to getSignatureName, r=bustage
MozReview-Commit-ID: 1SxJjt41NOj
2017-09-04 15:24:03 +02:00
Franziskus Kiefer
081791aac5 Bug 1396463 - add ssl_sig_rsa_pkcs1_sha1 case to getSignatureName, r=bustage
MozReview-Commit-ID: 814ZXGoesQz
2017-09-04 10:57:38 +02:00
Franziskus Kiefer
1111350822 Bug 1304923 - adding key exchange group and signature scheme details to devtools view, r=keeler, Honza
This patch adds the group used for TLS key exchange and the siganture scheme of the certificate to SSLStatus and displays it in devtools.

MozReview-Commit-ID: 7aTj0U5GIvo
2017-08-28 15:29:19 +02:00
Nicholas Nethercote
d24ecfe191 Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.
2017-08-08 16:07:55 +10:00
Andrea Marchesini
9e8ae1dfd0 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Sylvestre Ledru
9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Bill McCloskey
ce42826bdf Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book
238bf154d5 Backed out changeset 4f6302a98ae4 (bug 1372405) 2017-06-21 13:59:26 +02:00
Bill McCloskey
67e8af4720 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
bbe9441993 Backed out changeset 9846de3bd954 (bug 1372405) 2017-06-20 08:27:02 +02:00
Bill McCloskey
f69608368b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Bevis Tseng
e6dc9e02bc Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Cykesiopka
916e07dbb0 Bug 1368107 - Remove TransportSecurityInfo::GetHostNameRaw(). r=keeler
GetHostNameRaw() returns a char* string, which is less safe and ergonomic
compared to the Mozilla string classes. GetHostName() can be used instead.

MozReview-Commit-ID: GYvTnISNN35
2017-06-03 13:35:51 +08:00
David Keeler
91fd4bf7e6 bug 1364159 - potentially avoid calling CERT_CreateSubjectCertList in NSSCertDBTrustDomain::FindIssuer r=Cykesiopka,jcj
CERT_CreateSubjectCertList is not an inexpensive function call, since it
enumerates the certificate database (i.e. reads from disk a lot). If we're
verifying for a TLS handshake, however, we should already have in memory a
certificate chain sent by the peer (there are some cases where we won't, such as
session resumption (see bug 731478)). If we can, we should use those
certificates before falling back to calling CERT_CreateSubjectCertList.

MozReview-Commit-ID: ASjVGsELb1O
2017-05-11 16:41:12 -07:00
Cykesiopka
16c5e5a31f Bug 1342737 - Avoid using nsCRT.h and nsCRTGlue.h in PSM. r=keeler
There are a few places where we can use the safer functionality provided by the
Mozilla string classes instead.

Also fixes Bug 1268657 (remove vestigial
TransportSecurityInfo::SetShortSecurityDescription declaration).

MozReview-Commit-ID: Cxv5B4bsDua
2017-03-28 22:57:15 +08:00
David Keeler
d28657c143 bug 1348713 - ensure CT information is set in the case of session resumption r=jcj
MozReview-Commit-ID: 7fLnMu9f1kC
2017-03-20 17:10:33 -07:00
Cykesiopka
1287b2c0bb Bug 1310127 - Part 10: Handle netwerk/protocol/http MOZ_MUST_USE functions in PSM. r=wcpan
The only unhandled call updates nsHTTPListener::mHttpResponseContentType, but
nothing actually uses the value of mHttpResponseContentType.

MozReview-Commit-ID: FQXESvoO2ZN
2016-12-28 16:25:22 +08:00
Wes Kocher
64ccd9559b Merge inbound to m-c a=merge
MozReview-Commit-ID: DCUf7VEDrTt
2017-02-17 13:38:51 -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
Tom Tromey
a4b717ab39 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs
2016-12-15 20:16:31 -07:00
Cykesiopka
1930021909 Bug 1330365 - Use mozilla::TimeStamp instead of NSPR's PRIntervalTime for OCSP timeout code. r=keeler
mozilla::TimeStamp is generally superior to PRIntervalTime, and switching lets
us get rid of yet another NSPR dependency.

This patch also:
 1. Gets rid of code in nsNSSHttpRequestSession::createFcn() that limits the
    max OCSP timeout. This is a relic from when NSS was used for OCSP requests,
    and is no longer necessary.
 2. Converts all uses of PR_NOT_REACHED() to MFBT asserts while we're nearby.

MozReview-Commit-ID: KvgOWWhP8Km
2017-01-14 13:12:43 +08:00