From: Dr. David von Oheimb Date: Tue, 17 Dec 2019 05:07:17 +0000 (+0100) Subject: fix obsolete error codes in test/cmp_msg_test.c X-Git-Tag: openssl-3.0.0-alpha1~720 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bce58e7fcbc4b989ff9d02deb327f2a2d6232496;p=thirdparty%2Fopenssl.git fix obsolete error codes in test/cmp_msg_test.c Reviewed-by: Shane Lontis Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/10633) --- diff --git a/test/cmp_msg_test.c b/test/cmp_msg_test.c index 103ff58af4a..463c60789ba 100644 --- a/test/cmp_msg_test.c +++ b/test/cmp_msg_test.c @@ -141,7 +141,7 @@ static int test_cmp_create_ir_protection_set(void) unsigned char secret[16]; fixture->bodytype = OSSL_CMP_PKIBODY_IR; - fixture->err_code = CMP_R_ERROR_CREATING_IR; + fixture->err_code = -1; fixture->expected = 1; if (!TEST_int_eq(1, RAND_bytes(secret, sizeof(secret))) || !TEST_true(SET_OPT_UNPROTECTED_SEND(ctx, 0)) @@ -159,7 +159,7 @@ static int test_cmp_create_ir_protection_fails(void) { SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); fixture->bodytype = OSSL_CMP_PKIBODY_IR; - fixture->err_code = CMP_R_ERROR_CREATING_IR; + fixture->err_code = -1; fixture->expected = 0; if (!TEST_true(OSSL_CMP_CTX_set1_pkey(fixture->cmp_ctx, newkey)) || !TEST_true(SET_OPT_UNPROTECTED_SEND(fixture->cmp_ctx, 0)) @@ -175,7 +175,7 @@ static int test_cmp_create_cr_without_key(void) { SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); fixture->bodytype = OSSL_CMP_PKIBODY_CR; - fixture->err_code = CMP_R_ERROR_CREATING_CR; + fixture->err_code = -1; fixture->expected = 0; EXECUTE_TEST(execute_certreq_create_test, tear_down); return result; @@ -185,7 +185,7 @@ static int test_cmp_create_cr(void) { SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); fixture->bodytype = OSSL_CMP_PKIBODY_CR; - fixture->err_code = CMP_R_ERROR_CREATING_CR; + fixture->err_code = -1; fixture->expected = 1; if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey))) { tear_down(fixture); @@ -199,7 +199,7 @@ static int test_cmp_create_certreq_with_invalid_bodytype(void) { SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); fixture->bodytype = OSSL_CMP_PKIBODY_RR; - fixture->err_code = CMP_R_ERROR_CREATING_IR; + fixture->err_code = -1; fixture->expected = 0; if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey))) { tear_down(fixture); @@ -247,7 +247,7 @@ static int test_cmp_create_kur(void) { SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); fixture->bodytype = OSSL_CMP_PKIBODY_KUR; - fixture->err_code = CMP_R_ERROR_CREATING_KUR; + fixture->err_code = -1; fixture->expected = 1; if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey)) || !TEST_true(OSSL_CMP_CTX_set1_oldCert(fixture->cmp_ctx, cert))) { @@ -262,7 +262,7 @@ static int test_cmp_create_kur_without_oldcert(void) { SETUP_TEST_FIXTURE(CMP_MSG_TEST_FIXTURE, set_up); fixture->bodytype = OSSL_CMP_PKIBODY_KUR; - fixture->err_code = CMP_R_ERROR_CREATING_KUR; + fixture->err_code = -1; fixture->expected = 0; if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey))) { tear_down(fixture);