I have configured dovecot to use Client certificate authentication. I have used CA.pl (openssl wrapper) to create CA cert and sign client and server certs with that.(no certificate chain, CA cert is trusted in client) I have set the certificate as CA certificate in dovecot for client auth. Dovecot correctly asks IceDove for certificates but after clicking OK, It fails with error "Client didn't present valid SSL certificate."
Using openssl to manually test IMAP connection also results in this error.
dovecot config: https://gist.github.com/Xcess/71f7eeeda0a270b252f1de5d7308c0e2
I have tried certificate with CN=user1 and CNemail@example.com. both failed. Also set common-name to be username in dovecot conf...no difference.
I don't know what to do as this is all stated in manuals and seems pretty simple and straightforward. But it fails.
output of command
openssl x509 -in certificate.crt -text -noout:
Certificate: Data: Version: 3 (0x2) Serial Number: 8e:3d:9b:7c:13:35:88:b7
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=IR, ST=Isf, O=Apps4you, CN=lnxsrv2
Not Before: Mar 1 10:45:32 2017 GMT
Not After : Mar 1 10:45:32 2018 GMT
Subject: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd, CN=user1/emailAddressfirstname.lastname@example.org
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
--- Exponent: 65537 (0x10001)
X509v3 Basic Constraints: CA:FALSE
Netscape Comment: OpenSSL Generated Certificate
X509v3 Subject Key Identifier: ---
Update 2: this slightly modified config file also doesn't work: https://gist.github.com/Xcess/599beaec17a4a524a2acbde1b7f5c70f
Verbose SSL Log file :