Home
last modified time | relevance | path

Searched refs:pskfile (Results 1 – 3 of 3) sorted by relevance

/qemu/tests/unit/
H A Dcrypto-tls-psk-helpers.c28 test_tls_psk_init_common(const char *pskfile, const char *user, const char *key) in test_tls_psk_init_common() argument
33 g_file_set_contents(pskfile, line, strlen(line), &gerr); in test_tls_psk_init_common()
35 g_critical("Failed to create pskfile %s: %s", pskfile, gerr->message); in test_tls_psk_init_common()
40 void test_tls_psk_init(const char *pskfile) in test_tls_psk_init() argument
43 test_tls_psk_init_common(pskfile, "qemu", "009d5638c40fde0c"); in test_tls_psk_init()
46 void test_tls_psk_init_alt(const char *pskfile) in test_tls_psk_init_alt() argument
49 test_tls_psk_init_common(pskfile, "qemu", "10ffa6a2c42f0388"); in test_tls_psk_init_alt()
52 void test_tls_psk_cleanup(const char *pskfile) in test_tls_psk_cleanup() argument
54 unlink(pskfile); in test_tls_psk_cleanup()
/qemu/crypto/
H A Dtlscredspsk.c35 lookup_key(const char *pskfile, const char *username, gnutls_datum_t *key, in lookup_key() argument
45 if (!g_file_get_contents(pskfile, &content, &clen, &gerr)) { in lookup_key()
47 pskfile, gerr->message); in lookup_key()
62 username, pskfile); in lookup_key()
74 g_autofree char *pskfile = NULL; in qcrypto_tls_creds_psk_load() local
95 true, &pskfile, errp) < 0) { in qcrypto_tls_creds_psk_load()
112 ret = gnutls_psk_set_server_credentials_file(creds->data.server, pskfile); in qcrypto_tls_creds_psk_load()
123 true, &pskfile, errp) < 0) { in qcrypto_tls_creds_psk_load()
132 if (lookup_key(pskfile, username, &key, errp) != 0) { in qcrypto_tls_creds_psk_load()
/qemu/tests/qtest/
H A Dmigration-test.c885 char *pskfile; member
898 data->pskfile = g_strdup_printf("%s/%s", data->workdir, in test_migrate_tls_psk_start_common()
901 test_tls_psk_init(data->pskfile); in test_migrate_tls_psk_start_common()
955 test_tls_psk_cleanup(data->pskfile); in test_migrate_tls_psk_finish()
967 g_free(data->pskfile); in test_migrate_tls_psk_finish()