unacceptable certificate, application verification failure. POCO Openssl
<p>I am trying to perform following:</p>

<p>Generate Client Certificate,Key,Bundle
Generate Server Certificate,Key,Bundle</p>

<p>And I am trying to perform:</p>

<p>-Client verification of server Certificate</p>

<p>-Server side verification of Client Certificate Using POCO-HTTPS.</p>

<p>Client verifies the certificate(Server) Successfully But
Server Fails to Verify the Client certificate and i get 
"Certificate Validation Error Unacceptable certificate from 127.0.0.1: Application verification failure.</p>

<p>Used the <a href="https://jamielinux.com/docs/openssl-certificate-authority/sign-server-and-client-certificates.html" rel="nofollow">https://jamielinux.com/docs/openssl-certificate-authority/sign-server-and-client-certificates.html</a>
 for client and server certificate/key/CSR generation on Ubuntu
Code:</p>

<p>Client Code:</p>

<pre><code>**while(1){
    try{
        SharedPtr&lt;PrivateKeyPassphraseHandler&gt; pConsoleHandler = new KeyConsoleHandler(true);
        SharedPtr&lt;InvalidCertificateHandler&gt; pInvalidCertHandler = new ConsoleCertificateHandler(true);     
        Poco::Net::Context::Ptr m_pContext = new Poco::Net::Context( Poco::Net::Context::CLIENT_USE,"client.key.pem","client.cert.pem","ca-chain.cert.pem",Poco::Net::Context::VERIFY_STRICT);                  
        Poco::Net::SSLManager::instance().initializeClient(pConsoleHandler, pInvalidCertHandler, m_pContext);

        Poco::Net::HTTPSClientSession *m_HTTPClientSession = new Poco::Net::HTTPSClientSession(host,65157,m_pContext);          
        std::string version("HTTP/1.1");
        Poco::Net::HTTPRequest request("GET","/small",version); 
        request.setKeepAlive(m_HTTPClientSession-&gt;getKeepAlive());  
        request.write(std::cout);       

        std::ostream&amp; outstream = m_HTTPClientSession-&gt;sendRequest(request);
        Poco::Net::HTTPResponse response;
        response.setKeepAlive(m_HTTPClientSession-&gt;getKeepAlive());
        std::istream&amp; respStream =  m_HTTPClientSession-&gt;receiveResponse(response);                                                                     
        response.write(std::cout);
    }
    catch(Poco::Exception &amp;exc)
    {
        std::cout &lt;&lt; "::" &lt;&lt; "HTTPClientConnection::ServiceConnection()" &lt;&lt; "::" &lt;&lt; " Exception while sending the request for client session ::" &lt;&lt; exc.displayText().c_str() &lt;&lt; std::endl;                             
    }**
</code></pre>

<p>Server Code:</p>

<p>*try
{
SharedPtr pConsoleHandler = new KeyConsoleHandler(true);
SharedPtr pInvalidCertHandler = new ConsoleCertificateHandler(true); </p>

<pre><code>    Poco::Net::Context::Ptr pServerContext = new Poco::Net::Context(
    Poco::Net::Context::SERVER_USE, 
    "localhost.key.pem",
    "localhost.cert.pem",
    "ca-chain.cert.pem",        
    Poco::Net::Context::VERIFY_STRICT,
    9,
    true,
    "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");                   
    Poco::Net::SSLManager::instance().initializeServer(pConsoleHandler,pInvalidCertHandler,pServerContext);
    HTTPSTestServer srv(pServerContext);
    int port = srv.port();
    std::cout &lt;&lt; "Port on which it is listening:: " &lt;&lt; port &lt;&lt; std::endl;

    while(1){}
}
catch(Poco::Exception &amp;exc)
{
    std::cout &lt;&lt; "::" &lt;&lt; "HTTPClientConnection::ServiceConnection()" &lt;&lt; "::" &lt;&lt; " Exception while sending the request for client session ::" &lt;&lt; exc.displayText().c_str() &lt;&lt; std::endl;                             
}

return 0;*
</code></pre>