Removed an absolutely clueless const modifier from a bool argument that was introduced during a usual late night programming session. :)
This commit is contained in:
parent
0cdca672a0
commit
3ec30111e2
@ -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, const bool is_client) {
|
||||
const 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;
|
||||
@ -144,7 +144,7 @@ const unsigned char *crypt_hello_get_nonce(const unsigned char *const own_hello,
|
||||
return nonce;
|
||||
}
|
||||
|
||||
int crypt_session_init(crypt_session_t *const s, const crypt_key_t *const own, crypt_key_t *const remote, const bool is_client) {
|
||||
int crypt_session_init(crypt_session_t *const s, const crypt_key_t *const own, crypt_key_t *const remote, bool is_client) {
|
||||
if (is_client) {
|
||||
if (crypto_kx_client_session_keys(s->rx, s->tx, own->kx_pub, own->kx_sec, remote->kx_pub) != 0) {
|
||||
fprintf(stderr, "Failed to instantiate a client session.\n");
|
||||
|
@ -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, const bool is_client);
|
||||
const 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.
|
||||
@ -74,7 +74,7 @@ typedef struct crypt_session_t {
|
||||
// Derives the symmetric keys for a data encryption using own public and secret and remote's public keys.
|
||||
//
|
||||
// is_client should be set to true if you are the one establishing the connection.
|
||||
int crypt_session_init(crypt_session_t *const s, const crypt_key_t *const own, crypt_key_t *const remote, const bool is_client);
|
||||
int crypt_session_init(crypt_session_t *const s, const crypt_key_t *const own, crypt_key_t *const remote, bool is_client);
|
||||
// Securely erase the fields of a crypt_session_t struct.
|
||||
void crypt_session_destroy(crypt_session_t *const s);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user