cURL / Mailing Lists / curl-library / Single Mail

curl-library

NO_FILESYSTEM cyassl

From: Ola Mork <ola_at_agoragames.com>
Date: Fri, 20 May 2011 15:31:49 -0400

Friends -

I had to do this:

diff --git a/external/curl-7.21.6/lib/cyassl.c
b/external/curl-7.21.6/lib/cyassl.c
index 3e15b18..89fd541 100644
--- a/external/curl-7.21.6/lib/cyassl.c
+++ b/external/curl-7.21.6/lib/cyassl.c
@@ -122,6 +122,7 @@ cyassl_connect_step1(struct connectdata *conn,
     return CURLE_OUT_OF_MEMORY;
   }

+#ifndef NO_FILESYSTEM
   /* load trusted cacert */
   if(data->set.str[STRING_SSL_CAFILE]) {
     if (!SSL_CTX_load_verify_locations(conssl->ctx,
@@ -175,6 +176,12 @@ cyassl_connect_step1(struct connectdata *conn,
       return CURLE_SSL_CONNECT_ERROR;
     }
   }
+#else
+ if(CyaSSL_no_filesystem_verify(conssl->ctx)!= SSL_SUCCESS)
+ {
+ return CURLE_SSL_CONNECT_ERROR;
+ }
+#endif //NO_FILESYSTEM

   /* SSL always tries to verify the peer, this only says whether it should
    * fail to connect if the verification fails, or if it should continue

to get cyassl's NO_FILESYSTEM to work with libcurl-7.21.6 and cyassl 1.9.0

Otherwise I'd get linker errors for the missing
"SSL_CTX_load_verify_locations" functions:

--snip-- Debug/libcurl.lib(cyassl.obj): In function `cyassl_connect_step1':
--snip-- external/curl-7.21.6/lib/cyassl.c(127): undefined reference
to `.SSL_CTX_load_verify_locations'
--snip-- external/curl-7.21.6/lib/cyassl.c(164): undefined reference
to `.SSL_CTX_use_certificate_file'
--snip-- external/curl-7.21.6/lib/cyassl.c(172): undefined reference
to `.SSL_CTX_use_PrivateKey_file'

https://github.com/agoragames/curl/commit/d36d7f056c9c779396a2c664cf2d7e541251886c

-- 
Ola Mork
Senior Software Engineer
Agora Games
359 Broadway
Troy, NY 12180
ola_at_agoragames.com
www.agoragames.com
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-20