projects
/
elisp
/
flim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(mime-write-entity-body): Use `binary-write-decoded-region' instead of
[elisp/flim.git]
/
sasl-digest.el
diff --git
a/sasl-digest.el
b/sasl-digest.el
index
a1b08b1
..
9e061b7
100644
(file)
--- a/
sasl-digest.el
+++ b/
sasl-digest.el
@@
-104,7
+104,7
@@
charset algorithm cipher-opts auth-param)."
(encode-hex-string
(md5-binary
(concat "AUTHENTICATE:" digest-uri
(encode-hex-string
(md5-binary
(concat "AUTHENTICATE:" digest-uri
- (if (string-equal "auth-int" qop)
+ (if (member qop '("auth-int" "auth-conf"))
":00000000000000000000000000000000")))))))
(fillarray passphrase 0))))
":00000000000000000000000000000000")))))))
(fillarray passphrase 0))))
@@
-117,6
+117,9
@@
charset algorithm cipher-opts auth-param)."
(nonce-count
(or (sasl-client-property client 'nonce-count)
sasl-digest-md5-nonce-count))
(nonce-count
(or (sasl-client-property client 'nonce-count)
sasl-digest-md5-nonce-count))
+ (qop
+ (or (sasl-client-property client 'qop)
+ "auth"))
(digest-uri
(sasl-digest-md5-digest-uri
(sasl-client-service client)(sasl-client-server client)))
(digest-uri
(sasl-digest-md5-digest-uri
(sasl-client-service client)(sasl-client-server client)))
@@
-124,6
+127,8
@@
charset algorithm cipher-opts auth-param)."
(or (sasl-client-property client 'cnonce)
(sasl-digest-md5-cnonce))))
(sasl-client-set-property client 'nonce-count (1+ nonce-count))
(or (sasl-client-property client 'cnonce)
(sasl-digest-md5-cnonce))))
(sasl-client-set-property client 'nonce-count (1+ nonce-count))
+ (unless (string= qop "auth")
+ (sasl-error (format "Unsupported \"qop-value\": %s" qop)))
(concat
"username=\"" (sasl-client-name client) "\","
"realm=\"" realm "\","
(concat
"username=\"" (sasl-client-name client) "\","
"realm=\"" realm "\","
@@
-131,27
+136,17
@@
charset algorithm cipher-opts auth-param)."
"cnonce=\"" cnonce "\","
(format "nc=%08x," nonce-count)
"digest-uri=\"" digest-uri "\","
"cnonce=\"" cnonce "\","
(format "nc=%08x," nonce-count)
"digest-uri=\"" digest-uri "\","
- "response=\""
+ "qop=" qop ","
+ "response="
(sasl-digest-md5-response-value
(sasl-client-name client)
realm
(plist-get plist 'nonce)
cnonce
nonce-count
(sasl-digest-md5-response-value
(sasl-client-name client)
realm
(plist-get plist 'nonce)
cnonce
nonce-count
- (or (plist-get plist 'qop)
- "auth")
+ qop
digest-uri
digest-uri
- (plist-get plist 'authzid))
- "\","
- (mapconcat
- #'identity
- (delq nil
- (mapcar (lambda (prop)
- (let ((value (sasl-client-property client prop)))
- (if value
- (format "%s=%s" prop value))))
- '(maxbuf charset cipher authzid)))
- ","))))
+ (plist-get plist 'authzid)))))
(put 'sasl-digest 'sasl-mechanism
(sasl-make-mechanism "DIGEST-MD5" sasl-digest-md5-steps))
(put 'sasl-digest 'sasl-mechanism
(sasl-make-mechanism "DIGEST-MD5" sasl-digest-md5-steps))