Skip to content

Commit

Permalink
test/asn1_internal_test.c: silence the new check for the ASN1 method …
Browse files Browse the repository at this point in the history
…table

In 38eca7f a new check for the pem_str member of the entries of the
ASN1 method table was introduced. Because the test condition was split
into two TEST_true(...) conditions, the test outputs error diagnostics
for all entries which have pem_str != NULL. This commit joins the two
test conditions into a single condition.

Reviewed-by: Richard Levitte <[email protected]>
(Merged from openssl#6888)
  • Loading branch information
mspncp committed Aug 7, 2018
1 parent b5ee517 commit 0807691
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/asn1_internal_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ static int test_standard_methods(void)
*
* Anything else is an error and may lead to a corrupt ASN1 method table
*/
if (!TEST_true((*tmp)->pem_str == NULL &&
((*tmp)->pkey_flags & ASN1_PKEY_ALIAS) != 0)
&& !TEST_true((*tmp)->pem_str != NULL &&
((*tmp)->pkey_flags & ASN1_PKEY_ALIAS) == 0)) {
if (!TEST_true(((*tmp)->pem_str == NULL && ((*tmp)->pkey_flags & ASN1_PKEY_ALIAS) != 0)
|| ((*tmp)->pem_str != NULL && ((*tmp)->pkey_flags & ASN1_PKEY_ALIAS) == 0))) {
TEST_note("asn1 standard methods: Index %zu, pkey ID %d, Name=%s",
i, (*tmp)->pkey_id, OBJ_nid2sn((*tmp)->pkey_id));
ok = 0;
Expand Down

0 comments on commit 0807691

Please sign in to comment.