Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Issue 1742873002: Switch //net to the new SPKI and PKCS#8 APIs. (Closed)

Created:
4 years, 10 months ago by davidben
Modified:
4 years, 9 months ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, certificate-transparency-chrome_googlegroups.com, cbentzel+watch_chromium.org, Eran Messeri
Base URL:
https://chromium.googlesource.com/chromium/src.git@spki-crypto
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switch //net to the new SPKI and PKCS#8 APIs. This fixes the new verifier's SPKI parser and gets us closer to losing the legacy ASN.1 stack. This also rewrites the Android KeygenHandler implementation. This was tested manually, but to make sure it's good, make the tests actually parse out the SPKAC structure and verify the signature. (Everything that implements keygen may freely assume BoringSSL, so we have CBS and EVP available.) In doing so, this revealed a bug in our Mac SPKAC code. It was omitting the NULLs in both SPKI and signatureAlgorithm, and EVP_parse_public_key is strict about including them, per the MUST in the spec. (I've confirmed that Safari includes them, so it's just us that messed this up.) This resolves the last TODO about laxness in VerifySignedDataTest, so we should now be parsing SPKIs correctly. (Finally...) BUG=499653, 522228 Committed: https://crrev.com/f43769e980b0948775860095c672d17969c70a19 Cr-Commit-Position: refs/heads/master@{#380774}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : fix Mac #

Patch Set 6 : const_cast #

Total comments: 23

Patch Set 7 : tweak keygen_handler_openssl.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -108 lines) Patch
M net/android/keystore_unittest.cc View 1 2 3 3 chunks +9 lines, -11 lines 0 comments Download
M net/android/network_library.h View 1 chunk +4 lines, -9 lines 0 comments Download
M net/base/keygen_handler_mac.cc View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M net/base/keygen_handler_openssl.cc View 1 2 3 4 5 6 2 chunks +93 lines, -13 lines 0 comments Download
M net/base/keygen_handler_unittest.cc View 1 2 5 chunks +86 lines, -29 lines 0 comments Download
M net/base/openssl_private_key_store_android.cc View 1 2 1 chunk +27 lines, -27 lines 0 comments Download
M net/cert/ct_log_verifier_openssl.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M net/cert/internal/verify_signed_data.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M net/cert/internal/verify_signed_data_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M net/cert/jwk_serializer_openssl.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M net/ssl/scoped_openssl_types.h View 1 chunk +0 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 20 (8 generated)
davidben
https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_mac.cc File net/base/keygen_handler_mac.cc (right): https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_mac.cc#newcode159 net/base/keygen_handler_mac.cc:159: spkac.pkac.spki.algorithm.parameters.Length = sizeof(kNullDer); (We could also reimplement this whole ...
4 years, 9 months ago (2016-03-03 16:22:31 UTC) #4
Ryan Sleevi
Most everything but the keygen handler LG. To me, a lot of that reads like ...
4 years, 9 months ago (2016-03-03 18:32:06 UTC) #5
davidben
Long comments below. We might want to grab a VC and hash out exactly what ...
4 years, 9 months ago (2016-03-03 19:58:15 UTC) #6
Ryan Sleevi
https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_openssl.cc File net/base/keygen_handler_openssl.cc (right): https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_openssl.cc#newcode63 net/base/keygen_handler_openssl.cc:63: challenge_.size()) || On 2016/03/03 19:58:15, davidben wrote: > On ...
4 years, 9 months ago (2016-03-03 20:27:41 UTC) #7
davidben
https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_openssl.cc File net/base/keygen_handler_openssl.cc (right): https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_openssl.cc#newcode63 net/base/keygen_handler_openssl.cc:63: challenge_.size()) || On 2016/03/03 20:27:41, Ryan Sleevi wrote: > ...
4 years, 9 months ago (2016-03-03 21:59:37 UTC) #8
Ryan Sleevi
https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_openssl.cc File net/base/keygen_handler_openssl.cc (right): https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_openssl.cc#newcode79 net/base/keygen_handler_openssl.cc:79: }; On 2016/03/03 21:59:36, davidben wrote: > Nothing but ...
4 years, 9 months ago (2016-03-03 22:08:43 UTC) #9
davidben
Updated CL slightly to reflect discussion. https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_openssl.cc File net/base/keygen_handler_openssl.cc (right): https://codereview.chromium.org/1742873002/diff/100001/net/base/keygen_handler_openssl.cc#newcode79 net/base/keygen_handler_openssl.cc:79: }; On 2016/03/03 ...
4 years, 9 months ago (2016-03-03 22:25:40 UTC) #10
Ryan Sleevi
Sorry, forgot to LGTM. Thanks for the changes, all good.
4 years, 9 months ago (2016-03-11 17:56:45 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1742873002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1742873002/120001
4 years, 9 months ago (2016-03-11 19:12:40 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/195606)
4 years, 9 months ago (2016-03-11 19:49:58 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1742873002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1742873002/120001
4 years, 9 months ago (2016-03-11 21:25:24 UTC) #17
commit-bot: I haz the power
4 years, 9 months ago (2016-03-11 23:02:42 UTC) #20
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/f43769e980b0948775860095c672d17969c70a19
Cr-Commit-Position: refs/heads/master@{#380774}

Powered by Google App Engine
This is Rietveld 408576698