ecdh: test NULL-checking of arguments

Boosts the ECDH module to 100% coverage
This commit is contained in:
Andrew Poelstra
2016-11-23 18:47:38 +00:00
parent 25e3cfbf9b
commit 6f8ae2f3c0
2 changed files with 31 additions and 1 deletions

View File

@@ -16,10 +16,10 @@ int secp256k1_ecdh(const secp256k1_context* ctx, unsigned char *result, const se
secp256k1_gej res;
secp256k1_ge pt;
secp256k1_scalar s;
VERIFY_CHECK(ctx != NULL);
ARG_CHECK(result != NULL);
ARG_CHECK(point != NULL);
ARG_CHECK(scalar != NULL);
(void)ctx;
secp256k1_pubkey_load(ctx, &pt, point);
secp256k1_scalar_set_b32(&s, scalar, &overflow);