Lines Matching refs:b
164 BIO *b; in read_private_key() local
166 b = BIO_new_file(private_key_name, "rb"); in read_private_key()
167 ERR(!b, "%s", private_key_name); in read_private_key()
168 private_key = PEM_read_bio_PrivateKey(b, NULL, pem_pw_cb, in read_private_key()
171 BIO_free(b); in read_private_key()
181 BIO *b; in read_x509() local
184 b = BIO_new_file(x509_name, "rb"); in read_x509()
185 ERR(!b, "%s", x509_name); in read_x509()
188 n = BIO_read(b, buf, 2); in read_x509()
190 if (BIO_should_retry(b)) { in read_x509()
201 ERR(BIO_reset(b) != 0, "%s", x509_name); in read_x509()
205 x509 = d2i_X509_bio(b, NULL); in read_x509()
208 x509 = PEM_read_bio_X509(b, NULL, NULL, NULL); in read_x509()
210 BIO_free(b); in read_x509()
337 BIO *b; in main() local
341 b = BIO_new_file(sig_file_name, "wb"); in main()
342 ERR(!b, "%s", sig_file_name); in main()
344 ERR(i2d_CMS_bio_stream(b, cms, NULL, 0) != 1, in main()
347 ERR(i2d_PKCS7_bio(b, pkcs7) != 1, in main()
350 BIO_free(b); in main()
382 BIO *b; in main() local
387 b = BIO_new_file(raw_sig_name, "rb"); in main()
388 ERR(!b, "%s", raw_sig_name); in main()
389 while ((n = BIO_read(b, buf, sizeof(buf))), n > 0) in main()
391 BIO_free(b); in main()