<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic The best way to solve this in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SSL-function-not-declared-in-scope/m-p/1177307#M3400</link>
    <description>&lt;P&gt;The best way to solve this problem is to look at the current SGX SSL open source on how it imports the cert into the Enclave and make the call. The source code is at&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://github.com/intel/intel-sgx-ssl" target="_blank"&gt;https://github.com/intel/intel-sgx-ssl&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jun 2018 16:02:13 GMT</pubDate>
    <dc:creator>Hoang_N_Intel</dc:creator>
    <dc:date>2018-06-15T16:02:13Z</dc:date>
    <item>
      <title>SSL function not declared in scope</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SSL-function-not-declared-in-scope/m-p/1177306#M3399</link>
      <description>&lt;P&gt;i am coding an ssl server. However, whenever i try to make the file, it gives this error.&lt;/P&gt;

&lt;P&gt;Enclave/Enclave.cpp: In function ‘SSL_CTX* create_context()’:&lt;BR /&gt;
	Enclave/Enclave.cpp:35:73: error: ‘SSL_load_client_CA_file’ was not declared in this scope&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file("client.pem"));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;BR /&gt;
	Enclave/Enclave.cpp:41:74: error: ‘SSL_CTX_use_certificate_file’ was not declared in this scope&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; if (SSL_CTX_use_certificate_file(ctx, "ca.cert.pem", SSL_FILETYPE_PEM) &amp;lt;= 0){&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;BR /&gt;
	Makefile:230: recipe for target 'Enclave/Enclave.o' failed&lt;BR /&gt;
	make: *** [Enclave/Enclave.o] Error 1&lt;/P&gt;

&lt;P&gt;This is the function that caused the error.&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;
#include &amp;lt;openssl/ssl.h&amp;gt;
static SSL_CTX *create_context()
{
    const SSL_METHOD *method;
    SSL_CTX *ctx;

    method = TLSv1_2_server_method();

    ctx = SSL_CTX_new(method);
    if (!ctx) {
        printe("Unable to create SSL context");
        exit(EXIT_FAILURE);
    }

   
    SSL_CTX_set_verify(ctx,SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,NULL);
    
    SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file("client.pem"));
   
    SSL_CTX_load_verify_locations(ctx,"client.pem","/home/sgx/Desktop/Simple_TLS_Server");
    
    if (SSL_CTX_use_certificate_file(ctx, "ca.cert.pem", SSL_FILETYPE_PEM) &amp;lt;= 0){
        printe("error loading server certificate");
        exit(EXIT_FAILURE);
    }
    return ctx;
}
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 07:12:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SSL-function-not-declared-in-scope/m-p/1177306#M3399</guid>
      <dc:creator>Setiawan__Johan</dc:creator>
      <dc:date>2018-05-02T07:12:33Z</dc:date>
    </item>
    <item>
      <title>The best way to solve this</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SSL-function-not-declared-in-scope/m-p/1177307#M3400</link>
      <description>&lt;P&gt;The best way to solve this problem is to look at the current SGX SSL open source on how it imports the cert into the Enclave and make the call. The source code is at&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://github.com/intel/intel-sgx-ssl" target="_blank"&gt;https://github.com/intel/intel-sgx-ssl&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 16:02:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/SSL-function-not-declared-in-scope/m-p/1177307#M3400</guid>
      <dc:creator>Hoang_N_Intel</dc:creator>
      <dc:date>2018-06-15T16:02:13Z</dc:date>
    </item>
  </channel>
</rss>

