Lines Matching refs:msg

27                                           const OSSL_CMP_MSG *msg)  in ossl_cmp_calc_protection()  argument
35 if (!ossl_assert(ctx != NULL && msg != NULL)) in ossl_cmp_calc_protection()
39 prot_part.header = msg->header; in ossl_cmp_calc_protection()
40 prot_part.body = msg->body; in ossl_cmp_calc_protection()
42 if (msg->header->protectionAlg == NULL) { in ossl_cmp_calc_protection()
46 X509_ALGOR_get0(&algorOID, &pptype, &ppval, msg->header->protectionAlg); in ossl_cmp_calc_protection()
117 msg->header->protectionAlg, /* sets X509_ALGOR */ in ossl_cmp_calc_protection()
146 int ossl_cmp_msg_add_extraCerts(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg) in ossl_cmp_msg_add_extraCerts() argument
148 if (!ossl_assert(ctx != NULL && msg != NULL)) in ossl_cmp_msg_add_extraCerts()
159 if (!ossl_x509_add_certs_new(&msg->extraCerts, ctx->chain, prepend)) in ossl_cmp_msg_add_extraCerts()
163 if (!ossl_x509_add_cert_new(&msg->extraCerts, ctx->cert, prepend)) in ossl_cmp_msg_add_extraCerts()
170 if (!ossl_x509_add_certs_new(&msg->extraCerts, ctx->extraCertsOut, in ossl_cmp_msg_add_extraCerts()
175 if (sk_X509_num(msg->extraCerts) == 0) { in ossl_cmp_msg_add_extraCerts()
176 sk_X509_free(msg->extraCerts); in ossl_cmp_msg_add_extraCerts()
177 msg->extraCerts = NULL; in ossl_cmp_msg_add_extraCerts()
217 static int set_senderKID(const OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg, in set_senderKID() argument
222 return id == NULL || ossl_cmp_hdr_set1_senderKID(msg->header, id); in set_senderKID()
226 int ossl_cmp_msg_protect(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg) in ossl_cmp_msg_protect() argument
228 if (!ossl_assert(ctx != NULL && msg != NULL)) in ossl_cmp_msg_protect()
235 X509_ALGOR_free(msg->header->protectionAlg); in ossl_cmp_msg_protect()
236 msg->header->protectionAlg = NULL; in ossl_cmp_msg_protect()
237 ASN1_BIT_STRING_free(msg->protection); in ossl_cmp_msg_protect()
238 msg->protection = NULL; in ossl_cmp_msg_protect()
241 if (!set_senderKID(ctx, msg, NULL)) in ossl_cmp_msg_protect()
245 if ((msg->header->protectionAlg = pbmac_algor(ctx)) == NULL) in ossl_cmp_msg_protect()
247 if (!set_senderKID(ctx, msg, NULL)) in ossl_cmp_msg_protect()
264 if ((msg->header->protectionAlg = X509_ALGOR_new()) == NULL) in ossl_cmp_msg_protect()
267 if (!set_senderKID(ctx, msg, X509_get0_subject_key_id(ctx->cert))) in ossl_cmp_msg_protect()
281 && ((msg->protection = ossl_cmp_calc_protection(ctx, msg)) == NULL)) in ossl_cmp_msg_protect()
290 if (!ossl_cmp_msg_add_extraCerts(ctx, msg)) in ossl_cmp_msg_protect()
298 if (!(ossl_cmp_general_name_is_NULL_DN(msg->header->sender) in ossl_cmp_msg_protect()
299 && msg->header->senderKID == NULL)) in ossl_cmp_msg_protect()