<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>261550</bug_id>
          
          <creation_ts>2023-09-14 00:54:30 -0700</creation_ts>
          <short_desc>[WebCrypto] Refactoring: Add checks for supported algorithms</short_desc>
          <delta_ts>2023-09-19 08:29:32 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Javier Fernandez">jfernandez</reporter>
          <assigned_to name="Diego Pino">dpino</assigned_to>
          <cc>dpino</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1977452</commentid>
    <comment_count>0</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2023-09-14 00:54:30 -0700</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977454</commentid>
    <comment_count>1</comment_count>
    <who name="Javier Fernandez">jfernandez</who>
    <bug_when>2023-09-14 01:12:08 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/17768</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978005</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-09-18 03:29:48 -0700</bug_when>
    <thetext>Committed 268079@main (1fa83f2bc4ee): &lt;https://commits.webkit.org/268079@main&gt;

Reviewed commits have been landed. Closing PR #17768 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978006</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-09-18 03:30:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/115649943&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978292</commentid>
    <comment_count>4</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2023-09-19 08:20:42 -0700</bug_when>
    <thetext>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&lt;unsigned char, 12&gt; 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 ‘{{&quot;&quot;}}’ from ‘&lt;brace-enclosed initializer list&gt;’ to ‘const std::array&lt;unsigned char, 12&gt;’
  260 |         return { { &quot;&quot; } };
      |                         ^
      |                         |
      |                         &lt;brace-enclosed initializer list&gt;
ninja: build stopped: subcommand failed.
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978293</commentid>
    <comment_count>5</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2023-09-19 08:21:22 -0700</bug_when>
    <thetext>Re-opening for pull request https://github.com/webkit/webkit/pull/17917</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978295</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-09-19 08:29:30 -0700</bug_when>
    <thetext>Committed 268126@main (0d052d134bf0): &lt;https://commits.webkit.org/268126@main&gt;

Reviewed commits have been landed. Closing PR #17917 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>