cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3456322 ] Compile error CyaSSL when NO_FILESYSTEM is defined

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 16 Dec 2011 09:11:54 -0800

Bugs item #3456322, was opened at 2011-12-10 06:41
Message generated for change (Settings changed) made by borisgz910
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3456322&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: portability problem
Status: Open
Resolution: None
Priority: 4
Private: No
Submitted By: Boris (borisgz910)
Assigned to: Daniel Stenberg (bagder)
>Summary: Compile error CyaSSL when NO_FILESYSTEM is defined

Initial Comment:
Hello!
LibCurl version used: 7.23.1
CyaSSL version used: 2.0.2

When defining the NO_FILESYSTEM for CyaSSL Library (and also for LibCurl to use the right functions from CyaSSL) , the libcurl does not compile and of course doesn't link:

libcurl file cyassl.c:
Line 181:
  if(CyaSSL_no_filesystem_verify(conssl->ctx)!= SSL_SUCCESS) {
    return CURLE_SSL_CONNECT_ERROR;
  }

error when compiling:

curl\cyassl.c(181): warning C4013: 'CyaSSL_no_filesystem_verify' undefined; assuming extern returning int

error when linking:
LibCurl.lib(cyassl.obj) : error LNK2019: unresolved external symbol _CyaSSL_no_filesystem_verify referenced in function _cyassl_connect_step1

How can it be fixed?

Regards,
Boris.

----------------------------------------------------------------------

Comment By: Boris (borisgz910)
Date: 2011-12-16 09:11

Message:
The source code adaption layer for cyassl does figure out that
NO_FILESYSTEM is enabled, that is why it does try to call
CyaSSL_no_filesystem_verify.
It looks like CyaSSL_no_filesystem_verify is not defined anywhere. Not in
the cyassl library sources and not in the libcurl sources.
From what I understand reading the sources of CyaSSL library, there is an
option to use buffer certificates like this:

buff is a pointer to certificate in memory
sz is the size of the buffer in buff

Loading CA:
if (type == CYASSL_CA) {
        if (CyaSSL_CTX_load_verify_buffer(ctx, buff, sz, SSL_FILETYPE_PEM)
                                                                          != SSL_SUCCESS)
                err_sys("can't load buffer ca file");
}

Using certificate from buffer:
if (type == CYASSL_CERT) {
        if (CyaSSL_CTX_use_certificate_buffer(ctx, buff, sz,
                                SSL_FILETYPE_PEM) != SSL_SUCCESS)
                err_sys("can't load buffer cert file");
}

Using key from buffer:
if (type == CYASSL_KEY) {
        if (CyaSSL_CTX_use_PrivateKey_buffer(ctx, buff, sz,
                                SSL_FILETYPE_PEM) != SSL_SUCCESS)
                err_sys("can't load buffer key file");
}

Using these it looks to be almost as easy and identical to implement and
use as with the already code already implemented in the cyassl adaptation
layer in libcurl. (lib\cyassl.c lines 126-184)

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2011-12-11 05:16

Message:
I imagine the libcurl source code adaption layer for cyassl needs to figure
out if NO_FILESYSTEM is enabled, and then act accordingly.

I don't know cyassl enough to tell you exactly how, but I figure you should
be able to read up their docs or source code to learn what libcurl should
do.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3456322&group_id=976
Received on 2011-12-16

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET