aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2021-05-10 13:16:48 +0200
committerJakub Jelen <jjelen@redhat.com>2021-05-10 13:18:11 +0200
commit9e0d76fb67baa3811808ae54bc9bc4ee58a8ed31 (patch)
tree2a310adb67dc053371c286c6f9cd0f2ed2016f2b /src
parent8ea7fc6129fd41884788d0fc1f1759f3ec8c2cab (diff)
downloadlibssh-master.tar.gz
libssh-master.tar.xz
libssh-master.zip
ed25519: Harmonize arguments to make new gcc happyHEADmaster
This started failing CI on Fedora with new GCC /builds/jjelen/libssh-mirror/src/external/ed25519.c:80:48: error: argument 1 of type 'unsigned char *' declared as a pointer [-Werror=array-parameter=] 80 | int crypto_sign_ed25519_keypair(unsigned char *pk, | ~~~~~~~~~~~~~~~^~ In file included from /builds/jjelen/libssh-mirror/src/external/ed25519.c:15: /builds/jjelen/libssh-mirror/include/libssh/ed25519.h:46:48: note: previously declared as an array 'uint8_t[32]' {aka 'unsigned char[32]'} 46 | int crypto_sign_ed25519_keypair(ed25519_pubkey pk, ed25519_privkey sk); | ~~~~~~~~~~~~~~~^~ /builds/jjelen/libssh-mirror/src/external/ed25519.c:81:48: error: argument 2 of type 'unsigned char *' declared as a pointer [-Werror=array-parameter=] 81 | unsigned char *sk) | ~~~~~~~~~~~~~~~^~ In file included from /builds/jjelen/libssh-mirror/src/external/ed25519.c:15: /builds/jjelen/libssh-mirror/include/libssh/ed25519.h:46:68: note: previously declared as an array 'uint8_t[64]' {aka 'unsigned char[64]'} 46 | int crypto_sign_ed25519_keypair(ed25519_pubkey pk, ed25519_privkey sk); | ~~~~~~~~~~~~~~~~^~ /builds/jjelen/libssh-mirror/src/external/ed25519.c:117:46: error: argument 5 of type 'const unsigned char *' declared as a pointer [-Werror=array-parameter=] 117 | const unsigned char *sk) | ~~~~~~~~~~~~~~~~~~~~~^~ In file included from /builds/jjelen/libssh-mirror/src/external/ed25519.c:15: /builds/jjelen/libssh-mirror/include/libssh/ed25519.h:61:27: note: previously declared as an array 'const uint8_t[64]' {aka 'const unsigned char[64]'} 61 | const ed25519_privkey sk); | ~~~~~~~~~~~~~~~~~~~~~~^~ /builds/jjelen/libssh-mirror/src/external/ed25519.c:180:51: error: argument 5 of type 'const unsigned char *' declared as a pointer [-Werror=array-parameter=] 180 | const unsigned char *pk) | ~~~~~~~~~~~~~~~~~~~~~^~ In file included from /builds/jjelen/libssh-mirror/src/external/ed25519.c:15: /builds/jjelen/libssh-mirror/include/libssh/ed25519.h:76:26: note: previously declared as an array 'const uint8_t[32]' {aka 'const unsigned char[32]'} 76 | const ed25519_pubkey pk); | ~~~~~~~~~~~~~~~~~~~~~^~ Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Sahana Prasad <sahana@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/external/ed25519.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/external/ed25519.c b/src/external/ed25519.c
index 8cd58591..41b5f289 100644
--- a/src/external/ed25519.c
+++ b/src/external/ed25519.c
@@ -77,8 +77,8 @@ static void get_hram(unsigned char *hram,
}
-int crypto_sign_ed25519_keypair(unsigned char *pk,
- unsigned char *sk)
+int crypto_sign_ed25519_keypair(ed25519_pubkey pk,
+ ed25519_privkey sk)
{
sc25519 scsk;
ge25519 gepk;
@@ -114,7 +114,7 @@ int crypto_sign_ed25519(unsigned char *sm,
uint64_t *smlen,
const unsigned char *m,
uint64_t mlen,
- const unsigned char *sk)
+ const ed25519_privkey sk)
{
sc25519 sck, scs, scsk;
ge25519 ger;
@@ -177,7 +177,7 @@ int crypto_sign_ed25519_open(unsigned char *m,
uint64_t *mlen,
const unsigned char *sm,
uint64_t smlen,
- const unsigned char *pk)
+ const ed25519_pubkey pk)
{
unsigned int i;
int ret;