<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Is it possible to skip certificate validation in https ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63282/is-it-possible-to-skip-certificate-validation-in-https</link><description>Like --insecure option in the curl command, i want to skip certificate validation when make a https connection to server, so i have checked all http files in zephyr and there was nothing about skip certificate validation. (Im using nrf sdk 1.3.0) 
 Does</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Jul 2020 01:25:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63282/is-it-possible-to-skip-certificate-validation-in-https" /><item><title>RE: Is it possible to skip certificate validation in https ?</title><link>https://devzone.nordicsemi.com/thread/259060?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 01:25:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb331291-21c0-4fbd-bb3e-791c39cdb01b</guid><dc:creator>DucAnh</dc:creator><description>&lt;p&gt;Hi Simon, look like it still needs&amp;nbsp;&lt;em&gt;cert_provision even skip certificate-validation.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to skip certificate validation in https ?</title><link>https://devzone.nordicsemi.com/thread/258996?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 12:48:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:518cef0a-0bf9-4c88-8a08-81c816ba6a26</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I just tested this with the https_client sample in NCS v1.3.0. I simply did the following in&amp;nbsp;&lt;em&gt;&amp;lt;..&amp;gt;\ncs\v1.3.0\nrf\samples\nrf9160\https_client\src\main.c--&amp;gt;tls_setup(..)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* Set up TLS peer verification */
enum {
	NONE = 0,
	OPTIONAL = 1,
	REQUIRED = 2,
};

verify = NONE; //Changed it from REQUIRED

err = setsockopt(fd, SOL_TLS, TLS_PEER_VERIFY, &amp;amp;verify, sizeof(verify));
if (err) {
	printk(&amp;quot;Failed to setup peer verification, err %d\n&amp;quot;, errno);
	return err;
}else{
	printk(&amp;quot;Successfully set peer verification to: %d\n&amp;quot;, verify);
}&lt;/pre&gt;&lt;/em&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Why did you remove &lt;em&gt;cert_provision()&lt;/em&gt;? Even though the domain name won&amp;#39;t be verified, I think you still need the keys to encrypt the connection.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am not too familiar with https/tls, so I may be mistaken.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to skip certificate validation in https ?</title><link>https://devzone.nordicsemi.com/thread/258217?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 04:15:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a6e075e-5e96-4875-b786-1eb5e4729c17</guid><dc:creator>DucAnh</dc:creator><description>&lt;p&gt;Hi Simon!&lt;/p&gt;
&lt;p&gt;I have changed verify to 0, but the&amp;nbsp;debug log print &amp;quot;Failed to setup peer verification, &lt;span&gt;, err 109&lt;/span&gt;&amp;quot; (im using the code from https_client sample for nrf9160 and remove cert_provision). &lt;em&gt;Do you know&lt;/em&gt;&lt;span&gt;&amp;nbsp;what this&amp;nbsp;&lt;/span&gt;&lt;em&gt;means ?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Thanks you!&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to skip certificate validation in https ?</title><link>https://devzone.nordicsemi.com/thread/258200?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 21:49:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:241c60b1-3ca9-4124-b9d9-0ddf99485b2f</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I think this can be done&amp;nbsp;in the following manner:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int verify = 0; // NONE
setsockopt(fd, SOL_TLS, TLS_PEER_VERIFY, &amp;amp;verify, sizeof(verify));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then the domain name won&amp;#39;t be&amp;nbsp;verified using the&amp;nbsp;CA certificate.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>