Lines Matching refs:msg
34 const OSSL_CMP_MSG *msg) in ossl_cmp_calc_protection() argument
42 if (!ossl_assert(ctx != NULL && msg != NULL)) in ossl_cmp_calc_protection()
46 prot_part.header = msg->header; in ossl_cmp_calc_protection()
47 prot_part.body = msg->body; in ossl_cmp_calc_protection()
49 if (msg->header->protectionAlg == NULL) { in ossl_cmp_calc_protection()
53 X509_ALGOR_get0(&algorOID, &pptype, &ppval, msg->header->protectionAlg); in ossl_cmp_calc_protection()
124 msg->header->protectionAlg, /* sets X509_ALGOR */ in ossl_cmp_calc_protection()
134 int ossl_cmp_msg_add_extraCerts(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg) in ossl_cmp_msg_add_extraCerts() argument
136 if (!ossl_assert(ctx != NULL && msg != NULL)) in ossl_cmp_msg_add_extraCerts()
162 if (!ossl_x509_add_certs_new(&msg->extraCerts, ctx->chain, prepend)) in ossl_cmp_msg_add_extraCerts()
166 if (!ossl_x509_add_cert_new(&msg->extraCerts, ctx->cert, prepend)) in ossl_cmp_msg_add_extraCerts()
173 if (!ossl_x509_add_certs_new(&msg->extraCerts, ctx->extraCertsOut, in ossl_cmp_msg_add_extraCerts()
178 if (sk_X509_num(msg->extraCerts) == 0) { in ossl_cmp_msg_add_extraCerts()
179 sk_X509_free(msg->extraCerts); in ossl_cmp_msg_add_extraCerts()
180 msg->extraCerts = NULL; in ossl_cmp_msg_add_extraCerts()
220 static int set_senderKID(const OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg, in set_senderKID() argument
225 return id == NULL || ossl_cmp_hdr_set1_senderKID(msg->header, id); in set_senderKID()
229 int ossl_cmp_msg_protect(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg) in ossl_cmp_msg_protect() argument
231 if (!ossl_assert(ctx != NULL && msg != NULL)) in ossl_cmp_msg_protect()
238 X509_ALGOR_free(msg->header->protectionAlg); in ossl_cmp_msg_protect()
239 msg->header->protectionAlg = NULL; in ossl_cmp_msg_protect()
240 ASN1_BIT_STRING_free(msg->protection); in ossl_cmp_msg_protect()
241 msg->protection = NULL; in ossl_cmp_msg_protect()
244 if (!set_senderKID(ctx, msg, NULL)) in ossl_cmp_msg_protect()
248 if ((msg->header->protectionAlg = pbmac_algor(ctx)) == NULL) in ossl_cmp_msg_protect()
250 if (!set_senderKID(ctx, msg, NULL)) in ossl_cmp_msg_protect()
267 if ((msg->header->protectionAlg = X509_ALGOR_new()) == NULL) in ossl_cmp_msg_protect()
270 if (!set_senderKID(ctx, msg, X509_get0_subject_key_id(ctx->cert))) in ossl_cmp_msg_protect()
284 && ((msg->protection = ossl_cmp_calc_protection(ctx, msg)) == NULL)) in ossl_cmp_msg_protect()
293 if (!ossl_cmp_msg_add_extraCerts(ctx, msg)) in ossl_cmp_msg_protect()
301 if (!(ossl_cmp_general_name_is_NULL_DN(msg->header->sender) in ossl_cmp_msg_protect()
302 && msg->header->senderKID == NULL)) in ossl_cmp_msg_protect()