Lines Matching refs:local_peer

66     PEER_DATA *local_peer)  in keyexch_x25519_before()  argument
73 local_peer->privk = in keyexch_x25519_before()
78 local_peer->privk = EVP_PKEY_Q_keygen(libctx, propq, "X25519"); in keyexch_x25519_before()
80 if (local_peer->privk == NULL) { in keyexch_x25519_before()
86 if (EVP_PKEY_get_octet_string_param(local_peer->privk, in keyexch_x25519_before()
88 local_peer->pubk_data, in keyexch_x25519_before()
89 sizeof(local_peer->pubk_data), in keyexch_x25519_before()
105 EVP_PKEY_free(local_peer->privk); in keyexch_x25519_before()
106 local_peer->privk = NULL; in keyexch_x25519_before()
120 PEER_DATA *local_peer, in keyexch_x25519_after() argument
127 local_peer->secret = NULL; in keyexch_x25519_after()
139 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, local_peer->privk, propq); in keyexch_x25519_after()
158 if (EVP_PKEY_derive(ctx, NULL, &local_peer->secret_len) == 0) { in keyexch_x25519_after()
168 if (local_peer->secret_len != 32) { /* unreachable */ in keyexch_x25519_after()
174 local_peer->secret = OPENSSL_malloc(local_peer->secret_len); in keyexch_x25519_after()
175 if (local_peer->secret == NULL) { in keyexch_x25519_after()
181 if (EVP_PKEY_derive(ctx, local_peer->secret, in keyexch_x25519_after()
182 &local_peer->secret_len) == 0) { in keyexch_x25519_after()
187 printf("Shared secret (%s):\n", local_peer->name); in keyexch_x25519_after()
188 BIO_dump_indent_fp(stdout, local_peer->secret, local_peer->secret_len, 2); in keyexch_x25519_after()
196 OPENSSL_clear_free(local_peer->secret, local_peer->secret_len); in keyexch_x25519_after()
197 local_peer->secret = NULL; in keyexch_x25519_after()