vtls: Use bool for Curl_ssl_getsessionid() return type
The return type of this function is a boolean value, and even uses a bool internally, so use bool in the function declaration as well as the variables that store the return value, to avoid any confusion.
This commit is contained in:
Родитель
38aaf6c380
Коммит
6cb7b0c0ac
|
@ -509,7 +509,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex)
|
|||
struct SessionHandle *data = conn->data;
|
||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||
struct curl_schannel_cred *old_cred = NULL;
|
||||
int incache;
|
||||
bool incache;
|
||||
|
||||
DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
|
||||
|
||||
|
@ -550,6 +550,7 @@ schannel_connect_step3(struct connectdata *conn, int sockindex)
|
|||
incache = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if(!incache) {
|
||||
result = Curl_ssl_addsessionid(conn, (void *)connssl->cred,
|
||||
sizeof(struct curl_schannel_cred));
|
||||
|
|
|
@ -332,7 +332,7 @@ cyassl_connect_step3(struct connectdata *conn,
|
|||
void *old_ssl_sessionid=NULL;
|
||||
struct SessionHandle *data = conn->data;
|
||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||
int incache;
|
||||
bool incache;
|
||||
SSL_SESSION *our_ssl_sessionid;
|
||||
|
||||
DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
|
||||
|
@ -347,6 +347,7 @@ cyassl_connect_step3(struct connectdata *conn,
|
|||
incache = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if(!incache) {
|
||||
result = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
|
||||
0 /* unknown size */);
|
||||
|
|
|
@ -754,7 +754,7 @@ gtls_connect_step3(struct connectdata *conn,
|
|||
struct SessionHandle *data = conn->data;
|
||||
gnutls_session_t session = conn->ssl[sockindex].session;
|
||||
int rc;
|
||||
int incache;
|
||||
bool incache;
|
||||
void *ssl_sessionid;
|
||||
#ifdef HAS_ALPN
|
||||
gnutls_datum_t proto;
|
||||
|
|
|
@ -2610,7 +2610,7 @@ static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex)
|
|||
void *old_ssl_sessionid = NULL;
|
||||
struct SessionHandle *data = conn->data;
|
||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||
int incache;
|
||||
bool incache;
|
||||
SSL_SESSION *our_ssl_sessionid;
|
||||
|
||||
DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
|
||||
|
@ -2646,7 +2646,7 @@ static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex)
|
|||
|
||||
if(!incache) {
|
||||
result = Curl_ssl_addsessionid(conn, our_ssl_sessionid,
|
||||
0 /* unknown size */);
|
||||
0 /* unknown size */);
|
||||
if(result) {
|
||||
failf(data, "failed to store ssl session");
|
||||
return result;
|
||||
|
|
|
@ -488,7 +488,7 @@ polarssl_connect_step3(struct connectdata *conn,
|
|||
struct SessionHandle *data = conn->data;
|
||||
void *old_ssl_sessionid = NULL;
|
||||
ssl_session *our_ssl_sessionid = &conn->ssl[sockindex].ssn ;
|
||||
int incache;
|
||||
bool incache;
|
||||
|
||||
DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);
|
||||
|
||||
|
@ -501,6 +501,7 @@ polarssl_connect_step3(struct connectdata *conn,
|
|||
incache = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if(!incache) {
|
||||
void *new_session = malloc(sizeof(ssl_session));
|
||||
|
||||
|
|
|
@ -316,9 +316,9 @@ Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex,
|
|||
* Check if there's a session ID for the given connection in the cache, and if
|
||||
* there's one suitable, it is provided. Returns TRUE when no entry matched.
|
||||
*/
|
||||
int Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
void **ssl_sessionid,
|
||||
size_t *idsize) /* set 0 if unknown */
|
||||
bool Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
void **ssl_sessionid,
|
||||
size_t *idsize) /* set 0 if unknown */
|
||||
{
|
||||
struct curl_ssl_session *check;
|
||||
struct SessionHandle *data = conn->data;
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
***************************************************************************/
|
||||
#include "curl_setup.h"
|
||||
|
||||
#include "openssl.h" /* OpenSSL versions */
|
||||
#include "gtls.h" /* GnuTLS versions */
|
||||
#include "nssg.h" /* NSS versions */
|
||||
#include "gskit.h" /* Global Secure ToolKit versions */
|
||||
#include "polarssl.h" /* PolarSSL versions */
|
||||
#include "axtls.h" /* axTLS versions */
|
||||
#include "cyassl.h" /* CyaSSL versions */
|
||||
#include "curl_schannel.h" /* Schannel SSPI version */
|
||||
#include "openssl.h" /* OpenSSL versions */
|
||||
#include "gtls.h" /* GnuTLS versions */
|
||||
#include "nssg.h" /* NSS versions */
|
||||
#include "gskit.h" /* Global Secure ToolKit versions */
|
||||
#include "polarssl.h" /* PolarSSL versions */
|
||||
#include "axtls.h" /* axTLS versions */
|
||||
#include "cyassl.h" /* CyaSSL versions */
|
||||
#include "curl_schannel.h" /* Schannel SSPI version */
|
||||
#include "curl_darwinssl.h" /* SecureTransport (Darwin) version */
|
||||
|
||||
#ifndef MAX_PINNED_PUBKEY_SIZE
|
||||
|
@ -92,9 +92,9 @@ CURLcode Curl_ssl_push_certinfo(struct SessionHandle * data, int certnum,
|
|||
/* Functions to be used by SSL library adaptation functions */
|
||||
|
||||
/* extract a session ID */
|
||||
int Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
void **ssl_sessionid,
|
||||
size_t *idsize) /* set 0 if unknown */;
|
||||
bool Curl_ssl_getsessionid(struct connectdata *conn,
|
||||
void **ssl_sessionid,
|
||||
size_t *idsize) /* set 0 if unknown */;
|
||||
/* add a new session ID */
|
||||
CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
|
||||
void *ssl_sessionid,
|
||||
|
|
Загрузка…
Ссылка в новой задаче