<?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 — Cannot use X509 calls in TI_RTOS]]></title>
		<link>https://www.wolfssl.com/forums/topic1714-cannot-use-x509-calls-in-tirtos.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1714.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Cannot use X509 calls in TI_RTOS.]]></description>
		<lastBuildDate>Thu, 06 May 2021 17:00:22 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Cannot use X509 calls in TI_RTOS]]></title>
			<link>https://www.wolfssl.com/forums/post5990.html#p5990</link>
			<description><![CDATA[<p>No, that just breaks more stuff...</p><p>I had to FABRICATE some of the identifiers which were needed from &lt;sys/un.h&gt;</p><p>Because TI NDK doesn&#039;t have a &quot;socket&quot; in a reasonable location ( including it generates even MORE conflicts with WOLF headers because WOLF seems to think it has to provide definitions for things that are already there)</p><p>So I also had to #define socket(a,b,c)&nbsp; ( (int) NDK_socket(a,b,c) )</p>]]></description>
			<author><![CDATA[null@example.com (Scotty2541)]]></author>
			<pubDate>Thu, 06 May 2021 17:00:22 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5990.html#p5990</guid>
		</item>
		<item>
			<title><![CDATA[Re: Cannot use X509 calls in TI_RTOS]]></title>
			<link>https://www.wolfssl.com/forums/post5914.html#p5914</link>
			<description><![CDATA[<div class="quotebox"><cite>Scotty2541 wrote:</cite><blockquote><p>In Wolf/src/ssl.c : Line 310087&nbsp; (in version 4-7)&nbsp; <br /></p><div class="codebox"><pre><code>/* These constant values are protocol values made by egd */
#if defined(USE_WOLFSSL_IO) &amp;&amp; !defined(USE_WINDOWS_API)
    #define WOLFSSL_EGD_NBLOCK 0x01
    #include &lt;sys/un.h&gt;
#endif</code></pre></div></blockquote></div><p>A couple lines above this, this compiler conditional</p><div class="codebox"><pre><code>#ifndef FREERTOS_TCP</code></pre></div><p>should be changed to:</p><div class="codebox"><pre><code>#if !defined(FREERTOS_TCP) &amp;&amp; !defined(WOLFSSL_TIRTOS)</code></pre></div><p>Please let us know if this resolves the issue for your environment.</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Tue, 23 Mar 2021 21:45:01 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5914.html#p5914</guid>
		</item>
		<item>
			<title><![CDATA[Re: Cannot use X509 calls in TI_RTOS]]></title>
			<link>https://www.wolfssl.com/forums/post5913.html#p5913</link>
			<description><![CDATA[<p>No, I have no idea what that is.</p><p>I don&#039;t use GIT, and don&#039;t run DIFF in my Windows environment...&nbsp; Please don&#039;t assume your environment is a standard, used by everyone in the world.</p><p>if &quot;-31736&nbsp; &nbsp;+31736&quot;&nbsp; is supposed to be a line number is src/ssl.c&nbsp; then it&#039;s smack in the middle of the &quot;SetDhInternal()&quot; function.&nbsp; And sure to break my source.&nbsp; And 700 lines away from what I was referring to.</p>]]></description>
			<author><![CDATA[null@example.com (Scotty2541)]]></author>
			<pubDate>Tue, 23 Mar 2021 19:48:45 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5913.html#p5913</guid>
		</item>
		<item>
			<title><![CDATA[Re: Cannot use X509 calls in TI_RTOS]]></title>
			<link>https://www.wolfssl.com/forums/post5906.html#p5906</link>
			<description><![CDATA[<p>Hello Scotty2541,</p><p>Sounds like there could be a missing check for TI_RTOS. Would you please let us know if this fixes the build issue?</p><div class="codebox"><pre><code>diff --git a/src/ssl.c b/src/ssl.c
index 7432ffe73..486b3129a 100644
--- a/src/ssl.c
+++ b/src/ssl.c
@@ -31736,7 +31736,7 @@ int wolfSSL_RAND_write_file(const char* fname)
     return bytes;
 }
 
-#ifndef FREERTOS_TCP
+#if !defined(FREERTOS_TCP) &amp;&amp; !defined(WOLFSSL_TIRTOS)
 
 /* These constant values are protocol values made by egd */
 #if defined(USE_WOLFSSL_IO) &amp;&amp; !defined(USE_WINDOWS_API)</code></pre></div><p>Kind regards,<br />Eric @ wolfSSL Support</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Mon, 22 Mar 2021 20:49:57 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5906.html#p5906</guid>
		</item>
		<item>
			<title><![CDATA[Cannot use X509 calls in TI_RTOS]]></title>
			<link>https://www.wolfssl.com/forums/post5903.html#p5903</link>
			<description><![CDATA[<p>Hey Kaleb, (or anyone else...)</p><p>In the TI_RTOS world, using CCS,&nbsp; I am trying to load an X509 cert just to examine it.&nbsp; Logically the functions are:<br /></p><div class="codebox"><pre><code>wolfSSL_X509_load_certificate_buffer()
wolfSSL_X509_get_subject_name()
wolfSSL_X509_NAME_get_entry()</code></pre></div><p>etc...<br />Except these were unresolved at the linker stage.</p><p>So the next logical step was to see what needs to be defined:</p><div class="codebox"><pre><code>#if defined(OPENSSL_EXTRA_X509_SMALL) || defined(KEEP_PEER_CERT) || \
    defined(SESSION_CERTS)

wolfSSL_X509_get_subject_name(  X509)</code></pre></div><p>Okay, so I need OPENSSL_EXTRA_X509_SMALL</p><p>But</p><div class="codebox"><pre><code>#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL) || \
    defined(KEEP_PEER_CERT) || defined(SESSION_CERTS)

WOLFSSL_X509* wolfSSL_X509_load_certificate_buffer(...)</code></pre></div><p>This needs OPENSSL_EXTRA</p><p>So that looks weird...&nbsp; You define OPENSSL_EXTRA_X509_SMALL to get the subject name from an X509...&nbsp; But you can&#039;t load an X509 unless you define OPENSSL_EXTRA ??</p><p>But that&#039;s not what is broken...</p><p>In Wolf/src/ssl.c : Line 310087&nbsp; (in version 4-7)&nbsp; <br /></p><div class="codebox"><pre><code>/* These constant values are protocol values made by egd */
#if defined(USE_WOLFSSL_IO) &amp;&amp; !defined(USE_WINDOWS_API)
    #define WOLFSSL_EGD_NBLOCK 0x01
    #include &lt;sys/un.h&gt;
#endif</code></pre></div><p>Well, TI/CCS has never heard of the header file &quot;un.h&quot;.&nbsp; It&#039;s not included in any of the NDK 2-25 or 3-61.&nbsp; Nor is it in any of the TI compilers, or the GNU compilers they package with CCS.</p><p>What am I supposed to do?&nbsp; I can&#039;t comment it out, as there are several functions that use the sockaddr_un structure which is unheard of.&nbsp; I imagine (but haven&#039;t tried) if I try to take that header from from a unix/linux environment, there will be additional conflict and missing declarations.</p><p>So as it stands now, the X509 functions can&#039;t be used in TI-RTOS because the library wants to include support for Unix local interprocess functions (which are not used in TI_RTOS)</p><p>Any suggestions?</p>]]></description>
			<author><![CDATA[null@example.com (Scotty2541)]]></author>
			<pubDate>Mon, 22 Mar 2021 15:30:11 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5903.html#p5903</guid>
		</item>
	</channel>
</rss>
