summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Ahern <william@25thandclement.com>2016-11-01 15:29:29 -0700
committerWilliam Ahern <william@25thandclement.com>2016-11-01 15:29:29 -0700
commite3a15d0a7c8a1ee43e39c151bc517e9190b109b3 (patch)
treea83c945d19660a90d6c5529b6bb376c9df4311c2 /src
parent95ad8770b7fc6e0441be52483a45311a98669518 (diff)
downloadluaossl-e3a15d0a7c8a1ee43e39c151bc517e9190b109b3.tar.gz
luaossl-e3a15d0a7c8a1ee43e39c151bc517e9190b109b3.tar.bz2
luaossl-e3a15d0a7c8a1ee43e39c151bc517e9190b109b3.zip
forgot to remove old xc_getPublicKeyDigest
Diffstat (limited to 'src')
-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) {
5793} /* xc_setPublicKey() */ 5793} /* xc_setPublicKey() */
5794 5794
5795 5795
5796#if 0
5797static int xc_getPublicKeyDigest(lua_State *L) {
5798 ASN1_BIT_STRING *pk = X509_get0_pubkey_bitstr(checksimple(L, 1, X509_CERT_CLASS));
5799 const char *id = luaL_optstring(L, 2, "sha1");
5800 const EVP_MD *md;
5801 unsigned char digest[EVP_MAX_MD_SIZE];
5802 unsigned int len;
5803
5804 if (!(md = EVP_get_digestbyname(id)))
5805 return luaL_error(L, "x509.cert:getPublicKeyDigest: %s: invalid digest type", id);
5806
5807 if (!EVP_Digest(pk->data, pk->length, digest, &len, md, NULL))
5808 return auxL_error(L, auxL_EOPENSSL, "x509.cert:getPublicKeyDigest");
5809
5810 lua_pushlstring(L, (char *)digest, len);
5811
5812 return 1;
5813} /* xc_getPublicKeyDigest() */
5814#else
5815static int xc_getPublicKeyDigest(lua_State *L) { 5796static int xc_getPublicKeyDigest(lua_State *L) {
5816 X509 *crt = checksimple(L, 1, X509_CERT_CLASS); 5797 X509 *crt = checksimple(L, 1, X509_CERT_CLASS);
5817 EVP_PKEY *key; 5798 EVP_PKEY *key;
@@ -5831,7 +5812,6 @@ static int xc_getPublicKeyDigest(lua_State *L) {
5831 5812
5832 return 1; 5813 return 1;
5833} /* xc_getPublicKeyDigest() */ 5814} /* xc_getPublicKeyDigest() */
5834#endif
5835 5815
5836 5816
5837#if 0 5817#if 0