I'm trying to get a wildfly 8.1 server to access an imap server that ssl client certificate authentication. I managed to get the connection up and running, but the can't get wildfly to send the certificate.
I used the following cli-statement to configure the keystone
/host=master/core-service=management/security-realm=ApplicationRealm/server-identity=ssl:add(keystore-path=client-keystore.jks, keystore-relative-to=jboss.server.conf.dir, keystore-password=*****, alias=client-cert)
Still I get the following stacktrace when trying to connect to the server:
javax.mail.AuthenticationFailedException: [ALERT] Client didn't present valid SSL certificate
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:684) [javax.mail-1.5.1.jar:1.5.1]
at javax.mail.Service.connect(Service.java:345) [javax.mail-1.5.1.jar:1.5.1]
at javax.mail.Service.connect(Service.java:226) [javax.mail-1.5.1.jar:1.5.1]
at javax.mail.Service.connect(Service.java:246) [javax.mail-1.5.1.jar:1.5.1]
My Keystore looks like this:
$ keytool -list -keystore client-keystore.jks
Keystore-Typ: JKS
Keystore-Provider: SUN
Keystore enthält 1 Eintrag
client-cert, 12.11.2015, PrivateKeyEntry,
Zertifikat-Fingerprint (SHA1): 82:94:3F:5A:6F:7F:34:0A:03:B1:FF:AB:90:92:23:1E:4C:23:9F:3F