<?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 — [SOLVED] JNI call setCipherList does not change the cipher suites]]></title>
		<link>https://www.wolfssl.com/forums/topic733-solved-jni-call-setcipherlist-does-not-change-the-cipher-suites.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic733.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in [SOLVED] JNI call setCipherList does not change the cipher suites.]]></description>
		<lastBuildDate>Mon, 09 Nov 2015 10:59:17 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] JNI call setCipherList does not change the cipher suites]]></title>
			<link>https://www.wolfssl.com/forums/post2301.html#p2301</link>
			<description><![CDATA[<p>Ok, switching the cipher suites seems to work now, since I fixed another bug...</p><p>Best regards,<br />Steffen</p>]]></description>
			<author><![CDATA[null@example.com (steffen.mueller4)]]></author>
			<pubDate>Mon, 09 Nov 2015 10:59:17 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2301.html#p2301</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] JNI call setCipherList does not change the cipher suites]]></title>
			<link>https://www.wolfssl.com/forums/post2289.html#p2289</link>
			<description><![CDATA[<p>Hi Jacob,</p><p>thanks for your advice.<br />However, the suite seems to be set correctly in my unit test class. Java uses the IETF RFC cipher suite format mentioned in my previous post, i.e., TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 and TLS_DHE_RSA_WITH_AES_256_CBC_SHA256. The string is transformed by the class WolfSSLCipherSuiteList (<a href="https://github.com/steffenmueller4/wolfssl-jsse-integration/blob/master/src/main/java/edu/kit/aifb/eorg/wolfssl/WolfSSLCipherSuiteList.java">https://github.com/steffenmueller4/wolf … eList.java</a>) to the wolfssl format you mentioned.<br />The error from the previous post (wolfSSL_connect failed. err = -501) occurs despite the setCipherList method from the wolfssl JNI library returns WolfSSL.SSL_SUCCESS in line 197 of the socket implementation class (<a href="https://github.com/steffenmueller4/wolfssl-jsse-integration/blob/master/src/main/java/edu/kit/aifb/eorg/wolfssl/WolfSSLSocketImpl.java">https://github.com/steffenmueller4/wolf … tImpl.java</a>).</p><p>Regarding the wolfSSL JNI test server and client: I started both, the client and the server, with the parameter<br /></p><div class="codebox"><pre><code>-l DHE-RSA-AES256-SHA256</code></pre></div><p> I think, this is correct, isn&#039;t it? However, the error in the picture occured. In contrast to this, the wolfSSL test server and client (the c implementation from the wolfssl lib) worked with this parameter.</p><p>Regards,<br />Steffen</p>]]></description>
			<author><![CDATA[null@example.com (steffen.mueller4)]]></author>
			<pubDate>Wed, 04 Nov 2015 09:21:34 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2289.html#p2289</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] JNI call setCipherList does not change the cipher suites]]></title>
			<link>https://www.wolfssl.com/forums/post2287.html#p2287</link>
			<description><![CDATA[<p>Hi Steffen,</p><p>Make sure to be careful on the format of the string being used to set the cipher suites. An example of a setting a cipher suite would be DHE-RSA-AES256-SHA256 and is delimitated by : for example a valid string would be &quot;AES256-SHA256:DHE-RSA-AES256-SHA256&quot;. Is the return value of set cipher suite being looked at? In this case the function could be returning SSL_FAILURE due to not being able to set a cipher suite from the list. More in detailed reading about the set cipher suite function can be found at <a href="https://www.wolfssl.com/documentation/wolfssl-jni-javadocs/index.html">https://www.wolfssl.com/documentation/w … index.html</a> . Let us know if changing the format of the string does not help.</p><p>Regards,<br />Jacob</p>]]></description>
			<author><![CDATA[null@example.com (Jacob)]]></author>
			<pubDate>Wed, 04 Nov 2015 00:10:14 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2287.html#p2287</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] JNI call setCipherList does not change the cipher suites]]></title>
			<link>https://www.wolfssl.com/forums/post2284.html#p2284</link>
			<description><![CDATA[<p>Ok, I tested a lot of things...</p><p>Current state is that setting the cipher suite using the JNI library does not seem to work correctly<br />I tried to set the cipher list at various positions in the source code. Furthermore, I tried to set the cipher suites via the context as well as the session...<br />Now, I checked in a version that sets the suites via the session. This version works reasonably. However, if I set the suites, for example, to {&quot;TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256&quot;, &quot;TLS_DHE_RSA_WITH_AES_256_CBC_SHA256&quot;} (in the unit test &quot;SendReceiveWithDifferentCipherSuite&quot;) the sockets cannot connect:</p><div class="codebox"><pre><code>connect state: CLIENT_HELLO_SENT
16:38:05,679 DEBUG [LoggingCallback]  - wolfSSL Entering SSL_get_error
16:38:05,679 DEBUG [LoggingCallback]  - wolfSSL Leaving SSL_get_error, return -501
16:38:05,679 DEBUG [LoggingCallback]  - wolfSSL Entering ERR_error_string
16:38:05,679 ERROR [SSLSocketBaseClientServer]  - Error in server
java.io.IOException: wolfSSL_connect failed. err = -501, can&#039;t match cipher suite
    at edu.kit.aifb.eorg.wolfssl.WolfSSLSocketImpl.doneConnect(WolfSSLSocketImpl.java:229)
    at edu.kit.aifb.eorg.wolfssl.WolfSSLServerSocketImpl.accept(WolfSSLServerSocketImpl.java:90)
    at edu.kit.aifb.eorg.wolfssl.SSLSocketTestServer.getSSLSocket(SSLSocketTestServer.java:55)
    at edu.kit.aifb.eorg.wolfssl.SSLSocketBaseClientServer.run(SSLSocketBaseClientServer.java:102)</code></pre></div><p>Additionally, setting the cipher suites in the JNI lib does not even work when using the Java test client and server (see: attached picture).</p><p>Does anybody have an idea to get it working?</p><p>Thanks,<br />Steffen</p>]]></description>
			<author><![CDATA[null@example.com (steffen.mueller4)]]></author>
			<pubDate>Tue, 03 Nov 2015 15:59:00 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2284.html#p2284</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] JNI call setCipherList does not change the cipher suites]]></title>
			<link>https://www.wolfssl.com/forums/post2283.html#p2283</link>
			<description><![CDATA[<p>Hi everybody,</p><p>I&#039;m trying to build a JSSE integration for wolfSSL within a small research project (<a href="https://github.com/steffenmueller4/wolfssl-jsse-integration">https://github.com/steffenmueller4/wolf … ntegration</a>).<br />Therefore, I have to implement the methods <br /></p><div class="codebox"><pre><code>edu.kit.aifb.eorg.wolfssl.WolfSSLSocketImpl.setEnabledCipherSuites(...)</code></pre></div><p> and<br /></p><div class="codebox"><pre><code>edu.kit.aifb.eorg.wolfssl.WolfSSLServerSocketImpl.setEnabledCipherSuites(...)</code></pre></div><p>to set the enabled cipher suite list.<br />I tried to invoke the methods from wolfSSL (see: <a href="https://www.wolfssl.com/documentation/wolfssl-jni-javadocs/">https://www.wolfssl.com/documentation/w … -javadocs/</a>)<br /></p><div class="codebox"><pre><code>com.wolfssl.WolfSSLContext.setCipherList(...)</code></pre></div><p> and<br /></p><div class="codebox"><pre><code>com.wolfssl.WolfSSLSession.setCipherList(...)</code></pre></div><p>However, neither the first nor the second change it right.<br />For example, when I set the the enabled cipher suite to TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, wolfSSL negotiates TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 for a connection.<br />Do I misunderstand the methods? Do I do anything wrong? What do I do wrong? Is there any pre-/postcondition when calling the methods? Does anybody have a hint/idea to fix it (or to improve the complete code :-))?</p><p>Thanks<br />Steffen</p><p>PS: I use wolfSSL 3.6.9 + the JNI library in version 1.2.0.</p>]]></description>
			<author><![CDATA[null@example.com (steffen.mueller4)]]></author>
			<pubDate>Fri, 30 Oct 2015 18:20:30 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post2283.html#p2283</guid>
		</item>
	</channel>
</rss>
