Well, actually, let a crypt_hello_get_nonce func return just a "unsigned char *" without a const modifier.
This commit is contained in:
parent
8df5a6344e
commit
98581204e9
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user