Bug 261550
Summary: | [WebCrypto] Refactoring: Add checks for supported algorithms | ||
---|---|---|---|
Product: | WebKit | Reporter: | Javier Fernandez <jfernandez> |
Component: | WebCore Misc. | Assignee: | Diego Pino <dpino> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | dpino, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Javier Fernandez
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
Pull request: https://github.com/WebKit/WebKit/pull/17768
EWS
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
<rdar://problem/115649943>
Diego Pino
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
Re-opening for pull request https://github.com/webkit/webkit/pull/17917
EWS
Committed 268126@main (0d052d134bf0): <https://commits.webkit.org/268126@main>
Reviewed commits have been landed. Closing PR #17917 and removing active labels.