From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37236 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: decrypting S/MIME messages Date: Sun, 29 Jul 2001 22:14:44 +0200 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035172686 12808 80.91.224.250 (21 Oct 2002 03:58:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:58:06 +0000 (UTC) Cc: ding@gnus.org Return-Path: Return-Path: Original-Received: (qmail 17013 invoked from network); 29 Jul 2001 20:13:32 -0000 Original-Received: from dolk.extundo.com (195.42.214.242) by gnus.org with SMTP; 29 Jul 2001 20:13:32 -0000 Original-Received: from barbar.josefsson.org (slipsten.extundo.com [195.42.214.241]) (authenticated) by dolk.extundo.com (8.11.3/8.11.3) with ESMTP id f6TKDcw22307; Sun, 29 Jul 2001 22:13:39 +0200 Original-To: Vladimir Volovich In-Reply-To: (Vladimir Volovich's message of "Sun, 29 Jul 2001 17:00:59 +0400") Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.104 Original-Lines: 42 Xref: main.gmane.org gmane.emacs.gnus.general:37236 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37236 Vladimir Volovich writes: > "SJ" == Simon Josefsson writes: > > SJ> Ok, S/MIME decryption work for me now, tell me if it work for > SJ> you. > > Not yet. when viewing such S/MIME encrypted messages (even generated > by gnus itself), i get an error: > > signal(error ("Could not identify PKCS#7 type")) > error("Could not identify PKCS#7 type") I had no problem with XEmacs 21.4 or Emacs 21.0.104, do you have some special mule setting? It might be some mule interference, the code compares buffer contents with a string. Please try this patch and tell if it works or not: --- mm-view.el.~6.13.~ Sun Jul 29 03:01:59 2001 +++ mm-view.el Sun Jul 29 18:02:13 2001 @@ -338,7 +338,7 @@ ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03))))) (defun mm-view-pkcs7-get-type (handle) - (with-temp-buffer + (mm-with-unibyte-buffer (mm-insert-part handle) (cond ((looking-at (regexp-quote mm-pkcs7-enveloped-magic)) 'enveloped) > (defun smime-call-openssl-region (b e buf &rest args) > - (case (apply 'call-process-region b e smime-openssl-program nil buf nil args) >+ (case (apply 'call-process-region b e smime-openssl-program nil (list buf nil) nil args) I applied this, thanks. I hope OpenSSL error messages are still handled correctly, otherwise we'll have to come up with some other solution. > - (when (apply 'smime-call-openssl-region b e buffer "smime" "-sign" >+ (when (apply 'smime-call-openssl-region b e buffer "smime" "-sign" "-rand" "/etc/entropy" I added `smime-extra-arguments' instead. Is it sufficient?