offlineimap, OSX, SSL3_GET_SERVER_CERTIFICATE and the cert_fingerprint?

Johannes Kastl mail at ojkastl.de
Fri Feb 1 20:34:00 GMT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/1/13 9:23 PM Eygene Ryabinkin wrote:

> You're using sslcacertfile, aren't you?  If so, can we get its
> contents (should be only certificates, so it is OK to share, make
> sure that you have no private keys there) and the endpoint you're
> trying to connect with OIMAP to?  OS and OI versions will be
> helpful too.

Sure.
OSX 10.8 (same happened on 10.6 and 10.5 IIRC)
Endpoint is imap.gmx.net
offlineimap is the latest from git. But this happened before (2011),
since I upgrade macports to python 2.6 (i think, or 2.7?).

Here it comes (three blocks):

- -----BEGIN CERTIFICATE-----
MIID3TCCAsWgAwIBAgIQbdFfo1jT9k90NjIlvEnfDTANBgkqhkiG9w0BAQUFADA8
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U
aGF3dGUgU1NMIENBMB4XDTExMTAwNDAwMDAwMFoXDTEzMTAwMzIzNTk1OVowdjEL
MAkGA1UEBhMCREUxDzANBgNVBAgTBkJheWVybjERMA8GA1UEBxQITXVlbmNoZW4x
HjAcBgNVBAoUFTEmMSBNYWlsICYgTWVkaWEgR21iSDEMMAoGA1UECxQDR01YMRUw
EwYDVQQDFAxpbWFwLmdteC5uZXQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQC+ueE2NACGS+EtW6FWGkcC/uUsnjevbzuGWvwuD9dzNczn4zGWSoPCqu4P
7XXkleC6vPBuN62K7rit3A2NJtzeDNRfVQVj2E524CIeZ25SfCcBKCTFphhvzbxy
YgwWidrqVfAKHKQBhwpslbajJs/4n4Qb6rP4UntLHg+aOWzRK3QAwS6ZQ147y0Zk
LTNOQSoT7ZHdYGJxib5Lw03rsMQZXgJqVcgL8TV5wJjdBsj2cTwfxmHsns8xUrPu
z4CFGx1dy2JeyFNJP9PY4cMwEBIAOyL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5HMfHFyHMXAZ+sy/cmSXJTahcCbv1N9Kwn0jJ2RH5dqUsveCTakd9h7h1BE1T5u
KWn7OUkmHgmlgHtALevoJ4XJ/mH9fuZ8lx3VnQIDAQABo4HCMIG/MA8GA1UdEwEB
/wQFMAMBAf8wOwYDVR0gBDQwMjAwBgRVHSAAMCgwJgYIKwYBBQUHAgEWGmh0dHBz
Oi8vd3d3LnRoYXd0ZS5jb20vY3BzMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU
e1tFz6/Oy3r9MZIaarbzRutXSFAwQAYDVR0fBDkwNzA1oDOgMYYvaHR0cDovL2Ny
bC50aGF3dGUuY29tL1RoYXd0ZVByZW1pdW1TZXJ2ZXJDQS5jcmwwDQYJKoZIhvcN
AQEFBQADgYEAhKhMyT4qvJrizI8LsiV3xGGJiWNa1KMVQNT7Xj+0Q+pjFytrmXSe
Cajd1FYVLnp5MV9jllMbNNkV6k9tcMq+9oKp7dqFd8x2HGqBCiHYQZl/Xi6Cweiq
95OBBaqStB+3msAHF/XLxrRMDtdW3HEgdDjWdMbWj2uvi42gbCkLYeA=
- -----END CERTIFICATE-----

The sslcacertfile was created with the following command:

> openssl s_client -connect imap.gmx.net:993 -CApath
> /System/Library/OpenSSL/ -showcerts | perl -ne 'print if
> /BEGIN/../END/; print STDERR if /return/' >  filename.cert

I just noticed the following output:

> depth=3 C = ZA, ST = Western Cape, L = Cape Town, O = Thawte
> Consulting cc, OU = Certification Services Division, CN = Thawte
> Premium Server CA, emailAddress = premium-server at thawte.com verify
> return:1 depth=2 C = US, O = "thawte, Inc.", OU = Certification
> Services Division, OU = "(c) 2006 thawte, Inc. - For authorized use
> only", CN = thawte Primary Root CA verify return:1 depth=1 C = US,
> O = "Thawte, Inc.", CN = Thawte SSL CA verify return:1 depth=0 C =
> DE, ST = Bayern, L = Muenchen, O = 1&1 Mail & Media GmbH, OU = GMX,
> CN = imap.gmx.net verify return:1 Verify return code: 0 (ok)

The last line seems nice, but the three "verify return: 1" strike me
as odd. If 0 is ok, 1 seems to be a problem, right?

Regards,
Johannes
- -- 
When you say "I wrote a program that crashed Windows", people just
stare at you blankly and say "Hey, I got those with the system, *for
free*".
(Linus Torvalds)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAlEMJrgACgkQzi3gQ/xETbLZpQCfQVVUEiSe/rtnLD15rifs98fx
XfAAoJWFO/z29OzZXHYdVoOYQ8+vQdyD
=zwHg
-----END PGP SIGNATURE-----





More information about the OfflineIMAP-project mailing list