summaryrefslogtreecommitdiffstats
path: root/src/protocols
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 13:42:55 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-11-02 13:42:55 +0100
commit7a3c8bee42879add84a143ff98f28cbd0251dc7b (patch)
tree3138520bf3e16cd33fa03dfe68c1fedf67c3d901 /src/protocols
parentf2c2f2926bce65c5c09d274c514d382ffd98f78c (diff)
downloadfastd-7a3c8bee42879add84a143ff98f28cbd0251dc7b.tar
fastd-7a3c8bee42879add84a143ff98f28cbd0251dc7b.zip
Allow flexible specification of methods provided by an implementation
Diffstat (limited to 'src/protocols')
-rw-r--r--src/protocols/ec25519_fhmqvc/handshake.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c
index a9fc1a2..cb89462 100644
--- a/src/protocols/ec25519_fhmqvc/handshake.c
+++ b/src/protocols/ec25519_fhmqvc/handshake.c
@@ -102,12 +102,12 @@ static inline void new_session(fastd_context_t *ctx, fastd_peer_t *peer, const c
fastd_sha256_t secret[blocks];
derive_key(secret, blocks, salt, method_name, A, B, X, Y, sigma);
- peer->protocol_state->session.method_state = method->session_init(ctx, (const uint8_t*)secret, initiator);
+ peer->protocol_state->session.method_state = method->session_init(ctx, method_name, (const uint8_t*)secret, initiator);
}
else {
fastd_sha256_t hash;
fastd_sha256_blocks(&hash, X->p, Y->p, A->p, B->p, sigma->p, NULL);
- peer->protocol_state->session.method_state = method->session_init_compat(ctx, hash.b, HASHBYTES, initiator);
+ peer->protocol_state->session.method_state = method->session_init_compat(ctx, method_name, hash.b, HASHBYTES, initiator);
}
peer->protocol_state->session.established = ctx->now;
@@ -126,7 +126,7 @@ static bool establish(fastd_context_t *ctx, fastd_peer_t *peer, const char *meth
return false;
}
- const fastd_method_t *method = fastd_method_get_by_name(method_name);
+ const fastd_method_t *method = fastd_method_get_by_name(ctx, method_name);
if (!salt && !method->session_init_compat) {
pr_warn(ctx, "can't establish session with %P[%I] (method without compat support)");
return false;