(format "%02X " (epg-new-signature-class new-signature))
(epg-new-signature-fingerprint new-signature)))
(format "%02X " (epg-new-signature-class new-signature))
(epg-new-signature-fingerprint new-signature)))
"Start `epg-gpg-program' in a subprocess with given ARGS."
(if (and (epg-context-process context)
(eq (process-status (epg-context-process context)) 'run))
"Start `epg-gpg-program' in a subprocess with given ARGS."
(if (and (epg-context-process context)
(eq (process-status (epg-context-process context)) 'run))
(if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)")
(let* ((status (match-string 1))
(string (match-string 2))
(if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)")
(let* ((status (match-string 1))
(string (match-string 2))
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(user-id (match-string 2 string))
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(user-id (match-string 2 string))
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(user-id (match-string 2 string))
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(user-id (match-string 2 string))
(epg-context-set-result-for
epg-context
'verify
(cons (epg-make-signature 'no-pubkey string)
(epg-context-result-for epg-context 'verify))))
(epg-context-set-result-for
epg-context
'verify
(cons (epg-make-signature 'no-pubkey string)
(epg-context-result-for epg-context 'verify))))
(let ((signatures (epg-context-result-for epg-context 'verify)))
(unless signatures
(setq signatures (list (epg-make-signature 'error)))
(let ((signatures (epg-context-result-for epg-context 'verify)))
(unless signatures
(setq signatures (list (epg-make-signature 'error)))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(when (and signature
(eq (epg-signature-status signature) 'good)
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(when (and signature
(eq (epg-signature-status signature) 'good)
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'undefined))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'undefined))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'never))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'never))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'marginal))
(epg-signature-set-validity signature 'marginal))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'marginal))
(epg-signature-set-validity signature 'marginal))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'full))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'full))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'ultimate))))
(let ((signature (car (epg-context-result-for epg-context 'verify))))
(if (and signature
(eq (epg-signature-status signature) 'good))
(epg-signature-set-validity signature 'ultimate))))
(if (string-match "\\`\\([^ ]+\\) \\([^ ]\\) \\([0-9]+\\) \\([0-9]+\\)"
string)
(funcall (if (consp (epg-context-progress-callback epg-context))
(if (string-match "\\`\\([^ ]+\\) \\([^ ]\\) \\([0-9]+\\) \\([0-9]+\\)"
string)
(funcall (if (consp (epg-context-progress-callback epg-context))
(if (consp (epg-context-progress-callback epg-context))
(cdr (epg-context-progress-callback epg-context))))))
(if (consp (epg-context-progress-callback epg-context))
(cdr (epg-context-progress-callback epg-context))))))
(epg-context-set-result-for
epg-context 'error
(cons '(decryption-failed)
(epg-context-result-for epg-context 'error))))
(epg-context-set-result-for
epg-context 'error
(cons '(decryption-failed)
(epg-context-result-for epg-context 'error))))
(epg-context-set-result-for
epg-context 'error
(cons (list 'no-data (cons 'reason (string-to-number string)))
(epg-context-result-for epg-context 'error))))
(epg-context-set-result-for
epg-context 'error
(cons (list 'no-data (cons 'reason (string-to-number string)))
(epg-context-result-for epg-context 'error))))
(epg-context-set-result-for
epg-context 'error
(cons (list 'unexpected (cons 'reason (string-to-number string)))
(epg-context-result-for epg-context 'error))))
(epg-context-set-result-for
epg-context 'error
(cons (list 'unexpected (cons 'reason (string-to-number string)))
(epg-context-result-for epg-context 'error))))
(epg-context-set-result-for
epg-context 'error
(cons (list 'key-expired (cons 'expiration-time string))
(epg-context-result-for epg-context 'error))))
(epg-context-set-result-for
epg-context 'error
(cons (list 'key-expired (cons 'expiration-time string))
(epg-context-result-for epg-context 'error))))
(cons 'reason (string-to-number (match-string 1 string))))
(epg-context-result-for epg-context 'error)))))
(cons 'reason (string-to-number (match-string 1 string))))
(epg-context-result-for epg-context 'error)))))
(if (string-match "\\`\\([DCS]\\) \\([0-9]+\\) \\([0-9]+\\) \
\\([0-9A-Fa-F][0-9A-Fa-F]\\) \\(.*\\) " string)
(epg-context-set-result-for
(if (string-match "\\`\\([DCS]\\) \\([0-9]+\\) \\([0-9]+\\) \
\\([0-9A-Fa-F][0-9A-Fa-F]\\) \\(.*\\) " string)
(epg-context-set-result-for
(if (string-match "\\`\\([BPS]\\) \\([^ ]+\\)" string)
(epg-context-set-result-for
epg-context 'generate-key
(if (string-match "\\`\\([BPS]\\) \\([^ ]+\\)" string)
(epg-context-set-result-for
epg-context 'generate-key
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(user-id (match-string 2 string))
(if (string-match "\\`\\([^ ]+\\) \\(.*\\)" string)
(let* ((key-id (match-string 1 string))
(user-id (match-string 2 string))
(let ((result (epg-context-result-for epg-context 'import)))
(if (and result
(string-match "\\`\\([0-9]+\\)\\( \\(.+\\)\\)?" string))
(let ((result (epg-context-result-for epg-context 'import)))
(if (and result
(string-match "\\`\\([0-9]+\\)\\( \\(.+\\)\\)?" string))
If MODE is t or 'secret, only secret keyring should be searched.
Otherwise, only public keyring should be searched and the key
signatures should be included."
If MODE is t or 'secret, only secret keyring should be searched.
Otherwise, only public keyring should be searched and the key
signatures should be included."
(epg-key-sub-key-list (car keys)))))
((member (aref (car lines) 0) '("sub" "ssb"))
(epg-key-set-sub-key-list
(car keys)
(epg-key-sub-key-list (car keys)))))
((member (aref (car lines) 0) '("sub" "ssb"))
(epg-key-set-sub-key-list
(car keys)
(epg-key-sub-key-list (car keys)))))
((equal (aref (car lines) 0) "uid")
(epg-key-set-user-id-list
(epg-key-sub-key-list (car keys)))))
((equal (aref (car lines) 0) "uid")
(epg-key-set-user-id-list
"Create a temporary file.
The returned file name (created by appending some random characters at the end
of PREFIX, and expanding against `temporary-file-directory' if necessary),
"Create a temporary file.
The returned file name (created by appending some random characters at the end
of PREFIX, and expanding against `temporary-file-directory' if necessary),
;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
(unless (eq (epg-context-protocol context) 'CMS)
(epg-wait-for-status context '("BEGIN_DECRYPTION"))))
;; `gpgsm' does not read passphrase from stdin, so waiting is not needed.
(unless (eq (epg-context-protocol context) 'CMS)
(epg-wait-for-status context '("BEGIN_DECRYPTION"))))
(epg-start-decrypt context (epg-make-data-from-file cipher))
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
(epg-start-decrypt context (epg-make-data-from-file cipher))
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
(coding-system-for-write 'binary))
(unwind-protect
(progn
(write-region cipher nil input-file nil 'quiet)
(epg-context-set-output-file context
(coding-system-for-write 'binary))
(unwind-protect
(progn
(write-region cipher nil input-file nil 'quiet)
(epg-context-set-output-file context
(epg-start-decrypt context (epg-make-data-from-file input-file))
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
(epg-start-decrypt context (epg-make-data-from-file input-file))
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(epg-data-string signed-text)))
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(epg-data-string signed-text)))
(process-send-eof (epg-context-process context))))
;; Normal (or cleartext) signature.
(if (epg-data-file signature)
(process-send-eof (epg-context-process context))))
;; Normal (or cleartext) signature.
(if (epg-data-file signature)
- (epg-start context (list "--verify" (epg-data-file signature)))
- (epg-start context (list "--verify"))
+ (epg--start context (list "--verify" (epg-data-file signature)))
+ (epg--start context (list "--verify"))
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(epg-data-string signature)))
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(epg-data-string signature)))
(write-region signature nil input-file nil 'quiet)
(epg-start-verify context
(epg-make-data-from-file input-file)
(write-region signature nil input-file nil 'quiet)
(epg-start-verify context
(epg-make-data-from-file input-file)
`epg-sign-file' or `epg-sign-string' instead."
(epg-context-set-operation context 'sign)
(epg-context-set-result context nil)
`epg-sign-file' or `epg-sign-string' instead."
(epg-context-set-operation context 'sign)
(epg-context-set-result context nil)
(epg-start-sign context (epg-make-data-from-file plain) mode)
(epg-wait-for-completion context)
(unless (epg-context-result-for context 'sign)
(epg-start-sign context (epg-make-data-from-file plain) mode)
(epg-wait-for-completion context)
(unless (epg-context-result-for context 'sign)
(epg-start-sign context (epg-make-data-from-string plain) mode)
(epg-wait-for-completion context)
(unless (epg-context-result-for context 'sign)
(epg-start-sign context (epg-make-data-from-string plain) mode)
(epg-wait-for-completion context)
(unless (epg-context-result-for context 'sign)
`epg-encrypt-file' or `epg-encrypt-string' instead."
(epg-context-set-operation context 'encrypt)
(epg-context-set-result context nil)
`epg-encrypt-file' or `epg-encrypt-string' instead."
(epg-context-set-operation context 'encrypt)
(epg-context-set-result context nil)
(epg-start-encrypt context (epg-make-data-from-file plain)
recipients sign always-trust)
(epg-wait-for-completion context)
(epg-start-encrypt context (epg-make-data-from-file plain)
recipients sign always-trust)
(epg-wait-for-completion context)
(epg-start-encrypt context (epg-make-data-from-string plain)
recipients sign always-trust)
(epg-wait-for-completion context)
(epg-start-encrypt context (epg-make-data-from-string plain)
recipients sign always-trust)
(epg-wait-for-completion context)
`epg-export-keys-to-file' or `epg-export-keys-to-string' instead."
(epg-context-set-operation context 'export-keys)
(epg-context-set-result context nil)
`epg-export-keys-to-file' or `epg-export-keys-to-string' instead."
(epg-context-set-operation context 'export-keys)
(epg-context-set-result context nil)
(epg-start-export-keys context keys)
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
(epg-start-export-keys context keys)
(epg-wait-for-completion context)
(if (epg-context-result-for context 'error)
`epg-import-keys-from-file' or `epg-import-keys-from-string' instead."
(epg-context-set-operation context 'import-keys)
(epg-context-set-result context nil)
`epg-import-keys-from-file' or `epg-import-keys-from-string' instead."
(epg-context-set-operation context 'import-keys)
(epg-context-set-result context nil)
(when (epg-data-string keys)
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(when (epg-data-string keys)
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-eof (epg-context-process context)))))
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-eof (epg-context-process context)))))
`epg-generate-key-from-file' or `epg-generate-key-from-string' instead."
(epg-context-set-operation context 'receive-keys)
(epg-context-set-result context nil)
`epg-generate-key-from-file' or `epg-generate-key-from-string' instead."
(epg-context-set-operation context 'receive-keys)
(epg-context-set-result context nil)
`epg-delete-keys' instead."
(epg-context-set-operation context 'delete-keys)
(epg-context-set-result context nil)
`epg-delete-keys' instead."
(epg-context-set-operation context 'delete-keys)
(epg-context-set-result context nil)
`epg-sign-keys' instead."
(epg-context-set-operation context 'sign-keys)
(epg-context-set-result context nil)
`epg-sign-keys' instead."
(epg-context-set-operation context 'sign-keys)
(epg-context-set-result context nil)
(epg-context-set-operation context 'generate-key)
(epg-context-set-result context nil)
(if (epg-data-file parameters)
(epg-context-set-operation context 'generate-key)
(epg-context-set-result context nil)
(if (epg-data-file parameters)
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(epg-data-string parameters)))
(if (eq (process-status (epg-context-process context)) 'run)
(process-send-string (epg-context-process context)
(epg-data-string parameters)))
(let ((index 0))
(while (eq index (string-match "[0-9A-Fa-f][0-9A-Fa-f]" string index))
(setq string (replace-match "\\x\\&" t nil string)
index (+ index 4)))
(car (read-from-string (concat "\"" string "\"")))))
(let ((index 0))
(while (eq index (string-match "[0-9A-Fa-f][0-9A-Fa-f]" string index))
(setq string (replace-match "\\x\\&" t nil string)
index (+ index 4)))
(car (read-from-string (concat "\"" string "\"")))))
(let ((index 0))
(while (string-match "\\\\\\(\\([,=+<>#;\\\"]\\)\\|\
\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\|\\(.\\)\\)"
(let ((index 0))
(while (string-match "\\\\\\(\\([,=+<>#;\\\"]\\)\\|\
\\([0-9A-Fa-f][0-9A-Fa-f]\\)\\|\\(.\\)\\)"
"\\([^,=+<>#;\\\"]\\|\\\\.\\)+"
string index))
(setq index (match-end 0)
"\\([^,=+<>#;\\\"]\\|\\\\.\\)+"
string index))
(setq index (match-end 0)