diff --git a/lib/resty/openssl/include/crypto.lua b/lib/resty/openssl/include/crypto.lua index 6ca1f080..29a6a227 100644 --- a/lib/resty/openssl/include/crypto.lua +++ b/lib/resty/openssl/include/crypto.lua @@ -3,6 +3,7 @@ local C = ffi.C local OPENSSL_10 = require("resty.openssl.version").OPENSSL_10 local OPENSSL_11_OR_LATER = require("resty.openssl.version").OPENSSL_11_OR_LATER +local BORINGSSL = require("resty.openssl.version").BORINGSSL local OPENSSL_free if OPENSSL_10 then @@ -10,6 +11,11 @@ if OPENSSL_10 then void CRYPTO_free(void *ptr); ]] OPENSSL_free = C.CRYPTO_free +elseif BORINGSSL then + ffi.cdef [[ + void OPENSSL_free(void *ptr); + ]] + OPENSSL_free = C.OPENSSL_free elseif OPENSSL_11_OR_LATER then ffi.cdef [[ void CRYPTO_free(void *ptr, const char *file, int line);