|
|
|
@ -116,12 +116,13 @@ void alts_handshaker_client_handle_response(alts_handshaker_client* c, |
|
|
|
|
"cb is nullptr in alts_tsi_handshaker_handle_response()"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (handshaker == nullptr || recv_buffer == nullptr) { |
|
|
|
|
if (handshaker == nullptr) { |
|
|
|
|
gpr_log(GPR_ERROR, |
|
|
|
|
"Invalid arguments to alts_tsi_handshaker_handle_response()"); |
|
|
|
|
"handshaker is nullptr in alts_tsi_handshaker_handle_response()"); |
|
|
|
|
cb(TSI_INTERNAL_ERROR, user_data, nullptr, 0, nullptr); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
/* TSI handshake has been shutdown. */ |
|
|
|
|
if (alts_tsi_handshaker_has_shutdown(handshaker)) { |
|
|
|
|
gpr_log(GPR_ERROR, "TSI handshake shutdown"); |
|
|
|
|
cb(TSI_HANDSHAKE_SHUTDOWN, user_data, nullptr, 0, nullptr); |
|
|
|
@ -133,6 +134,12 @@ void alts_handshaker_client_handle_response(alts_handshaker_client* c, |
|
|
|
|
cb(TSI_INTERNAL_ERROR, user_data, nullptr, 0, nullptr); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (recv_buffer == nullptr) { |
|
|
|
|
gpr_log(GPR_ERROR, |
|
|
|
|
"recv_buffer is nullptr in alts_tsi_handshaker_handle_response()"); |
|
|
|
|
cb(TSI_INTERNAL_ERROR, user_data, nullptr, 0, nullptr); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
grpc_gcp_handshaker_resp* resp = |
|
|
|
|
alts_tsi_utils_deserialize_response(recv_buffer); |
|
|
|
|
grpc_byte_buffer_destroy(client->recv_buffer); |
|
|
|
|