[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: S/MIME with Wanderlust



> Now the contents of *WL:Message*-nil is only a section of the
> complete output of gpgsm, if run on the comand-line.  The visible
> section displayed in the buffer, however, does not contain all the
> decoded raw output of gpgsm:
(snip)
> Content-Transfer-Encoding: 7bit
> 
> Content-Disposition: attachment;
>  filename=smime.p7s
> 
> Content-Transfer-Encoding: base64

This result is very strange.  The first line is a part of header in
the first text/plain entity and the rest are in the second
application/pkcs7-signature entity.  Moreover, Content-Type: header
and its parameter of the second entity are skipped or replaced with a
blank line.

Anyway, I guess that EasyPG fails to receive outputs from gpgsm or
gpgsm's output to stdout is broken.  Please check whether EasyPG +
gpgsm properly works.

1. Extract your application/pkcs7-mime part into file (use
mime-save-content or wl-mime-save-content instead of
mime-view-application/pkcs7-mime).

2. Evaluate the below code in *scratch* buffer.

(epg-decrypt-file (epg-make-context 'CMS)
		  "/path/to/extracted/smime.p7m" nil)

3. Confirm whether correct decrypted string is inserted.

4. If inserted string is corrupted, try the below code and confirm
whther "tempfile" is corrupted.

(epg-decrypt-file (epg-make-context 'CMS)
		  "/path/to/extracted/smime.p7m" "/path/to/tempfile")


-- 
Kazuhiro Ito