diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/openssl.c b/src/openssl.c index 5a8e03f..0910bb3 100644 --- a/src/openssl.c +++ b/src/openssl.c | |||
@@ -6838,6 +6838,19 @@ static int xx_sign(lua_State *L) { | |||
6838 | } /* xx_sign() */ | 6838 | } /* xx_sign() */ |
6839 | 6839 | ||
6840 | 6840 | ||
6841 | static int xx_verify(lua_State *L) { | ||
6842 | X509_CRL *crl = checksimple(L, 1, X509_CRL_CLASS); | ||
6843 | EVP_PKEY *key = checksimple(L, 2, PKEY_CLASS); | ||
6844 | |||
6845 | if (!X509_CRL_verify(crl, key)) | ||
6846 | return auxL_error(L, auxL_EOPENSSL, "x509.crl:verify"); | ||
6847 | |||
6848 | lua_pushboolean(L, 1); | ||
6849 | |||
6850 | return 1; | ||
6851 | } /* xx_verify() */ | ||
6852 | |||
6853 | |||
6841 | static int xx_text(lua_State *L) { | 6854 | static int xx_text(lua_State *L) { |
6842 | X509_CRL *crl = checksimple(L, 1, X509_CRL_CLASS); | 6855 | X509_CRL *crl = checksimple(L, 1, X509_CRL_CLASS); |
6843 | 6856 | ||
@@ -6907,6 +6920,7 @@ static const auxL_Reg xx_methods[] = { | |||
6907 | { "getExtension", &xx_getExtension }, | 6920 | { "getExtension", &xx_getExtension }, |
6908 | { "getExtensionCount", &xx_getExtensionCount }, | 6921 | { "getExtensionCount", &xx_getExtensionCount }, |
6909 | { "sign", &xx_sign }, | 6922 | { "sign", &xx_sign }, |
6923 | { "verify", &xx_verify }, | ||
6910 | { "text", &xx_text }, | 6924 | { "text", &xx_text }, |
6911 | { "tostring", &xx__tostring }, | 6925 | { "tostring", &xx__tostring }, |
6912 | { NULL, NULL }, | 6926 | { NULL, NULL }, |