From c60df7b9ff099e397a716edb59595e7afca42fa1 Mon Sep 17 00:00:00 2001 From: Ilya Maykov Date: Mon, 3 Dec 2018 09:17:05 -0800 Subject: [PATCH] Made sig parameter of crypto_sign_final_verify() const --- src/libsodium/crypto_sign/crypto_sign.c | 2 +- src/libsodium/crypto_sign/ed25519/sign_ed25519.c | 2 +- src/libsodium/include/sodium/crypto_sign.h | 2 +- src/libsodium/include/sodium/crypto_sign_ed25519.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libsodium/crypto_sign/crypto_sign.c b/src/libsodium/crypto_sign/crypto_sign.c index 127072f7..d723ff8c 100644 --- a/src/libsodium/crypto_sign/crypto_sign.c +++ b/src/libsodium/crypto_sign/crypto_sign.c @@ -108,7 +108,7 @@ crypto_sign_final_create(crypto_sign_state *state, unsigned char *sig, } int -crypto_sign_final_verify(crypto_sign_state *state, unsigned char *sig, +crypto_sign_final_verify(crypto_sign_state *state, const unsigned char *sig, const unsigned char *pk) { return crypto_sign_ed25519ph_final_verify(state, sig, pk); diff --git a/src/libsodium/crypto_sign/ed25519/sign_ed25519.c b/src/libsodium/crypto_sign/ed25519/sign_ed25519.c index 8a69513e..9b902497 100644 --- a/src/libsodium/crypto_sign/ed25519/sign_ed25519.c +++ b/src/libsodium/crypto_sign/ed25519/sign_ed25519.c @@ -86,7 +86,7 @@ crypto_sign_ed25519ph_final_create(crypto_sign_ed25519ph_state *state, int crypto_sign_ed25519ph_final_verify(crypto_sign_ed25519ph_state *state, - unsigned char *sig, + const unsigned char *sig, const unsigned char *pk) { unsigned char ph[crypto_hash_sha512_BYTES]; diff --git a/src/libsodium/include/sodium/crypto_sign.h b/src/libsodium/include/sodium/crypto_sign.h index 9d4b17e4..3d31ab24 100644 --- a/src/libsodium/include/sodium/crypto_sign.h +++ b/src/libsodium/include/sodium/crypto_sign.h @@ -96,7 +96,7 @@ int crypto_sign_final_create(crypto_sign_state *state, unsigned char *sig, __attribute__ ((nonnull(1, 2, 4))); SODIUM_EXPORT -int crypto_sign_final_verify(crypto_sign_state *state, unsigned char *sig, +int crypto_sign_final_verify(crypto_sign_state *state, const unsigned char *sig, const unsigned char *pk) __attribute__ ((warn_unused_result)) __attribute__ ((nonnull)); diff --git a/src/libsodium/include/sodium/crypto_sign_ed25519.h b/src/libsodium/include/sodium/crypto_sign_ed25519.h index ddbe8586..db978ea2 100644 --- a/src/libsodium/include/sodium/crypto_sign_ed25519.h +++ b/src/libsodium/include/sodium/crypto_sign_ed25519.h @@ -113,7 +113,7 @@ int crypto_sign_ed25519ph_final_create(crypto_sign_ed25519ph_state *state, SODIUM_EXPORT int crypto_sign_ed25519ph_final_verify(crypto_sign_ed25519ph_state *state, - unsigned char *sig, + const unsigned char *sig, const unsigned char *pk) __attribute__ ((warn_unused_result)) __attribute__ ((nonnull));