1
0
Fork 0

- prevented 'ssl-key-has-empty-password-p' to print on console the prompt asking for key password.

This commit is contained in:
cage 2024-02-17 11:05:58 +01:00
parent b9b59f9de6
commit e0589e56f1
1 changed files with 9 additions and 8 deletions

View File

@ -185,14 +185,15 @@
output-string))))))))) output-string)))))))))
(defun ssl-key-has-empty-password-p (key-path) (defun ssl-key-has-empty-password-p (key-path)
(let* ((cmd-args (format nil "rsa -noout -text -in ~a" key-path)) (with-input-from-string (passphrase-stream (format nil "~%"))
(process (run-external-program +openssl-bin+ (let* ((cmd-args (format nil "rsa -passin stdin -noout -text -in ~a" key-path))
(text-utils:split-words cmd-args) (process (run-external-program +openssl-bin+
:input nil (text-utils:split-words cmd-args)
:output nil :input passphrase-stream
:error :output :output nil
:wait t))) :error t
(process-exit-success-p process))) :wait t)))
(process-exit-success-p process))))
(defun send-to-pipe (data program-and-args) (defun send-to-pipe (data program-and-args)