🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.free.newsservers
Article #160755

Re: Question for network gurus on how to set up mixmin SSL certificates for NewsTap on iOS

#160755
From: Michael Baeuerle
Date: Wed, 23 Sep 2015 12:11
76 lines
4012 bytes
Winston_Smith wrote:
> On Tue, 22 Sep 2015 08:06:38 +0000, Michael Baeuerle wrote:
> > 
> > If you save the certificate to a file, you can decode & view
> > $ openssl x509 -in aioe.pem -noout -text
> > As you can see, the certificate is no longer valid (expired)
> 
> It's actually surprisingly not as easy to save to a file as ">".
> 
> This didn't work:
> $ openssl s_client -connect news.aioe.org:563 > aioe.pem
> 
> But this seems to have worked:
> $ openssl s_client -connect news.aioe.org:563 >& aioe.pem

To do it correct, you have to cut out and store only the certificate
section:
| 
| -----BEGIN CERTIFICATE-----
| [...]
| -----END CERTIFICATE-----

in the PEM file. Looks like OpenSSL ignores the leading and trailing
garbage in some circumstances.

> When I ran the viewing command, I saw the expired date:
> $ openssl x509 -in aioe.pem -noout -text | more
>   Validity
>    Not Before: Jan 31 00:44:47 2013 GMT
>    Not After : Jan 31 22:42:43 2014 GMT
> 
> Repeating for mixmin, we see that the mixmin cert is still valid:
> $ openssl s_client -connect news.mixmin.net:563 >& mixmin.pem
> $ openssl x509 -in mixmin.pem -noout -text | more
>   Validity
>    Not Before: May 19 08:17:09 2015 GMT
>    Not After : Nov 15 08:17:09 2015 GMT

Yes, but a complete certificate chain check is much more complicated.

First you have to repeat the validity check for all the certificates in
the chain. For Mixmin the chain consists of only 2 certificates, the one
for the server and the root certificate. With the "-showcerts" option
OpenSSL will display both:
| 
| $ openssl s_client -connect news.mixmin.net:563 -showcerts
| [Cut&Paste second certificate into editor and saved as "mixmin_root.pem"]
| $ openssl x509 -in mixmin_root.pem -noout -text | less
| [...]
|         Validity
|             Not Before: Mar 30 12:29:49 2003 GMT
|             Not After : Mar 29 12:29:49 2033 GMT

Second you should verify that no certificate in the chain was revoked
(normally nobody do this or errors are ignored).

Third you need to check that the certificate really was issued for the
service you have connected. In the Mixmin case anything is OK:
| 
| $ openssl x509 -in mixmin.pem -noout -text | less
| [...]
| Subject: CN=news.mixmin.net
| [...]
| X509v3 Subject Alternative Name: 
|                 DNS:news.mixmin.net, othername:<unsupported>

A single match is sufficient. Again some clients don't check this, but
the whole authentication is useless if a mismatch is accepted here.

The last check is to verify that the certificate chain end in a root
certificate that is trusted.


But even all this together can still be weak if the signature algorithms
used are not strong (using something like MD5 or RSA512). It is really
hard to implement this correctly because OpenSSL can't do it alone.
Technical Details
Message-ID: <AABWAo8aZDYAAAtd.A1.flnews@WStation3.stz-e.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
References: <mtppat$2c8$1@news.mixmin.net> <d6b968F82htU2@mid.individual.net> <mtq07u$ghs$1@news.mixmin.net> <d6bg5mF9o52U1@mid.individual.net> <mtqu9i$cnp$1@news.mixmin.net> <AABWAQtlh/0AAAor.A1.flnews@WStation3.stz-e.de> <mtrv20$et4$1@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <AABWAo8aZDYAAAtd.A1.flnews@WStation3.stz-e.de>
Subject: Re: Question for network gurus on how to set up mixmin SSL certificates for NewsTap on iOS
Date: Wed, 23 Sep 2015 12:11:42 +0000
From: Michael Baeuerle <michael.baeuerle@stz-e.de>
References: <mtppat$2c8$1@news.mixmin.net> <d6b968F82htU2@mid.individual.net> <mtq07u$ghs$1@news.mixmin.net> <d6bg5mF9o52U1@mid.individual.net> <mtqu9i$cnp$1@news.mixmin.net> <AABWAQtlh/0AAAor.A1.flnews@WStation3.stz-e.de> <mtrv20$et4$1@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
Newsgroups: alt.free.newsservers
Lines: 76
Reply-To: Michael Baeuerle <michael.baeuerle@gmx.net>
Mime-Version: 1.0
X-Trace: individual.net LNpP3+d6ubfv7+iH+ae7cAmEYiTTBxG9l9NQHYg3NhDKBZDt0l
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:zInnn/hrRyQSxPN25SJOaR4yH0Q= sha1:xXvLfcdP1QmVrjS+QlBbkb9c5hg=
Injection-Date: 23 Sep 2015 12:11:42 -0000
User-Agent: flnews/0.11pre54 (for GNU/Linux)