diff options
| author | william <william+macosx@25thandclement.com> | 2015-06-04 12:28:42 -0700 |
|---|---|---|
| committer | william <william+macosx@25thandclement.com> | 2015-06-04 12:28:42 -0700 |
| commit | c366e459c0bc83ec749efb6bf5bd36da25c48105 (patch) | |
| tree | 6d6f54f4413cc54953a36941df77196829a0a77a | |
| parent | 969207b3c5926ac33ce6cb8685ae3b0616d27176 (diff) | |
| download | luaossl-c366e459c0bc83ec749efb6bf5bd36da25c48105.tar.gz luaossl-c366e459c0bc83ec749efb6bf5bd36da25c48105.tar.bz2 luaossl-c366e459c0bc83ec749efb6bf5bd36da25c48105.zip | |
use X509_get0_pubkey_bitstr to get reference to public key ASN.1 bit string object
| -rw-r--r-- | src/openssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c index 646e2ae..3c4a237 100644 --- a/src/openssl.c +++ b/src/openssl.c | |||
| @@ -3722,7 +3722,7 @@ static int xc_setPublicKey(lua_State *L) { | |||
| 3722 | 3722 | ||
| 3723 | 3723 | ||
| 3724 | static int xc_getPublicKeyDigest(lua_State *L) { | 3724 | static int xc_getPublicKeyDigest(lua_State *L) { |
| 3725 | ASN1_BIT_STRING *pk = ((X509 *)checksimple(L, 1, X509_CERT_CLASS))->cert_info->key->public_key; | 3725 | ASN1_BIT_STRING *pk = X509_get0_pubkey_bitstr(checksimple(L, 1, X509_CERT_CLASS)); |
| 3726 | const char *id = luaL_optstring(L, 2, "sha1"); | 3726 | const char *id = luaL_optstring(L, 2, "sha1"); |
| 3727 | const EVP_MD *md; | 3727 | const EVP_MD *md; |
| 3728 | unsigned char digest[EVP_MAX_MD_SIZE]; | 3728 | unsigned char digest[EVP_MAX_MD_SIZE]; |
