mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Use clear-string instead of fillarray to clobber secret strings
* lisp/net/sasl-cram.el (sasl-cram-md5-response): * lisp/net/sasl-digest.el (sasl-digest-md5-response-value): * lisp/net/sasl.el (sasl-plain-response): `fillarray` signals an error for strings that contain multibyte chars; `clear-string` always works for this purpose.
This commit is contained in:
parent
b08d5158c4
commit
1ac70626fa
@ -42,7 +42,7 @@
|
||||
(concat (sasl-client-name client) " "
|
||||
(encode-hex-string
|
||||
(hmac-md5 (sasl-step-data step) passphrase)))
|
||||
(fillarray passphrase 0))))
|
||||
(clear-string passphrase))))
|
||||
|
||||
(put 'sasl-cram 'sasl-mechanism
|
||||
(sasl-make-mechanism "CRAM-MD5" sasl-cram-md5-steps))
|
||||
|
@ -107,7 +107,7 @@ charset algorithm cipher-opts auth-param)."
|
||||
(concat "AUTHENTICATE:" digest-uri
|
||||
(if (member qop '("auth-int" "auth-conf"))
|
||||
":00000000000000000000000000000000")))))))
|
||||
(fillarray passphrase 0))))
|
||||
(clear-string passphrase))))
|
||||
|
||||
(defun sasl-digest-md5-response (client step)
|
||||
(let* ((plist
|
||||
|
@ -219,7 +219,7 @@ It contain at least 64 bits of entropy."
|
||||
(not (string= authenticator-name name)))
|
||||
(concat authenticator-name "\0" name "\0" passphrase)
|
||||
(concat "\0" name "\0" passphrase))
|
||||
(fillarray passphrase 0))))
|
||||
(clear-string passphrase))))
|
||||
|
||||
(put 'sasl-plain 'sasl-mechanism
|
||||
(sasl-make-mechanism "PLAIN" sasl-plain-steps))
|
||||
|
Loading…
Reference in New Issue
Block a user