Bug 173695 - [GCrypt] Implement CryptoKeyRSA SPKI exports
Summary: [GCrypt] Implement CryptoKeyRSA SPKI exports
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on: 173646
Blocks: 133122 173697
  Show dependency treegraph
 
Reported: 2017-06-21 23:18 PDT by Zan Dobersek
Modified: 2017-07-13 03:09 PDT (History)
3 users (show)

See Also:


Attachments
WIP patch (13.37 KB, patch)
2017-06-21 23:41 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
WIP patch (9.48 KB, patch)
2017-06-26 04:58 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (11.34 KB, patch)
2017-06-28 09:25 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (11.44 KB, patch)
2017-07-03 01:01 PDT, Zan Dobersek
jiewen_tan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2017-06-21 23:18:47 PDT
SSIA.
Comment 1 Zan Dobersek 2017-06-21 23:41:20 PDT
Created attachment 313588 [details]
WIP patch
Comment 2 Build Bot 2017-06-22 00:16:33 PDT
Attachment 313588 [details] did not pass style-queue:


ERROR: Source/WebCore/PAL/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 2 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Zan Dobersek 2017-06-26 04:58:31 PDT
Created attachment 313827 [details]
WIP patch
Comment 4 Build Bot 2017-06-26 05:01:50 PDT
Attachment 313827 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Zan Dobersek 2017-06-28 09:25:57 PDT
Created attachment 314028 [details]
Patch
Comment 6 Zan Dobersek 2017-06-28 09:26:10 PDT
(In reply to Zan Dobersek from comment #5)
> Created attachment 314028 [details]
> Patch


This is ready for review, but the patch still relies on libtasn1 helpers that are being added in bug #173646.
Comment 7 Zan Dobersek 2017-07-03 01:01:44 PDT
Created attachment 314462 [details]
Patch

Now buildable.
Comment 8 Jiewen Tan 2017-07-12 11:39:10 PDT
Comment on attachment 314462 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=314462&action=review

Looks good to me. r=me.

> Source/WebCore/ChangeLog:29
> +        A helper mpiSignedData() function is added, providing overloads for gcry_mpi_t

Interesting.

> Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:304
> +        if (!PAL::TASN1::writeElement(spki, "algorithm.algorithm", "1.2.840.113549.1.1.1", 1))

Remember we should replace "1.2.840.113549.1.1.1" with a constant.

> Source/WebCore/crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:308
> +        if (!PAL::TASN1::writeElement(spki, "algorithm.parameters", "\x05\x00", 2))

Another constant here?
Comment 9 Zan Dobersek 2017-07-13 03:09:03 PDT
Committed r219449: <http://trac.webkit.org/changeset/219449>