All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Zaborowski <andrew.zaborowski@intel.com>
To: ell@lists.01.org
Subject: [PATCH 7/9] tls, pem: Drop tls_cert_load_file, l_pem_load_certificate
Date: Thu, 13 Dec 2018 20:57:44 +0100	[thread overview]
Message-ID: <20181213195746.32144-7-andrew.zaborowski@intel.com> (raw)
In-Reply-To: <20181213195746.32144-1-andrew.zaborowski@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2873 bytes --]

These functions have no users left.
---
 ell/ell.sym       |  1 -
 ell/pem.c         | 20 --------------------
 ell/pem.h         |  1 -
 ell/tls-private.h |  1 -
 ell/tls.c         | 15 ---------------
 5 files changed, 38 deletions(-)

diff --git a/ell/ell.sym b/ell/ell.sym
index 2ff7d30..23d2349 100644
--- a/ell/ell.sym
+++ b/ell/ell.sym
@@ -337,7 +337,6 @@ global:
 	l_netlink_set_debug;
 	/* pem */
 	l_pem_load_buffer;
-	l_pem_load_certificate;
 	l_pem_load_certificate_chain;
 	l_pem_load_certificate_list;
 	l_pem_load_file;
diff --git a/ell/pem.c b/ell/pem.c
index dffd476..fa08962 100644
--- a/ell/pem.c
+++ b/ell/pem.c
@@ -245,26 +245,6 @@ LIB_EXPORT uint8_t *l_pem_load_file(const char *filename, int index,
 	return result;
 }
 
-LIB_EXPORT uint8_t *l_pem_load_certificate(const char *filename, size_t *len)
-{
-	uint8_t *content;
-	char *label;
-
-	content = l_pem_load_file(filename, 0, &label, len);
-
-	if (!content)
-		return NULL;
-
-	if (strcmp(label, "CERTIFICATE")) {
-		l_free(content);
-		content = NULL;
-	}
-
-	l_free(label);
-
-	return content;
-}
-
 LIB_EXPORT struct l_certchain *l_pem_load_certificate_chain(
 							const char *filename)
 {
diff --git a/ell/pem.h b/ell/pem.h
index bb9e53a..fc5b019 100644
--- a/ell/pem.h
+++ b/ell/pem.h
@@ -37,7 +37,6 @@ uint8_t *l_pem_load_buffer(const uint8_t *buf, size_t buf_len,
 uint8_t *l_pem_load_file(const char *filename, int index,
 				char **type_label, size_t *len);
 
-uint8_t *l_pem_load_certificate(const char *filename, size_t *len);
 struct l_certchain *l_pem_load_certificate_chain(const char *filename);
 struct l_queue *l_pem_load_certificate_list(const char *filename);
 
diff --git a/ell/tls-private.h b/ell/tls-private.h
index e2ec014..3fda4b5 100644
--- a/ell/tls-private.h
+++ b/ell/tls-private.h
@@ -233,7 +233,6 @@ void tls_tx_record(struct l_tls *tls, enum tls_content_type type,
 bool tls_handle_message(struct l_tls *tls, const uint8_t *message,
 			int len, enum tls_content_type type, uint16_t version);
 
-struct l_cert *tls_cert_load_file(const char *filename);
 int tls_parse_certificate_list(const void *data, size_t len,
 				struct l_certchain **out_certchain);
 
diff --git a/ell/tls.c b/ell/tls.c
index 8abbabd..59d7f5a 100644
--- a/ell/tls.c
+++ b/ell/tls.c
@@ -2868,21 +2868,6 @@ const char *tls_handshake_state_to_str(enum tls_handshake_state state)
 	return buf;
 }
 
-struct l_cert *tls_cert_load_file(const char *filename)
-{
-	uint8_t *der;
-	size_t len;
-	struct l_cert *cert;
-
-	der = l_pem_load_certificate(filename, &len);
-	if (!der)
-		return NULL;
-
-	cert = l_cert_new_from_der(der, len);
-	l_free(der);
-	return cert;
-}
-
 int tls_parse_certificate_list(const void *data, size_t len,
 				struct l_certchain **out_certchain)
 {
-- 
2.19.1


  parent reply	other threads:[~2018-12-13 19:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 19:57 [PATCH 1/9] tls: Don't send Client Hello in l_tls_new Andrew Zaborowski
2018-12-13 19:57 ` [PATCH 2/9] unit: Call l_tls_start in tls tests Andrew Zaborowski
2018-12-13 19:57 ` [PATCH 3/9] tls: Add TLS version number printf macros Andrew Zaborowski
2018-12-14 15:53   ` Denis Kenzior
2018-12-14 18:48     ` Andrew Zaborowski
2018-12-13 19:57 ` [PATCH 4/9] tls: Implement l_tls_set_version_range Andrew Zaborowski
2018-12-14 15:55   ` Denis Kenzior
2018-12-13 19:57 ` [PATCH 5/9] unit: Test TLS 1.0, 1.1 and 1.2 Andrew Zaborowski
2018-12-13 19:57 ` [PATCH 6/9] unit: Move tls_cert_load_file to relevant unit tests Andrew Zaborowski
2018-12-14 16:01   ` Denis Kenzior
2018-12-13 19:57 ` Andrew Zaborowski [this message]
2018-12-13 19:57 ` [PATCH 8/9] tls: Allow user to set custom list of cipher suites Andrew Zaborowski
2018-12-14 16:33   ` Denis Kenzior
2018-12-14 19:12     ` Andrew Zaborowski
2018-12-14 19:28       ` Denis Kenzior
2018-12-14 19:49         ` Andrew Zaborowski
2018-12-14 19:57           ` Denis Kenzior
2018-12-13 19:57 ` [PATCH 9/9] unit: Test many TLS cipher suite and version combinations Andrew Zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181213195746.32144-7-andrew.zaborowski@intel.com \
    --to=andrew.zaborowski@intel.com \
    --cc=ell@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.