WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
261550
[WebCrypto] Refactoring: Add checks for supported algorithms
https://bugs.webkit.org/show_bug.cgi?id=261550
Summary
[WebCrypto] Refactoring: Add checks for supported algorithms
Javier Fernandez
Reported
2023-09-14 00:54:30 PDT
We have several functions using if/then/else clauses and ternary operators to reuse the logic structure between several algorithms that use the OKP keys (eg, Curve25519 and Curve488). While it's not a big deal for Curve25519, since we are talking just about 2 algorithms, it may become a problem if we want to add support for Curve488 in the future.
Attachments
Add attachment
proposed patch, testcase, etc.
Javier Fernandez
Comment 1
2023-09-14 01:12:08 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/17768
EWS
Comment 2
2023-09-18 03:29:48 PDT
Committed
268079@main
(1fa83f2bc4ee): <
https://commits.webkit.org/268079@main
> Reviewed commits have been landed. Closing PR #17768 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2023-09-18 03:30:16 PDT
<
rdar://problem/115649943
>
Diego Pino
Comment 4
2023-09-19 08:20:42 PDT
Debian Stable and Ubuntu 20.04 build bots are failing after this patch with the following error:
https://build.webkit.org/#/builders/595/builds/13369
``` In file included from /home/buildbot/worker/GTK-Linux-64-bit-Release-Ubuntu-2004-Build/build/WebKitBuild/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-44a97133-6.cpp:4: /home/buildbot/worker/GTK-Linux-64-bit-Release-Ubuntu-2004-Build/build/Source/WebCore/crypto/gcrypt/CryptoKeyOKPGCrypt.cpp: In function ‘const std::array<unsigned char, 12> WebCore::algorithmId(WebCore::CryptoKeyOKP::NamedCurve)’: /home/buildbot/worker/GTK-Linux-64-bit-Release-Ubuntu-2004-Build/build/Source/WebCore/crypto/gcrypt/CryptoKeyOKPGCrypt.cpp:260:25: error: could not convert ‘{{""}}’ from ‘<brace-enclosed initializer list>’ to ‘const std::array<unsigned char, 12>’ 260 | return { { "" } }; | ^ | | | <brace-enclosed initializer list> ninja: build stopped: subcommand failed. ```
Diego Pino
Comment 5
2023-09-19 08:21:22 PDT
Re-opening for pull request
https://github.com/webkit/webkit/pull/17917
EWS
Comment 6
2023-09-19 08:29:30 PDT
Committed
268126@main
(0d052d134bf0): <
https://commits.webkit.org/268126@main
> Reviewed commits have been landed. Closing PR #17917 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug