Bug 171220 - [GCrypt] RSASSA-PKCS1-v1_5 support
Summary: [GCrypt] RSASSA-PKCS1-v1_5 support
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: InRadar
Depends on: 171213
Blocks: 133122
  Show dependency treegraph
 
Reported: 2017-04-24 07:05 PDT by Zan Dobersek
Modified: 2017-05-30 20:30 PDT (History)
4 users (show)

See Also:


Attachments
Patch (12.16 KB, patch)
2017-04-24 07:12 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (15.51 KB, patch)
2017-04-26 01:12 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch for landing (15.24 KB, patch)
2017-05-29 09:24 PDT, Zan Dobersek
no flags 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-04-24 07:05:15 PDT
[GCrypt] RSASSA-PKCS1-v1_5 support
Comment 1 Zan Dobersek 2017-04-24 07:12:59 PDT
Created attachment 307972 [details]
Patch

Still has to enable the relevant layout tests.
Comment 2 Build Bot 2017-04-24 07:14:48 PDT
Attachment 307972 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp:208:  CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp:235:  CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Zan Dobersek 2017-04-26 01:12:52 PDT
Created attachment 308232 [details]
Patch
Comment 4 Build Bot 2017-04-26 01:15:18 PDT
Attachment 308232 [details] did not pass style-queue:


ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp:208:  CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp:235:  CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Jiewen Tan 2017-05-22 12:06:20 PDT
Comment on attachment 308232 [details]
Patch

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

> Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp:199
> +    error = gcry_pk_verify(signatureSexp, dataSexp, keySexp);

A crypto expert just pointed it out that we should not report any operation error if verification fails. Maybe you should consider just returning true/false for verification as well. I have filed: Bug 171983 for Apple ports.
Otherwise, looks good to me as well.
Comment 6 Zan Dobersek 2017-05-29 09:24:58 PDT
Created attachment 311476 [details]
Patch for landing

Addresses the comments about the verification step.
Comment 7 Zan Dobersek 2017-05-30 00:27:38 PDT
Comment on attachment 311476 [details]
Patch for landing

Clearing flags on attachment: 311476

Committed r217545: <http://trac.webkit.org/changeset/217545>
Comment 8 Zan Dobersek 2017-05-30 00:27:42 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2017-05-30 20:30:21 PDT
<rdar://problem/32479869>