Function: mml-smime-epg-verify
mml-smime-epg-verify is a byte-compiled function defined in
mml-smime.el.gz.
Signature
(mml-smime-epg-verify HANDLE CTL)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/mml-smime.el.gz
(defun mml-smime-epg-verify (handle ctl)
(catch 'error
(let (context part signature) ;; plain signature-file
(when (or (null (setq part (mm-find-raw-part-by-type
ctl (or (mm-handle-multipart-ctl-parameter
ctl 'protocol)
"application/pkcs7-signature")
t)))
(null (setq signature (or (mm-find-part-by-type
(cdr handle)
"application/pkcs7-signature"
nil t)
(mm-find-part-by-type
(cdr handle)
"application/x-pkcs7-signature"
nil t)))))
(mm-sec-error 'gnus-info "Corrupted")
(throw 'error handle))
(setq part (string-replace "\n" "\r\n" part)
context (epg-make-context 'CMS))
(condition-case error
;; (setq plain
(epg-verify-string context (mm-get-part signature) part) ;;)
(error
(mm-sec-error 'gnus-info "Failed")
(mm-sec-status 'gnus-details (if (eq (car error) 'quit)
"Quit."
(format "%S" error)))
(throw 'error handle)))
(mm-sec-status
'gnus-info
(epg-verify-result-to-string (epg-context-result-for context 'verify)))
handle)))