Граф коммитов

419 Коммитов

Автор SHA1 Сообщение Дата
David Keeler 65f33e8410 bug 1257362 - remove the code-signing usage from certverifier as nothing uses it r=Cykesiopka
MozReview-Commit-ID: 6nWy8k6fMvw

--HG--
extra : rebase_source : fa9f78d39b89bfd3416a7a869bf6436d19ac74bc
2017-10-02 16:24:38 -07:00
David Keeler 6bbfc835f0 bug 1406396 - work around NSS utils potentially loading spurious root cert modules r=mgoodwin
NSS command-line utilities may add a built-in root certificate module with the
name "Root Certs" if run on a profile that has a copy of the module file (which
is an unexpected configuration in general for Firefox). This can cause breakage.
To work around this, PSM now simply deletes any module named "Root Certs" at
startup. In an effort to prevent PSM from deleting unrelated modules
coincidentally named "Root Certs", we also prevent the user from using the
Firefox UI to name modules "Root Certs".

MozReview-Commit-ID: ABja3wpShO9

--HG--
extra : rebase_source : cfc62fb3fabf491a72f009601f3ec6973244642e
2017-10-13 11:27:30 -07:00
J.C. Jones d01c97d43a Bug 1392852 - Disable EV treatment for old StartCom root certificates r=keeler
Per the root program's request, this patch removes EV treatment for three
StartCom roots:

1) CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL
SHA-256 Fingerprint: C7:66:A9:BE:F2:D4:07:1C:86:3A:31:AA:49:20:E8:13:B2:D1:98:60:8C:B7:B7:CF:E2:11:43:B8:36:DF:09:EA

2) CN=StartCom Certification Authority, OU=Secure Digital Certificate Signing, O=StartCom Ltd., C=IL
SHA-256 Fingerprint: E1:78:90:EE:09:A3:FB:F4:F4:8B:9C:41:4A:17:D6:37:B7:A5:06:47:E9:BC:75:23:22:72:7F:CC:17:42:A9:11

3) CN=StartCom Certification Authority G2, OU=null, O=StartCom Ltd., C=IL
SHA-256 Fingerprint: C7:BA:65:67:DE:93:A7:98:AE:1F:AA:79:1E:71:2D:37:8F:AE:1F:93:C4:39:7F:EA:44:1B:B7:CB:E6:FD:59:95

MozReview-Commit-ID: COOu1zvoNWG

--HG--
extra : rebase_source : 68ce6ebd850f3a796bb52e71d05b02b8d860c9f7
2017-10-16 16:14:06 -07:00
J.C. Jones 11a9b47490 Bug 1387261 - Remove EV treatment for WoSign roots r=keeler
Per the root program's request, this patch removes EV treatment for four WoSign
roots:

Common Name: CA 沃通根证书
SHA-256 Fingerprint: D6:F0:34:BD:94:AA:23:3F:02:97:EC:A4:24:5B:28:39:73:E4:47:AA:59:0F:31:0C:77:F4:8F:DF:83:11:22:54

Common Name: Certification Authority of WoSign
SHA-256 Fingerprint: 4B:22:D5:A6:AE:C9:9F:3C:DB:79:AA:5E:C0:68:38:47:9C:D5:EC:BA:71:64:F7:F2:2D:C1:D6:5F:63:D8:57:08

Common Name: Certification Authority of WoSign G2
SHA-256 Fingerprint: D4:87:A5:6F:83:B0:74:82:E8:5E:96:33:94:C1:EC:C2:C9:E5:1D:09:03:EE:94:6B:02:C3:01:58:1E:D9:9E:16

Common Name: CA WoSign ECC Root
SHA-256 Fingerprint: 8B:45:DA:1C:06:F7:91:EB:0C:AB:F2:6B:E5:88:F5:FB:23:16:5C:2E:61:4B:F8:85:56:2D:0D:CE:50:B2:9B:02

MozReview-Commit-ID: Bxp9LgvxCsp

--HG--
extra : rebase_source : 065d98cc654d3fb22c17ea185253ce917b48e270
2017-10-16 16:08:56 -07:00
David Keeler d26e95be10 bug 1257403 - don't bother verifying CA or email certificates when importing r=Cykesiopka
Incidentally, this means we can remove certificateUsageVerifyCA and
certificateUsageStatusResponder from CertVerifier, since we no longer use them.

MozReview-Commit-ID: Bbqn8fShfTm

--HG--
extra : rebase_source : 012cb08dcbe33fe889c9f6824959b1a02cd0bdc7
2017-09-22 15:42:20 -07:00
Chris Peterson 9f4c1f5278 Bug 870698 - Part 1: Replace Assign("") with AssignLiteral(""). r=erahm
MozReview-Commit-ID: A0u9PP49OW3

--HG--
extra : rebase_source : 7d5286959f510eb4b7df1b7e32d5b9b58719c48b
extra : intermediate-source : f552b4a78236c42bc09030b3eb008725a3edb9c8
extra : source : 26ac4a1014f6661a70e3bf9f552407e12c2c3981
2017-09-03 22:12:56 -07:00
David Keeler bae8112f6b 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

--HG--
extra : rebase_source : 7db9597e25b98942450840519d707046cc660781
2017-09-18 10:28:58 -07:00
David Keeler 9f77404d3f bug 1398932 - add a preference for enabling the sqlite-backed NSS databases r=Cykesiopka,jcj
In the future, bug 1377940 will make the sqlite-backed databases the default,
but until we're sure this will stick we want to be able to control this with a
Firefox-only change. The use of a preference to configure which format to use
will hopefully allow us to restore the old behavior quickly and relatively
safely if necessary. Note that doing this should be done with care; any changes
made in the sqlite databases after upgrade migration will not be reflected if
we need to go back to the old database format. Thus, user data (imported CAs,
client certificates, and keys) can be lost.

MozReview-Commit-ID: tkovdiCU9v

--HG--
extra : rebase_source : e74358bd65afb5844fa8fc5b729eba2bbc5bb2db
2017-09-06 14:31:27 -07:00
Kris Maglione 6bad4f8ef7 Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan
Also adds a mozilla/ResultExtensions.h header to define the appropriate
conversion functions for nsresult and PRResult. This is in a separate header
since those types are not available in Spidermonkey, and this is the pattern
other *Extensions.h headers follow.

Also removes equivalent NS_TRY macros and WrapNSResult inlines that served the
same purpose in existing code, and are no longer necessary.

MozReview-Commit-ID: A85PCAeyWhx

--HG--
extra : rebase_source : a5988ff770888f901dd0798e7717bcf6254460cd
2017-08-29 21:28:31 -07:00
Stephanie Ouillon 73e9f686e8 Bug 1343202 - Utility function for decoding an InclusionProof structure; r=ckerschb,keeler
MozReview-Commit-ID: 1x2Cwan8nLL

--HG--
extra : rebase_source : 079a8945f4d04be06dd99b776246d9b96930613a
2017-08-18 09:50:49 +02:00
Stephanie Ouillon 3bac94ec4a Bug 1343202 - Move Buffer definition into its own file; r=keeler,rbarnes
MozReview-Commit-ID: JHAXllvfG3x

--HG--
extra : rebase_source : 4c18c882bea0f1d4f507baa47910672d80d73c72
2017-08-17 09:23:29 +02:00
David Keeler d11da41c16 bug 1389664 - centralize on-demand empty pin initialization of the user's NSS database r=Cykesiopka,jcj
The sqlite-backed NSS database implementation requires explicitly setting some
kind of pin (password, really). To maintain behavior compatibility with the old
database implementation, we set the pin to the empty string as necessary.
Previously this would only happen on Android (NSS_DISABLE_DBM builds), but
because we're moving towards using the sqlite-backed implementation on all
platforms, we should enable this code everywhere and move it to a more central
location.

This also fixes some now-unnecessary test behavior.

MozReview-Commit-ID: KKtxmvOZt78

--HG--
extra : rebase_source : 0de061928bf63b62386a4e244b326610d32cd122
2017-07-18 15:05:58 -07:00
David Keeler 8b85837b61 bug 1372656 - load loadable roots on a background thread r=Cykesiopka,jcj
In a profile, loading the loadable roots PKCS#11 module (i.e. the built-in root
CA module) accounted for about 60% of the time to initialize PSM/NSS. Since we
only need the roots module loaded when we're actually looking for an issuing
certificate or querying a certificate's trust, we can do the load
asynchronously (where it hopefully finishes before we actually need it, because
otherwise we'll have to wait anyway).

MozReview-Commit-ID: JyY6NtpQAUj

--HG--
extra : rebase_source : f63a697b18a409dd042289afa2b727b09f81f19f
2017-06-08 16:10:00 -07:00
David Keeler f60f796fb1 bug 1356623 - remove now-unnecessary CNNIC certificate whitelist r=jcj
As a result of CNNIC issuing an unconstrained intermediate certificate that
misissued an end-entity certificate for google.com (see bug 1146026 and
bug 1177209), we implemented a system that would in theory enable Firefox to
continue to trust certificates that were valid at the time but not newly issued
certificates. This consisted of a whitelist added in bug 1151512. The CNNIC
roots have since been removed from NSS in bug 1380868. We can now remove the
whitelist in Firefox.

MozReview-Commit-ID: 7VXOuvwzbct

--HG--
extra : rebase_source : 20e6e39c40417a9b7f2962e06cf9de85e3e08ee8
2017-08-03 16:17:11 -07:00
Kate McKinley a85cfefb59 Bug 1380872 remove EV treatment for "China Internet Network Information Center EV Certificates Root" r=keeler
Disable EV treatment in preparation for removing the CNNIC root certificates
from NSS.

MozReview-Commit-ID: Anz1vXqABUM

--HG--
extra : rebase_source : 694d8321b9f5994fe57e81cb3169681c5e491910
2017-07-18 11:18:47 -07:00
Kate McKinley 67464ef73c Bug 1380821 remove EV treatment for UTN-USERFirst-Hardware r=keeler
The CA, Comodo, has requested that we remove the UTN-USERFirst-Hardware
root certificate from NSS. First remove EV treatment.

MozReview-Commit-ID: 8OTsevYOuKq

--HG--
extra : rebase_source : aabb219bcbee1c667bae29df618449df4b50d548
2017-07-18 11:28:26 -07:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Cykesiopka 0adca03a5d 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

--HG--
extra : rebase_source : da257f5fba2c26cd92d932c3d1d363458b84a65b
2017-06-03 13:35:51 +08:00
David Keeler 3e029fa5c8 bug 1359514 - remove EV treatment for "Swisscom Root EV CA 2" r=kmckinley
The "Swisscom Root EV CA 2" root is no longer in use and will be removed from
the built-in root CA list. However, we have to remove its EV treatment first.

MozReview-Commit-ID: 2TZRt5px7bl

--HG--
extra : rebase_source : 68902555ffe62a973cfaac3af531e96aa288a339
2017-05-25 13:55:15 -07:00
David Keeler 3ddfb3c1ce 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

--HG--
extra : rebase_source : 1efc635d4a98079c87f77ef3794e4b2f20eec59f
2017-05-11 16:41:12 -07:00
Cykesiopka 7b21c27198 Bug 1308143 - Clean up ExtendedValidation.cpp. r=keeler
In general, the changes here attempt to:
1. Fix up the style to match modern PSM style.
2. Shorten unnecessarily long code.
3. Reduce global scope pollution.

MozReview-Commit-ID: GFyqFgV0RLD

--HG--
extra : source : 8cb5ee464e42ff07324922abeffef00c7cb1fb1b
2017-05-09 00:53:21 +08:00
Cykesiopka a05d6a925c Bug 1361750 - Disable various MSVC 2017 warnings in PSM to unbreak --enable-warnings-as-errors builds. r=keeler
MSVC 2017 headers aren't warning free at the -Wall level.
Since PSM enables -Wall in some moz.build files, this breaks
--enable-warnings-as-errors builds.
As a temporary measure, disable enough warnings to get working builds.

MozReview-Commit-ID: G0oUsAYYct2

--HG--
extra : rebase_source : dc37783c89e66a54510c9940f9eaa5a4340ef43e
2017-05-05 00:41:33 +08:00
David Keeler c138b8d0b6 bug 1349312 - part 1/2: patch CT implementation to include debug-only test logs r=Cykesiopka,jcj
MozReview-Commit-ID: Gay4bliuiDc

This modifies getCTKnownLogs.py to inject 3 debug-only Certificate Transparency
log keys and 2 organizations ("Mozilla Test Org 1" and "2") for use with
integration tests. Also updates CTKnownLogs.h as generated by the python script.

The debug logs use the "default", "secp256r1", and "alternate" keys that are
already present in our testing infrastructure (see pykey.py).

--HG--
extra : rebase_source : 3d4fc736f840cd080fab6b8c6c5b53cc9361abf2
2017-04-19 14:02:26 -07:00
David Keeler 455ab646d3 bug 1337950 - work around failing to load a FIPS PKCS#11 module DB in NSS initialization r=Cykesiopka,jcj
Firefox essentially does not support running NSS in FIPS mode any longer. This
has always been the case on Android from what I can tell and it has been the
case on OS X since at least version 34 (see bug 1047584). It became the case on
Windows as of version 53 (see bug 1295937). Unfortunately, before this patch,
if a user attempted to run an affected version of Firefox using a profile
directory containing an NSS database collection that had FIPS enabled, NSS
initialization would fail and fall back to running in no DB mode, which had the
side-effect of making any saved passwords and certificates unavailable. This
patch attempts to detect and work around this failure mode by moving the
PKCS#11 module DB (which is where the FIPS bit is set) to a backup location and
basically running with a fresh, non-FIPS module DB. This allows Firefox to
initialize NSS with the preexisting key and certificate databases available.

MozReview-Commit-ID: 1E4u1ngZyRv

--HG--
rename : security/manager/ssl/tests/unit/test_sdr_preexisting.js => security/manager/ssl/tests/unit/test_broken_fips.js
rename : security/manager/ssl/tests/unit/test_sdr_preexisting/key3.db => security/manager/ssl/tests/unit/test_broken_fips/key3.db
extra : rebase_source : 887f457e998d6e57c6536573fbe3cb10547fe154
2017-04-20 10:31:22 -07:00
David Keeler af0ce9fbd6 bug 1357226 - work around a library inefficiency with EC keys when verifying ECDSA signatures r=fkiefer,jcj
Calling VFY_VerifyDigestDirect causes the provided SECKEYPublicKey to be
reimported to the softoken regardless of if it already exists on it. EC keys
must be verified upon import (to see if the point is on the curve to avoid some
small subgroup attacks), and so repeatedly doing this with a static key (say,
for example, a key corresponding to a built-in certificate transparency log) is
inefficient. This patch alters the certificate transparency implementation to
import these keys each once and then use PK11_Verify for ECDSA signature
verification, which doesn't have the same drawback.

Since this change causes CertVerifier to hold an NSS resource (via its
MultiLogCTVerifier having a list of CTLogVerifier, each of which now has a
SECKEYPublicKey), nsNSSComponent has to make sure it goes away before shutting
down NSS. This patch ensures this happens in nsNSSComponent::ShutdownNSS().

MozReview-Commit-ID: 6VSmz7S53y2

--HG--
extra : rebase_source : 4994db9de80a6c1aec3d7e322ff30d040140ce92
2017-04-11 14:11:28 -07:00
David Keeler 07f34ebd2f bug 1352262 - make OCSP timeout values configurable r=Cykesiopka,jcj
The default OCSP timeout for soft-fail DV is still 2 seconds. This patch makes
it configurable on the interval (0, 5] seconds.

The default OCSP timeout for EV and hard-fail DV is still 10 seconds. This patch
makes it configurable on the interval (0, 20] seconds.

MozReview-Commit-ID: CPd8pwYrJhj

--HG--
extra : rebase_source : 45bd7d06ea013f0a776ea18be9408dedb18271d8
2017-03-31 15:21:40 -07:00
Adam Velebil 69da80395b Bug 1308100 - Replace PL_strlen/PL_strnlen with strlen/strnlen;r=erahm
MozReview-Commit-ID: CGnzomkIsi5
***
Bug 1308100 - Replace PL_strlen/PL_strnlen with strlen/strnlen;r?erahm

--HG--
extra : rebase_source : a14b1538ed91848ecd02fb4607bce4cb9b2ab7c4
2017-04-13 20:47:00 +02:00
David Keeler 47263aefb3 bug 1349762 - handle two GlobalSign EV root transfers r=Cykesiopka,jcj
(adapted from bug 1349762 comment 0)
Google Trust Services (GTS) recently purchased two roots from GlobalSign that
are both enabled for EV treatment: "GlobalSign Root CA - R2" and "GlobalSign ECC
Root CA - R4".

However, GTS does not have an EV audit, so we are going to turn off EV treatment
for both of those root certificates.

But "GlobalSign Root CA - R2" has intermediate cert "GlobalSign Extended
Validation CA - SHA256 - G2" that continues to be controlled by GlobalSign, to
be used to migrate their customers off dependence on that root.

This patch removes EV treatment for "GlobalSign ECC Root CA - R4". It also
removes EV treatment for all chains rooted in "GlobalSign Root CA - R2" unless
the "GlobalSign Extended Validation CA - SHA256 - G2" intermediate is in the
chain.

MozReview-Commit-ID: Ej9L9zTwoPN

--HG--
extra : rebase_source : 575f1a48646cf728d879d0cf53c888654e4a32ad
2017-04-03 17:17:38 -07:00
Cykesiopka 7995951109 Bug 1338897 - Avoid using NSS Base64 functions in PSM. r=keeler
The NSS Base64 functions are less safe and convenient to use than the XPCOM ones.
They're also an unnecessary dependency on NSS.

The NSS Base64 functions behave slightly differently than the XPCOM ones:
1. ATOB_ConvertAsciiToItem() / NSSBase64_DecodeBuffer() silently ignore invalid
   characters like CRLF, space and so on. Base64Decode() will return an error
   if these characters are encountered.
2. BTOA_DataToAscii() will produce output that has CRLF inserted every 64
   characters. Base64Encode() doesn't do this.

For the reasons listed below, no unexpected compatibility issues should arise:
1. AppSignatureVerification.cpp already filters out CRLF and spaces for Manifest
   and Signature values before decoding.
2. ExtendedValidation.cpp is only given what should be valid hard-coded input to
   decode.
3. ContentSignatureVerifier.cpp already splits on CRLF for when it needs to
   decode PEM certs. Spaces shouldn't be likely.
   For Content-Signature header verification, examination of real input to a
   running instance of Firefox suggests CRLF and spaces will not be present in
   the header to decode.
4. nsCryptoHash.cpp encode is affected, but we actually don't want the CRLF
   behaviour.
5. nsDataSignatureVerifier.cpp decode is affected, but we add whitespace
   stripping to maintain backwards compatibility.
6. nsKeygenHandler.cpp encode is affected, but the previous CRLF behaviour was
   arguably a bug, since neither WHATWG or W3C specs specified this.

MozReview-Commit-ID: IWMFxqVZMeX

--HG--
extra : rebase_source : 4863b2e5eabef0555e8e1ebe39216d0d9393f3e9
2017-03-17 23:31:40 +08:00
David Major ed12ea611f Bug 1346078: Remove nsAString_internal and just use the nsAString name directly. r=bsmedberg
MozReview-Commit-ID: DWDEDMIVKm7

--HG--
extra : rebase_source : 7fe8dc07c816dca234c67761e61cdee372a87e97
2017-03-10 15:17:23 +13:00
Joel Maher 41e6060a92 Bug 1344829 - add BUG_COMPONENT to security/* files. r=keeler
MozReview-Commit-ID: AS6e14FOqsb
2017-03-09 05:33:30 -05:00
Cykesiopka 0aa3a82f68 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

--HG--
extra : rebase_source : 547158311de136054acff2539ea6a8bdbfb8227b
2016-12-28 16:25:22 +08:00
David Keeler 8fa9a9c682 bug 1294580 - prevent end-entity certificates from being their own trust anchors r=Cykesiopka
MozReview-Commit-ID: KaZaFG8AWwl

--HG--
extra : rebase_source : 8cba6d29febc73e65ff54bc754ab9d016e140d6f
2017-02-24 12:32:41 -08:00
Cykesiopka 90e8bc1b28 Bug 1026589 - Enable more GCC/Clang compiler warnings (-Wextra) for security/certverifier. r=keeler
Original patch by Camilo Viecco.

MozReview-Commit-ID: 4LWpueoyQHL

--HG--
extra : rebase_source : 85563711287ad851019c4031d97c1d309f066139
2017-02-23 23:19:55 +08:00
David Keeler fca1830f46 bug 1341905 - double-check that uses of CERT_LIST_* are safe in PSM r=jcj
MozReview-Commit-ID: BhGHd9xUUbP

--HG--
extra : amend_source : b7f8260719a3d918867a8ed7cf092e2909193bb5
2017-02-22 15:07:05 -08:00
Jeff Walden d5deea2a4f Bug 1338374 - Make Vector not use AlignedStorage for its inline element storage. r=froydnj, r=keeler
--HG--
extra : rebase_source : 81eb5278404b4843ed5a59819f6000f74200aa41
2017-01-30 15:56:05 -08:00
Kai Engert fb7e5cbb5d Bug 1324096, PSM should check the roots module for a flag, that allows to distinguish between Mozilla-CA-Policy CAs and other CAs, r=dkeeler 2017-02-22 18:02:48 +01:00
Jonathan Hao 4489e44dc2 Bug 1323644 - Isolate the HSTS and HPKP storage by first party domain (PSM) r=Cykesiopka,keeler
MozReview-Commit-ID: HhFFqtpBNjO

--HG--
extra : rebase_source : 980dfd035efc4886a7ca393923c2c2783cc76a7d
2017-02-14 10:29:10 +08:00
Wes Kocher 8c4ce17711 Merge inbound to m-c a=merge
MozReview-Commit-ID: DCUf7VEDrTt
2017-02-17 13:38:51 -08:00
Vedant Sareen 7d4bd52fae 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
David Major fff91cf0bf Bug 1335632 - Split out the const and mutable parts of myTrustedEVInfos. r=keeler
.rdata:    5536 bytes change
 .data:   -5760 bytes change

--HG--
extra : rebase_source : 2aa718f0744760cab5f5146d73139dace24a3225
2017-02-17 15:31:05 +13:00
David Keeler 2950b86660 bug 1339010 - ensure pinning and CT telemetry info has been initialized r=jcj
MozReview-Commit-ID: F7pOqCK145n

--HG--
extra : rebase_source : 7138aca9769f6719e35073f16b835159c7929684
2017-02-13 16:47:43 -08:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Tom Tromey f8ab4ddf02 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH

--HG--
extra : rebase_source : 08460997dc3fd91f3065c718e17b41bb4acf8bae
2016-12-09 10:00:01 -10:00
David Major 66f98480ef Bug 1335294: Remove const from data tables under security/ for better codegen on Windows. r=keeler
MozReview-Commit-ID: 3k1Gpm0ugY2
2017-02-13 09:41:20 +13:00
David Keeler 31150dd09f bug 1335904 - disable EV treatment for TurkTrust H6 root certificate r=jcj
MozReview-Commit-ID: FzQsKAuuVcX

--HG--
extra : rebase_source : 424699fa3a680939ee047037b4f37fc48af1b680
2017-02-02 14:37:49 -08:00
David Keeler 9f9d96b6c8 bug 1307984 - enable "LuxTrust Global Root 2" for EV r=jcj
MozReview-Commit-ID: FVFHvydyb39

--HG--
extra : rebase_source : 4f12a04548b40bfac46bf97061108f5e1a978e74
2017-01-31 15:55:02 -08:00
Phil Ringnalda 0efec638f3 Merge m-c to a CLOSED TREE autoland 2017-02-01 20:42:06 -08:00
Phil Ringnalda d20e4431d0 Backed out changeset b03c9f4ac1b0 (bug 1335294) for Windows PGO bustage
CLOSED TREE
2017-02-01 19:17:21 -08:00
David Major 369d1056a8 Bug 1335294: Add constexpr to data tables under security/ for better codegen on Windows. r=keeler
MozReview-Commit-ID: 3OMBGfLKP9I

--HG--
extra : rebase_source : 9422b385ce03ddef674167df41665224e4f9b6f3
2017-02-01 14:59:57 +13:00
Sergei Chernov b3b80907d0 Bug 1320566 - Certificate Transparency - implement CT Policy. r=Dolske,keeler
MozReview-Commit-ID: LcMdKcgBStG

--HG--
extra : rebase_source : 38b2531e9abb8a84d32c437d13fab881f2c49f18
2017-01-09 08:22:28 +02:00
David Keeler 04becd07e6 bug 1303383 - enable 5 Amazon root CAs for EV r=jcj
MozReview-Commit-ID: JRs7CWwafSK

--HG--
extra : rebase_source : 710439bbd2814b8eddd04149172495adf0408131
2017-01-31 16:05:35 -08:00
Cykesiopka df8dcae128 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

--HG--
extra : rebase_source : ea832a1acc4423cf6cfc98862af6b1c29a83ce56
2017-01-14 13:12:43 +08:00
Andrea Marchesini 359ae91eac Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
David Keeler 472b6a4be3 bug 1330043 - disable SHA-1 in signatures on certificates issued by publicly-trusted roots r=jcj
Unfortunately, this doesn't cover delegated OCSP responder certificates. While
gathering telemetry on the use of SHA-1, we encountered bug 1183822 (basically,
that the method of gathering telemetry was causing OCSP verification failures
due to delegated responders signed with SHA-1). As a temporary solution, we
changed the verifier to always allow SHA-1 for OCSP certificates when verifying
an OCSP response. Consequently, we now have no idea what the compatibility
impact of disabling SHA-1 in OCSP responder certificates will be, so it's
probably not a good idea to do that right now.

Even if someone does manage to forge an OCSP responder certificate using a SHA-1
collision, they will have about as much power as an active network attacker
blocking OCSP requests or injecting bad stapled OCSP responses, so this isn't a
disaster.

MozReview-Commit-ID: 10r23W1APiR

--HG--
extra : rebase_source : dc003c4812677c40882506b1b6b1e1f68d7e6e92
2017-01-10 14:48:30 -08:00
Cykesiopka 56c6899d8e Bug 1325107 - Stop using PR_ASSERT() in PSM. r=mgoodwin
PR_ASSERT() is an unnecessary dependency on NSPR.
We can use MOZ_ASSERT() instead, which accomplishes the same task but doesn't
depend on NSPR.

MozReview-Commit-ID: 9gyWUkv3KxQ

--HG--
extra : rebase_source : 313ce6c8de3db3ce72635e37f09d28316ae02c51
2017-01-02 14:11:30 +08:00
David Keeler d339ca2730 bug 1312827 - make the certificate blocklist only apply to TLS server certificates r=jcj,mgoodwin
(Note that content signature verification does not use the unified certificate
verifier and thus will still consult OneCRL.)

MozReview-Commit-ID: 6KvHOngpabT

--HG--
extra : rebase_source : 601f4d8d1c66befb77d0c07a2d84f3f04416f996
2016-12-22 16:57:20 -08:00
David Keeler 0e8a35a56d Backed out changeset 68d6f69e0837 (bug 1301407) for not being necessary any longer r=dragana
MozReview-Commit-ID: EcoJ3BEpRlQ

--HG--
extra : histedit_source : 98c0f5cf8f3f00afc581b746aca93e16c5997795
2016-12-21 16:22:04 -08:00
Cykesiopka e8b35af2ec Bug 1313715 - Avoid unnecessary uses of PR_SetError() under security/apps/ and security/certverifier/. r=keeler
The PR_SetError() + PR_GetError() pattern is error prone and unnecessary.

Also fixes Bug 1254403.

MozReview-Commit-ID: DRI69xY4vxC

--HG--
extra : rebase_source : aa07c0dfb5cc2a203e772b415b7a75b27d9bad3c
2016-12-14 20:10:25 +08:00
Wes Kocher d360bdebf5 Merge inbound to central, a=merge 2016-12-01 15:31:47 -08:00
Sergei Chernov 19e9f4d7ed Bug 1317951, part 2 - Certificate Transparency - basic support for disqualified logs. r=keeler
MozReview-Commit-ID: 4y2JYFnO9Xm

--HG--
extra : rebase_source : 3d6dbfa4d0a6a24dbd8907f42071943895ba068a
2016-11-29 22:51:46 +02:00
Sergei Chernov 08a30eac51 Bug 1317951, part 1 - Certificate Transparency - extracted verification related fields from SCT to a separate struct. r=keeler
MozReview-Commit-ID: 3iHUdZrzyXB

--HG--
extra : rebase_source : d5590733c87c3a8a525eb29dabfdb9be2822a0a6
2016-11-23 15:37:31 +02:00
Ms2ger b4ff4ad7ea Bug 1319831 - Clarify some code with explicit casts; r=Waldo 2016-12-01 09:23:21 +01:00
Ms2ger 53af63d8fa Bug 1319831 - Remove an unbalanced pragma from Vector.h; r=Waldo 2016-12-01 09:23:21 +01:00
Jonathan Hao 6fe3399188 Bug 1315143 - Disable warnings caused by including BasePrincipal.h r=Cykesiopka,keeler
--HG--
extra : rebase_source : 79e9d80eada5e4c0450852da4d0bbc42e5e9f1bf
2016-11-23 14:56:20 +08:00
Jonathan Hao 88a5aac5aa Bug 1315143 - Make OCSP use Origin Attribute framework (PSM). r=Cykesiopka,keeler
--HG--
extra : rebase_source : 6ee53f5f4ce6a0cc842eb27c6890bdfde9563237
2016-11-14 18:26:15 +08:00
Carsten "Tomcat" Book e7ca75286b Merge mozilla-central to inbound 2016-11-16 14:53:15 +01:00
Sergei Chernov fd387b2ec7 Bug 1308787 - Certificate Transparency - script for generating the static list of known logs. r=Cykesiopka,keeler
MozReview-Commit-ID: 9z7Ac5OQqOP

--HG--
extra : rebase_source : 99db3caf90f0cb109727787a24dd80022d9bb25e
2016-11-08 13:54:39 +02:00
Carsten "Tomcat" Book 788a6efc4c Backed out changeset 81a11a25d25d (bug 1315143) 2016-11-14 12:52:16 +01:00
Jonathan Hao 06ffb1f775 Bug 1315143 - Make OCSP use Origin Attribute framework (PSM). r=mayhemer
--HG--
extra : rebase_source : 5047ebd0245729109635ba5ad99dc3f6a18b57ae
2016-11-14 18:26:15 +08:00
David Keeler 8c2f5cbb94 bug 1301407 - add annotated crashes to find out why PSM initialization is failing r=dragana
Crash reports indicate LoadExtendedValidationInfo is failing. This adds
annotated crashes that should point us at exactly what is failing. (Note that
because Nightly builds aren't built with DEBUG defined, the majority of
LoadExtendedValidationInfo isn't even run, so we can ignore that code.)

--HG--
extra : amend_source : 0940efc65bb706b572f0699ab5c66b82d6591d30
2016-11-14 12:44:53 -08:00
Jonathan Hao 736db2051a Bug 1312794 - Annotate OCSP requests by first party domain. (adapted from Tor Browser patch #13670) r=keeler
--HG--
extra : rebase_source : 1ba4d78756f9170c1ba05738dda06b9ad00a3231
2016-11-03 17:53:52 +08:00
Jan de Mooij 31df59e394 Bug 1311996 - Fix code using pkix::Result to not conflict with the new mozilla::Result type. r=keeler 2016-10-31 10:05:13 +01:00
David Keeler 544761d217 bug 1309707 - revoke StartCom and WoSign certificates issued after 21 October 2016 r=Cykesiopka,jcj
MozReview-Commit-ID: 1itMZuWY9HO

--HG--
extra : rebase_source : 5e46c04d959ab1b6e7c961e0b5d4fff7ad6417bc
2016-10-12 17:02:33 -07:00
David Keeler b3a0669843 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

--HG--
extra : rebase_source : 5b2e76079c256f7e3c55b1d4ec0d9f654fec44f6
2016-09-30 18:08:08 -07:00
Jonathan Hao 8c7b033b68 Bug 1264562 - Part 5: Double key OCSP cache with firstPartyDomain (adapted from Tor Browser patch #13670) r=keeler
--HG--
extra : rebase_source : cfca6f16dcd315c03704e75ed63181466a8eb5c4
2016-10-18 17:08:39 +08:00
Jonathan Hao d9e14ecf6a Bug 1264562 - Part 4: Instantiates an NSSCertDBTrustDomain containing the first party domain (adapted from Tor Browser patch #13670) r=keeler
--HG--
extra : rebase_source : c43aa11ae06a3281219d1c70c0ec274c258e43c8
2016-10-04 16:49:55 +08:00
Wes Kocher 13054d32fc Backed out changeset 003ec40aa484 (bug 1227638) for android Cpp failures a=backout 2016-10-17 15:08:41 -07:00
David Keeler ec181af1f7 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

--HG--
extra : rebase_source : 344b68c81af1ed3fb038e4e96c3c50e939d32c3d
2016-09-30 18:08:08 -07:00
David Keeler 238b27055a bug 1282008 - update CNNIC whitelist to remove expired certificates r=rbarnes
MozReview-Commit-ID: 1OopsrAxXrv

--HG--
extra : rebase_source : 49813d3da508059f503304a98aa8a03777d4f4ce
2016-10-06 14:45:51 -07:00
Cykesiopka a5b764f858 Bug 495357 - Update some documentation concerning SaveIntermediateCerts(). r=kaie,me
Original patch by Wan-Teh Chang.

MozReview-Commit-ID: 3ElvC7DanYJ
2016-10-11 19:39:00 +02:00
Cykesiopka 275d94abd0 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

--HG--
extra : rebase_source : f09e37c6a3a930c30cce003139df86bc84d771ee
2016-10-10 15:44:41 +08:00
Cykesiopka ca5051d9c8 Bug 1296214 - Stop storing handle to CERTCertificate in ExtendedValidation.cpp. r=keeler
This may save us some memory and reduce the number of static constructors.

MozReview-Commit-ID: FNIkiFtRjfK

--HG--
extra : rebase_source : d2781f11db7a1f8370c0e6c6c8e6f0fb52122614
2016-10-06 16:43:45 +08:00
David Keeler 8d6b6a78fe bug 1243923 - add support for the CA/Browser Forum EV OID r=Cykesiopka,jcj
MozReview-Commit-ID: 4zqzistEhvo

--HG--
extra : rebase_source : 62d28c3715fcb225ec83ba422621dd3f8c40f708
2016-09-02 16:39:15 -07:00
Sergei Chernov 976d5c3f1d Bug 1293231 - Certificate Transparency - basic telemetry reports; r=Cykesiopka,keeler
MozReview-Commit-ID: EGvuZADObJo

--HG--
extra : rebase_source : 9a059c9f8e2fdf9bfc693b0b5649808b1beeb67b
2016-08-11 13:41:50 +03:00
David Keeler b1cb7643ef bug 1302140 - add policy to disable SHA-1 except for certificates issued by non-built-in CAs r=jcj,rbarnes
MozReview-Commit-ID: 2uwHPxk0VhZ

--HG--
extra : rebase_source : 1c7b5d2559139fa8286342decf4e4f7c83317e29
2016-09-14 15:11:15 -07:00
Sebastian Hengst d8888f81d1 Backed out changeset 2df66e8b7411 (bug 1302140) for Windows build bustage in CertVerifier.cpp. r=backout on a CLOSED TREE 2016-09-21 20:47:08 +02:00
David Keeler d374bc442a bug 1302140 - add policy to disable SHA-1 except for certificates issued by non-built-in CAs r=jcj,rbarnes
MozReview-Commit-ID: 2uwHPxk0VhZ

--HG--
extra : rebase_source : 5b1342abc2eb260ec91464b3a1d331baf8968460
2016-09-14 15:11:15 -07:00
Igor 60cd1e3bb7 Bug 1296180 - Replace more uses of PR_ARRAY_SIZE with mozilla::ArrayLength. r=keeler,mt 2016-09-09 13:17:52 -07:00
Cykesiopka 80c7f24081 Bug 1274135 - Replace char_ptr_cast() and uint8_t_ptr_cast() with mozilla::BitwiseCast. r=keeler,valentin
The functions aren't necessary now that we have BitwiseCast.

MozReview-Commit-ID: 2nzOuwAop4Y

--HG--
extra : rebase_source : 0cb2c16f484a81b2e77384564973b58ac2d10fb9
2016-09-08 20:46:26 +08:00
Ryan VanderMeulen 57d3c61d9b Backed out changeset db5d2a3899c0 (bug 1274135) for bustage. 2016-09-07 20:52:18 -04:00
Cykesiopka 0193f94d53 Bug 1274135 - Replace char_ptr_cast() and uint8_t_ptr_cast() with mozilla::BitwiseCast. r=keeler,valentin
The functions aren't necessary now that we have BitwiseCast.

MozReview-Commit-ID: 2nzOuwAop4Y

--HG--
extra : rebase_source : 196449249eec75b8eb10e59662231c3f4e83c268
2016-09-01 15:58:51 +08:00
Cykesiopka 2e47d34ebc Bug 1256302 - Remove CertVerifier::InitCertVerifierLog(). r=jcj 2016-09-02 10:45:47 +02:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Cykesiopka 9529f2321e Bug 1294011 - Obviate manual calls to SECITEM_FreeItem() in PSM. r=keeler
MozReview-Commit-ID: 7RNV0YNraBx

--HG--
extra : rebase_source : bd4c8981b52e3f5a504fc09958872415cf757eff
2016-08-13 21:45:00 +08:00
Cykesiopka 2c9b1285df Bug 1289455 - Obviate manual CERT_DestroyCertificate() calls in PSM. r=dkeeler
MozReview-Commit-ID: Aoi1VWvkNjp

--HG--
extra : transplant_source : B%8F9%E7%E8%84%7D%D1%7B%5Due%ED%9A%E8%DE%05%5B%E2D
2016-08-05 23:57:44 +08:00
Sergei Chernov 21be681857 Bug 1284256 - Certificate Transparency - verification of Signed Certificate Timestamps (RFC 6962); r=keeler, r=Cykesiopka
MozReview-Commit-ID: IgcnyBH4Up

--HG--
extra : transplant_source : %98%A3%5E%B4%DA%89qI1%01A%F8%FF%C7%1FS%D4%23v%B3
2016-07-05 08:35:06 +03:00
David Keeler 67199d7bf6 bug 1289885 - Enable VeriSign Class 3 Public PCA - G4 for EV in PSM r=jcj
MozReview-Commit-ID: GDZnZcVCNl6

--HG--
extra : rebase_source : ffdfa0fac7d4114e1251d00ced4c6ca7aab1ec86
2016-07-27 14:06:09 -07:00
Andi-Bogdan Postelnicu d19b17ffc3 Bug 1289366 - added return statement for CharToByte when assertion fails. r=keeler
MozReview-Commit-ID: LDAamOxHdli

--HG--
extra : rebase_source : 7a180b058c3d756074b4cb2f56356c41eaf9919d
2016-07-26 12:48:49 +03:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
David Keeler a77caa9d20 bug 1274677 - Enable Certplus and OpenTrust root certificates for EV in PSM r=Cykesiopka
MozReview-Commit-ID: 4rZ0NIEyKF6

--HG--
extra : rebase_source : 089184f70e3a6949da5211f464c51fb113db997a
2016-07-15 14:51:08 -07:00
Sergei Chernov edb1f658f6 Bug 1275238 - Certificate Transparency support in mozilla::pkix; r=keeler
MozReview-Commit-ID: HZwzSgxarTw

--HG--
extra : transplant_source : %BF%F9%A8T%C6x%82%03%3Ez%9F%3BT%E3%1B%11s%294%F4
2016-06-15 11:11:00 +03:00
David Keeler 3fed4e5ecc bug 1272858 - use a name-agnostic method to find the built-in root PKCS#11 slot r=Cykesiopka
Previously this implementation would use the expected names of the built-in
module and slot to get a handle on them. This doesn't work on distributions that
use other names. The new implementation searches through the slots from the
default module list for one where PK11_HasRootCerts returns true (which
indicates that NSS considers that slot to contain the default built-in root
list).

MozReview-Commit-ID: LmX27hQfFJU

--HG--
extra : rebase_source : 50383dcc77257fe08ce2c7d908e95cda7c4bbe9d
2016-06-23 15:43:47 -07:00
David Keeler baead5135e bug 1277240 - don't import trust anchors in SaveIntermediateCerts r=Cykesiopka
MozReview-Commit-ID: KHwA2LJSeUS

--HG--
extra : rebase_source : e1f7a469d2dc8608adf4b0172f99d9adb192bbb5
2016-06-02 13:17:14 -07:00
Sergei Chernov d46c2e938b Bug 1241574 - Certificate Transparency - base definitions and serialization to/from TLS wire format. r=keeler, r=Cykesiopka
MozReview-Commit-ID: KmJOr2crof7

--HG--
extra : transplant_source : %97%2A%03p%7CP%09%CA%60J%D22%91%3C%C1%C9%B8%C6%89%D8
2016-04-11 16:17:25 +03:00
Cykesiopka 0b04616a47 Bug 1271496 - Stop using Scoped.h in non-exported PSM code. r=keeler
Scoped.h is deprecated in favour of the standardised UniquePtr.

This patch removes use of Scoped.h everywhere in PSM except ScopedNSSTypes.h,
which is exported. Other consumers of ScopedNSSTypes.h can move off Scoped.h
at their own pace.

This patch also changes parameters and return types of various functions to make
ownership more explicit.

MozReview-Commit-ID: BFbtCDjENzy

--HG--
extra : transplant_source : %0B%C7%9F%40%FA9%A4%F2%5E%0D%92%1C%A6%A49%94%C3%7E%1Cz
2016-05-23 19:50:26 -07:00
Cykesiopka 1d22abcec2 Bug 1271953 - Remove nss_addEscape(). r=mgoodwin
The function basically duplicates existing Mozilla string class functionality.

MozReview-Commit-ID: 9IFEXuT9cW1

--HG--
extra : rebase_source : 0d0c4492a63f7a168b6092fdb2e1bf8ec09d5308
2016-05-16 09:04:09 -07:00
Cykesiopka 6b12fc8650 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

--HG--
extra : rebase_source : c1725c8363c0f7f9877601de5ab5f152ef4d0439
2016-05-18 21:20:56 -07:00
Cykesiopka 5e0c49ff77 Bug 1271501 - Remove unnecessary uses of reinterpret_cast in PSM. r=keeler
These uses of reinterpret_cast are either pointless, or can be removed via
refactoring.

MozReview-Commit-ID: Aw2rlJfrT6J

--HG--
extra : rebase_source : 243d6c38eedc086c59d47c93d4a57cb6a922910a
2016-05-18 18:58:40 -07:00
Cykesiopka 18c21f386e Bug 1271495 - Replace uses of ScopedPK11Context with UniquePK11Context. r=keeler,mcmanus
ScopedPK11Context is based on Scoped.h, which is deprecated in favour of the
standardised UniquePtr.

MozReview-Commit-ID: HE8UY1hOuph

--HG--
extra : transplant_source : 4%BF%81M%09Q-%2A%E6%04%86i%18%1B%3CL%90%88%04%C7
2016-05-13 05:53:57 -07:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
David Keeler c17f3a2733 bug 982932 - only allow Netscape-stepUp to be used for serverAuth for old CA certificates r=Cykesiopka,jcj
MozReview-Commit-ID: 88JhIU1pUji

--HG--
rename : security/manager/ssl/tests/unit/test_cert_eku/ee-int-nsSGC.pem.certspec => security/manager/ssl/tests/unit/test_cert_eku/ee-int-nsSGC-recent.pem.certspec
rename : security/manager/ssl/tests/unit/test_cert_eku/int-nsSGC.pem.certspec => security/manager/ssl/tests/unit/test_cert_eku/int-nsSGC-recent.pem.certspec
extra : rebase_source : 2f6251679a6f31cccb6d88bb51c567de9cc9bc76
2016-05-05 16:11:11 -07:00
Cykesiopka 8f7bebaa5c Bug 160122 - Stop using PR_smprintf in PSM. r=keeler
The (more) modern Mozilla string classes can be used instead, which at the very
least provide built in automatic memory management and performance improvements.

MozReview-Commit-ID: 4l2Er5rkeI0

--HG--
extra : transplant_source : %A1%16%AB%02m%CA%25HfW%40%96Mq%0D%F0%91%9C%99%29
2016-05-10 23:38:55 -07:00
Cykesiopka 391584fd9d Bug 1270005 - Replace uses of ScopedPK11SlotInfo with UniquePK11SlotInfo in PSM. r=keeler
ScopedPK11SlotInfo is based on Scoped.h, which is deprecated in favour of the
standardised UniquePtr.

Also changes PK11SlotInfo parameters of various functions to make ownership more
explicit, and replaces some manual management of PK11SlotInfo pointers.

MozReview-Commit-ID: JtNH2lJsjwx

--HG--
extra : rebase_source : 9d764e0dd3a1f2df14c16f8f14a3c5392770c9a1
2016-05-09 18:02:40 -07:00
Cykesiopka 128f004a1f 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

--HG--
extra : transplant_source : %9B%A9a%94%D1%7E%2BTa%9E%9Fu%9F%02%B3%1AT%1B%F1%F6
2016-05-05 14:56:36 -07:00
David Keeler 1fdc1bdd0a bug 1267463 - add a more nuanced subject common name fallback option for prerelease channels r=Cykesiopka,jcj
MozReview-Commit-ID: 1vHXrPAHTRm

--HG--
extra : rebase_source : dddd8ae973d1d793890bbfc44d9fe84ef4a47ee2
2016-04-25 15:55:18 -07:00
Cykesiopka 372fe1a598 Bug 1260643 - Convert most uses of ScopedCERTCertificate in PSM to UniqueCERTCertificate. r=keeler
MozReview-Commit-ID: JnjoUd7d2M0

--HG--
extra : transplant_source : %99x%B6%F5%09%97%E6%60%B6%3C%3C%C2%D5vt%27%0C-%96%1B
2016-04-20 01:14:22 -07:00
Mark Goodwin 23e56a0fd2 Bug 1252882 - Add a Content Signature Service r=keeler,r=franziskus,r=Cykesiopka
MozReview-Commit-ID: 2nS6vN3iDKe
2016-04-13 13:26:01 +01:00
Cykesiopka b883b2533f 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

--HG--
extra : transplant_source : afU%FB%0EC%3E%E0pm%A3-%0E%C8%83%CF%0A%B1%9E%ED
2016-04-09 01:03:59 -07:00
Cykesiopka efe5b47ede Bug 1260644 - Use UniquePLArenaPool to manage PLArenaPools in PSM. r=keeler
MozReview-Commit-ID: HyLXbWoHMGz

--HG--
extra : rebase_source : 6164b7df51e11c4d3814a06bd41765d40be85a9d
2016-04-04 17:35:24 -07:00
David Keeler 6e4140d766 bug 1245280 - add policy mechanism to optionally enforce BRs for falling back to subject CN r=Cykesiopka,mgoodwin
MozReview-Commit-ID: 7xT6JGpOH1g

--HG--
extra : rebase_source : 0def29e8be898a2d975ee4390b3bc6a193766b1b
2016-02-09 10:14:27 -08:00
David Keeler 581a304acb bug 1254667 - change certificate verification SHA1 policy to "allow for locally-installed roots" r=jcj
Before this patch, the default policy for the use of SHA1 in certificate
signatures was "allow all" due to compatibility concerns.
After gathering telemetry, we are confident that we can enforce the policy of
"allow for locally-installed roots" (or certificates valid before 2016) without
too much breakage.

MozReview-Commit-ID: 8GxtgdbaS3P

--HG--
extra : rebase_source : d1bed911f2d5d40229ea06556fee0848668e98b6
2016-03-28 12:52:40 -07:00
Cykesiopka e05e655f1b Bug 1258298 - Switch more Scoped.h templates in PSM to UniquePtr equivalents. r=keeler
MozReview-Commit-ID: 8VOhiuNOlBX

--HG--
extra : amend_source : 70d01c7a061c4b751d643d1277e3185ccf348e54
2016-03-24 18:30:37 -07:00
Cykesiopka bdfc5290f6 Bug 1004149 - Return mozilla::pkix::Result values in nsNSSHttpInterface functions. r=keeler
MozReview-Commit-ID: Kx1E3HLP7zC

--HG--
extra : transplant_source : %F0%068%83%E21dM-%FE%7C%EC1%1E%05h%E6%1D%271
2016-03-18 21:11:03 -07:00
David Keeler 3db46cef2e bug 1240118 - add functionality to treat a test certificate as a built-in root r=mgoodwin
MozReview-Commit-ID: GJMd2zEAcmX

--HG--
extra : rebase_source : d2d55c593368b4e5d8562484673a1018dc5ad02d
2016-03-15 17:19:00 -07:00
David Keeler d27e176906 bug 1236964 - enable Certum Trusted Network CA 2 root certificate for EV treatment r=jcj
MozReview-Commit-ID: 8QlBgAdXjlm

--HG--
extra : rebase_source : 07affb67f289f9d460e3eac147dcd44945da182d
2016-03-15 16:08:15 -07:00
Gregory Szorc 3ff1fe40e4 Bug 1256484 - Disable C4456 and C4458 to unblock compilation on VS2015; r=keeler
As part of unblocking building with VS2015u1 in automation, I'm mass
disabling compiler warnings that are turned into errors. This is not
the preferred mechanism to fix compilation warnings. So hopefully
someone fixes the underlying problem someday. However, there are tons
of ignored warnings in security/certverifier, so I guess the workaround
in this patch is par for the course.

MozReview-Commit-ID: 7GZ9RpkxnwT

--HG--
extra : rebase_source : 023a438b6458fb4859018cde421d51072f0f0490
2016-03-14 23:57:33 -07:00
David Keeler 2f0004e1be bug 1228175 - fix IsCertBuiltInRoot r=Cykesiopka,mgoodwin
When a built-in root certificate has its trust changed from the default value,
the platform has to essentially create a copy of it in the read/write
certificate database with the new trust settings. At that point, the desired
behavior is that the platform still considers that certificate a built-in root.
Before this patch, this would indeed happen for the duration of that run of the
platform, but as soon as it restarted, the certificate in question would only
appear to be from the read/write database, and thus was not considered a
built-in root. This patch changes the test of built-in-ness to explicitly
search the built-in certificate slot for the certificate in question. If found,
it is considered a built-in root.

MozReview-Commit-ID: HCtZpPQVEGZ

--HG--
extra : rebase_source : 759e9c5a7bb14f14a77e62eae2ba40c085f04ccd
2016-03-04 17:06:33 -08:00
sajitk 25babf4ea8 Bug 1219482: Replace PRLogModuleInfo with LazyLogModule in security subdirectory.r=nfroyd 2016-01-28 10:36:00 -08:00
Wes Kocher e7883e4059 Backed out changeset 490eb9194ae1 (bug 1228175) for TestIsCertBuiltInRoot failures on at least Android
MozReview-Commit-ID: 7kpuhoY0CJw
2016-03-09 14:22:36 -08:00
David Keeler f228ba40a1 bug 1228175 - fix IsCertBuiltInRoot r=Cykesiopka,mgoodwin
When a built-in root certificate has its trust changed from the default value,
the platform has to essentially create a copy of it in the read/write
certificate database with the new trust settings. At that point, the desired
behavior is that the platform still considers that certificate a built-in root.
Before this patch, this would indeed happen for the duration of that run of the
platform, but as soon as it restarted, the certificate in question would only
appear to be from the read/write database, and thus was not considered a
built-in root. This patch changes the test of built-in-ness to explicitly
search the built-in certificate slot for the certificate in question. If found,
it is considered a built-in root.

MozReview-Commit-ID: HCtZpPQVEGZ

--HG--
extra : rebase_source : 898ef37459723f1d8479cfdc58658ccb00e782a9
2016-03-04 17:06:33 -08:00
Cykesiopka a150859d8e Bug 1248874 - Replace Scoped.h templates used only by PSM in ScopedNSSTypes.h with UniquePtr equivalents. r=dkeeler
MozReview-Commit-ID: 5OClBV522lv

--HG--
extra : transplant_source : G%A3%3B%A0%AC%0D%25%F2%C5K%DC8%0F%90%1B%7Bf%E0%93%F7
2016-02-18 06:01:39 -08:00
David Keeler 28c09863cb bug 1241564 - remove EV treatment for TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı SHA-1 root certificate r=Cykesiopka
MozReview-Commit-ID: 9ktEj2kgfYo
2016-02-09 13:30:22 -08:00
Wes Kocher a40af4aa59 Backed out changeset 7ec471c99263 (bug 1219482) to hopefully fix the intermittent hazard failures CLOSED TREE
--HG--
extra : commitid : B8zmd9Xadpz
2016-01-29 10:15:34 -08:00
sajitk 1b0525a9d3 Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in security subdirectory. r=froydnj
--HG--
extra : rebase_source : 7aed4d8669dccd1270a88a0cacfa254e3b9f5950
2016-01-28 10:36:00 -05:00
David Keeler 113252b726 bug 1239455 - rework telemetry for SHA-1 certificates to reflect possible policy states r=Cykesiopka,mgoodwin,rbarnes
Before this patch, we were measuring where SHA-1 was being used in TLS
certificates: nowhere, in end-entities, in intermediates, or in both. However,
the possible SHA-1 policies don't differentiate between end-entities and
intermediates and instead depended on whether or not each certificate has a
notBefore value after 2015 (i.e. >= 0:00:00 1 January 2016 UTC). We need to
gather telemetry on the possible policy configurations.

--HG--
extra : rebase_source : 301c821c8de16ffb924cd198dd0a4d3139536019
2016-01-13 12:50:42 -08:00
Jan de Mooij 68d44577b4 Bug 1237232 - Properly check the result of Vector append() calls in security/. r=keeler 2016-01-13 22:05:08 +01:00
Chris Peterson 3f4e7bf8d5 Bug 1235188 - Fix -Wformat warnings in security/certverifier/. r=keeler
security/certverifier/NSSCertDBTrustDomain.cpp:433:26 [-Wformat] format specifies type 'long' but the argument has underlying type 'int'
security/certverifier/NSSCertDBTrustDomain.cpp:433:48 [-Wformat] format specifies type 'long long' but the argument has type 'mozilla::pkix::Time'
2015-12-28 18:41:54 -07:00
Chris Peterson 4034ee65b8 Bug 1235308 - Fix -Wimplicit-fallthrough warnings in security/. r=keeler
security/certverifier/NSSCertDBTrustDomain.cpp:282:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
security/manager/ssl/nsNSSComponent.cpp:149:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
security/manager/ssl/nsSecureBrowserUIImpl.cpp:1406:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-12-25 00:03:35 -07:00
David Keeler cf2300da93 bug 1230994 - December 2015 batch of EV root CA changes r=mgoodwin
Adds:
  bug 1193480:
    CN=Certification Authority of WoSign G2,O=WoSign CA Limited,C=CN
    CN=CA WoSign ECC Root,O=WoSign CA Limited,C=CN
  bug 1147675:
    CN=TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H6,O=TÜRKTRUST Bilgi İletişim ve Bilişim Güvenliği Hizmetleri A...,L=Ankara,C=TR
  bug 1230985:
    OU=Security Communication RootCA2,O="SECOM Trust Systems CO.,LTD.",C=JP
  bug 1213044:
    CN=OISTE WISeKey Global Root GB CA,OU=OISTE Foundation Endorsed,O=WISeKey,C=CH
2015-12-14 14:44:44 -08:00
Xidorn Quan 8cd346c251 Bug 1229587 part 1 - Disable C4464 warning newly added in VS2015u1. r=keeler
--HG--
extra : source : 1c79d789b2de950e8024d857f9315ea362141969
2015-12-03 09:29:42 +11:00
Cykesiopka fedad480ea Bug 1222903 - Reject EV status for EV EE certs that are valid for longer than 27 months as well. r=keeler 2015-11-13 07:42:00 +01:00
Mark Goodwin 31adb1a5c5 Bug 901698 - Implement OCSP-must-staple; r=keeler 2015-11-13 16:49:08 +00:00
David Keeler a1cf24355b bug 1223466 - update extended validation information to deal with root removals in NSS 3.21 r=mgoodwin
These entries were removed:

from bug 1204962:

CN=TC TrustCenter Universal CA III,OU=TC TrustCenter Universal CA,O=TC TrustCenter GmbH,C=DE
SHA-256: 309B4A87F6CA56C93169AAA99C6D988854D7892BD5437E2D07B29CBEDA55D35D
SHA-1: 9656CD7B57969895D0E141466806FBB8C6110687

from bug 1204997:

CN=A-Trust-nQual-03,OU=A-Trust-nQual-03,O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT
SHA-256: 793CBF4559B9FDE38AB22DF16869F69881AE14C4B0139AC788A78A1AFCCA02FB
SHA-1: D3C063F219ED073E34AD5D750B327629FFD59AF2

from bug 1208461:

CN=UTN - DATACorp SGC,OU=http://www.usertrust.com,O=The USERTRUST Network,L=Salt Lake City,ST=UT,C=US
SHA-256: 85FB2F91DD12275A0145B636534F84024AD68B69B8EE88684FF711375805B348
SHA-1: 58119F0E128287EA50FDD987456F4F78DCFAD6D4
2015-11-10 10:13:18 -08:00
David Keeler 29b3d15dde bug 1220223 - don't load PKCS11 modules in safe mode r=mgoodwin r=bsmedberg 2015-10-30 10:37:22 -07:00
Cykesiopka 4ec261d0e7 Bug 1194419 - Remove signature algorithm duplicate use in serial number determination in pycert. r=keeler 2015-10-23 05:13:00 -04:00
Carsten "Tomcat" Book ea5d701c66 Backed out changeset 11e681d48acd (bug 1194419) for S4 Test failures 2015-10-20 12:40:18 +02:00
Cykesiopka fa99ba4063 Bug 1194419 - Remove signature algorithm duplicate use in serial number determination in pycert. r=dkeeler
--HG--
extra : rebase_source : 14756428ea3f8bc41d746a2e71a5d4914e96f33c
2015-10-17 09:04:43 -07:00
Richard Barnes 990593f9cf Bug 942515 - Show Untrusted Connection Error for SHA-1-based SSL certificates with notBefore >= 2016-01-01 r=keeler 2015-09-11 14:52:30 -04:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00