<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — Client authentication still passed even without client-key/cert.pem]]></title>
		<link>https://www.wolfssl.com/forums/topic793-client-authentication-still-passed-even-without-clientkeycertpem.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic793.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Client authentication still passed even without client-key/cert.pem.]]></description>
		<lastBuildDate>Tue, 31 May 2016 15:36:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Client authentication still passed even without client-key/cert.pem]]></title>
			<link>https://www.wolfssl.com/forums/post2510.html#p2510</link>
			<description><![CDATA[<p>Hi Jack,</p><p>Great, thanks for following up and letting me know what helped.</p><p>Best Regards,<br />Chris</p>]]></description>
			<author><![CDATA[null@example.com (chrisc)]]></author>
			<pubDate>Tue, 31 May 2016 15:36:55 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2510.html#p2510</guid>
		</item>
		<item>
			<title><![CDATA[Re: Client authentication still passed even without client-key/cert.pem]]></title>
			<link>https://www.wolfssl.com/forums/post2509.html#p2509</link>
			<description><![CDATA[<p>Hi Chris,</p><p>Sorry for the late response. The problem got solved. One cause is rejectUnauthorized needs to be true, the other cause is the certificate/key files were not generated correctly.</p><p>Thanks again for your support.<br />Jack</p>]]></description>
			<author><![CDATA[null@example.com (jackwang)]]></author>
			<pubDate>Mon, 30 May 2016 06:42:39 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2509.html#p2509</guid>
		</item>
		<item>
			<title><![CDATA[Re: Client authentication still passed even without client-key/cert.pem]]></title>
			<link>https://www.wolfssl.com/forums/post2497.html#p2497</link>
			<description><![CDATA[<p>Hi Jack,</p><p>When using TLS 1.2, if the client doesn&#039;t send a client certificate, the server can choose what to continue or error out.&nbsp; From RFC5246[1]:</p><div class="quotebox"><blockquote><p>If the client does not send any certificates, the<br />server MAY at its discretion either continue the handshake without<br />client authentication, or respond with a fatal handshake_failure<br />alert.</p></blockquote></div><p>From the node.js documentation, it looks like you might need to add the <strong>rejectUnauthorized</strong> option to your server config, ie &quot;rejectUnauthorized: true&quot;.&nbsp; Can you give that a try?</p><p>Thanks,<br />Chris</p><p>[1] <a href="https://tools.ietf.org/html/rfc5246#section-7.4.6">https://tools.ietf.org/html/rfc5246#section-7.4.6</a></p>]]></description>
			<author><![CDATA[null@example.com (chrisc)]]></author>
			<pubDate>Thu, 12 May 2016 22:33:12 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2497.html#p2497</guid>
		</item>
		<item>
			<title><![CDATA[Client authentication still passed even without client-key/cert.pem]]></title>
			<link>https://www.wolfssl.com/forums/post2495.html#p2495</link>
			<description><![CDATA[<p>I’m encountering a strange problem: Client authentication still passed even though client-cert.pem and client-key.pem are not loaded in wolfssl client. Client authentication check has been enabled at server side.</p><p>Client side (STM32F2+FreeRTOS): <br />1)&nbsp; &nbsp; Add wolfssl files into my project.</p><p>2)&nbsp; &nbsp; <br />#define FREERTOS<br />#define WOLFSSL_LWIP<br />#define WOLFSSL_STM32F2<br />#define WOLFSSL_IAR_ARM<br />#define WOLFSSL_STATIC_RSA</p><p>#define BUILD_TLS_RSA_WITH_AES_128_CBC_SHA<br />#define BUILD_TLS_RSA_WITH_AES_256_CBC_SHA</p><p>#define WOLFSSL_LOW_MEMORY<br />#define DEBUG_WOLFSSL<br />#define NO_INLINE<br />#define NO_WOLFSSL_SERVER<br />#define NO_DES3<br />#define NO_DH<br />#define NO_MD4<br />#define NO_RC4<br />#define NO_MD5<br />#define NO_SESSION_CACHE<br />#define NO_ERROR_STRINGS<br />#define NO_OLD_TLS<br />#define NO_PWDBASED<br />#define NO_HC128<br />#define NO_SHA512<br />#define NO_DSA<br />#define WC_NO_RSA_OAEP<br />#define NO_CERT<br />#define USER_TICKS<br />#define USER_TIME<br />#define USER_TIME_TJZ_DEF</p><p>3)&nbsp; &nbsp; Key code:</p><p>wolfSSL_SetLoggingCb(wolfSSL_Logging);<br />wolfSSL_Debugging_ON();<br />wolfSSL_library_init();<br />wolfSSL_load_error_strings();</p><p>ssl_ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());<br />wolfSSL_CTX_set_cipher_list(ssl_ctx, &quot;AES128-SHA&quot;);<br />//wolfSSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_NONE, 0);<br />wolfSSL_CTX_load_verify_buffer(ssl_ctx, ca_cert_der_1024, sizeof_ca_cert_der_1024, SSL_FILETYPE_ASN1);</p><p>sockfd = socket(xxxx);<br />connect(sockfd, xxxx,xxxx);</p><p>ssl = wolfSSL_new(ssl_ctx);<br />wolfSSL_set_fd(ssl , sockfd );</p><p>4)&nbsp; &nbsp; Use wolfSSL_read()/wolfSSL_write() to send and receive message from server.</p><p>Server side: Node.js<br />Key code: </p><p>&nbsp; &nbsp; var wsCa = fs.readFileSync(path.resolve(config.secure.wsCa), &#039;utf8&#039;);<br />&nbsp; &nbsp; var wsServerCert = fs.readFileSync(path.resolve(config.secure.wsServerCert), &#039;utf8&#039;);<br />&nbsp; &nbsp; var wsServerKey = fs.readFileSync(path.resolve(config.secure.wsServerKey), &#039;utf8&#039;);</p><p>&nbsp; &nbsp; var wsOptions = {<br />&nbsp; &nbsp; &nbsp; &nbsp; key: wsServerKey,<br />&nbsp; &nbsp; &nbsp; &nbsp; cert: wsServerCert,<br />&nbsp; &nbsp; &nbsp; &nbsp; ca: wsCa,<br />&nbsp; &nbsp; &nbsp; &nbsp; requestCert : true,<br />&nbsp; &nbsp; &nbsp; &nbsp; secureProtocol: &#039;TLSv1_2_method&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; ciphers: [<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ECDHE-RSA-AES128-GCM-SHA256&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ECDHE-ECDSA-AES128-GCM-SHA256&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ECDHE-RSA-AES256-GCM-SHA384&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ECDHE-ECDSA-AES256-GCM-SHA384&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;DHE-RSA-AES128-GCM-SHA256&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ECDHE-RSA-AES128-SHA256&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;DHE-RSA-AES128-SHA256&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ECDHE-RSA-AES256-SHA384&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;DHE-RSA-AES256-SHA384&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ECDHE-RSA-AES256-SHA256&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;DHE-RSA-AES256-SHA256&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;HIGH&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!aNULL&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!eNULL&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!EXPORT&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!DES&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!RC4&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!MD5&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!PSK&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!SRP&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;!CAMELLIA&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; ].join(&#039;:&#039;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;honorCipherOrder: true<br />&nbsp; &nbsp; };</p><p>&nbsp; &nbsp; ws_server = https.createServer(wsOptions, app);<br />&nbsp; &nbsp; wss = new WebSocketServer({<br />&nbsp; &nbsp; &nbsp; &nbsp; server: ws_server<br />&nbsp; &nbsp; &nbsp; &nbsp; }); </p><p>Can you pls help to find the cause of the problem?</p><p>Thanks a lot!<br />Jack</p>]]></description>
			<author><![CDATA[null@example.com (jackwang)]]></author>
			<pubDate>Wed, 11 May 2016 14:32:21 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2495.html#p2495</guid>
		</item>
	</channel>
</rss>
