Article View: alt.free.newsservers
Article #160919Re: Question for network gurus on how to set up mixmin SSL certificates for NewsTap on iOS
From: Winston_Smith
Date: Tue, 29 Sep 2015 01:47
Date: Tue, 29 Sep 2015 01:47
202 lines
10724 bytes
10724 bytes
On Sun, 27 Sep 2015 09:42:52 +0000, Steve Crook wrote:
> Newstap works with news.mixmin.net but only the pay version supports SSL.
> As Mixmin only allows posting over SSL connections, clearly only the pay
> version will work.
Hi Mike,
Some said that your port 119 worked for them, but, they probably were
confused in all the details.
As you summarized, Mixmin works fine with the payware NewsTap
(whether version 4 or version 5).
The devil was in the details of the cacert/mixmin md5 signature, which,
without Michael Baeuerle's and David Empson's (and Dunno's) help, nobody
would have actually understood what was really going on under the covers.
The problem was mostly that the developer was unfamiliar with the technical
merits of your server and its certificates; you were unfamiliar with iOS
ramifications for software and certificate management; and most users
(including me) didn't understand the certificate-trust process well enough
to debug what was going on; while only Michael, David, and Dunno had the
wherewithal to find the critically needed missing details which explained
what was really going on under the covers.
Here is an uncompleted summary I am working on which shows how to better
test what is really going on, rather than just guessing or giving up, or,
worse, just blindly throwing software at the problem, all of which is what
most clueless people do, instead of getting to the bottom of the issue.
Apple apparently has three levels of trust: "Trusted", "Always Ask",
and "Blocked". Dunno surmised that unknown self-signed certificates
might likely fall into the "Always Ask" category (which, he surmised,
means that the program should probably ask user whether the certificate
should be trusted.)
David Empson suggested we read this Apple "Data Security" Document:
https://support.apple.com/en-us/HT202349
[begin quote]
Available for: iOS 3.0 through 4.3.5 for iPhone 3GS and iPhone 4, iOS
3.1 through 4.3.5 for iPod touch (3rd generation) and later, iOS 3.2
through 4.3.5 for iPad
Impact: Support for X.509 certificates with MD5 hashes may expose users
to spoofing and information disclosure as attacks improve
Description: Certificates signed using the MD5 hash algorithm were
accepted by iOS. This algorithm has known cryptographic weaknesses.
Further research or a misconfigured certificate authority could have
allowed the creation of X.509 certificates with attacker controlled
values that would have been trusted by the system. This would have
exposed X.509 based protocols to spoofing, man in the middle attacks,
and information disclosure. This update disables support for an X.509
certificate with an MD5 hash for any use other than as a trusted root
certificate. CVE-ID, CVE-2011-3427
[end quote]
David noted the last sentence of the paragraph which was:
"This update disables support for an X.509 certificate with an MD5
hash for any use *other* than as a trusted root certificate."
David summarized that as:
"A trusted root certificate doesn't need to have a cryptographically
strong signature. And an untrusted root certificate is useless, therefore
it doesn't matter what signature an untrusted root certificate uses)."
Michael Baeuerle provided fantastic techniques for checking problematic
certificate chains, which will be useful to all of us in the future.
Michaae noted these useful steps for checking SSL certificate chains:
1. You first determine the number of certificates in the chain
2. Then you check for valid dates & no revocations in the chain
3. Lastly, you check that the certificate was issued for the service
Details from Michael follow for those who wish to expand their knowledge:
1. The number of certificates is "2" by virtue of the fact there is a
"0" and a "1" in the "Certificate chain".
$ openssl s_client -connect news.mixmin.net:563 >& mixmin.path
$ geedit mixmin.path
[...]
Certificate chain
0 s:/CN=news.mixmin.net
i:/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing
Authority/emailAddress=support@cacert.org
1 s:/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing
Authority/emailAddress=support@cacert.org
i:/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing
Authority/emailAddress=support@cacert.org
[...]
Note: This is the whole chain and you can see:
a) That it contains 2 certificates (0, and 1);
b) That certificate 0 is the server certificate where
s(ubject) is news.mixmin.net and i(ssuer) is CAcert
c) That certificate 1 is a root certificate where
it is self signed (i.e., the issuer and subject are both CAcert)
Note: iOS needs to trust the root certificate too, but the root certificate
is normally trusted by the operating system simply because it is there
(not because it has a valid signature generated with its own key).
For root certificates, the process of installation declares the trust.
Any root certificate installed in a dedicated location is trusted.
To revoke the trust, the certificate must be deleted/uninstalled.
Note: By default, openssl only prints out the first BEGIN/END certificate
which you can manually store as a pem file by cutting this section:
-----BEGIN CERTIFICATE-----
[...]
-----END CERTIFICATE-----
If you want all the certificates in the chain, use the "-showcerts"
option, which will display all certificates in the chain, which,
for mixmin, will first be the server certificate, and then the root
certificate.
$ openssl s_client -connect news.mixmin.net:563 -showcerts \
>& mixmin_certs_full.txt
$ geedit mixmin_certs_full.txt
[Manually save the first certificate as "mixmin_server_cert.pem"]
[Manually save the second certificate as "mixmin_root_cert.pem"]
mixmin_server_cert.pem
-----BEGIN CERTIFICATE-----
MIIFCz...[...]...MvJNCjAs/D5w=
-----END CERTIFICATE-----
mixmin_root_cert.pem
-----BEGIN CERTIFICATE-----
MIIHPTCCBSW...[...]...k9p2rSVzTMVD
-----END CERTIFICATE-----
NOTE: The root certificate can also be obtained from this web page:
http://www.cacert.org/index.php?id=3
Specifically this is the root certificate in PEM (crt) format:
http://www.cacert.org/certs/root.crt
And this is the root certificate in TEXT format:
http://www.cacert.org/certs/root.txt
2. Both certificates in the Mixmin chain are currently valid by
virtue of the fact that the current date is between the before
and after dates as shown below.
$ openssl s_client -connect news.mixmin.net:563 >& mixmin.path
Then manually cut out the BEGIN/END certificate & save as
mixmin_server_certificate.pem.
$ openssl x509 -in mixmin_server_certificate.pem -noout -text \
>& mixmin.validity
$ geedit mixmin.validity
[...]
Validity
Not Before: May 19 08:17:09 2015 GMT
Not After : Nov 15 08:17:09 2015 GMT
[...]
3. And, the certificate issuance is OK:
$ openssl s_client -connect news.mixmin.net:563 >& mixmin.path
Then manually cut out the BEGIN/END certificate & save as
mixmin_server_certificate.pem.
$ openssl x509 -in mixmin_server_certificate.pem -noout -text \
>& mixmin.validity
$ geedit mixmin.validity
[...]
Subject: CN=news.mixmin.net
X509v3 Subject Alternative Name: DNS:news.mixmin.net,
othername:<unsupported>
[...]
Note: This web site gives us another reliable datapoint:
https://www.sslshopper.com/article-check-ssl-certificates-for-the-vulnerable-md5-algorithm.html
Entering "news.mixmin.net:563" into the test box, outputs the
following:
SERVER:
Common name: news.mixmin.net
SANs: news.mixmin.net, othername:<unsupported>
Valid from May 19, 2015 to November 15, 2015
Serial Number: 1092736 (0x10ac80)
Signature Algorithm: sha512WithRSAEncryption
Issuer: CA Cert Signing Authority
CHAIN:
Common name: CA Cert Signing Authority
Organization: Root CA
Valid from March 30, 2003 to March 29, 2033
Serial Number: 0 (0x0)
Signature Algorithm: md5WithRSAEncryption
Issuer: CA Cert Signing Authority
In this case there is no problem with MD5 because it is only used
for the self signature of the root certificate.
And the self signature of the root certificate doesn't need to be checked
because it is always trusted as long as it is installed on the system.
Michael said that this is rather unintuitive, where, a few month ago
he, himself, "made the same mistake and believed that the signature
algorithm listed in the root certificate is the one used to sign other
certificates. But this is not the case!"
In summary, Michael reminded us:
"What is used to sign the servers certificate is the RSA key from the
root certificate (which has 4096 bits so it can be considered strong)
and the hash algorithm SHA512 (which can be considered strong too)."
Technical Details
Message-ID:
<mucqik$nbr$1@news.mixmin.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.mobile.ipad.(72287).mbox.7z!not-for-mailReferences:
<mtppat$2c8$1@news.mixmin.net> <mtvqp2$8k9$2@news.mixmin.net> <mu04va$t6q$1@news.mixmin.net> <mu25c9$o7g$1@news.mixmin.net> <mu2b6i$48c$1@news.mixmin.net> <mu2v1n$5fr$1@news.mixmin.net> <2039180121464862224.541675dempson-actrix.gen.nz@news.mixmin.net> <1mbbrma.1vge7j7e6iw8wN%jamiekg@wizardling.geek.nz> <1mbc3be.qnnw5v1ayd8srN%dempson@actrix.gen.nz> <d6l9bjFm5j3U9@mid.individual.net> <slrnn0asun.tso.steve@snorky.mixmin.net> <1mbcpkw.d0tpdirbg49kN%dempson@actrix.gen.nz> <d6m2heFsuorU3@mid.individual.net> <1mbctig.2wel4g6vg9lqN%dempson@actrix.gen.nz> <slrnn0d592.tso.steve@snorky.mixmin.net> <slrnn0d7q3.kgr.g.kreme@amelia.local> <slrnn0fegs.tso.steve@snorky.mixmin.net>Show Full Headers
Complete Article Headers
Message-ID: <mucqik$nbr$1@news.mixmin.net> Subject: Re: Question for network gurus on how to set up mixmin SSL certificates for NewsTap on iOS Date: Tue, 29 Sep 2015 01:47:00 +0000 From: Winston_Smith <invalid@butterfly.net> References: <mtppat$2c8$1@news.mixmin.net> <mtvqp2$8k9$2@news.mixmin.net> <mu04va$t6q$1@news.mixmin.net> <mu25c9$o7g$1@news.mixmin.net> <mu2b6i$48c$1@news.mixmin.net> <mu2v1n$5fr$1@news.mixmin.net> <2039180121464862224.541675dempson-actrix.gen.nz@news.mixmin.net> <1mbbrma.1vge7j7e6iw8wN%jamiekg@wizardling.geek.nz> <1mbc3be.qnnw5v1ayd8srN%dempson@actrix.gen.nz> <d6l9bjFm5j3U9@mid.individual.net> <slrnn0asun.tso.steve@snorky.mixmin.net> <1mbcpkw.d0tpdirbg49kN%dempson@actrix.gen.nz> <d6m2heFsuorU3@mid.individual.net> <1mbctig.2wel4g6vg9lqN%dempson@actrix.gen.nz> <slrnn0d592.tso.steve@snorky.mixmin.net> <slrnn0d7q3.kgr.g.kreme@amelia.local> <slrnn0fegs.tso.steve@snorky.mixmin.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.mobile.ipad.(72287).mbox.7z!not-for-mail Newsgroups: alt.free.newsservers,alt.os.linux,comp.mobile.ipad Organization: Mixmin Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 29 Sep 2015 01:47:00 +0000 (UTC) Injection-Info: news.mixmin.net; posting-host="14ff61b0716c96464fb07221a066159d69e7ec8c"; logging-data="23931"; mail-complaints-to="abuse@mixmin.net" Lines: 202 X-Received-Bytes: 10554 X-Received-Body-CRC: 2147011385