mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-11 19:51:36 +01:00
79 lines
3.2 KiB
Diff
79 lines
3.2 KiB
Diff
Patch-Source: https://github.com/cl-plus-ssl/cl-plus-ssl/pull/154
|
|
--
|
|
From c08c60e624050c114e55e7b8c4e3581cf54f2f4b Mon Sep 17 00:00:00 2001
|
|
From: Athos Ribeiro <athos.ribeiro@canonical.com>
|
|
Date: Tue, 5 Apr 2022 10:05:13 -0300
|
|
Subject: [PATCH 1/2] reload.lisp: allow OpenSSL 3
|
|
|
|
Ubuntu 22.04 will ship OpenSSL 3. Allow loading its libraries.
|
|
---
|
|
src/reload.lisp | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/reload.lisp b/src/reload.lisp
|
|
index 89adb24..d409b44 100644
|
|
--- a/_build/cl-plus-ssl/src/reload.lisp
|
|
+++ b/_build/cl-plus-ssl/src/reload.lisp
|
|
@@ -133,6 +133,7 @@ sudo rm /usr/local/lib/libcrypto.dylib /usr/local/lib/libssl.dylib
|
|
"/usr/lib/libcrypto.dylib"))
|
|
((and :unix (not :cygwin)) (:or "libcrypto.so.1.1"
|
|
"libcrypto.so.1.0.0"
|
|
+ "libcrypto.so.3"
|
|
"libcrypto.so"))
|
|
(:cygwin (:or "cygcrypto-1.1.dll" "cygcrypto-1.0.0.dll"))))
|
|
|
|
@@ -183,6 +184,7 @@ sudo rm /usr/local/lib/libcrypto.dylib /usr/local/lib/libssl.dylib
|
|
"libssl.so.0.9.8"
|
|
"libssl.so.10"
|
|
"libssl.so.4"
|
|
+ "libssl.so.3"
|
|
"libssl.so"))
|
|
(:cygwin (:or "cygssl-1.1.dll" "cygssl-1.0.0.dll"))
|
|
(t (:default "libssl3"))))
|
|
|
|
From 05244f305383c91724532d826612774336aec080 Mon Sep 17 00:00:00 2001
|
|
From: Athos Ribeiro <athos.ribeiro@canonical.com>
|
|
Date: Tue, 5 Apr 2022 10:55:56 -0300
|
|
Subject: [PATCH 2/2] Use EVP_MD_get_size when available
|
|
|
|
OpenSSL 3 renamed EVP_MD_size to EVP_MD_get_size. Check OpenSSL version
|
|
and use the proper function depending on availability.
|
|
---
|
|
src/ffi.lisp | 6 +++++-
|
|
src/x509.lisp | 5 ++++-
|
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/ffi.lisp b/src/ffi.lisp
|
|
index 949e34f..794255c 100644
|
|
--- a/_build/cl-plus-ssl/src/ffi.lisp
|
|
+++ b/_build/cl-plus-ssl/src/ffi.lisp
|
|
@@ -728,7 +728,11 @@ Note: the _really_ old formats (<= 0.9.4) are not supported."
|
|
:pointer
|
|
(name :string))
|
|
|
|
-(define-crypto-function ("EVP_MD_size" evp-md-size)
|
|
+(define-crypto-function-ex (:vanished "3.0.0") ("EVP_MD_size" evp-md-size)
|
|
+ :int
|
|
+ (evp :pointer))
|
|
+
|
|
+(define-crypto-function-ex (:since "3.0.0") ("EVP_MD_get_size" evp-md-get-size)
|
|
:int
|
|
(evp :pointer))
|
|
|
|
diff --git a/src/x509.lisp b/src/x509.lisp
|
|
index d579fc2..ee1d413 100644
|
|
--- a/_build/cl-plus-ssl/src/x509.lisp
|
|
+++ b/_build/cl-plus-ssl/src/x509.lisp
|
|
@@ -296,7 +296,10 @@ designator for the digest algorithm to use (it defaults to SHA-1)."
|
|
(error 'ssl-error-call
|
|
:message (format nil "unknown digest algorithm ~A" algorithm)
|
|
:queue (read-ssl-error-queue)))
|
|
- (let* ((size (evp-md-size evp))
|
|
+ (let* ((size (funcall (if (openssl-is-at-least 3 0 0)
|
|
+ 'evp-md-get-size
|
|
+ 'evp-md-size)
|
|
+ evp))
|
|
(fingerprint (cffi:make-shareable-byte-vector size)))
|
|
(cffi:with-pointer-to-vector-data (buf fingerprint)
|
|
(unless (= 1 (x509-digest certificate evp buf (cffi:null-pointer)))
|