<?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 — Build error /wolfssl/wolfcrypt/random.h:117:6: error: #error No RNG so]]></title>
		<link>https://www.wolfssl.com/forums/topic2301-build-error-wolfsslwolfcryptrandomh1176-error-error-no-rng-so.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic2301.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Build error /wolfssl/wolfcrypt/random.h:117:6: error: #error No RNG so.]]></description>
		<lastBuildDate>Mon, 14 Apr 2025 13:15:31 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Build error /wolfssl/wolfcrypt/random.h:117:6: error: #error No RNG so]]></title>
			<link>https://www.wolfssl.com/forums/post8304.html#p8304</link>
			<description><![CDATA[<p>Hey Eric,</p><p>Thanks! and also thank you for your detailed response.</p><div class="quotebox"><cite>embhorn wrote:</cite><blockquote><p>Are you building from the Zephyr folder?</p></blockquote></div><p>The project structure looks something like this:</p><p>Project/<br />|---extern/<br />|&nbsp; &nbsp;|---wolfssl/<br />|&nbsp; &nbsp;|---wolfmqtt/<br />|---src/<br />|&nbsp; &nbsp;|---*.c<br />|--- CMakeLists.txt<br />|--- prj.conf<br />|--- KConfig</p><p>I am not a 100% sure if I understand your question/ the situation correctly, but I am not starting my build there. I am using the NRF Connect extension for vs code to build my application. This software is used for the board that I am developing on. </p><p>I am adding wolfSSL as a zephyr module, which to my understanding also results in the cmake add_subdirectory() function to be called on the wolfssl main folder (<a href="https://docs.zephyrproject.org/latest/develop/modules.html#integrate-modules-in-zephyr-build-system">https://docs.zephyrproject.org/latest/d … ild-system</a>).</p><div class="quotebox"><cite>embhorn wrote:</cite><blockquote><p>This uses the user_settings.h file for configuration.</p></blockquote></div><p>It seems that in this user_settings.h the WC_NO_HASHDRBG gets defined, because CONFIG_MBEDTLS_PSA_CRYPTO_C is defined in my environment, which could cause the build to run into this case (see: <a href="https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/wolfcrypt/random.h#L68-L117">https://github.com/wolfSSL/wolfssl/blob … h#L68-L117</a>):<br /></p><div class="codebox"><pre><code>#elif !defined(WC_NO_RNG)
    #error No RNG source defined!</code></pre></div><br /><p>For testing purposes I also tried to build the example provided here:<br />zephyr/samples/wolfssl_test<br />and here:<br />zephyr/samples/wolfssl_tls_sock<br />There the error also shows up.</p><p>Interestingly this same configuration works, if I build the test application for the nrf52840dk/nrf52840 board, but I am not quite sure how to investigate the differences in the build environment.</p><p>I am currently trying to disable mbedtls to see what effects this would have on the build.</p><br /><p>EDIT:</p><p>So, I got it to build changing only a few lines in the user_config.h you linked. When I comment out the following lines<br /></p><div class="codebox"><pre><code>#ifdef CONFIG_MBEDTLS_PSA_CRYPTO_C
    #define WOLFSSL_HAVE_PSA
    #ifndef SINGLE_THREADED
        #define WOLFSSL_PSA_GLOBAL_LOCK
    #endif
    #define WC_NO_HASHDRBG /* use PSA RNG directly via wc_psa_get_random */
#endif</code></pre></div><p>(<a href="https://github.com/wolfSSL/wolfssl/blob/master/zephyr/user_settings.h#L73-L79">https://github.com/wolfSSL/wolfssl/blob … .h#L73-L79</a>)</p><p>The build works, but I can not judge if this is still a valid configuration. Does not defining WOLFSSL_HAVE_PSA and WC_NO_HASHDRBG have any undesirable effects?</p>]]></description>
			<author><![CDATA[null@example.com (maximilian.schnabel)]]></author>
			<pubDate>Mon, 14 Apr 2025 13:15:31 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8304.html#p8304</guid>
		</item>
		<item>
			<title><![CDATA[Re: Build error /wolfssl/wolfcrypt/random.h:117:6: error: #error No RNG so]]></title>
			<link>https://www.wolfssl.com/forums/post8301.html#p8301</link>
			<description><![CDATA[<p>Hello Max,</p><p>Welcome to the wolfSSL Forums. This is a great place to ask your questions. You are also welcome to use our support portal by emailing support@wolfssl.com</p><p>Are you building from the Zephyr folder?<br /><a href="https://github.com/wolfSSL/wolfssl/tree/master/zephyr">https://github.com/wolfSSL/wolfssl/tree/master/zephyr</a></p><p>This uses the user_settings.h file for configuration. <br /><a href="https://github.com/wolfSSL/wolfssl/blob/master/zephyr/user_settings.h">https://github.com/wolfSSL/wolfssl/blob … settings.h</a></p><p>Zephyr should provide the RNG seed:<br /><a href="https://github.com/wolfSSL/wolfssl/blob/099eaf582c5fb043b02bc7f5f9740487004e28dc/wolfcrypt/src/random.c#L3748-L3776">https://github.com/wolfSSL/wolfssl/blob … 3748-L3776</a></p><p>Thanks,<br />Eric - wolfSSL Support</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Wed, 09 Apr 2025 15:53:29 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8301.html#p8301</guid>
		</item>
		<item>
			<title><![CDATA[Build error /wolfssl/wolfcrypt/random.h:117:6: error: #error No RNG so]]></title>
			<link>https://www.wolfssl.com/forums/post8300.html#p8300</link>
			<description><![CDATA[<p>Hello everyone,</p><p>I am not entirely sure if I should post this here in wolfSSL, in wolfMQTT or in the wolfCrypt forums, so I&#039;m sorry if this is not the correct place.</p><p>I have an issue when trying to build wolfmqtt (and wolfssl) from source. I do this to be able to use TLS 1.3 in a project that uses an Actinius Icarus board (ARM® Cortex M33 processor). I&#039;m working on windows 11 and am using VS Code. <br />The build fails with an error (I adjusted the paths here to be relative to the projects source folder):<br /></p><div class="codebox"><pre><code>In file included from extern/wolfssl/wolfssl/wolfcrypt/asn_public.h:36,
                 from extern/wolfssl/wolfssl/ssl.h:36,
                 from extern/wolfssl/wolfssl/internal.h:28,
                 from extern/wolfssl/src/ssl.c:32:
extern/wolfssl/wolfssl/wolfcrypt/random.h:117:6: error: #error No RNG source defined!</code></pre></div><p>I did the following steps to set up my build in addition to my projects own configurations:<br /></p><ul><li><p>I cloned the repositories in ${project_folder}/extern/wolfssl and ${project_folder}/extern/wolfMQTT</p></li><li><p>in my ${project_folder}/CMakeLists.txt I added the following line to add the zephyr module to my project:</p></li></ul><div class="codebox"><pre><code>set(ZEPHYR_EXTRA_MODULES ${CMAKE_SOURCE_DIR}\extern\wolfssl ${CMAKE_SOURCE_DIR}\extern\wolfMQTT)</code></pre></div><ul><li><p>in my prj.conf file I added:</p></li></ul><div class="codebox"><pre><code>CONFIG_WOLFSSL=y
CONFIG_WOLFSSL_BUILTIN=y
#CONFIG_WOLFSSL_LIBRARY=y
CONFIG_APP_LINK_WITH_WOLFSSL=y
CONFIG_WOLFMQTT=y
CONFIG_WOLFMQTT_TLS=y</code></pre></div><p>I tried a few things to get some Number Generators from the board&#039;s software side, but I&#039;m not entirely sure what is expected from me on the wolfssl side. <br />I have seen the HAVE_HASHDRBG and CUSTOM_RAND_GENERATE_BLOCK defines in random.h. Do I have to implement a custom function to use the boards provided random functions? Is sha256 some kind of library that I otherwise have to link against? Or is this a build configuration issue?</p><p>Any help would be greatly appreciated. Thank you!</p>]]></description>
			<author><![CDATA[null@example.com (maximilian.schnabel)]]></author>
			<pubDate>Wed, 09 Apr 2025 15:01:51 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8300.html#p8300</guid>
		</item>
	</channel>
</rss>
