From 25a2f4bb44da825b38f118a4c80d1bf518e38626 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Thu, 28 Dec 2017 13:11:18 +0100 Subject: [PATCH] Remove unused function SSL_readcert(). --- src/ssli_openssl.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/ssli_openssl.c b/src/ssli_openssl.c index 4cc1db9..3d173c3 100644 --- a/src/ssli_openssl.c +++ b/src/ssli_openssl.c @@ -67,32 +67,6 @@ static int SSL_add_ext(X509 * crt, int nid, char *value) { return 1; } -static X509 *SSL_readcert(char *certfile) -{ - FILE *fp; - X509 *x509; - - /* open the certificate file */ - fp = fopen(certfile, "r"); - if (fp == NULL) { - Log_warn("Unable to open the X509 file %s for reading.", certfile); - return NULL; - } - - /* allocate memory for the cert structure */ - x509 = X509_new(); - - if (PEM_read_X509(fp, &x509, NULL, NULL) == 0) { - /* error reading the x509 information - check the error stack */ - Log_warn("Error trying to read X509 info."); - fclose(fp); - X509_free(x509); - return NULL; - } - fclose(fp); - return x509; -} - static RSA *SSL_readprivatekey(char *keyfile) { FILE *fp; -- 2.30.2