Lines Matching refs:base
92 static int do_testhpke(const TEST_BASEDATA *base, in do_testhpke() argument
118 if (!TEST_true(OSSL_HPKE_keygen(base->suite, pub, &publen, &privE, in do_testhpke()
119 base->ikmE, base->ikmElen, libctx, propq))) in do_testhpke()
121 if (!TEST_true(cmpkey(privE, base->expected_pkEm, base->expected_pkEmlen))) in do_testhpke()
123 if (!TEST_ptr(sealctx = OSSL_HPKE_CTX_new(base->mode, base->suite, in do_testhpke()
127 if (!TEST_true(OSSL_HPKE_CTX_set1_ikme(sealctx, base->ikmE, base->ikmElen))) in do_testhpke()
129 if (base->mode == OSSL_HPKE_MODE_AUTH in do_testhpke()
130 || base->mode == OSSL_HPKE_MODE_PSKAUTH) { in do_testhpke()
131 if (!TEST_true(base->ikmAuth != NULL && base->ikmAuthlen > 0)) in do_testhpke()
133 if (!TEST_true(OSSL_HPKE_keygen(base->suite, in do_testhpke()
135 base->ikmAuth, base->ikmAuthlen, in do_testhpke()
141 if (!TEST_true(OSSL_HPKE_keygen(base->suite, rpub, &rpublen, &privR, in do_testhpke()
142 base->ikmR, base->ikmRlen, libctx, propq))) in do_testhpke()
144 if (!TEST_true(cmpkey(privR, base->expected_pkRm, base->expected_pkRmlen))) in do_testhpke()
146 if (base->mode == OSSL_HPKE_MODE_PSK in do_testhpke()
147 || base->mode == OSSL_HPKE_MODE_PSKAUTH) { in do_testhpke()
148 if (!TEST_true(OSSL_HPKE_CTX_set1_psk(sealctx, base->pskid, in do_testhpke()
149 base->psk, base->psklen))) in do_testhpke()
154 base->ksinfo, base->ksinfolen))) in do_testhpke()
173 if (!TEST_ptr(openctx = OSSL_HPKE_CTX_new(base->mode, base->suite, in do_testhpke()
177 if (base->mode == OSSL_HPKE_MODE_PSK in do_testhpke()
178 || base->mode == OSSL_HPKE_MODE_PSKAUTH) { in do_testhpke()
179 if (!TEST_true(base->pskid != NULL && base->psk != NULL in do_testhpke()
180 && base->psklen > 0)) in do_testhpke()
182 if (!TEST_true(OSSL_HPKE_CTX_set1_psk(openctx, base->pskid, in do_testhpke()
183 base->psk, base->psklen))) in do_testhpke()
186 if (base->mode == OSSL_HPKE_MODE_AUTH in do_testhpke()
187 || base->mode == OSSL_HPKE_MODE_PSKAUTH) { in do_testhpke()
193 base->ksinfo, base->ksinfolen))) in do_testhpke()