Wireshark-dev: [Wireshark-dev] Questions regarding ssl_parse_uat() in packet-ssl.c file
From: Sara fahman <fflloorraa9@xxxxxxxxx>
Date: Tue, 4 Nov 2014 15:52:26 -0500
I'm trying to learn how this function works and I have some questions (I placed them below its following definition).

static void
ssl_parse_uat(void)
{
    wmem_stack_t   *tmp_stack;
    guint           i;

    ssl_set_debug(ssl_debug_file_name);

    if (ssl_key_hash)
    {
        g_hash_table_foreach(ssl_key_hash, ssl_private_key_free, NULL);
        g_hash_table_destroy(ssl_key_hash);
    }

    /* remove only associations created from key list */
    tmp_stack = wmem_stack_new(NULL);
    g_tree_foreach(ssl_associations, ssl_assoc_from_key_list, tmp_stack);
    while (wmem_stack_count(tmp_stack) > 0) {
        ssl_association_remove(ssl_associations, (SslAssociation *)wmem_stack_pop(tmp_stack));
    }
    wmem_destroy_stack(tmp_stack);

    /* parse private keys string, load available keys and put them in key hash*/
    ssl_key_hash = g_hash_table_new(ssl_private_key_hash,ssl_private_key_equal);


    if (nssldecrypt > 0) {
        for (i = 0; i < nssldecrypt; i++) {
            ssldecrypt_assoc_t *ssl_uat = &(sslkeylist_uats[i]);
            ssl_parse_key_list(ssl_uat, ssl_key_hash, ssl_associations, ssl_handle, TRUE);
        }
    }

    ssl_debug_flush();
}

My Questions:

What does removing the association created from key list mean?
Where do the variable  nssldecrypt get updated? i.e : it is default value is zero when it changes? What does it represent?
the same question for sslkeylist_uats? Does it represent the whole file that entered by the user or just an entry of the file?
 
Sorry if the answers for these questions are obvious but I'm still a beginner programmer in the learning phase.

Thanks.
Flora