Skip to content

Commit 0d75995

Browse files
committed
Use openssl for md5 checksum verification
At least for CL implementations other than SBCL.
1 parent a8b1f5d commit 0d75995

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ql-https.lisp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@
5656
#-sbcl
5757
(defun md5 (file)
5858
"Returns md5sum of FILE"
59-
(let* ((output (uiop:run-program (list "md5sum" (namestring file)) :output :string))
59+
(let* ((output (uiop:run-program (list "openssl" "dgst" "-md5" (namestring file))
60+
:output '(:string :stripped t)))
6061
(space-pos (position #\Space output)))
61-
(subseq output 0 space-pos)))
62+
(subseq output (1+ space-pos)))) ; exclude space itself
6263

6364
(defun file-size (file)
6465
"Returns the size of FILE in bytes"

0 commit comments

Comments
 (0)