diff --git a/jls/util/MessageDigest.lua b/jls/util/MessageDigest.lua index b2a77e2..82d60d2 100644 --- a/jls/util/MessageDigest.lua +++ b/jls/util/MessageDigest.lua @@ -85,9 +85,10 @@ end, function(MessageDigest) end function MessageDigest.fromOpenssl(alg) + local opensslLib = require('openssl') -- fail quickly if not available return class.create(MessageDigest, function(md) function md:initialize() - self.md = require('openssl').digest.new(alg) + self.md = opensslLib.digest.new(alg) end function md:update(m) self.md:update(m)