boringssl: unstable-2024-09-20 -> 0.20250818.0 (#445812)
This commit is contained in:
@@ -8,24 +8,29 @@
|
||||
buildGoModule,
|
||||
}:
|
||||
|
||||
# reference: https://boringssl.googlesource.com/boringssl/+/2661/BUILDING.md
|
||||
buildGoModule {
|
||||
# reference: https://boringssl.googlesource.com/boringssl/+/refs/tags/0.20250818.0/BUILDING.md
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "boringssl";
|
||||
version = "unstable-2024-09-20";
|
||||
version = "0.20250818.0";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://boringssl.googlesource.com/boringssl";
|
||||
rev = "718900aeb84c601523e71abbd18fd70c9e2ad884";
|
||||
hash = "sha256-TdSObRECiGRQcgz6N2LhKvSi9yRYOZYJdK6MyfJX2Bo=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-lykIlC0tvjtjjS/rQTeX4vK9PgI+A8EnasEC+HYspvg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Add SECP224R1 for backward compatibility
|
||||
./secp224r1-compat.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
perl
|
||||
];
|
||||
|
||||
vendorHash = "sha256-GlhLsPD+yp2LdqsIsfXNEaNKKlc76p0kBCyu4rlEmMg=";
|
||||
vendorHash = "sha256-IXmnoCYLoiQ/XL2wjksRFv5Kwsje0VNkcupgGxG6rSY=";
|
||||
proxyVendor = true;
|
||||
|
||||
# hack to get both go and cmake configure phase
|
||||
@@ -59,13 +64,10 @@ buildGoModule {
|
||||
|
||||
mkdir -p $bin/bin $dev $out/lib
|
||||
|
||||
mv tool/bssl $bin/bin
|
||||
install -Dm755 bssl -t $bin/bin
|
||||
install -Dm644 {libboringssl_gtest,libcrypto,libdecrepit,libpki,libssl,libtest_support_lib}.a -t $out/lib
|
||||
|
||||
mv ssl/libssl.a $out/lib
|
||||
mv crypto/libcrypto.a $out/lib
|
||||
mv decrepit/libdecrepit.a $out/lib
|
||||
|
||||
mv ../include $dev
|
||||
cp -r ../include $dev
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
@@ -76,16 +78,16 @@ buildGoModule {
|
||||
"dev"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Free TLS/SSL implementation";
|
||||
mainProgram = "bssl";
|
||||
homepage = "https://boringssl.googlesource.com";
|
||||
maintainers = [ maintainers.thoughtpolice ];
|
||||
license = with licenses; [
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
license = with lib.licenses; [
|
||||
openssl
|
||||
isc
|
||||
mit
|
||||
bsd3
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
|
||||
index 51417d412..a961a1093 100644
|
||||
--- a/include/openssl/ssl.h
|
||||
+++ b/include/openssl/ssl.h
|
||||
@@ -2522,6 +2522,7 @@ OPENSSL_EXPORT size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
|
||||
// |SSL_SIGN_*|.
|
||||
|
||||
// SSL_GROUP_* define TLS group IDs.
|
||||
+#define SSL_GROUP_SECP224R1 22
|
||||
#define SSL_GROUP_SECP256R1 23
|
||||
#define SSL_GROUP_SECP384R1 24
|
||||
#define SSL_GROUP_SECP521R1 25
|
||||
@@ -5836,6 +5837,7 @@ OPENSSL_EXPORT int SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg);
|
||||
#define SSL_R_TLSV1_CERTIFICATE_REQUIRED SSL_R_TLSV1_ALERT_CERTIFICATE_REQUIRED
|
||||
|
||||
// The following symbols are compatibility aliases for |SSL_GROUP_*|.
|
||||
+#define SSL_CURVE_SECP224R1 SSL_GROUP_SECP224R1
|
||||
#define SSL_CURVE_SECP256R1 SSL_GROUP_SECP256R1
|
||||
#define SSL_CURVE_SECP384R1 SSL_GROUP_SECP384R1
|
||||
#define SSL_CURVE_SECP521R1 SSL_GROUP_SECP521R1
|
||||
@@ -55,6 +55,21 @@ let
|
||||
);
|
||||
|
||||
vendorHash = "sha256-06MkjXl0DKFzIH/H+uT9kXsQdPq7qdZh2dlLW/YhJuk=";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $bin/bin $dev $out/lib
|
||||
|
||||
install -Dm755 tool/bssl -t $bin/bin
|
||||
install -Dm644 ssl/libssl.a -t $out/lib
|
||||
install -Dm644 crypto/libcrypto.a -t $out/lib
|
||||
install -Dm644 decrepit/libdecrepit.a -t $out/lib
|
||||
|
||||
cp -r ../include $dev
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
# boring-sys expects the static libraries in build/ instead of lib/
|
||||
boringssl-wrapper = runCommand "boringssl-wrapper" { } ''
|
||||
|
||||
Reference in New Issue
Block a user