Lines Matching +full:rpmsg +full:- +full:in

2  * Copyright 2007-2023 The OpenSSL Project Authors. All Rights Reserved.
3 * Copyright Nokia 2007-2019
4 * Copyright Siemens AG 2015-2019
7 * this file except in compliance with the License. You can obtain a copy
8 * in the file LICENSE in the source distribution or at
40 OSSL_CMP_CTX_free(fixture->cmp_ctx); in tear_down()
41 OSSL_CMP_MSG_free(fixture->msg); in tear_down()
42 OSSL_CMP_PKISI_free(fixture->si); in tear_down()
54 fixture->test_case_name = test_case_name; in set_up()
56 if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(libctx, NULL)) in set_up()
57 || !TEST_true(SET_OPT_UNPROTECTED_SEND(fixture->cmp_ctx, 1)) in set_up()
58 || !TEST_true(OSSL_CMP_CTX_set1_referenceValue(fixture->cmp_ctx, in set_up()
72 int good = fixture->expected != 0 ? \
81 /*-
83 * if fixture->expected != 0:
85 * if fixture->expected == 0
90 EXECUTE_MSG_CREATION_TEST(ossl_cmp_certreq_new(fixture->cmp_ctx, in execute_certreq_create_test()
91 fixture->bodytype, in execute_certreq_create_test()
97 EXECUTE_MSG_CREATION_TEST(ossl_cmp_error_new(fixture->cmp_ctx, fixture->si, in execute_errormsg_create_test()
98 fixture->err_code, in execute_errormsg_create_test()
104 EXECUTE_MSG_CREATION_TEST(ossl_cmp_rr_new(fixture->cmp_ctx)); in execute_rr_create_test()
110 (fixture->cmp_ctx, OSSL_CMP_CERTREQID, in execute_certconf_create_test()
111 fixture->fail_info, NULL)); in execute_certconf_create_test()
116 EXECUTE_MSG_CREATION_TEST(ossl_cmp_genm_new(fixture->cmp_ctx)); in execute_genm_create_test()
121 EXECUTE_MSG_CREATION_TEST(ossl_cmp_pollReq_new(fixture->cmp_ctx, 4711)); in execute_pollreq_create_test()
127 (fixture->cmp_ctx, fixture->bodytype)); in execute_pkimessage_create_test()
149 ctx = fixture->cmp_ctx; in test_cmp_create_ir_protection_set()
150 fixture->bodytype = OSSL_CMP_PKIBODY_IR; in test_cmp_create_ir_protection_set()
151 fixture->err_code = -1; in test_cmp_create_ir_protection_set()
152 fixture->expected = 1; in test_cmp_create_ir_protection_set()
168 fixture->bodytype = OSSL_CMP_PKIBODY_IR; in test_cmp_create_ir_protection_fails()
169 fixture->err_code = -1; in test_cmp_create_ir_protection_fails()
170 fixture->expected = 0; in test_cmp_create_ir_protection_fails()
171 if (!TEST_true(OSSL_CMP_CTX_set1_pkey(fixture->cmp_ctx, newkey)) in test_cmp_create_ir_protection_fails()
172 || !TEST_true(SET_OPT_UNPROTECTED_SEND(fixture->cmp_ctx, 0)) in test_cmp_create_ir_protection_fails()
174 || !TEST_true(OSSL_CMP_CTX_set1_cert(fixture->cmp_ctx, cert))) { in test_cmp_create_ir_protection_fails()
185 fixture->bodytype = OSSL_CMP_PKIBODY_CR; in test_cmp_create_cr_without_key()
186 fixture->err_code = -1; in test_cmp_create_cr_without_key()
187 fixture->expected = 0; in test_cmp_create_cr_without_key()
195 fixture->bodytype = OSSL_CMP_PKIBODY_CR; in test_cmp_create_cr()
196 fixture->err_code = -1; in test_cmp_create_cr()
197 fixture->expected = 1; in test_cmp_create_cr()
198 if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey))) { in test_cmp_create_cr()
209 fixture->bodytype = OSSL_CMP_PKIBODY_RR; in test_cmp_create_certreq_with_invalid_bodytype()
210 fixture->err_code = -1; in test_cmp_create_certreq_with_invalid_bodytype()
211 fixture->expected = 0; in test_cmp_create_certreq_with_invalid_bodytype()
212 if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey))) { in test_cmp_create_certreq_with_invalid_bodytype()
226 ctx = fixture->cmp_ctx; in test_cmp_create_p10cr()
227 fixture->bodytype = OSSL_CMP_PKIBODY_P10CR; in test_cmp_create_p10cr()
228 fixture->err_code = CMP_R_ERROR_CREATING_CERTREQ; in test_cmp_create_p10cr()
229 fixture->expected = 1; in test_cmp_create_p10cr()
244 fixture->bodytype = OSSL_CMP_PKIBODY_P10CR; in test_cmp_create_p10cr_null()
245 fixture->err_code = CMP_R_ERROR_CREATING_CERTREQ; in test_cmp_create_p10cr_null()
246 fixture->expected = 0; in test_cmp_create_p10cr_null()
247 if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey))) { in test_cmp_create_p10cr_null()
258 fixture->bodytype = OSSL_CMP_PKIBODY_KUR; in test_cmp_create_kur()
259 fixture->err_code = -1; in test_cmp_create_kur()
260 fixture->expected = 1; in test_cmp_create_kur()
261 if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey)) in test_cmp_create_kur()
262 || !TEST_true(OSSL_CMP_CTX_set1_oldCert(fixture->cmp_ctx, cert))) { in test_cmp_create_kur()
273 fixture->bodytype = OSSL_CMP_PKIBODY_KUR; in test_cmp_create_kur_without_oldcert()
274 fixture->err_code = -1; in test_cmp_create_kur_without_oldcert()
275 fixture->expected = 0; in test_cmp_create_kur_without_oldcert()
276 if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey))) { in test_cmp_create_kur_without_oldcert()
287 fixture->fail_info = 0; in test_cmp_create_certconf()
288 fixture->expected = 1; in test_cmp_create_certconf()
289 if (!TEST_true(ossl_cmp_ctx_set0_newCert(fixture->cmp_ctx, in test_cmp_create_certconf()
301 fixture->fail_info = 1 << OSSL_CMP_PKIFAILUREINFO_badAlg; in test_cmp_create_certconf_badAlg()
302 fixture->expected = 1; in test_cmp_create_certconf_badAlg()
303 if (!TEST_true(ossl_cmp_ctx_set0_newCert(fixture->cmp_ctx, in test_cmp_create_certconf_badAlg()
315 fixture->fail_info = 1 << OSSL_CMP_PKIFAILUREINFO_MAX; in test_cmp_create_certconf_fail_info_max()
316 fixture->expected = 1; in test_cmp_create_certconf_fail_info_max()
317 if (!TEST_true(ossl_cmp_ctx_set0_newCert(fixture->cmp_ctx, in test_cmp_create_certconf_fail_info_max()
329 fixture->si = OSSL_CMP_STATUSINFO_new(OSSL_CMP_PKISTATUS_rejection, in test_cmp_create_error_msg()
332 fixture->err_code = -1; in test_cmp_create_error_msg()
333 fixture->expected = 1; /* expected: message creation is successful */ in test_cmp_create_error_msg()
334 if (!TEST_true(set1_newPkey(fixture->cmp_ctx, newkey))) { in test_cmp_create_error_msg()
346 fixture->expected = 1; in test_cmp_create_pollreq()
354 fixture->expected = 1; in test_cmp_create_rr()
355 if (!TEST_true(OSSL_CMP_CTX_set1_oldCert(fixture->cmp_ctx, cert))) { in test_cmp_create_rr()
368 fixture->expected = 1; in test_cmp_create_genm()
371 || !TEST_true(OSSL_CMP_CTX_push0_genm_ITAV(fixture->cmp_ctx, iv))) { in test_cmp_create_genm()
383 OSSL_CMP_CTX *ctx = fixture->cmp_ctx; in execute_certrep_create()
391 if (!ASN1_INTEGER_set(cresp->certReqId, 99)) in execute_certrep_create()
393 if ((cresp->certifiedKeyPair = OSSL_CMP_CERTIFIEDKEYPAIR_new()) == NULL) in execute_certrep_create()
395 cresp->certifiedKeyPair->certOrEncCert->type = in execute_certrep_create()
397 if ((cresp->certifiedKeyPair->certOrEncCert->value.certificate = in execute_certrep_create()
399 || !sk_OSSL_CMP_CERTRESPONSE_push(crepmsg->response, cresp)) in execute_certrep_create()
433 OSSL_CMP_MSG *rpmsg = NULL; in execute_rp_create() local
440 (unsigned char *)"The Issuer", -1, -1, 0) in execute_rp_create()
443 || (rpmsg = ossl_cmp_rp_new(fixture->cmp_ctx, si, cid, 1)) == NULL) in execute_rp_create()
446 if (!TEST_ptr(ossl_cmp_revrepcontent_get_CertId(rpmsg->body->value.rp, 0))) in execute_rp_create()
449 if (!TEST_ptr(ossl_cmp_revrepcontent_get_pkisi(rpmsg->body->value.rp, 0))) in execute_rp_create()
458 OSSL_CMP_MSG_free(rpmsg); in execute_rp_create()
474 pollrep = ossl_cmp_pollRep_new(fixture->cmp_ctx, 77, 2000); in execute_pollrep_create()
477 if (!TEST_ptr(ossl_cmp_pollrepcontent_get0_pollrep(pollrep->body-> in execute_pollrep_create()
480 if (!TEST_ptr_null(ossl_cmp_pollrepcontent_get0_pollrep(pollrep->body-> in execute_pollrep_create()
503 switch (fixture->bodytype = bodytype) { in test_cmp_pkimessage_create()
505 fixture->expected = 1; in test_cmp_pkimessage_create()
507 if (!TEST_true(OSSL_CMP_CTX_set1_p10CSR(fixture->cmp_ctx, p10cr))) { in test_cmp_pkimessage_create()
528 fixture->expected = 1; in test_cmp_pkimessage_create()
531 fixture->expected = 0; in test_cmp_pkimessage_create()