Changed a crypt_hello_get_nonce func because now a half of a nonce is placed after a pub key and before a signature.
This commit is contained in:
parent
944a81a8bf
commit
0c61d4e433
@ -141,8 +141,8 @@ unsigned char *crypt_hello_get_nonce(const unsigned char *const own_hello, const
|
|||||||
|
|
||||||
const unsigned char *first = NULL, *second = NULL;
|
const unsigned char *first = NULL, *second = NULL;
|
||||||
|
|
||||||
first = (is_client ? own_hello : remote_hello) + CRYPT_PKEY_HEXLEN+CRYPT_SIGN_LEN;
|
first = (is_client ? own_hello : remote_hello) + CRYPT_PKEY_HEXLEN;
|
||||||
second = (is_client ? remote_hello : own_hello) + CRYPT_PKEY_HEXLEN+CRYPT_SIGN_LEN;
|
second = (is_client ? remote_hello : own_hello) + CRYPT_PKEY_HEXLEN;
|
||||||
|
|
||||||
memcpy(nonce, first, CRYPT_NONCEHALF_LEN);
|
memcpy(nonce, first, CRYPT_NONCEHALF_LEN);
|
||||||
memcpy(nonce+CRYPT_NONCEHALF_LEN, second, CRYPT_NONCEHALF_LEN);
|
memcpy(nonce+CRYPT_NONCEHALF_LEN, second, CRYPT_NONCEHALF_LEN);
|
||||||
|
Loading…
Reference in New Issue
Block a user