Gnus development mailing list
 help / color / mirror / Atom feed
* S/MIME
@ 2000-11-01 22:38 Bruce Stephens
  2000-11-04 14:23 ` S/MIME ShengHuo ZHU
  2000-11-05  2:13 ` S/MIME Simon Josefsson
  0 siblings, 2 replies; 15+ messages in thread
From: Bruce Stephens @ 2000-11-01 22:38 UTC (permalink / raw)


The PGP/MIME and S/MIME stuff looks like it's developing quickly.  I
can already sign messages with S/MIME.  (Actually, I could do that a
while ago, but it's nice to have it integrated into the main CVS
tree.)

How do I verify signatures?  I just get the error that
application/x-pkcs7-signed (or something like that) is unknown?  I can
see there's code that might work, but I can't see how to tie up the
hooks.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME
  2000-11-01 22:38 S/MIME Bruce Stephens
@ 2000-11-04 14:23 ` ShengHuo ZHU
  2000-11-05  2:13 ` S/MIME Simon Josefsson
  1 sibling, 0 replies; 15+ messages in thread
From: ShengHuo ZHU @ 2000-11-04 14:23 UTC (permalink / raw)


Bruce Stephens <bruce+gnus@cenderis.demon.co.uk> writes:

> The PGP/MIME and S/MIME stuff looks like it's developing quickly.  I
> can already sign messages with S/MIME.  (Actually, I could do that a
> while ago, but it's nice to have it integrated into the main CVS
> tree.)
> 
> How do I verify signatures?  I just get the error that
> application/x-pkcs7-signed (or something like that) is unknown?  I can
> see there's code that might work, but I can't see how to tie up the
> hooks.

Verification and decryption of S/MIME have not been implemented yet.
You could (setq mm-verify-option 'known) and 
(setq mm-decrypt-option 'known) to ignore the message.

ShengHuo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME
  2000-11-01 22:38 S/MIME Bruce Stephens
  2000-11-04 14:23 ` S/MIME ShengHuo ZHU
@ 2000-11-05  2:13 ` Simon Josefsson
  2000-11-05  5:43   ` S/MIME ShengHuo ZHU
  2000-11-28  0:08   ` S/MIME suggestions Bruce Stephens
  1 sibling, 2 replies; 15+ messages in thread
From: Simon Josefsson @ 2000-11-05  2:13 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

Bruce Stephens <bruce+gnus@cenderis.demon.co.uk> writes:

> How do I verify signatures?  I just get the error that
> application/x-pkcs7-signed (or something like that) is unknown?

S/MIME signature verification should work now.  Unfortunately S/MIME
doesn't use multipart/encrypted (rfc 2015), so there's a little more
work involved getting decryption to work too.  Shouldn't take too long
though.

I'm signing this so that you can check if it works.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 1515 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME
  2000-11-05  2:13 ` S/MIME Simon Josefsson
@ 2000-11-05  5:43   ` ShengHuo ZHU
  2000-11-05 12:18     ` S/MIME Simon Josefsson
  2000-11-28  0:08   ` S/MIME suggestions Bruce Stephens
  1 sibling, 1 reply; 15+ messages in thread
From: ShengHuo ZHU @ 2000-11-05  5:43 UTC (permalink / raw)


Simon Josefsson <sj@extundo.com> writes:

> Bruce Stephens <bruce+gnus@cenderis.demon.co.uk> writes:
> 
> > How do I verify signatures?  I just get the error that
> > application/x-pkcs7-signed (or something like that) is unknown?
> 
> S/MIME signature verification should work now.  Unfortunately S/MIME
> doesn't use multipart/encrypted (rfc 2015), so there's a little more
> work involved getting decryption to work too.  Shouldn't take too long
> though.

Two possible problems:

1. The output of openssl may contain ^M's.  At least, I found one at
   the end of the first MIME boundary. I don't know why.  Should those
   ^M's be removed?

2. When smime-verify-buffer is called, the article headers have been
   decoded, which means that users may have to pick a coding system to
   encode those non-ASCII characters before it is sent to openssl.  It
   would be better to copy the article to a new buffer, and remove
   unnecessary headers, or just narrow to the article body.

ShengHuo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME
  2000-11-05  5:43   ` S/MIME ShengHuo ZHU
@ 2000-11-05 12:18     ` Simon Josefsson
  2000-11-05 13:36       ` S/MIME ShengHuo ZHU
  0 siblings, 1 reply; 15+ messages in thread
From: Simon Josefsson @ 2000-11-05 12:18 UTC (permalink / raw)
  Cc: ding

ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> 1. The output of openssl may contain ^M's.  At least, I found one at
>    the end of the first MIME boundary. I don't know why.  Should those
>    ^M's be removed?

OpenSSL problem, fixed in 0.9.6.  I believe the signature isn't
calculated over the boundary so this shouldn't cause any problems, I
think.

> 2. When smime-verify-buffer is called, the article headers have been
>    decoded, which means that users may have to pick a coding system to
>    encode those non-ASCII characters before it is sent to openssl.  It
>    would be better to copy the article to a new buffer, and remove
>    unnecessary headers, or just narrow to the article body.

Right.  I added mm-handle-multipart-* to get information of a MIME
multipart, and it's used by mml-smime-verify now.  What do you think,
is the copying too costly?

I think the proper solution would be to add a reference to the "upper"
MIME object within a MIME handle.  I'm not sure how to do that in
elisp though.  The uppermost MIME handle should also include a
reference to the RFC822 article headers too, because the "From:" line
should be verified to match the certificate used to sign a message.

Also, what should happen when verification fails?  For S/MIME it print
a message saying if the verification was successful or not, PGP/MIME
doesn't seem to print anything, and display a *MML2015* buffer if the
verification fail.  Neither is very intuitive if you got 100 signed
parts in a mail.  I think it would be nice if verification/decryption
status was displayed such as

[text/plain; signed (S/MIME): Undecided]
[text/plain; signed (S/MIME): OK]
[text/plain; signed (S/MIME): Failed]

and you could pop up the menu and get some kind of "Security info" for
that MIME part, with more details.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME
  2000-11-05 12:18     ` S/MIME Simon Josefsson
@ 2000-11-05 13:36       ` ShengHuo ZHU
  2000-11-05 14:14         ` S/MIME Simon Josefsson
  0 siblings, 1 reply; 15+ messages in thread
From: ShengHuo ZHU @ 2000-11-05 13:36 UTC (permalink / raw)


Simon Josefsson <sj@extundo.com> writes:

> Right.  I added mm-handle-multipart-* to get information of a MIME
> multipart, and it's used by mml-smime-verify now.  What do you think,
> is the copying too costly?

What kind of information mml-smime-verify needs? CTL, From and To?

> I think the proper solution would be to add a reference to the "upper"
> MIME object within a MIME handle.  I'm not sure how to do that in
> elisp though.  The uppermost MIME handle should also include a
> reference to the RFC822 article headers too, because the "From:" line
> should be verified to match the certificate used to sign a message.

"From:" line could be saved in a dynamic variable when
mm-dissect-buffer is called without no-strict-mime, like what I did in
PGP/MIME encryption.

> Also, what should happen when verification fails?  For S/MIME it print
> a message saying if the verification was successful or not, PGP/MIME
> doesn't seem to print anything, and display a *MML2015* buffer if the
> verification fail.  Neither is very intuitive if you got 100 signed
> parts in a mail.  I think it would be nice if verification/decryption
> status was displayed such as

> [text/plain; signed (S/MIME): Undecided]
> [text/plain; signed (S/MIME): OK]
> [text/plain; signed (S/MIME): Failed]
> 
> and you could pop up the menu and get some kind of "Security info" for
> that MIME part, with more details.

It sounds good to me.  I suggest to forge attributes `gnus-info' and
`gnus-details' in content-disposition.

ShengHuo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME
  2000-11-05 13:36       ` S/MIME ShengHuo ZHU
@ 2000-11-05 14:14         ` Simon Josefsson
  0 siblings, 0 replies; 15+ messages in thread
From: Simon Josefsson @ 2000-11-05 14:14 UTC (permalink / raw)
  Cc: ding

On 5 Nov 2000, ShengHuo ZHU wrote:

> What kind of information mml-smime-verify needs? CTL, From and To?

I looked at SMIMEv2 and SMIMEv3 specs but I can't find the reference to
looking at From: and comparing it to certificate owner.  Perhaps that's 
simply obvious, altough I can think of some issues (use
X.509 subjectAlternateName or not? etc).  Ok; CTL is required, From will
be needed, To will be needed by encryption/decryption.

Verifying signatures without checking that the sender == signer is of
course bad.  OpenSSL doesn't seem to perform this checking (although it
has "-from" and "-to") so we have to do it ourself. Hm, are there any
ASN.1 libraries written in elisp?  We'd might use 
`ssl-certificate-information' of ssl.el as an easier solution.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* S/MIME suggestions
  2000-11-05  2:13 ` S/MIME Simon Josefsson
  2000-11-05  5:43   ` S/MIME ShengHuo ZHU
@ 2000-11-28  0:08   ` Bruce Stephens
  2000-11-29 21:22     ` Simon Josefsson
  2001-01-15 17:09     ` Simon Josefsson
  1 sibling, 2 replies; 15+ messages in thread
From: Bruce Stephens @ 2000-11-28  0:08 UTC (permalink / raw)


Just a couple of suggestions for signed email mostly.  Most user
agents don't *require* that certificates verify (i.e., you don't
*have* to have the issuer's certificate).  They complain loudly if the
certificate doesn't validate, obviously, but they allow you to trust a
specific certificate, without having to trust all certificates signed
by a particular issuer.

Openssl allows this using the -noverify flag.  So (in a pleasantly
contradictory fashion), "openssl smime -verify -noverify ..." makes
perfect sense.

Also, "openssl smime -verify ... -signer <file>" extracts the
certificate (presuming there is one).  That strikes me as a very
convenient feature to use.  Especially considering that "openssl x509
-email -noout -in <cert>.pem" prints out a list of email addresses for
the given certificate, which would presumably allow Gnus to check that
the email addresses match with the From header.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME suggestions
  2000-11-28  0:08   ` S/MIME suggestions Bruce Stephens
@ 2000-11-29 21:22     ` Simon Josefsson
  2000-11-30  0:34       ` Bruce Stephens
  2000-11-30  1:25       ` ShengHuo ZHU
  2001-01-15 17:09     ` Simon Josefsson
  1 sibling, 2 replies; 15+ messages in thread
From: Simon Josefsson @ 2000-11-29 21:22 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

Bruce Stephens <bruce+gnus@cenderis.demon.co.uk> writes:

> Just a couple of suggestions for signed email mostly.  Most user
> agents don't *require* that certificates verify (i.e., you don't
> *have* to have the issuer's certificate).  They complain loudly if the
> certificate doesn't validate, obviously, but they allow you to trust a
> specific certificate, without having to trust all certificates signed
> by a particular issuer.
> 
> Openssl allows this using the -noverify flag.  So (in a pleasantly
> contradictory fashion), "openssl smime -verify -noverify ..." makes
> perfect sense.

Yes.  What would good defaults be?  First try to verify
message+certificate, with fall back to simply verify the message?  In
the second case, it could say something along the lines of

[[S/MIME Signed: OK (Untrusted CA))]]

What do you think?

> Also, "openssl smime -verify ... -signer <file>" extracts the
> certificate (presuming there is one).  That strikes me as a very
> convenient feature to use.  Especially considering that "openssl x509
> -email -noout -in <cert>.pem" prints out a list of email addresses for
> the given certificate, which would presumably allow Gnus to check that
> the email addresses match with the From header.

I've added support for this now.

This message should be an example of this, if you got the verisign
cert in your CA path, it should say "Sender forged" (you might need to
do `W s' if you disabled auto-verification).  If you click on the
button it should display the certificate found in this message so you
can spot why it happened.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 1515 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME suggestions
  2000-11-29 21:22     ` Simon Josefsson
@ 2000-11-30  0:34       ` Bruce Stephens
  2000-11-30  9:54         ` Simon Josefsson
  2000-11-30  1:25       ` ShengHuo ZHU
  1 sibling, 1 reply; 15+ messages in thread
From: Bruce Stephens @ 2000-11-30  0:34 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> Bruce Stephens <bruce+gnus@cenderis.demon.co.uk> writes:

[...]

> > Openssl allows this using the -noverify flag.  So (in a pleasantly
> > contradictory fashion), "openssl smime -verify -noverify ..." makes
> > perfect sense.
> 
> Yes.  What would good defaults be?  First try to verify
> message+certificate, with fall back to simply verify the message?
> In the second case, it could say something along the lines of
> 
> [[S/MIME Signed: OK (Untrusted CA))]]
> 
> What do you think?

Yes, probably.  The way Outlook Express does it (by default) is a bit
OTT, but it expresses the various possibilities.  When you open a
signed and/or encrypted message, you get a screen with a number of
items on it, with ticks or crosses by them.  I forget exactly the
list, but it'll include things like "signature verifies", "certificate
trusted", "certificate issuer trusted", "certificate subject matches
from address", and so on.  (Things for expiry, too, I guess.)

Then you need to click again to get to the message (which is what
sucks---Netscrape does this much less intrusively, and much more
appropriately, IMHO---also, when it's an encrypted message that you
can't decrypt, it won't even show you the (unencrypted) headers, which
is really dumb).

However, there seem to be a number of possibilities.  I think I'd like
to be able to trust a CA, but still be warned if something signed by a
certificate issued by it (i.e., I'd have a list of generally trusted
CAs, but mostly I'd explicitly trust individual certificates).

Anyway, this is making real progress---S/MIME support seems to be
approaching PGP's in usability.

> > Also, "openssl smime -verify ... -signer <file>" extracts the
> > certificate (presuming there is one).  That strikes me as a very
> > convenient feature to use.  Especially considering that "openssl x509
> > -email -noout -in <cert>.pem" prints out a list of email addresses for
> > the given certificate, which would presumably allow Gnus to check that
> > the email addresses match with the From header.
> 
> I've added support for this now.
> 
> This message should be an example of this, if you got the verisign
> cert in your CA path, it should say "Sender forged" (you might need to
> do `W s' if you disabled auto-verification).  If you click on the
> button it should display the certificate found in this message so you
> can spot why it happened.

OK, I'll try reading it when I've updated my Gnus.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME suggestions
  2000-11-29 21:22     ` Simon Josefsson
  2000-11-30  0:34       ` Bruce Stephens
@ 2000-11-30  1:25       ` ShengHuo ZHU
  2000-11-30  2:00         ` Kai Großjohann
  2000-11-30  9:36         ` Simon Josefsson
  1 sibling, 2 replies; 15+ messages in thread
From: ShengHuo ZHU @ 2000-11-30  1:25 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

[...]

> I've added support for this now.

A possible error:

,----
| While compiling the end of the data in file /u/zsh/s/gnus/lisp/smime.el:
|   ** the function point-at-eol is not known to be defined.
`----

ShengHuo



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME suggestions
  2000-11-30  1:25       ` ShengHuo ZHU
@ 2000-11-30  2:00         ` Kai Großjohann
  2000-11-30  9:36         ` Simon Josefsson
  1 sibling, 0 replies; 15+ messages in thread
From: Kai Großjohann @ 2000-11-30  2:00 UTC (permalink / raw)
  Cc: ding

On 29 Nov 2000, ShengHuo ZHU wrote:

> A possible error:
> 
> ,----
> | While compiling the end of the data in file /u/zsh/s/gnus/lisp/smime.el:
> |   ** the function point-at-eol is not known to be defined.
> `----

gnus-point-at-eol is probably Simon's friend.

kai
-- 
The arms should be held in a natural and unaffected way and never
be conspicuous. -- Revised Technique of Latin American Dancing



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME suggestions
  2000-11-30  1:25       ` ShengHuo ZHU
  2000-11-30  2:00         ` Kai Großjohann
@ 2000-11-30  9:36         ` Simon Josefsson
  1 sibling, 0 replies; 15+ messages in thread
From: Simon Josefsson @ 2000-11-30  9:36 UTC (permalink / raw)
  Cc: ding

ShengHuo ZHU <zsh@cs.rochester.edu> writes:

> | While compiling the end of the data in file /u/zsh/s/gnus/lisp/smime.el:
> |   ** the function point-at-eol is not known to be defined.

Fixed, thanks.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME suggestions
  2000-11-30  0:34       ` Bruce Stephens
@ 2000-11-30  9:54         ` Simon Josefsson
  0 siblings, 0 replies; 15+ messages in thread
From: Simon Josefsson @ 2000-11-30  9:54 UTC (permalink / raw)
  Cc: ding

Bruce Stephens <bruce+gnus@cenderis.demon.co.uk> writes:

> Yes, probably.  The way Outlook Express does it (by default) is a bit
> OTT, but it expresses the various possibilities.  When you open a
> signed and/or encrypted message, you get a screen with a number of
> items on it, with ticks or crosses by them.  I forget exactly the
> list, but it'll include things like "signature verifies", "certificate
> trusted", "certificate issuer trusted", "certificate subject matches
> from address", and so on.  (Things for expiry, too, I guess.)

That's too obtrusive imho, but there should be a menu or something on
the security button so one could list all details of a signed part.

> Anyway, this is making real progress---S/MIME support seems to be
> approaching PGP's in usability.

Deciphering S/MIME messages doesn't work though.  Mainly because
S/MIME didn't use RFC 1847.  Sigh.  I have a sort-of working elisp
ASN.1 library now, that is able to parse those PKCS#7 blobs and find
out what they are.  I'll check it in soon..




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: S/MIME suggestions
  2000-11-28  0:08   ` S/MIME suggestions Bruce Stephens
  2000-11-29 21:22     ` Simon Josefsson
@ 2001-01-15 17:09     ` Simon Josefsson
  1 sibling, 0 replies; 15+ messages in thread
From: Simon Josefsson @ 2001-01-15 17:09 UTC (permalink / raw)
  Cc: ding

Bruce Stephens <bruce+gnus@cenderis.demon.co.uk> writes:

> Openssl allows this using the -noverify flag.  So (in a pleasantly
> contradictory fashion), "openssl smime -verify -noverify ..." makes
> perfect sense.

I've implemented & commited this now -- which means that everyone with
OpenSSL 0.9.6 should be able to verify the integrity of S/MIME
messages without any configuration.  To additionally be able to
authenticate identity of a sender, one needs to populate
`smime-CA-file' or `smime-CA-directory' with something you trust (or
not, or whatever).




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2001-01-15 17:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-01 22:38 S/MIME Bruce Stephens
2000-11-04 14:23 ` S/MIME ShengHuo ZHU
2000-11-05  2:13 ` S/MIME Simon Josefsson
2000-11-05  5:43   ` S/MIME ShengHuo ZHU
2000-11-05 12:18     ` S/MIME Simon Josefsson
2000-11-05 13:36       ` S/MIME ShengHuo ZHU
2000-11-05 14:14         ` S/MIME Simon Josefsson
2000-11-28  0:08   ` S/MIME suggestions Bruce Stephens
2000-11-29 21:22     ` Simon Josefsson
2000-11-30  0:34       ` Bruce Stephens
2000-11-30  9:54         ` Simon Josefsson
2000-11-30  1:25       ` ShengHuo ZHU
2000-11-30  2:00         ` Kai Großjohann
2000-11-30  9:36         ` Simon Josefsson
2001-01-15 17:09     ` Simon Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).