From e3a15d0a7c8a1ee43e39c151bc517e9190b109b3 Mon Sep 17 00:00:00 2001
From: William Ahern <william@25thandclement.com>
Date: Tue, 1 Nov 2016 15:29:29 -0700
Subject: forgot to remove old xc_getPublicKeyDigest

---
 src/openssl.c | 20 --------------------
 1 file changed, 20 deletions(-)

(limited to 'src')

diff --git a/src/openssl.c b/src/openssl.c
index ed88c3a..f4bba40 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -5793,25 +5793,6 @@ static int xc_setPublicKey(lua_State *L) {
 } /* xc_setPublicKey() */
 
 
-#if 0
-static int xc_getPublicKeyDigest(lua_State *L) {
-	ASN1_BIT_STRING *pk = X509_get0_pubkey_bitstr(checksimple(L, 1, X509_CERT_CLASS));
-	const char *id = luaL_optstring(L, 2, "sha1");
-	const EVP_MD *md;
-	unsigned char digest[EVP_MAX_MD_SIZE];
-	unsigned int len;
-
-	if (!(md = EVP_get_digestbyname(id)))
-		return luaL_error(L, "x509.cert:getPublicKeyDigest: %s: invalid digest type", id);
-
-	if (!EVP_Digest(pk->data, pk->length, digest, &len, md, NULL))
-		return auxL_error(L, auxL_EOPENSSL, "x509.cert:getPublicKeyDigest");
-
-	lua_pushlstring(L, (char *)digest, len);
-
-	return 1;
-} /* xc_getPublicKeyDigest() */
-#else
 static int xc_getPublicKeyDigest(lua_State *L) {
 	X509 *crt = checksimple(L, 1, X509_CERT_CLASS);
 	EVP_PKEY *key;
@@ -5831,7 +5812,6 @@ static int xc_getPublicKeyDigest(lua_State *L) {
 
 	return 1;
 } /* xc_getPublicKeyDigest() */
-#endif
 
 
 #if 0
-- 
cgit v1.2.3-55-g6feb