Lines Matching refs:format
65 static BIO *bio_open_default_(const char *filename, char mode, int format,
83 int load_key_certs_crls_suppress(const char *uri, int format, int maybe_stdin,
465 X509 *load_cert_pass(const char *uri, int format, int maybe_stdin,
477 (void)load_key_certs_crls(uri, format, maybe_stdin, pass, desc,
486 X509_CRL *load_crl(const char *uri, int format, int maybe_stdin,
498 (void)load_key_certs_crls(uri, format, maybe_stdin, NULL, desc,
507 X509_REQ *load_csr(const char *file, int format, const char *desc)
512 if (format == FORMAT_UNDEF)
513 format = FORMAT_PEM;
516 in = bio_open_default(file, 'r', format);
520 if (format == FORMAT_ASN1)
522 else if (format == FORMAT_PEM)
525 print_format_error(format, OPT_FMT_PEMDER);
548 EVP_PKEY *load_key(const char *uri, int format, int may_stdin,
557 if (format == FORMAT_ENGINE) {
560 (void)load_key_certs_crls(uri, format, may_stdin, pass, desc,
567 EVP_PKEY *load_pubkey(const char *uri, int format, int maybe_stdin,
576 if (format == FORMAT_ENGINE) {
579 (void)load_key_certs_crls(uri, format, maybe_stdin, pass, desc,
586 EVP_PKEY *load_keyparams_suppress(const char *uri, int format, int maybe_stdin,
595 (void)load_key_certs_crls_suppress(uri, format, maybe_stdin, NULL, desc,
611 EVP_PKEY *load_keyparams(const char *uri, int format, int maybe_stdin,
614 return load_keyparams_suppress(uri, format, maybe_stdin, keytype, desc, 0);
834 static const char *format2string(int format)
836 switch(format) {
861 int load_key_certs_crls_suppress(const char *uri, int format, int maybe_stdin,
936 if ((input_type = format2string(format)) != NULL) {
1092 int load_key_certs_crls(const char *uri, int format, int maybe_stdin,
1099 return load_key_certs_crls_suppress(uri, format, maybe_stdin, pass, desc,
1548 BIO_printf(bio_err, "error converting serial to ASN.1 format\n");
1871 * name is expected to be in the format /type0=value0/type1=value1/type2=...
1884 "%s: %s name is expected to be in the format "
1886 "be escaped by \\. This name is not in that format: '%s'\n",
2076 * in a format suitable for passing to SSL_CTX_set_next_protos_advertised.
2926 * Centralized handling of input and output files with format specification
2927 * The format is meant to show what the input and output is supposed to be,
2932 BIO *dup_bio_in(int format)
2935 BIO_NOCLOSE | (FMT_istext(format) ? BIO_FP_TEXT : 0));
2938 BIO *dup_bio_out(int format)
2941 BIO_NOCLOSE | (FMT_istext(format) ? BIO_FP_TEXT : 0));
2948 if (FMT_istext(format))
2952 if (FMT_istext(format)
2961 BIO *dup_bio_err(int format)
2964 BIO_NOCLOSE | (FMT_istext(format) ? BIO_FP_TEXT : 0));
2966 if (b != NULL && FMT_istext(format))
2991 static const char *modestr(char mode, int format)
2997 return FMT_istext(format) ? "a" : "ab";
2999 return FMT_istext(format) ? "r" : "rb";
3001 return FMT_istext(format) ? "w" : "wb";
3023 BIO *bio_open_owner(const char *filename, int format, int private)
3033 return bio_open_default(filename, 'w', format);
3035 textmode = FMT_istext(format);
3065 fp = fdopen(fd, modestr('w', format));
3068 fp = fopen(filename, modestr('w', format));
3093 static BIO *bio_open_default_(const char *filename, char mode, int format,
3099 ret = mode == 'r' ? dup_bio_in(format) : dup_bio_out(format);
3110 ret = BIO_new_file(filename, modestr(mode, format));
3125 BIO *bio_open_default(const char *filename, char mode, int format)
3127 return bio_open_default_(filename, mode, format, 0);
3130 BIO *bio_open_default_quiet(const char *filename, char mode, int format)
3132 return bio_open_default_(filename, mode, format, 1);