Since we're going to be determining cell format and relay crypto
algorithm when we send our negotiation message, we'll need to
initialize it here.
{
int r = -1;
+ circuit_params_init(&state_out->chosen_params);
+
switch (type) {
case ONION_HANDSHAKE_TYPE_TAP:
return -1;
}
*keys_len_out = keys_out_needed;
- circuit_params_init(params_out);
+ memcpy(params_out, &handshake_state->chosen_params,
+ sizeof(circuit_params_t));
switch (type) {
case ONION_HANDSHAKE_TYPE_TAP:
#define CRYPT_PATH_ST_H
#include "core/crypto/relay_crypto_st.h"
+#include "core/crypto/onion_crypto.h"
#define CRYPT_PATH_MAGIC 0x70127012u
/** One of `ONION_HANDSHAKE_TYPE_*`. Determines which member of the union
* is accessible. */
uint16_t tag;
+ /** Initial circuit parameters (selected during first stage of negotiation;
+ * may be changed based on response from relay). */
+ circuit_params_t chosen_params;
union {
struct fast_handshake_state_t *fast;
struct ntor_handshake_state_t *ntor;