From e66148a18fbf0883b615adeecb59661a80cdf4ab Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 2 Feb 2016 14:14:36 -0500 Subject: [PATCH] Drop dh->q in bssl_shim when -use-sparse-dh-prime is passed. Otherwise it still thinks this is an RFC 5114 prime and kicks in the (now incorrect) validity check. Change-Id: Ie78514211927f1f2d2549958621cb7896f68b5ce Reviewed-on: https://boringssl-review.googlesource.com/7050 Reviewed-by: Adam Langley --- ssl/test/bssl_shim.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ssl/test/bssl_shim.cc b/ssl/test/bssl_shim.cc index 74674a49..dde25b44 100644 --- a/ssl/test/bssl_shim.cc +++ b/ssl/test/bssl_shim.cc @@ -747,6 +747,8 @@ static ScopedSSL_CTX SetupCtx(const TestConfig *config) { !BN_set_word(dh->g, 2)) { return nullptr; } + BN_free(dh->q); + dh->q = NULL; dh->priv_length = 0; }