Abort on misuse in crypto_kx_server_session_keys() too

This commit is contained in:
Frank Denis 2017-07-16 16:43:47 +02:00
parent 765ba55cdc
commit 8b99f44ff9

View File

@ -88,6 +88,9 @@ crypto_kx_server_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES],
if (tx == NULL) { if (tx == NULL) {
tx = rx; tx = rx;
} }
if (rx == NULL) {
abort();
}
if (crypto_scalarmult(q, server_sk, client_pk) != 0) { if (crypto_scalarmult(q, server_sk, client_pk) != 0) {
return -1; return -1;
} }