Home
last modified time | relevance | path

Searched refs:preshared_key (Results 1 – 8 of 8) sorted by relevance

/freebsd/contrib/wireguard-tools/
H A Dipc-freebsd.h138 if (binary && size == sizeof(peer->preshared_key)) { in kernel_get_device()
139 memcpy(peer->preshared_key, binary, sizeof(peer->preshared_key)); in kernel_get_device()
140 if (!key_is_zero(peer->preshared_key)) in kernel_get_device()
297 …nvlist_add_binary(nvl_peers[i], "preshared-key", peer->preshared_key, sizeof(peer->preshared_key)); in kernel_set_device()
H A Dipc-uapi.h63 key_to_hex(hex, peer->preshared_key); in userspace_set_device()
203 if (!key_from_hex(peer->preshared_key, value)) in userspace_get_device()
205 if (!key_is_zero(peer->preshared_key)) in userspace_get_device()
H A Dshow.c230 …rintf(" " TERMINAL_BOLD "preshared key" TERMINAL_RESET ": %s\n", masked_key(peer->preshared_key)); in pretty_print()
271 printf("%s\t", maybe_key(peer->preshared_key, peer->flags & WGPEER_HAS_PRESHARED_KEY)); in dump_print()
361 printf("%s\n", maybe_key(peer->preshared_key, peer->flags & WGPEER_HAS_PRESHARED_KEY)); in ugly_print()
H A Dcontainers.h53 uint8_t preshared_key[WG_KEY_LEN]; member
H A Dshowconf.c54 key_to_base64(base64, peer->preshared_key); in showconf_main()
H A Dconfig.c467 ret = parse_key(ctx->last_peer->preshared_key, value); in process_line()
636 if (!parse_keyfile(peer->preshared_key, argv[1])) in config_read_cmd()
/freebsd/sys/dev/wg/
H A Dif_wg.c2373 const void *pub_key, *preshared_key = NULL; in wg_peer_add() local
2423 preshared_key = nvlist_get_binary(nvl, "preshared-key", &size); in wg_peer_add()
2428 noise_remote_set_psk(peer->p_remote, preshared_key); in wg_peer_add()
2605 uint8_t preshared_key[NOISE_SYMMETRIC_KEY_LEN] = { 0 }; in wgc_get() local
2644 (void)noise_remote_keys(peer->p_remote, public_key, preshared_key); in wgc_get()
2647 nvlist_add_binary(nvl_peer, "preshared-key", preshared_key, sizeof(preshared_key)); in wgc_get()
2648 explicit_bzero(preshared_key, sizeof(preshared_key)); in wgc_get()
H A Dwg_noise.c1134 uint8_t preshared_key[NOISE_SYMMETRIC_KEY_LEN]; in noise_consume_response() local
1152 memcpy(preshared_key, r->r_psk, NOISE_SYMMETRIC_KEY_LEN); in noise_consume_response()
1168 noise_mix_psk(hs.hs_ck, hs.hs_hash, key, preshared_key); in noise_consume_response()
1185 explicit_bzero(preshared_key, NOISE_SYMMETRIC_KEY_LEN); in noise_consume_response()