diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 20 |
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 | ||
5797 | static 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 | ||
5815 | static int xc_getPublicKeyDigest(lua_State *L) { | 5796 | static 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 |