Lines Matching defs:bio

99 static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio);
106 static int multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret);
120 BIO *bio, *tbio;
128 if ((bio = BIO_new_NDEF(out, val, it)) == NULL) {
133 ret = SMIME_crlf_copy(in, bio, flags);
134 (void)BIO_flush(bio);
138 tbio = BIO_pop(bio);
139 BIO_free(bio);
140 bio = tbio;
141 } while (bio != out);
185 b64_read_asn1(BIO *bio, const ASN1_ITEM *it)
193 bio = BIO_push(b64, bio);
194 val = ASN1_item_d2i_bio(it, bio, NULL);
197 (void)BIO_flush(bio);
198 bio = BIO_pop(bio);
278 SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
309 BIO_printf(bio, "MIME-Version: 1.0%s", mime_eol);
310 BIO_printf(bio, "Content-Type: multipart/signed;");
311 BIO_printf(bio, " protocol=\"%ssignature\";", mime_prefix);
312 BIO_puts(bio, " micalg=\"");
313 asn1_write_micalg(bio, mdalgs);
314 BIO_printf(bio, "\"; boundary=\"----%s\"%s%s",
316 BIO_printf(bio, "This is an S/MIME signed message%s%s",
319 BIO_printf(bio, "------%s%s", bound, mime_eol);
320 if (!asn1_output_data(bio, data, val, flags, it))
322 BIO_printf(bio, "%s------%s%s", mime_eol, bound, mime_eol);
326 BIO_printf(bio, "Content-Type: %ssignature;", mime_prefix);
327 BIO_printf(bio, " name=\"smime.p7s\"%s", mime_eol);
328 BIO_printf(bio, "Content-Transfer-Encoding: base64%s",
330 BIO_printf(bio, "Content-Disposition: attachment;");
331 BIO_printf(bio, " filename=\"smime.p7s\"%s%s",
333 B64_write_ASN1(bio, val, NULL, 0, it);
334 BIO_printf(bio, "%s------%s--%s%s", mime_eol, bound,
355 BIO_printf(bio, "MIME-Version: 1.0%s", mime_eol);
356 BIO_printf(bio, "Content-Disposition: attachment;");
357 BIO_printf(bio, " filename=\"%s\"%s", cname, mime_eol);
358 BIO_printf(bio, "Content-Type: %smime;", mime_prefix);
360 BIO_printf(bio, " smime-type=%s;", msg_type);
361 BIO_printf(bio, " name=\"%s\"%s", cname, mime_eol);
362 BIO_printf(bio, "Content-Transfer-Encoding: base64%s%s",
364 if (!B64_write_ASN1(bio, val, data, flags, it))
366 BIO_printf(bio, "%s", mime_eol);
429 SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it)
442 if (!(headers = mime_parse_hdr(bio))) {
463 ret = multi_split(bio, prm->param_value, &parts);
526 if (!(val = b64_read_asn1(bio, it))) {
609 multi_split(BIO *bio, char *bound, STACK_OF(BIO) **ret)
626 while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
670 mime_parse_hdr(BIO *bio)
682 while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {