Lines Matching defs:hdr
109 static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name);
110 static void mime_hdr_free(MIME_HEADER *hdr);
172 const char *hdr, const ASN1_ITEM *it)
175 BIO_printf(out, "-----BEGIN %s-----\n", hdr);
177 BIO_printf(out, "-----END %s-----\n", hdr);
425 MIME_HEADER *hdr;
438 if (!(hdr = mime_hdr_find(headers, "content-type")) || !hdr->value) {
446 if (!strcmp(hdr->value, "multipart/signed")) {
448 prm = mime_param_find(hdr, "boundary");
473 if (!(hdr = mime_hdr_find(headers, "content-type")) || !hdr->value) {
480 if (strcmp(hdr->value, "application/x-pkcs7-signature") &&
481 strcmp(hdr->value, "application/pkcs7-signature")) {
483 ERR_add_error_data(2, "type: ", hdr->value);
507 if (strcmp(hdr->value, "application/x-pkcs7-mime") &&
508 strcmp(hdr->value, "application/pkcs7-mime")) {
510 ERR_add_error_data(2, "type: ", hdr->value);
566 MIME_HEADER *hdr;
572 if (!(hdr = mime_hdr_find(headers, "content-type")) || !hdr->value) {
577 if (strcmp(hdr->value, "text/plain")) {
579 ERR_add_error_data(2, "type: ", hdr->value);
906 static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, char *name)
911 idx = sk_MIME_PARAM_find(hdr->params, ¶m);
914 return sk_MIME_PARAM_value(hdr->params, idx);
917 static void mime_hdr_free(MIME_HEADER *hdr)
919 if (hdr->name)
920 OPENSSL_free(hdr->name);
921 if (hdr->value)
922 OPENSSL_free(hdr->value);
923 if (hdr->params)
924 sk_MIME_PARAM_pop_free(hdr->params, mime_param_free);
925 OPENSSL_free(hdr);