From: Joe Orton Date: Mon, 4 May 2020 09:00:29 +0000 (+0000) Subject: * modules/ssl/ssl_util.c (ssl_asn1_table_set): Remove unused function. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1470 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37de2054b37f531f090010d554e6ab373b7521b0;p=thirdparty%2Fapache%2Fhttpd.git * modules/ssl/ssl_util.c (ssl_asn1_table_set): Remove unused function. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877348 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h index 1798cc5f480..779129e24b5 100644 --- a/modules/ssl/ssl_private.h +++ b/modules/ssl/ssl_private.h @@ -1046,8 +1046,6 @@ ssl_asn1_t *ssl_asn1_table_set(apr_hash_t *table, const char *key, EVP_PKEY *pkey); /* Retrieve the ssl_asn1_t structure with given key from the hash. */ ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table, const char *key); -/* Remove and free the ssl_asn1_t structure with given key. */ -void ssl_asn1_table_unset(apr_hash_t *table, const char *key); /** Mutex Support */ int ssl_mutex_init(server_rec *, apr_pool_t *); diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c index 83f590bbf9b..7de6f57d448 100644 --- a/modules/ssl/ssl_util.c +++ b/modules/ssl/ssl_util.c @@ -231,24 +231,6 @@ ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table, return (ssl_asn1_t *)apr_hash_get(table, key, APR_HASH_KEY_STRING); } -void ssl_asn1_table_unset(apr_hash_t *table, - const char *key) -{ - apr_ssize_t klen = strlen(key); - ssl_asn1_t *asn1 = apr_hash_get(table, key, klen); - - if (!asn1) { - return; - } - - if (asn1->cpData) { - free(asn1->cpData); - } - free(asn1); - - apr_hash_set(table, key, klen, NULL); -} - #if APR_HAS_THREADS && MODSSL_USE_OPENSSL_PRE_1_1_API /*