diff --git a/src/crypt.c b/src/crypt.c index 3231ad9..1f12be8 100644 --- a/src/crypt.c +++ b/src/crypt.c @@ -128,7 +128,7 @@ int crypt_hello_verify(const unsigned char *const hello, crypt_key_t *const remo return 0; } -const unsigned char *crypt_hello_get_nonce(const unsigned char *const own_hello, const unsigned char *const remote_hello, bool is_client) { +unsigned char *crypt_hello_get_nonce(const unsigned char *const own_hello, const unsigned char *const remote_hello, bool is_client) { unsigned char *nonce = (unsigned char *)malloc(CRYPT_NONCE_LEN * sizeof(unsigned char)); if (nonce == NULL) return NULL; diff --git a/src/crypt.h b/src/crypt.h index 6faeb1e..ac06b25 100644 --- a/src/crypt.h +++ b/src/crypt.h @@ -61,7 +61,7 @@ unsigned char *crypt_hello(const crypt_key_t *const own); int crypt_hello_verify(const unsigned char *const hello, crypt_key_t *const remote); // Combines own and remote halves of a nonce depending in a connection direction and returns it. // It will be of CRYPT_NONCE_LEN length. -const unsigned char *crypt_hello_get_nonce(const unsigned char *const own_hello, const unsigned char *const remote_hello, bool is_client); +unsigned char *crypt_hello_get_nonce(const unsigned char *const own_hello, const unsigned char *const remote_hello, bool is_client); // Stores symmetric keys used for a data encryption in both directions // and a remote public key.