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 <agl@google.com>
This commit is contained in:
David Benjamin 2016-02-02 14:14:36 -05:00 committed by Adam Langley
parent 6014ea6248
commit e66148a18f

View File

@ -747,6 +747,8 @@ static ScopedSSL_CTX SetupCtx(const TestConfig *config) {
!BN_set_word(dh->g, 2)) { !BN_set_word(dh->g, 2)) {
return nullptr; return nullptr;
} }
BN_free(dh->q);
dh->q = NULL;
dh->priv_length = 0; dh->priv_length = 0;
} }