X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=epg.el;h=0cf9722d6b3845ac75ebbd289cc5ddffcbbca65c;hb=1750e2f3d7b84648182886bfc282291a69a863d2;hp=b32d57a64205ed5f928fe3bae83847df7db73db2;hpb=7dd310a5477089fc298a838e5676fbed2892e282;p=elisp%2Fepg.git diff --git a/epg.el b/epg.el index b32d57a..0cf9722 100644 --- a/epg.el +++ b/epg.el @@ -1235,9 +1235,14 @@ Otherwise, it makes a normal signature." (epg-make-temp-file "epg-output"))) (epg-start-sign context (epg-make-data-from-file plain) mode) (epg-wait-for-completion context) - (unless (epg-context-result-for context 'sign) - (error "Sign failed: %S" - (epg-context-result-for context 'error))) + (if (epg-context-result-for context 'sign) + (if (epg-context-result-for context 'error) + (message "Sign error: %S" + (epg-context-result-for context 'error))) + (if (epg-context-result-for context 'error) + (error "Sign failed: %S" + (epg-context-result-for context 'error)) + (error "Sign failed"))) (unless signature (epg-read-output context))) (unless signature @@ -1257,9 +1262,14 @@ Otherwise, it makes a normal signature." (epg-start-sign context (epg-make-data-from-string plain) mode) (epg-flush context) (epg-wait-for-completion context) - (unless (epg-context-result-for context 'sign) - (error "Sign failed: %S" - (epg-context-result-for context 'error))) + (if (epg-context-result-for context 'sign) + (if (epg-context-result-for context 'error) + (message "Sign error: %S" + (epg-context-result-for context 'error))) + (if (epg-context-result-for context 'error) + (error "Sign failed: %S" + (epg-context-result-for context 'error)) + (error "Sign failed"))) (epg-read-output context)) (epg-delete-output-file context) (epg-reset context))) @@ -1320,10 +1330,15 @@ If RECIPIENTS is nil, it performs symmetric encryption." (epg-start-encrypt context (epg-make-data-from-file plain) recipients sign always-trust) (epg-wait-for-completion context) - (if (and sign - (not (epg-context-result-for context 'sign))) - (error "Sign encrypt failed: %S" - (epg-context-result-for context 'error))) + (if sign + (if (epg-context-result-for context 'sign) + (if (epg-context-result-for context 'error) + (message "Sign error: %S" + (epg-context-result-for context 'error))) + (if (epg-context-result-for context 'error) + (error "Sign failed: %S" + (epg-context-result-for context 'error)) + (error "Sign failed")))) (if (epg-context-result-for context 'error) (error "Encrypt failed: %S" (epg-context-result-for context 'error))) @@ -1346,10 +1361,15 @@ If RECIPIENTS is nil, it performs symmetric encryption." recipients sign always-trust) (epg-flush context) (epg-wait-for-completion context) - (if (and sign - (not (epg-context-result-for context 'sign))) - (error "Sign encrypt failed: %S" - (epg-context-result-for context 'error))) + (if sign + (if (epg-context-result-for context 'sign) + (if (epg-context-result-for context 'error) + (message "Sign error: %S" + (epg-context-result-for context 'error))) + (if (epg-context-result-for context 'error) + (error "Sign failed: %S" + (epg-context-result-for context 'error)) + (error "Sign failed")))) (if (epg-context-result-for context 'error) (error "Encrypt failed: %S" (epg-context-result-for context 'error)))