Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5499e7a11401b48e87f66c236de81b701060445
https://github.com/WebKit/WebKit/commit/e5499e7a11401b48e87f66c236de81b701060445
Author: Claudio Saavedra <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)
Changed paths:
M Source/WebCore/PAL/pal/PlatformGTK.cmake
M Source/WebCore/PAL/pal/PlatformWPE.cmake
M Source/WebCore/PlatformGTK.cmake
M Source/WebCore/PlatformWPE.cmake
M Source/WebCore/crypto/openssl/CryptoKeyECOpenSSL.cpp
M Source/WebCore/platform/GCrypt.cmake
M Source/cmake/OptionsGTK.cmake
M Source/cmake/OptionsWPE.cmake
Log Message:
-----------
[GLib] Add option to use OpenSSL crypto backend
https://bugs.webkit.org/show_bug.cgi?id=286932
Reviewed by Adrian Perez de Castro.
Add USE_OPENSSL, a private option for the GTK and WPE ports that builds the
WebCrypto and PAL::CryptoDigest implementations in crypto/openssl instead of
the libgcrypt ones. It is off by default, and when enabled it also defines the
USE(OPENSSL) macro that the Windows and PlayStation ports already set;
USE(GCRYPT) is defined otherwise. The option makes it possible to build and
test the OpenSSL backend on these ports while it is brought to parity with the
libgcrypt backend, whose removal
https://bugs.webkit.org/show_bug.cgi?id=216201 proposes.
OpenSSL 3.0 or newer is required. Earlier releases are not available under
the Apache 2.0 licence and have been out of upstream support since 2023.
libgcrypt and libtasn1 are only looked up and linked when the option is off,
as libtasn1 is used solely by the libgcrypt key classes.
The backend still calls RSA, EC_KEY, HMAC and AES functions that OpenSSL 3
deprecates, so the option defines OPENSSL_API_COMPAT for WebCore to keep
them compiling with fatal warnings until the migration tracked in
https://bugs.webkit.org/show_bug.cgi?id=245146 is complete. The definition
is set for the GLib ports only; the other ports building these files,
PlayStation with BoringSSL and Windows with LibreSSL, see no deprecation.
* Source/WebCore/PAL/pal/PlatformGTK.cmake:
* Source/WebCore/PAL/pal/PlatformWPE.cmake: Compile the digest and tasn1
sources for the selected backend; link OpenSSL::Crypto when selected.
* Source/WebCore/PlatformGTK.cmake:
* Source/WebCore/PlatformWPE.cmake: Include the selected backend's CMake
file, link OpenSSL::Crypto and define OPENSSL_API_COMPAT when selected.
Tasn1 moves to GCrypt.cmake.
* Source/WebCore/crypto/openssl/CryptoKeyECOpenSSL.cpp: Include the header
for the ASN1 functions used here rather than relying on transitive includes.
* Source/WebCore/platform/GCrypt.cmake: Link Tasn1::Tasn1.
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake: Define the option; look up the selected
backend's libraries, and set USE_GCRYPT when the option is off, after the
options are resolved.
Co-authored-by: Patrick Griffis <[email protected]>
Canonical link: https://commits.webkit.org/322715@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications