[Dovecot] SSL Certificate Anomalies with latest code changes
Some change between bf5ae73e9475 and 584bd77c38fd seems to have broken something in the SSL Handshake. A previously valid server certificate is deemed invalid by various mail clients.
http://hg.dovecot.org/dovecot-2.1/rev/bf5ae73e9475 works fine while http://hg.dovecot.org/dovecot-2.1/rev/584bd77c38fd does not.
Regards Thomas
On 12.4.2012, at 10.11, Thomas Leuxner wrote:
Some change between bf5ae73e9475 and 584bd77c38fd seems to have broken something in the SSL Handshake. A previously valid server certificate is deemed invalid by various mail clients.
http://hg.dovecot.org/dovecot-2.1/rev/bf5ae73e9475 works fine while http://hg.dovecot.org/dovecot-2.1/rev/584bd77c38fd does not.
What kind of a certificate do you have? You have an intermediary cert that exists only in ssl_ca file? I couldn't reproduce this with a test. But anyway, reverted for now: http://hg.dovecot.org/dovecot-2.1/rev/f80f18d0ffa3
Now how do I fix the memory leak then?...
On 12.4.2012, at 10.43, Timo Sirainen wrote:
On 12.4.2012, at 10.11, Thomas Leuxner wrote:
Some change between bf5ae73e9475 and 584bd77c38fd seems to have broken something in the SSL Handshake. A previously valid server certificate is deemed invalid by various mail clients.
http://hg.dovecot.org/dovecot-2.1/rev/bf5ae73e9475 works fine while http://hg.dovecot.org/dovecot-2.1/rev/584bd77c38fd does not.
What kind of a certificate do you have? You have an intermediary cert that exists only in ssl_ca file? I couldn't reproduce this with a test. But anyway, reverted for now: http://hg.dovecot.org/dovecot-2.1/rev/f80f18d0ffa3
Now how do I fix the memory leak then?...
On Thu, Apr 12, 2012 at 10:43:22AM +0300, Timo Sirainen wrote:
What kind of a certificate do you have? You have an intermediary cert that exists only in ssl_ca file? I couldn't reproduce this with a test. But anyway, reverted for now: http://hg.dovecot.org/dovecot-2.1/rev/f80f18d0ffa3
Thawte. They only do intermediates for some time now.
$ openssl x509 -in /etc/ssl/certs/spectre_leuxner_net_2011.crt -noout -subject -issuer -dates subject= /O=spectre.leuxner.net/OU=Go to https://www.thawte.com/repository/index.html/OU=Thawte SSL123 certificate/OU=Domain Validated/CN=spectre.leuxner.net issuer= /C=US/O=Thawte, Inc./OU=Domain Validated SSL/CN=Thawte DV SSL CA notBefore=May 16 00:00:00 2011 GMT notAfter=Jun 14 23:59:59 2012 GMT
[...]
ssl_ca =
On 12.4.2012, at 11.16, Thomas Leuxner wrote:
On Thu, Apr 12, 2012 at 10:43:22AM +0300, Timo Sirainen wrote:
What kind of a certificate do you have? You have an intermediary cert that exists only in ssl_ca file? I couldn't reproduce this with a test. But anyway, reverted for now: http://hg.dovecot.org/dovecot-2.1/rev/f80f18d0ffa3
Thawte. They only do intermediates for some time now.
But do you keep your intermediate cert in ssl_ca file or ssl_cert file?
On Thu, Apr 12, 2012 at 11:17:50AM +0300, Timo Sirainen wrote:
But do you keep your intermediate cert in ssl_ca file or ssl_cert file?
Separate. Root and intermediate are in ssl_ca:
$ cat /etc/ssl/certs/SSL123_CA_Bundle.pem -----BEGIN CERTIFICATE----- MIIEjzCCA3egAwIBAgIQdhASihe2grs6H50amjXAkjANBgkqhkiG9w0BAQUFADCB qTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMf Q2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIw MDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNV BAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMTAwMjE4MDAwMDAwWhcNMjAw MjE3MjM1OTU5WjBeMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMu MR0wGwYDVQQLExREb21haW4gVmFsaWRhdGVkIFNTTDEZMBcGA1UEAxMQVGhhd3Rl IERWIFNTTCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMuYyTY/ 0pzYFgfUSWP5g7DoAi3MXFp0l6YT7xMT3gV8p+bKACPaOfnvE89Sxa+a48q+84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S5jb20vY3BzMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU e1tFz6/Oy3r9MZIaarbzRutXSFAwQAYDVR0fBDkwNzA1oDOgMYYvaHR0cDovL2Ny bC50aGF3dGUuY29tL1RoYXd0ZVByZW1pdW1TZXJ2ZXJDQS5jcmwwDQYJKoZIhvcN AQEFBQADgYEAhKhMyT4qvJrizI8LsiV3xGGJiWNa1KMVQNT7Xj+0Q+pjFytrmXSe Cajd1FYVLnp5MV9jllMbNNkV6k9tcMq+9oKp7dqFd8x2HGqBCiHYQZl/Xi6Cweiq 95OBBaqStB+3msAHF/XLxrRMDtdW3HEgdDjWdMbWj2uvi42gbCkLYeA= -----END CERTIFICATE-----
$ dovecot --version 2.1.4 (584bd77c38fd)
Seems to have fixed it. Thanks.
On 12.4.2012, at 11.33, Thomas Leuxner wrote:
On Thu, Apr 12, 2012 at 11:17:50AM +0300, Timo Sirainen wrote:
But do you keep your intermediate cert in ssl_ca file or ssl_cert file?
Separate. Root and intermediate are in ssl_ca:
The documentation tells to put the intermediary to ssl_cert though. I didn't even know it worked in ssl_ca. But I guess I won't intentionally break it..
On Thu, Apr 12, 2012 at 11:35:48AM +0300, Timo Sirainen wrote:
On 12.4.2012, at 11.33, Thomas Leuxner wrote:
On Thu, Apr 12, 2012 at 11:17:50AM +0300, Timo Sirainen wrote:
But do you keep your intermediate cert in ssl_ca file or ssl_cert file?
Separate. Root and intermediate are in ssl_ca:
The documentation tells to put the intermediary to ssl_cert though. I didn't even know it worked in ssl_ca. But I guess I won't intentionally break it..
Hmmm. I did emulate Thawte instructions though:
https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=SO15464&actp=LIST&viewlocale=en_US https://search.thawte.com/library/VERISIGN/ALL_OTHER/thawte%20ca/SSL123_CA_B...
[...]
SSLCertificateFile /usr/local/ssl/crt/domainname.crt SSLCertificateKeyFile /usr/local/ssl/private/server.key SSLCACertificateFile /usr/local/ssl/crt/cabundle.crt
participants (2)
-
Thomas Leuxner
-
Timo Sirainen