summaryrefslogtreecommitdiffstats
path: root/test/asn1_internal_test.c
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-08-07 17:49:28 +0200
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-08-07 23:35:06 +0200
commit080769102a0bb41c23f81cf4f4f8060991dd0b8e (patch)
treefa8bde3da505f3d7a0af6292048845aa45b33858 /test/asn1_internal_test.c
parentIncrease CT_NUMBER values (diff)
downloadopenssl-080769102a0bb41c23f81cf4f4f8060991dd0b8e.tar.xz
openssl-080769102a0bb41c23f81cf4f4f8060991dd0b8e.zip
test/asn1_internal_test.c: silence the new check for the ASN1 method table
In 38eca7fed09a 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 <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6888)
Diffstat (limited to '')
-rw-r--r--test/asn1_internal_test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/asn1_internal_test.c b/test/asn1_internal_test.c
index fa69dc7a9e..38313d58fa 100644
--- a/test/asn1_internal_test.c
+++ b/test/asn1_internal_test.c
@@ -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;