Skip to content

Commit

Permalink
fixup! cmp_mock_srv.c: add support of Key encapculation and ITAV with…
Browse files Browse the repository at this point in the history
… kemCiphertext
  • Loading branch information
rajeev-0 committed Aug 11, 2023
1 parent fd975b5 commit 046a205
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/lib/cmp_mock_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ static int process_genm(OSSL_CMP_SRV_CTX *srv_ctx,
}
OSSL_CMP_CTX_set1_kem_secret(OSSL_CMP_SRV_CTX_get0_cmp_ctx(srv_ctx),
secret, secret_len);
kem = OSSL_CMP_kem_algo(OSSL_CMP_SRV_CTX_get0_cmp_ctx(srv_ctx), pubkey);
kem = OSSL_CMP_kem_algo(OSSL_CMP_SRV_CTX_get0_cmp_ctx(srv_ctx),
pubkey);
rsp = OSSL_CMP_ITAV_new_KemCiphertext(kem,
ct, ct_len);
if (rsp == NULL) {
Expand All @@ -501,7 +502,8 @@ static int process_genm(OSSL_CMP_SRV_CTX *srv_ctx,
return 0;
}
OSSL_CMP_CTX_set_option(OSSL_CMP_SRV_CTX_get0_cmp_ctx(srv_ctx),
OSSL_CMP_OPT_KEM_STATUS, 1);
OSSL_CMP_OPT_KEM_STATUS,
3 /* KBM_SSK_USING_SERVER_KEM_KEY */);
(void)sk_OSSL_CMP_ITAV_push(*out, rsp);
OPENSSL_free(secret);
OPENSSL_free(ct);
Expand Down

0 comments on commit 046a205

Please sign in to comment.