Skip to content

Commit

Permalink
Make gcc more happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
jirihnidek committed Jun 26, 2017
1 parent b729173 commit c7a56b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/client/vc_tcp_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ struct VStreamConn *vc_create_client_stream_conn(const struct VC_CTX *ctx,
#ifdef WITH_OPENSSL
if(ctx->tls_ctx != NULL) {
long cert_verify_res;
X509* cert = NULL;
/* Set up SSL */
if( (stream_conn->io_ctx.ssl=SSL_new(ctx->tls_ctx)) == NULL) {
v_print_log(VRS_PRINT_ERROR, "Setting up SSL failed.\n");
Expand Down Expand Up @@ -1115,7 +1116,7 @@ struct VStreamConn *vc_create_client_stream_conn(const struct VC_CTX *ctx,
}

/* Verify a server certificate was presented during the handshake */
X509* cert = SSL_get_peer_certificate(stream_conn->io_ctx.ssl);
cert = SSL_get_peer_certificate(stream_conn->io_ctx.ssl);
if(NULL == cert) {
v_print_log(VRS_PRINT_ERROR, "Server did not sent certificate\n");
ERR_print_errors_fp(v_log_file());
Expand Down

0 comments on commit c7a56b5

Please sign in to comment.