test/handshake_helper.c:1213: error: UNINITIALIZED_VALUE
  The value read from server_ex_data.session_ticket_do_not_call was never initialized.
Showing all 1 steps of the trace


test/handshake_helper.c:1213:5: 
1211.                          ? SSL_TEST_COMPRESSION_NO
1212.                          : SSL_TEST_COMPRESSION_YES;
1213. >     ret->session_ticket_do_not_call = server_ex_data.session_ticket_do_not_call;
1214.   
1215.   #ifndef OPENSSL_NO_NEXTPROTONEG

static HANDSHAKE_RESULT *do_handshake_internal(
    SSL_CTX *server_ctx, SSL_CTX *server2_ctx, SSL_CTX *client_ctx,
    const SSL_TEST_CTX *test_ctx, const SSL_TEST_EXTRA_CONF *extra,
    SSL_SESSION *session_in, SSL_SESSION **session_out)
{
    PEER server, client;
    BIO *client_to_server, *server_to_client;
    HANDSHAKE_EX_DATA server_ex_data, client_ex_data;
    CTX_DATA client_ctx_data, server_ctx_data, server2_ctx_data;
    HANDSHAKE_RESULT *ret = HANDSHAKE_RESULT_new();
    int client_turn = 1, client_turn_count = 0;
    connect_phase_t phase = HANDSHAKE;
    handshake_status_t status = HANDSHAKE_RETRY;
    const unsigned char* tick = NULL;
    size_t tick_len = 0;
    SSL_SESSION* sess = NULL;
    const unsigned char *proto = NULL;
    unsigned int proto_len = 0;
    EVP_PKEY *tmp_key;
    memset(&server_ctx_data, 0, sizeof(server_ctx_data));
    memset(&server2_ctx_data, 0, sizeof(server2_ctx_data));
    memset(&client_ctx_data, 0, sizeof(client_ctx_data));
    memset(&server, 0, sizeof(server));
    memset(&client, 0, sizeof(client));
    configure_handshake_ctx(server_ctx, server2_ctx, client_ctx, test_ctx, extra,
                            &server_ctx_data, &server2_ctx_data, &client_ctx_data);
    create_peer(&server, server_ctx);
    create_peer(&client, client_ctx);
    server.bytes_to_write = client.bytes_to_read = test_ctx->app_data_size;
    client.bytes_to_write = server.bytes_to_read = test_ctx->app_data_size;
    configure_handshake_ssl(server.ssl, client.ssl, extra);
    if (session_in != NULL) {
        TEST_check(SSL_CTX_add_session(server_ctx, session_in));
        TEST_check(SSL_set_session(client.ssl, session_in));
    }
    memset(&server_ex_data, 0, sizeof(server_ex_data));
    memset(&client_ex_data, 0, sizeof(client_ex_data));
    ret->result = SSL_TEST_INTERNAL_ERROR;
    client_to_server = BIO_new(BIO_s_mem());
    server_to_client = BIO_new(BIO_s_mem());
    TEST_check(client_to_server != NULL);
    TEST_check(server_to_client != NULL);
    BIO_set_nbio(client_to_server, 1);
    BIO_set_nbio(server_to_client, 1);
    SSL_set_connect_state(client.ssl);
    SSL_set_accept_state(server.ssl);
    SSL_set_bio(client.ssl, server_to_client, client_to_server);
    TEST_check(BIO_up_ref(server_to_client) > 0);
    TEST_check(BIO_up_ref(client_to_server) > 0);
    SSL_set_bio(server.ssl, client_to_server, server_to_client);
    ex_data_idx = SSL_get_ex_new_index(0, "ex data", NULL, NULL, NULL);
    TEST_check(ex_data_idx >= 0);
    TEST_check(SSL_set_ex_data(server.ssl, ex_data_idx, &server_ex_data) == 1);
    TEST_check(SSL_set_ex_data(client.ssl, ex_data_idx, &client_ex_data) == 1);
    SSL_set_info_callback(server.ssl, &info_cb);
    SSL_set_info_callback(client.ssl, &info_cb);
    client.status = server.status = PEER_RETRY;
    for(;;) {
        if (client_turn) {
            do_connect_step(test_ctx, &client, phase);
            status = handshake_status(client.status, server.status,
                                      1  );
        } else {
            do_connect_step(test_ctx, &server, phase);
            status = handshake_status(server.status, client.status,
                                      0  );
        }
        switch (status) {
        case HANDSHAKE_SUCCESS:
            client_turn_count = 0;
            phase = next_phase(test_ctx, phase);
            if (phase == CONNECTION_DONE) {
                ret->result = SSL_TEST_SUCCESS;
                goto err;
            } else {
                client.status = server.status = PEER_RETRY;
                client_turn = 1;
                break;
            }
        case CLIENT_ERROR:
            ret->result = SSL_TEST_CLIENT_FAIL;
            goto err;
        case SERVER_ERROR:
            ret->result = SSL_TEST_SERVER_FAIL;
            goto err;
        case INTERNAL_ERROR:
            ret->result = SSL_TEST_INTERNAL_ERROR;
            goto err;
        case HANDSHAKE_RETRY:
            if (client_turn_count++ >= 2000) {
                ret->result = SSL_TEST_INTERNAL_ERROR;
                goto err;
            }
            client_turn ^= 1;
            break;
        }
    }
 err:
    ret->server_alert_sent = server_ex_data.alert_sent;
    ret->server_num_fatal_alerts_sent = server_ex_data.num_fatal_alerts_sent;
    ret->server_alert_received = client_ex_data.alert_received;
    ret->client_alert_sent = client_ex_data.alert_sent;
    ret->client_num_fatal_alerts_sent = client_ex_data.num_fatal_alerts_sent;
    ret->client_alert_received = server_ex_data.alert_received;
    ret->server_protocol = SSL_version(server.ssl);
    ret->client_protocol = SSL_version(client.ssl);
    ret->servername = server_ex_data.servername;
    if ((sess = SSL_get0_session(client.ssl)) != NULL)
        SSL_SESSION_get0_ticket(sess, &tick, &tick_len);
    if (tick == NULL || tick_len == 0)
        ret->session_ticket = SSL_TEST_SESSION_TICKET_NO;
    else
        ret->session_ticket = SSL_TEST_SESSION_TICKET_YES;
    ret->compression = (SSL_get_current_compression(client.ssl) == NULL)
                       ? SSL_TEST_COMPRESSION_NO
                       : SSL_TEST_COMPRESSION_YES;
    ret->session_ticket_do_not_call = server_ex_data.session_ticket_do_not_call;
#ifndef OPENSSL_NO_NEXTPROTONEG
    SSL_get0_next_proto_negotiated(client.ssl, &proto, &proto_len);
    ret->client_npn_negotiated = dup_str(proto, proto_len);
    SSL_get0_next_proto_negotiated(server.ssl, &proto, &proto_len);
    ret->server_npn_negotiated = dup_str(proto, proto_len);
#endif
    SSL_get0_alpn_selected(client.ssl, &proto, &proto_len);
    ret->client_alpn_negotiated = dup_str(proto, proto_len);
    SSL_get0_alpn_selected(server.ssl, &proto, &proto_len);
    ret->server_alpn_negotiated = dup_str(proto, proto_len);
    ret->client_resumed = SSL_session_reused(client.ssl);
    ret->server_resumed = SSL_session_reused(server.ssl);
    if (session_out != NULL)
        *session_out = SSL_get1_session(client.ssl);
    if (SSL_get_server_tmp_key(client.ssl, &tmp_key)) {
        ret->tmp_key_type = pkey_type(tmp_key);
        EVP_PKEY_free(tmp_key);
    }
    SSL_get_peer_signature_nid(client.ssl, &ret->server_sign_hash);
    SSL_get_peer_signature_nid(server.ssl, &ret->client_sign_hash);
    SSL_get_peer_signature_type_nid(client.ssl, &ret->server_sign_type);
    SSL_get_peer_signature_type_nid(server.ssl, &ret->client_sign_type);
    ret->server_cert_type = peer_pkey_type(client.ssl);
    ret->client_cert_type = peer_pkey_type(server.ssl);
    ctx_data_free_data(&server_ctx_data);
    ctx_data_free_data(&server2_ctx_data);
    ctx_data_free_data(&client_ctx_data);
    peer_free_data(&server);
    peer_free_data(&client);
    return ret;
}
['static HANDSHAKE_RESULT *do_handshake_internal(\n    SSL_CTX *server_ctx, SSL_CTX *server2_ctx, SSL_CTX *client_ctx,\n    const SSL_TEST_CTX *test_ctx, const SSL_TEST_EXTRA_CONF *extra,\n    SSL_SESSION *session_in, SSL_SESSION **session_out)\n{\n    PEER server, client;\n    BIO *client_to_server, *server_to_client;\n    HANDSHAKE_EX_DATA server_ex_data, client_ex_data;\n    CTX_DATA client_ctx_data, server_ctx_data, server2_ctx_data;\n    HANDSHAKE_RESULT *ret = HANDSHAKE_RESULT_new();\n    int client_turn = 1, client_turn_count = 0;\n    connect_phase_t phase = HANDSHAKE;\n    handshake_status_t status = HANDSHAKE_RETRY;\n    const unsigned char* tick = NULL;\n    size_t tick_len = 0;\n    SSL_SESSION* sess = NULL;\n    const unsigned char *proto = NULL;\n    unsigned int proto_len = 0;\n    EVP_PKEY *tmp_key;\n    memset(&server_ctx_data, 0, sizeof(server_ctx_data));\n    memset(&server2_ctx_data, 0, sizeof(server2_ctx_data));\n    memset(&client_ctx_data, 0, sizeof(client_ctx_data));\n    memset(&server, 0, sizeof(server));\n    memset(&client, 0, sizeof(client));\n    configure_handshake_ctx(server_ctx, server2_ctx, client_ctx, test_ctx, extra,\n                            &server_ctx_data, &server2_ctx_data, &client_ctx_data);\n    create_peer(&server, server_ctx);\n    create_peer(&client, client_ctx);\n    server.bytes_to_write = client.bytes_to_read = test_ctx->app_data_size;\n    client.bytes_to_write = server.bytes_to_read = test_ctx->app_data_size;\n    configure_handshake_ssl(server.ssl, client.ssl, extra);\n    if (session_in != NULL) {\n        TEST_check(SSL_CTX_add_session(server_ctx, session_in));\n        TEST_check(SSL_set_session(client.ssl, session_in));\n    }\n    memset(&server_ex_data, 0, sizeof(server_ex_data));\n    memset(&client_ex_data, 0, sizeof(client_ex_data));\n    ret->result = SSL_TEST_INTERNAL_ERROR;\n    client_to_server = BIO_new(BIO_s_mem());\n    server_to_client = BIO_new(BIO_s_mem());\n    TEST_check(client_to_server != NULL);\n    TEST_check(server_to_client != NULL);\n    BIO_set_nbio(client_to_server, 1);\n    BIO_set_nbio(server_to_client, 1);\n    SSL_set_connect_state(client.ssl);\n    SSL_set_accept_state(server.ssl);\n    SSL_set_bio(client.ssl, server_to_client, client_to_server);\n    TEST_check(BIO_up_ref(server_to_client) > 0);\n    TEST_check(BIO_up_ref(client_to_server) > 0);\n    SSL_set_bio(server.ssl, client_to_server, server_to_client);\n    ex_data_idx = SSL_get_ex_new_index(0, "ex data", NULL, NULL, NULL);\n    TEST_check(ex_data_idx >= 0);\n    TEST_check(SSL_set_ex_data(server.ssl, ex_data_idx, &server_ex_data) == 1);\n    TEST_check(SSL_set_ex_data(client.ssl, ex_data_idx, &client_ex_data) == 1);\n    SSL_set_info_callback(server.ssl, &info_cb);\n    SSL_set_info_callback(client.ssl, &info_cb);\n    client.status = server.status = PEER_RETRY;\n    for(;;) {\n        if (client_turn) {\n            do_connect_step(test_ctx, &client, phase);\n            status = handshake_status(client.status, server.status,\n                                      1  );\n        } else {\n            do_connect_step(test_ctx, &server, phase);\n            status = handshake_status(server.status, client.status,\n                                      0  );\n        }\n        switch (status) {\n        case HANDSHAKE_SUCCESS:\n            client_turn_count = 0;\n            phase = next_phase(test_ctx, phase);\n            if (phase == CONNECTION_DONE) {\n                ret->result = SSL_TEST_SUCCESS;\n                goto err;\n            } else {\n                client.status = server.status = PEER_RETRY;\n                client_turn = 1;\n                break;\n            }\n        case CLIENT_ERROR:\n            ret->result = SSL_TEST_CLIENT_FAIL;\n            goto err;\n        case SERVER_ERROR:\n            ret->result = SSL_TEST_SERVER_FAIL;\n            goto err;\n        case INTERNAL_ERROR:\n            ret->result = SSL_TEST_INTERNAL_ERROR;\n            goto err;\n        case HANDSHAKE_RETRY:\n            if (client_turn_count++ >= 2000) {\n                ret->result = SSL_TEST_INTERNAL_ERROR;\n                goto err;\n            }\n            client_turn ^= 1;\n            break;\n        }\n    }\n err:\n    ret->server_alert_sent = server_ex_data.alert_sent;\n    ret->server_num_fatal_alerts_sent = server_ex_data.num_fatal_alerts_sent;\n    ret->server_alert_received = client_ex_data.alert_received;\n    ret->client_alert_sent = client_ex_data.alert_sent;\n    ret->client_num_fatal_alerts_sent = client_ex_data.num_fatal_alerts_sent;\n    ret->client_alert_received = server_ex_data.alert_received;\n    ret->server_protocol = SSL_version(server.ssl);\n    ret->client_protocol = SSL_version(client.ssl);\n    ret->servername = server_ex_data.servername;\n    if ((sess = SSL_get0_session(client.ssl)) != NULL)\n        SSL_SESSION_get0_ticket(sess, &tick, &tick_len);\n    if (tick == NULL || tick_len == 0)\n        ret->session_ticket = SSL_TEST_SESSION_TICKET_NO;\n    else\n        ret->session_ticket = SSL_TEST_SESSION_TICKET_YES;\n    ret->compression = (SSL_get_current_compression(client.ssl) == NULL)\n                       ? SSL_TEST_COMPRESSION_NO\n                       : SSL_TEST_COMPRESSION_YES;\n    ret->session_ticket_do_not_call = server_ex_data.session_ticket_do_not_call;\n#ifndef OPENSSL_NO_NEXTPROTONEG\n    SSL_get0_next_proto_negotiated(client.ssl, &proto, &proto_len);\n    ret->client_npn_negotiated = dup_str(proto, proto_len);\n    SSL_get0_next_proto_negotiated(server.ssl, &proto, &proto_len);\n    ret->server_npn_negotiated = dup_str(proto, proto_len);\n#endif\n    SSL_get0_alpn_selected(client.ssl, &proto, &proto_len);\n    ret->client_alpn_negotiated = dup_str(proto, proto_len);\n    SSL_get0_alpn_selected(server.ssl, &proto, &proto_len);\n    ret->server_alpn_negotiated = dup_str(proto, proto_len);\n    ret->client_resumed = SSL_session_reused(client.ssl);\n    ret->server_resumed = SSL_session_reused(server.ssl);\n    if (session_out != NULL)\n        *session_out = SSL_get1_session(client.ssl);\n    if (SSL_get_server_tmp_key(client.ssl, &tmp_key)) {\n        ret->tmp_key_type = pkey_type(tmp_key);\n        EVP_PKEY_free(tmp_key);\n    }\n    SSL_get_peer_signature_nid(client.ssl, &ret->server_sign_hash);\n    SSL_get_peer_signature_nid(server.ssl, &ret->client_sign_hash);\n    SSL_get_peer_signature_type_nid(client.ssl, &ret->server_sign_type);\n    SSL_get_peer_signature_type_nid(server.ssl, &ret->client_sign_type);\n    ret->server_cert_type = peer_pkey_type(client.ssl);\n    ret->client_cert_type = peer_pkey_type(server.ssl);\n    ctx_data_free_data(&server_ctx_data);\n    ctx_data_free_data(&server2_ctx_data);\n    ctx_data_free_data(&client_ctx_data);\n    peer_free_data(&server);\n    peer_free_data(&client);\n    return ret;\n}']