From 0eb79753c2acb611f612a35774c162426fc2ef43 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 30 Oct 2016 19:50:59 +1100 Subject: Remove unused GENERAL_NAME_get0_value --- src/openssl.c | 66 ----------------------------------------------------------- 1 file changed, 66 deletions(-) diff --git a/src/openssl.c b/src/openssl.c index fd392d7..8c02981 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -175,10 +175,6 @@ #define HAVE_EVP_PKEY_ID OPENSSL_PREREQ(1,1,0) #endif -#ifndef HAVE_GENERAL_NAME_GET0_VALUE -#define HAVE_GENERAL_NAME_GET0_VALUE OPENSSL_PREREQ(1,1,0) -#endif - #ifndef HAVE_GENERAL_NAME_SET0_VALUE #define HAVE_GENERAL_NAME_SET0_VALUE OPENSSL_PREREQ(1,1,0) #endif @@ -1379,68 +1375,6 @@ static void *compat_EVP_PKEY_get0(EVP_PKEY *key) { } /* compat_EVP_PKEY_get0() */ #endif -#if !HAVE_GENERAL_NAME_GET0_VALUE -#define GENERAL_NAME_get0_value(...) \ - compat_GENERAL_NAME_get0_value(__VA_ARGS__) - -static void *GENERAL_NAME_get0_value(GENERAL_NAME *name, int *type) { - if (type) - *type = name->type; - switch (name->type) { - case GEN_X400: - case GEN_EDIPARTY: - return name->d.other; - case GEN_OTHERNAME: - return name->d.otherName; - case GEN_EMAIL: - case GEN_DNS: - case GEN_URI: - return name->d.ia5; - case GEN_DIRNAME: - return name->d.dirn; - case GEN_IPADD: - return name->d.ip; - case GEN_RID: - return name->d.rid; - default: - return NULL; - } -} /* compat_GENERAL_NAME_get0_value() */ -#endif - -#if !HAVE_GENERAL_NAME_SET0_VALUE -#define GENERAL_NAME_set0_value(...) \ - compat_GENERAL_NAME_set0_value(__VA_ARGS__) - -static void GENERAL_NAME_set0_value(GENERAL_NAME *name, int type, void *value) { - switch ((name->type = type)) { - case GEN_X400: - case GEN_EDIPARTY: - name->d.other = value; - break; - case GEN_OTHERNAME: - name->d.otherName = value; - break; - case GEN_EMAIL: - case GEN_DNS: - case GEN_URI: - name->d.ia5 = value; - break; - case GEN_DIRNAME: - name->d.dirn = value; - break; - case GEN_IPADD: - name->d.ip = value; - break; - case GEN_RID: - name->d.rid = value; - break; - default: - break; - } -} /* compat_GENERAL_NAME_set0_value() */ -#endif - #if !HAVE_HMAC_CTX_FREE #define HMAC_CTX_free(ctx) compat_HMAC_CTX_free((ctx)) -- cgit v1.2.3-59-g8ed1b From 94307e3b49ec0519baa1704917cb0d3a4cd374b9 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 30 Oct 2016 19:51:15 +1100 Subject: Remove unused ecg_new_by_nid --- src/openssl.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/openssl.c b/src/openssl.c index 8c02981..ee51386 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -3980,21 +3980,6 @@ static EC_GROUP *ecg_dup_nil(lua_State *L, const EC_GROUP *src) { return (src)? ecg_dup(L, src) : (lua_pushnil(L), (EC_GROUP *)0); } /* ecg_dup_nil() */ -static EC_GROUP *ecg_new_by_nid(int nid) { - EC_GROUP *group; - - if (!(group = EC_GROUP_new_by_curve_name(nid))) - return NULL; - - /* flag as named for benefit of __tostring */ - EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE); - - /* compressed points may be patented */ - EC_GROUP_set_point_conversion_form(group, POINT_CONVERSION_UNCOMPRESSED); - - return group; -} /* ecg_new_by_nid() */ - static EC_GROUP *ecg_push_by_nid(lua_State *L, int nid) { EC_GROUP **group = prepsimple(L, EC_GROUP_CLASS); -- cgit v1.2.3-59-g8ed1b From b83c8a531a8733dfbb4c0eabeca67d303f07922a Mon Sep 17 00:00:00 2001 From: William Ahern Date: Tue, 1 Nov 2016 15:23:12 -0700 Subject: forgot to remove HAVE_GENERAL_NAME_SET0_VALUE --- src/openssl.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/openssl.c b/src/openssl.c index ee51386..ffe3d4f 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -175,10 +175,6 @@ #define HAVE_EVP_PKEY_ID OPENSSL_PREREQ(1,1,0) #endif -#ifndef HAVE_GENERAL_NAME_SET0_VALUE -#define HAVE_GENERAL_NAME_SET0_VALUE OPENSSL_PREREQ(1,1,0) -#endif - #ifndef HAVE_HMAC_CTX_FREE #define HAVE_HMAC_CTX_FREE OPENSSL_PREREQ(1,1,0) #endif -- cgit v1.2.3-59-g8ed1b