|
|
|
@ -774,7 +774,7 @@ static tsi_result build_alpn_protocol_name_list( |
|
|
|
|
// the server's certificate, but we need to pull it anyway, in case a higher
|
|
|
|
|
// layer wants to look at it. In this case the verification may fail, but
|
|
|
|
|
// we don't really care.
|
|
|
|
|
static int NullVerifyCallback(int preverify_ok, X509_STORE_CTX* ctx) { |
|
|
|
|
static int NullVerifyCallback(int /*preverify_ok*/, X509_STORE_CTX* /*ctx*/) { |
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1265,7 +1265,7 @@ static tsi_result ssl_handshaker_next( |
|
|
|
|
tsi_handshaker* self, const unsigned char* received_bytes, |
|
|
|
|
size_t received_bytes_size, const unsigned char** bytes_to_send, |
|
|
|
|
size_t* bytes_to_send_size, tsi_handshaker_result** handshaker_result, |
|
|
|
|
tsi_handshaker_on_next_done_cb cb, void* user_data) { |
|
|
|
|
tsi_handshaker_on_next_done_cb /*cb*/, void* /*user_data*/) { |
|
|
|
|
/* Input sanity check. */ |
|
|
|
|
if ((received_bytes_size > 0 && received_bytes == nullptr) || |
|
|
|
|
bytes_to_send == nullptr || bytes_to_send_size == nullptr || |
|
|
|
@ -1465,11 +1465,9 @@ static void tsi_ssl_client_handshaker_factory_destroy( |
|
|
|
|
gpr_free(self); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int client_handshaker_factory_npn_callback(SSL* ssl, unsigned char** out, |
|
|
|
|
unsigned char* outlen, |
|
|
|
|
const unsigned char* in, |
|
|
|
|
unsigned int inlen, |
|
|
|
|
void* arg) { |
|
|
|
|
static int client_handshaker_factory_npn_callback( |
|
|
|
|
SSL* /*ssl*/, unsigned char** out, unsigned char* outlen, |
|
|
|
|
const unsigned char* in, unsigned int inlen, void* arg) { |
|
|
|
|
tsi_ssl_client_handshaker_factory* factory = |
|
|
|
|
static_cast<tsi_ssl_client_handshaker_factory*>(arg); |
|
|
|
|
return select_protocol_list((const unsigned char**)out, outlen, |
|
|
|
@ -1556,7 +1554,8 @@ static int does_entry_match_name(grpc_core::StringView entry, |
|
|
|
|
return !entry.empty() && name_subdomain == entry; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int ssl_server_handshaker_factory_servername_callback(SSL* ssl, int* ap, |
|
|
|
|
static int ssl_server_handshaker_factory_servername_callback(SSL* ssl, |
|
|
|
|
int* /*ap*/, |
|
|
|
|
void* arg) { |
|
|
|
|
tsi_ssl_server_handshaker_factory* impl = |
|
|
|
|
static_cast<tsi_ssl_server_handshaker_factory*>(arg); |
|
|
|
@ -1579,7 +1578,7 @@ static int ssl_server_handshaker_factory_servername_callback(SSL* ssl, int* ap, |
|
|
|
|
|
|
|
|
|
#if TSI_OPENSSL_ALPN_SUPPORT |
|
|
|
|
static int server_handshaker_factory_alpn_callback( |
|
|
|
|
SSL* ssl, const unsigned char** out, unsigned char* outlen, |
|
|
|
|
SSL* /*ssl*/, const unsigned char** out, unsigned char* outlen, |
|
|
|
|
const unsigned char* in, unsigned int inlen, void* arg) { |
|
|
|
|
tsi_ssl_server_handshaker_factory* factory = |
|
|
|
|
static_cast<tsi_ssl_server_handshaker_factory*>(arg); |
|
|
|
@ -1590,7 +1589,7 @@ static int server_handshaker_factory_alpn_callback( |
|
|
|
|
#endif /* TSI_OPENSSL_ALPN_SUPPORT */ |
|
|
|
|
|
|
|
|
|
static int server_handshaker_factory_npn_advertised_callback( |
|
|
|
|
SSL* ssl, const unsigned char** out, unsigned int* outlen, void* arg) { |
|
|
|
|
SSL* /*ssl*/, const unsigned char** out, unsigned int* outlen, void* arg) { |
|
|
|
|
tsi_ssl_server_handshaker_factory* factory = |
|
|
|
|
static_cast<tsi_ssl_server_handshaker_factory*>(arg); |
|
|
|
|
*out = factory->alpn_protocol_list; |
|
|
|
|