Corrupt the newhope secret key directly.
Rather than use an internal function in a test (which would need an OPENSSL_EXPORT to work in a shared-library build), this change corrupts the secret key directly. Change-Id: Iee501910b23a0affaa0639dcc773d6ea2d0c5a82 Reviewed-on: https://boringssl-review.googlesource.com/7780 Reviewed-by: Matt Braithwaite <mab@google.com> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
945cf9a131
commit
bc57d55c9f
@ -77,8 +77,8 @@ static int test_invalid_sk_a() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Overwrite the secret key */
|
||||
newhope_poly_getnoise(sk);
|
||||
/* Corrupt the secret key */
|
||||
NEWHOPE_keygen(servermsg /* not used below */, sk);
|
||||
|
||||
/* Alice uses Bob's response to get her secret key */
|
||||
if (!NEWHOPE_server_compute_key(server_key, sk, clientmsg,
|
||||
|
Loading…
Reference in New Issue
Block a user