-/* $OpenBSD: by_file.c,v 1.23 2021/11/10 09:00:21 schwarze Exp $ */
+/* $OpenBSD: by_file.c,v 1.24 2021/11/10 09:19:25 schwarze Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <openssl/buffer.h>
#include <openssl/err.h>
#include <openssl/pem.h>
-#include <openssl/lhash.h>
#include <openssl/x509.h>
#include "x509_lcl.h"
X509_LOOKUP_METHOD *
X509_LOOKUP_file(void)
{
- return (&x509_file_lookup);
+ return &x509_file_lookup;
}
static int
}
break;
}
- return (ok);
+ return ok;
}
int
int i, count = 0;
X509 *x = NULL;
- in = BIO_new(BIO_s_file_internal());
+ in = BIO_new(BIO_s_file());
if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) {
X509error(ERR_R_SYS_LIB);
err:
X509_free(x);
BIO_free(in);
- return (ret);
+ return ret;
}
int
int i, count = 0;
X509_CRL *x = NULL;
- in = BIO_new(BIO_s_file_internal());
+ in = BIO_new(BIO_s_file());
if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) {
X509error(ERR_R_SYS_LIB);
goto err;
}
err:
- if (x != NULL)
- X509_CRL_free(x);
+ X509_CRL_free(x);
BIO_free(in);
- return (ret);
+ return ret;
}
int
X509_INFO *itmp;
BIO *in;
int i, count = 0;
+
if (type != X509_FILETYPE_PEM)
return X509_load_cert_file(ctx, file, type);
in = BIO_new_file(file, "r");