MQ Server fails: AMQ9637: Channel is lacking a certificate. But Java client is configured to send it
<p>I've issue with SSL handshake reported on client side as:</p>

<pre><code>main, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
...
    Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9771: SSL handshake failed. [1=javax.net.ssl.SSLHandshakeException[Remote host closed connection during handshake],3=localhost/127.0.0.1:1414 (localhost),4=SSLSocket.startHandshake,5=default]
        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1187)
        at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:724)
        at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:400)
        at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:299)
        at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:164)
        at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1598)
        ... 15 more
    Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:953)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$6.run(RemoteTCPConnection.java:1156)
        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$6.run(RemoteTCPConnection.java:1151)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1149)
        ... 20 more
    Caused by: java.io.EOFException: SSL peer shut down incorrectly
        at sun.security.ssl.InputRecord.read(InputRecord.java:482)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:934)
        ... 27 more
</code></pre>

<p>and on MQ server as:</p>

<pre><code>AMQ9637: Channel is lacking a certificate.
</code></pre>

<p>is obvious that server do not obtain (or accept?) <s>client certificate</s>. That was bad premise, problem was the <strong>server certificate</strong>. </p>

<p>I use:</p>

<pre><code>JAVA 7 (1.7.0_75) 
MQ 7.5 client libs (7.5.0.2)
MQ 8.0 server (8.0.0.5)
</code></pre>

<p>Here is <a href="https://github.com/majacz/prototypes/blob/master/mq_ssl/src/main/java/tutorial/mq_ssl/MQSSLTest.java" rel="nofollow noreferrer">client Java class</a>. I try to accept all server certificates, and send the client certificate to MQ server side and same certificate is imported in MQ trust store. Not sure if problem is any restriction for certificate name as is noticed here: <a href="http://www-01.ibm.com/support/docview.wss?rs=0&amp;uid=swg21245474" rel="nofollow noreferrer">http://www-01.ibm.com/support/docview.wss?rs=0&amp;uid=swg21245474</a> or if the certificate is really not send to server side.</p>

<p>---Edit:---</p>

<p>Here is my QMGR and CNL configuration's screens for SSL:
<a href="https://i.stack.imgur.com/BOkEP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BOkEP.png" alt="enter image description here"></a> 
<a href="https://i.stack.imgur.com/y8jcb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y8jcb.jpg" alt="enter image description here"></a></p>