Thanks for writing stunnel, it looks like a great tool!
I have, however, a really hard time understanding the difference between
verify=2,3 and 4. In the manpage, I found
verify = level
verify peer certificate
level 0 - request and ignore peer certificate
level 1 - verify peer certificate if present
level 2 - verify peer certificate
level 3 - verify peer with locally installed certificate
level 4 - ignore CA chain and only verify peer certificate
default - no verify
Levels 0-2 seem pretty clear cut, but then it becomes confusing for me.
First, I do not understand how level 3 differs from level2. What does
"against a locally installed certificate" mean? It seems to me that I
certainly need to have a local copy of the trusted CAs even in level 2
-- at least I hope that they aren't somehow build in to stunnel. But
there is also just one CApath option, so will that be used for level 2
or level 3?
For level 4, the "ignore the CA chain" path is fine -- but where do I
put the peer certificates that I'm willing to accept? CApath seems
wrong, but cert is already used for the server's own certificate...
Best,
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
_______________________________________________
stunnel-users mailing list
stunne...@stunnel.org
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
Thanks for explanations. So in which case would I ever use 3? Somehow I
can't think of such a situation. If I already explicitly trust a
specific certificate, why would I be interested in checking the CA
chain?
Best,
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
FWIW, I still don't see why I'd use verify=3 in that case.
Best,
Nikolaus
--
Encrypted emails preferred.
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
»Time flies like an arrow, fruit flies like a Banana.«
Because verify=4 doesn't know the CA chain (barring the oddity reported
by Thomas) and thus would not consider the server cert invalid because
of the CA cert revocation.
Whether you *want* that to happen is a somewhat different question.
Under normal circumstances, one would expect such a situation to result
in the server operators installing a new server cert from another CA, at
which point your stunnel setup will stop working, anyway. (Unless the
attacker was able to snarf the server's privkey from the CA's archives
and has already set up a MitM attack against *your* connections.) In
other words, using 4 instead of 3 where possible gains you maybe a
couple days of continued operation, at the expense of probably not
learning that fast *how* the CA was compromised and what that means for
the trustworthiness of the server cert.
(I currently have another case at hand where the difference would be
much more pronounced, though. IMHO the CA blundered there - as in, the
server cert is valid until late 2015, but one intermediate CA's cert
expires early in 2014. Ho hum ... !)
Regards,
J. Bern
--
*NEU* - NEC IT-Infrastruktur-Produkte im <http://www.linworks-shop.de/>:
Server--Storage--Virtualisierung--Management SW--Passion for Performance
Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel