From 3c3065bff715102649d3bef55c6738cc511a6bec Mon Sep 17 00:00:00 2001 From: Sebastian Christ Date: Wed, 19 Aug 2026 09:58:49 +0200 Subject: [PATCH] Fix `extract-openssl-digest' to handle non-prefixed openssl output Usually the output of `openssl dgst` looks like this: SHA1(install.sh)= a708a8b6996a18c3aed1d9d909f9c52477c72fba But on some systems the prefix is missing and it seems that the digest is already passt to `extract-openssl-digest'. In that case we simply return the output without any processing. --- ql-https.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ql-https.lisp b/ql-https.lisp index 7e594aa..1965441 100644 --- a/ql-https.lisp +++ b/ql-https.lisp @@ -76,7 +76,14 @@ (defun extract-openssl-digest (output) "Extracts digest from output of `openssl dgst'" (let ((space-pos (position #\Space output))) - (subseq output (1+ space-pos)))) ; exclude space itself + (if space-pos + ;; strip everything before the space (space itself included) + (subseq output (1+ space-pos)) + ;; on some systems the output of openssl doens't contain the + ;; sha file prefix: SHA1(filename)= + ;; so we return the output as is + ;; see issue #31 + output))) #-sbcl (defun md5 (file)