diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-01 00:59:13 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-01 00:59:13 +0100 |
commit | f0de72ae8d04fcd97c03cc52ac2bc8dc6c2c0527 (patch) | |
tree | 86a63dfe0643d3f6de446dcf4b528b6fd5e914ae /src/methods/xsalsa20_poly1305 | |
parent | 310cc1260fbd47016027bba04bc0c39b9c9144b3 (diff) | |
download | fastd-f0de72ae8d04fcd97c03cc52ac2bc8dc6c2c0527.tar fastd-f0de72ae8d04fcd97c03cc52ac2bc8dc6c2c0527.zip |
Add missing const attribute to secret argument of the session init functions
Diffstat (limited to 'src/methods/xsalsa20_poly1305')
-rw-r--r-- | src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c b/src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c index 466ff34..768e5c8 100644 --- a/src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c +++ b/src/methods/xsalsa20_poly1305/xsalsa20_poly1305.c @@ -58,7 +58,7 @@ static size_t method_key_length(fastd_context_t *ctx UNUSED) { return crypto_secretbox_xsalsa20poly1305_KEYBYTES; } -static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx, uint8_t *secret, bool initiator) { +static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx, const uint8_t *secret, bool initiator) { fastd_method_session_state_t *session = malloc(sizeof(fastd_method_session_state_t)); fastd_method_common_init(ctx, &session->common, initiator); @@ -68,7 +68,7 @@ static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx, u return session; } -static fastd_method_session_state_t* method_session_init_compat(fastd_context_t *ctx, uint8_t *secret, size_t length, bool initiator) { +static fastd_method_session_state_t* method_session_init_compat(fastd_context_t *ctx, const uint8_t *secret, size_t length, bool initiator) { if (length < crypto_secretbox_xsalsa20poly1305_KEYBYTES) exit_bug(ctx, "xsalsa20-poly1305: tried to init with short secret"); |