cyassl: CTX callback cosmetic changes and doc fix

- More descriptive fail message for NO_FILESYSTEM builds.
- Cosmetic changes.
- Change more of CURLOPT_SSL_CTX_* doc to not be OpenSSL specific.
This commit is contained in:
Jay Satiro
2015-03-28 00:16:08 -04:00
committed by Daniel Stenberg
parent 623d24f3ee
commit fcdc597b1a
4 changed files with 25 additions and 21 deletions

View File

@@ -191,7 +191,7 @@ cyassl_connect_step1(struct connectdata *conn,
return CURLE_SSL_CONNECT_ERROR;
}
}
#endif /* NO_FILESYSTEM */
#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
@@ -205,7 +205,7 @@ cyassl_connect_step1(struct connectdata *conn,
if(data->set.ssl.fsslctx) {
CURLcode result = CURLE_OK;
result = (*data->set.ssl.fsslctx)(data, conssl->ctx,
data->set.ssl.fsslctxp);
data->set.ssl.fsslctxp);
if(result) {
failf(data, "error signaled by ssl ctx callback");
return result;
@@ -213,8 +213,10 @@ cyassl_connect_step1(struct connectdata *conn,
}
#ifdef NO_FILESYSTEM
else if(data->set.ssl.verifypeer) {
failf(data, "CyaSSL: unable to verify certificate; no certificate",
" authorities registered");
failf(data, "SSL: Certificates couldn't be loaded because CyaSSL was built"
" with \"no filesystem\". Either disable peer verification"
" (insecure) or if you are building an application with libcurl you"
" can load certificates via CURLOPT_SSL_CTX_FUNCTION.");
return CURLE_SSL_CONNECT_ERROR;
}
#endif

View File

@@ -46,7 +46,7 @@ int Curl_cyassl_random(struct SessionHandle *data,
/* Set the API backend definition to Schannel */
#define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL
/* this backend suppots CURLOPT_SSL_CTX_FUNCTION */
/* this backend supports CURLOPT_SSL_CTX_* */
#define have_curlssl_ssl_ctx 1
/* API setup for CyaSSL */