RESOLVED FIXED 171222
[GCrypt] RSA-OAEP support
https://bugs.webkit.org/show_bug.cgi?id=171222
Summary [GCrypt] RSA-OAEP support
Zan Dobersek
Reported 2017-04-24 07:16:56 PDT
[GCrypt] RSA-OAEP support
Attachments
Patch (10.97 KB, patch)
2017-04-24 07:21 PDT, Zan Dobersek
no flags
Patch (14.03 KB, patch)
2017-04-26 01:18 PDT, Zan Dobersek
mcatanzaro: review+
Zan Dobersek
Comment 1 2017-04-24 07:21:46 PDT
Created attachment 307974 [details] Patch Still has to enable the relevant layout tests.
Build Bot
Comment 2 2017-04-24 07:26:10 PDT
Attachment 307974 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:160: CryptoAlgorithmRSA_OAEP::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:188: CryptoAlgorithmRSA_OAEP::platformDecrypt 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.
Zan Dobersek
Comment 3 2017-04-26 01:18:08 PDT
Build Bot
Comment 4 2017-04-26 01:20:15 PDT
Attachment 308234 [details] did not pass style-queue: ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:160: CryptoAlgorithmRSA_OAEP::platformEncrypt is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:188: CryptoAlgorithmRSA_OAEP::platformDecrypt 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.
Michael Catanzaro
Comment 5 2017-05-20 13:35:05 PDT
Comment on attachment 308234 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308234&action=review > Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:57 > -void CryptoAlgorithmRSA_OAEP::platformEncrypt(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) > +static std::optional<const char*> hashAlgorithmName(CryptoAlgorithmIdentifier identifier) > { > - notImplemented(); > + switch (identifier) { > + case CryptoAlgorithmIdentifier::SHA_1: > + return "sha1"; > + case CryptoAlgorithmIdentifier::SHA_224: > + return "sha224"; > + case CryptoAlgorithmIdentifier::SHA_256: > + return "sha256"; > + case CryptoAlgorithmIdentifier::SHA_384: > + return "sha384"; > + case CryptoAlgorithmIdentifier::SHA_512: > + return "sha512"; > + default: > + return std::nullopt; > + } > } This is getting a bit absurd... it needs to move to a shared location. > Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:59 > +static std::optional<Vector<uint8_t>> mpiData(gcry_sexp_t paramSexp) This too... don't you have some utility file for stuff like this? You need one.
Zan Dobersek
Comment 6 2017-05-22 11:22:41 PDT
Comment on attachment 308234 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308234&action=review >> Source/WebCore/crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:59 >> +static std::optional<Vector<uint8_t>> mpiData(gcry_sexp_t paramSexp) > > This too... don't you have some utility file for stuff like this? You need one. I'll add it after the patches land, that way it's easier to update all the call sites.
Jiewen Tan
Comment 7 2017-05-24 11:55:39 PDT
Comment on attachment 308234 [details] Patch Looks good to me as well.
Zan Dobersek
Comment 8 2017-05-30 01:27:52 PDT
Radar WebKit Bug Importer
Comment 9 2017-05-30 20:30:41 PDT
Note You need to log in before you can comment on or make changes to this bug.