1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 22:15:13 -05:00

cyassl: Fix library initialization return value

(Curl_cyassl_init)
- Return 1 on success, 0 in failure.

Prior to this change the fail path returned an incorrect value and the
evaluation to determine whether CyaSSL_Init had succeeded was incorrect.
Ironically that combined with the way curl_global_init tests SSL library
initialization (!Curl_ssl_init()) meant that CyaSSL having been
successfully initialized would be seen as that even though the code path
and return value in Curl_cyassl_init were wrong.
This commit is contained in:
Jay Satiro 2015-03-30 19:09:26 -04:00 committed by Daniel Stenberg
parent c84f0250e3
commit b121633402

View File

@ -496,10 +496,7 @@ size_t Curl_cyassl_version(char *buffer, size_t size)
int Curl_cyassl_init(void) int Curl_cyassl_init(void)
{ {
if(CyaSSL_Init() == 0) return (CyaSSL_Init() == SSL_SUCCESS);
return 1;
return -1;
} }