aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar William Ahern <william@25thandclement.com> 2016-11-01 15:29:29 -0700
committerLibravatarLibravatar William Ahern <william@25thandclement.com> 2016-11-01 15:29:29 -0700
commite3a15d0a7c8a1ee43e39c151bc517e9190b109b3 (patch)
treea83c945d19660a90d6c5529b6bb376c9df4311c2
parent95ad8770b7fc6e0441be52483a45311a98669518 (diff)
downloadluaossl-e3a15d0a7c8a1ee43e39c151bc517e9190b109b3.tar.gz
luaossl-e3a15d0a7c8a1ee43e39c151bc517e9190b109b3.tar.bz2
luaossl-e3a15d0a7c8a1ee43e39c151bc517e9190b109b3.zip
forgot to remove old xc_getPublicKeyDigest
-rw-r--r--src/openssl.c20
1 files changed, 0 insertions, 20 deletions
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