diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/x509/by_file.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/libcrypto/x509/by_file.c b/src/lib/libcrypto/x509/by_file.c index f719636412..db66617d2b 100644 --- a/src/lib/libcrypto/x509/by_file.c +++ b/src/lib/libcrypto/x509/by_file.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: by_file.c,v 1.22 2021/11/01 20:53:08 tb Exp $ */ | 1 | /* $OpenBSD: by_file.c,v 1.23 2021/11/10 09:00:21 schwarze Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -127,8 +127,6 @@ X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type) | |||
| 127 | int i, count = 0; | 127 | int i, count = 0; |
| 128 | X509 *x = NULL; | 128 | X509 *x = NULL; |
| 129 | 129 | ||
| 130 | if (file == NULL) | ||
| 131 | return (1); | ||
| 132 | in = BIO_new(BIO_s_file_internal()); | 130 | in = BIO_new(BIO_s_file_internal()); |
| 133 | 131 | ||
| 134 | if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) { | 132 | if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) { |
| @@ -138,7 +136,7 @@ X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type) | |||
| 138 | 136 | ||
| 139 | if (type == X509_FILETYPE_PEM) { | 137 | if (type == X509_FILETYPE_PEM) { |
| 140 | for (;;) { | 138 | for (;;) { |
| 141 | x = PEM_read_bio_X509_AUX(in, NULL, NULL, NULL); | 139 | x = PEM_read_bio_X509_AUX(in, NULL, NULL, ""); |
| 142 | if (x == NULL) { | 140 | if (x == NULL) { |
| 143 | if ((ERR_GET_REASON(ERR_peek_last_error()) == | 141 | if ((ERR_GET_REASON(ERR_peek_last_error()) == |
| 144 | PEM_R_NO_START_LINE) && (count > 0)) { | 142 | PEM_R_NO_START_LINE) && (count > 0)) { |
| @@ -185,8 +183,6 @@ X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type) | |||
| 185 | int i, count = 0; | 183 | int i, count = 0; |
| 186 | X509_CRL *x = NULL; | 184 | X509_CRL *x = NULL; |
| 187 | 185 | ||
| 188 | if (file == NULL) | ||
| 189 | return (1); | ||
| 190 | in = BIO_new(BIO_s_file_internal()); | 186 | in = BIO_new(BIO_s_file_internal()); |
| 191 | 187 | ||
| 192 | if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) { | 188 | if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) { |
| @@ -196,7 +192,7 @@ X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type) | |||
| 196 | 192 | ||
| 197 | if (type == X509_FILETYPE_PEM) { | 193 | if (type == X509_FILETYPE_PEM) { |
| 198 | for (;;) { | 194 | for (;;) { |
| 199 | x = PEM_read_bio_X509_CRL(in, NULL, NULL, NULL); | 195 | x = PEM_read_bio_X509_CRL(in, NULL, NULL, ""); |
| 200 | if (x == NULL) { | 196 | if (x == NULL) { |
| 201 | if ((ERR_GET_REASON(ERR_peek_last_error()) == | 197 | if ((ERR_GET_REASON(ERR_peek_last_error()) == |
| 202 | PEM_R_NO_START_LINE) && (count > 0)) { | 198 | PEM_R_NO_START_LINE) && (count > 0)) { |
| @@ -250,7 +246,7 @@ X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type) | |||
| 250 | X509error(ERR_R_SYS_LIB); | 246 | X509error(ERR_R_SYS_LIB); |
| 251 | return 0; | 247 | return 0; |
| 252 | } | 248 | } |
| 253 | inf = PEM_X509_INFO_read_bio(in, NULL, NULL, NULL); | 249 | inf = PEM_X509_INFO_read_bio(in, NULL, NULL, ""); |
| 254 | BIO_free(in); | 250 | BIO_free(in); |
| 255 | if (!inf) { | 251 | if (!inf) { |
| 256 | X509error(ERR_R_PEM_LIB); | 252 | X509error(ERR_R_PEM_LIB); |
