From: Antonio Quartulli Date: Fri, 11 Aug 2017 09:07:43 +0000 (+0800) Subject: remove unused functions X-Git-Tag: v2.5_beta1~620 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4158f46f6474447520ebc7440050411eb8be8cb9;p=thirdparty%2Fopenvpn.git remove unused functions Signed-off-by: Antonio Quartulli Acked-by: Steffan Karger Message-Id: <20170811090744.31750-5-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15205.html Signed-off-by: David Sommerseth --- diff --git a/src/openvpn/misc.c b/src/openvpn/misc.c index aff1bb2e5..0adb164e4 100644 --- a/src/openvpn/misc.c +++ b/src/openvpn/misc.c @@ -429,29 +429,6 @@ construct_name_value(const char *name, const char *value, struct gc_arena *gc) return BSTR(&out); } -bool -deconstruct_name_value(const char *str, const char **name, const char **value, struct gc_arena *gc) -{ - char *cp; - - ASSERT(str); - ASSERT(name && value); - - *name = cp = string_alloc(str, gc); - *value = NULL; - - while ((*cp)) - { - if (*cp == '=' && !*value) - { - *cp = 0; - *value = cp + 1; - } - ++cp; - } - return *name && *value; -} - static bool env_string_equal(const char *s1, const char *s2) { diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 339baf7d6..ff311d8e6 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -2190,16 +2190,6 @@ read_string_alloc(struct buffer *buf) return str; } -void -read_string_discard(struct buffer *buf) -{ - char *data = read_string_alloc(buf); - if (data) - { - free(data); - } -} - /* * Handle the reading and writing of key data to and from * the TLS control channel (cleartext). diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 090a66e81..26b71743d 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -803,12 +803,6 @@ tls_ctx_load_cert_file(struct tls_root_ctx *ctx, const char *cert_file, tls_ctx_load_cert_file_and_copy(ctx, cert_file, cert_file_inline, NULL); } -void -tls_ctx_free_cert_file(X509 *x509) -{ - X509_free(x509); -} - int tls_ctx_load_priv_file(struct tls_root_ctx *ctx, const char *priv_key_file, const char *priv_key_file_inline