<?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 — how to add functions in ssl.c to libwolfssl.so]]></title>
		<link>https://www.wolfssl.com/forums/topic1623-how-to-add-functions-in-sslc-to-libwolfsslso.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1623.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in how to add functions in ssl.c to libwolfssl.so.]]></description>
		<lastBuildDate>Fri, 23 Oct 2020 08:02:57 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: how to add functions in ssl.c to libwolfssl.so]]></title>
			<link>https://www.wolfssl.com/forums/post5514.html#p5514</link>
			<description><![CDATA[<p>the problem has been solved.<br />the cause is that there is an old libwolfssl.so in dir,/usr/lib.evreytime i make the wolfssl-4.5.0 files, the gcc upgrades libwolfssl.so only in another dir,ie,/usr/local/lib.i deleted libwolfssl.so in /usr/lib,then everything looks good during making my code.</p><p>thank you anyway</p>]]></description>
			<author><![CDATA[null@example.com (wnqu)]]></author>
			<pubDate>Fri, 23 Oct 2020 08:02:57 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5514.html#p5514</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to add functions in ssl.c to libwolfssl.so]]></title>
			<link>https://www.wolfssl.com/forums/post5513.html#p5513</link>
			<description><![CDATA[<p>I added the same code lines into wolfssl-4.5.0\examples\echoclient\echoclient.c</p><p>void echoclient_test(void* args)<br />{<br />&nbsp; ......<br />&nbsp; &nbsp; ssl = SSL_new(ctx);<br />&nbsp; &nbsp; tcp_connect(&amp;sockfd, yasslIP, port, doDTLS, 0, ssl);<br />#if 1<br />&nbsp; &nbsp; {//added test code<br />&nbsp; &nbsp; WOLFSSL_BIO *mRbio = wolfSSL_BIO_new(wolfSSL_BIO_s_mem());<br />&nbsp; &nbsp; WOLFSSL_BIO *mWbio = wolfSSL_BIO_new(wolfSSL_BIO_s_mem());<br />&nbsp; &nbsp; wolfSSL_set_bio(ssl, mRbio, mWbio);<br />&nbsp; &nbsp; }<br />#endif<br />&nbsp; &nbsp; SSL_set_fd(ssl, sockfd);<br />#if defined(USE_WINDOWS_API) &amp;&amp; defined(CYASSL_DTLS) &amp;&amp; defined(NO_MAIN_DRIVER)<br />&nbsp; &nbsp; /* let echoserver bind first, TODO: add Windows signal like pthreads does */<br />&nbsp; &nbsp; Sleep(100);<br />#endif<br />&nbsp; &nbsp;......<br />}</p><p>then wolfssl-4.5.0$ /make clean;make<br />as a result, no error occur.it&#039;s well done.<br />i&#039;m confused what&#039;s the cause of the problem.<br />i&#039;m expecting an advice.</p>]]></description>
			<author><![CDATA[null@example.com (wnqu)]]></author>
			<pubDate>Fri, 23 Oct 2020 06:43:40 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5513.html#p5513</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to add functions in ssl.c to libwolfssl.so]]></title>
			<link>https://www.wolfssl.com/forums/post5512.html#p5512</link>
			<description><![CDATA[<p>Hi, dgarske,<br />I follow your advice to correct my code,but sorry,it dos&#039;nt work.<br />I made a simple test.<br />the original ssl-tutorial-2.2 works very well.no problem during compiling and running.<br />but, if i add some code lines in the tcpcli01.c,the compiler allways reports some errors.</p><p>#include&nbsp; &nbsp; &quot;unp.h&quot;<br />#include &lt;wolfssl/options.h&gt; <br />#include&nbsp; &nbsp; &lt;wolfssl/ssl.h&gt;</p><p>int main(int argc, char **argv)<br />{<br />....<br />&nbsp; if( (ssl = wolfSSL_new(ctx)) == NULL) {<br />&nbsp; &nbsp; fprintf(stderr, &quot;wolfSSL_new error.\n&quot;);<br />&nbsp; &nbsp; exit(EXIT_FAILURE);<br />&nbsp; }<br />&nbsp; &nbsp; <br />#if 1<br />&nbsp; {//added test code<br />&nbsp; &nbsp; WOLFSSL_BIO *mRbio = wolfSSL_BIO_new(wolfSSL_BIO_s_mem());<br />&nbsp; &nbsp; WOLFSSL_BIO *mWbio = wolfSSL_BIO_new(wolfSSL_BIO_s_mem());<br />&nbsp; &nbsp; wolfSSL_set_bio(ssl, mRbio, mWbio);<br />&nbsp; }<br />#endif</p><p>&nbsp; wolfSSL_set_fd(ssl, sockfd);<br />&nbsp; str_cli(stdin, ssl);&nbsp; &nbsp; &nbsp; &nbsp; /* do it all */<br />&nbsp; ...<br />}</p><p>after make,it says:<br />qn@Hisino-Linux-srv:~/smb/tls/wolfssl/ssl-tutorial-2.2/finished_src/echoclient$ make<br />gcc -Wall -o echoclient ../lib/*.c tcpcli01.c -I ../include -lm -lwolfssl<br />In file included from /usr/local/include/wolfssl/ssl.h:33:0,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from tcpcli01.c:2:<br />/usr/local/include/wolfssl/wolfcrypt/settings.h:2138:14: warning: #warning &quot;For timing resistance / side-channel attack prevention consider using harden options&quot; [-Wcpp]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#warning &quot;For timing resistance / side-channel attack prevention consider using harden options&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br />qn@Hisino-Linux-srv:~/smb/tls/wolfssl/ssl-tutorial-2.2/finished_src/echoclient$ make<br />gcc -Wall -o echoclient ../lib/*.c tcpcli01.c -I ../include -lm -lwolfssl<br />/tmp/cc3crctr.o: In function `main&#039;:<br />tcpcli01.c:(.text+0x2cf): undefined reference to `wolfSSL_BIO_s_mem&#039;<br />tcpcli01.c:(.text+0x2d7): undefined reference to `wolfSSL_BIO_new&#039;<br />tcpcli01.c:(.text+0x2e0): undefined reference to `wolfSSL_BIO_s_mem&#039;<br />tcpcli01.c:(.text+0x2e8): undefined reference to `wolfSSL_BIO_new&#039;<br />tcpcli01.c:(.text+0x303): undefined reference to `wolfSSL_set_bio&#039;<br />collect2: error: ld returned 1 exit status<br />make: *** [echoclient] Error 1<br />qn@Hisino-Linux-srv:~/smb/tls/wolfssl/ssl-tutorial-2.2/finished_src/echoclient$<br />pls give more advice.<br />thank you</p>]]></description>
			<author><![CDATA[null@example.com (wnqu)]]></author>
			<pubDate>Fri, 23 Oct 2020 02:10:09 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5512.html#p5512</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to add functions in ssl.c to libwolfssl.so]]></title>
			<link>https://www.wolfssl.com/forums/post5510.html#p5510</link>
			<description><![CDATA[<p>Hi wnqu,</p><p>Please make sure you include &lt;wolfssl/options.h&gt; prior to any other wolfSSL headers in your application. I am guessing that will resolve this. If not make sure you change the link to &quot;-lwolfssl&quot;.</p><p>Thanks,<br />David Garske, wolfSSL</p>]]></description>
			<author><![CDATA[null@example.com (dgarske)]]></author>
			<pubDate>Thu, 22 Oct 2020 22:31:46 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5510.html#p5510</guid>
		</item>
		<item>
			<title><![CDATA[how to add functions in ssl.c to libwolfssl.so]]></title>
			<link>https://www.wolfssl.com/forums/post5508.html#p5508</link>
			<description><![CDATA[<p>Hi, dear friend,<br />&nbsp; I&#039;m using wolfssl 4.5.0 to replace openssl.<br />&nbsp; I&#039;m using gcc to compile a c file.<br />&nbsp; First ,execte ./configure --enable-opensslall --enable-opensslextra<br />&nbsp; Then, make<br />&nbsp; &nbsp;and, sudo make install<br />&nbsp; &nbsp;and, compile my c file.but it says :<br />wrp.c:(.text+0x10e): undefined reference to `wolfSSL_add_all_algorithms&#039;<br />wrp.c:(.text+0x113): undefined reference to `wolfSSL_RAND_status&#039;<br />wrp.c:(.text+0x14d): undefined reference to `wolfSSL_BIO_new_mem_buf&#039;<br />wrp.c:(.text+0x178): undefined reference to `wolfSSL_PEM_read_bio_X509&#039;<br />wrp.c:(.text+0x189): undefined reference to `wolfSSL_BIO_free&#039;<br />wrp.c:(.text+0x1a5): undefined reference to `wolfSSL_BIO_new_mem_buf&#039;<br />wrp.c:(.text+0x1d0): undefined reference to `wolfSSL_PEM_read_bio_X509&#039;<br />wrp.c:(.text+0x1e2): undefined reference to `wolfSSL_BIO_free&#039;<br />wrp.c:(.text+0x1fe): undefined reference to `wolfSSL_BIO_new_mem_buf&#039;<br />wrp.c:(.text+0x229): undefined reference to `wolfSSL_PEM_read_bio_PrivateKey&#039;<br />wrp.c:(.text+0x23b): undefined reference to `wolfSSL_BIO_free&#039;<br />wrp.c:(.text+0x2a2): undefined reference to `wolfSSL_CTX_use_certificate&#039;<br />wrp.c:(.text+0x2e6): undefined reference to `wolfSSL_CTX_use_PrivateKey&#039;<br />wrp.c:(.text+0x385): undefined reference to `wolfSSL_check_private_key&#039;<br />wrp.c:(.text+0x3af): undefined reference to `wolfSSL_BIO_s_mem&#039;<br />wrp.c:(.text+0x3b7): undefined reference to `wolfSSL_BIO_new&#039;<br />wrp.c:(.text+0x3f0): undefined reference to `wolfSSL_BIO_s_mem&#039;<br />wrp.c:(.text+0x3f8): undefined reference to `wolfSSL_BIO_new&#039;<br />wrp.c:(.text+0x451): undefined reference to `wolfSSL_set_bio&#039;<br />wrp.c:(.text+0x464): undefined reference to `wolfSSL_set_connect_state&#039;<br />wrp.c:(.text+0x470): undefined reference to `wolfSSL_X509_STORE_new&#039;<br />wrp.c:(.text+0x4ba): undefined reference to `wolfSSL_X509_STORE_add_cert&#039;<br />wrp.c:(.text+0x4ed): undefined reference to `wolfSSL_X509_STORE_set_flags&#039;<br /> It seems all the above functions are in src/ssl.c.<br /> Pls tell me how to add the functions to the libwolfssl.so</p><p>&nbsp; Thks a lot.</p>]]></description>
			<author><![CDATA[null@example.com (wnqu)]]></author>
			<pubDate>Thu, 22 Oct 2020 09:51:31 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5508.html#p5508</guid>
		</item>
	</channel>
</rss>
