diff --git a/docs/index.html b/docs/index.html index fca6264..6ca12a4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -115,8 +115,8 @@

Parameters:

  • tags extra tags to include on all reported errors
  • logger
  • verify_ssl boolean of whether to perform SSL certificate verification
  • -
  • cacert path to CA certificate bundle file (defaults to ./data/cacert.pem). - Useful only when using luasec, ngx version uses the lua_ssl_trusted_certificate directive for this.
  • +
  • cafile path to CA certificate bundle file. + Required only when using luasec, ngx version uses the lua_ssl_trusted_certificate directive for this.
  • For example:
    { tags = { foo = "bar", abc = "def" }, logger = "myLogger", verify_ssl = false }
    @@ -290,7 +290,7 @@

    Usage:

    generated by LDoc 1.4.6 -Last updated 2017-05-10 15:09:54 +Last updated 2017-05-16 12:19:18
    diff --git a/raven.lua b/raven.lua index 643012d..6fe5024 100644 --- a/raven.lua +++ b/raven.lua @@ -227,7 +227,7 @@ _M._parse_dsn = _parse_dsn --
  • tags extra tags to include on all reported errors
  • --
  • logger
  • --
  • verify_ssl boolean of whether to perform SSL certificate verification
  • ---
  • cacert path to CA certificate bundle file. +--
  • cafile path to CA certificate bundle file. -- Required only when using luasec, ngx version uses the lua_ssl_trusted_certificate directive for this.
  • -- -- For example: @@ -268,7 +268,7 @@ function _M.new(self, dsn, conf) end - obj.cacert = conf.cacert + obj.cafile = conf.cafile end return setmetatable(obj, mt) @@ -557,7 +557,7 @@ function _M.lua_wrap_tls(self, sock) mode = "client", protocol = "tlsv1_2", verify = self.verify_ssl and "peer" or "none", - cafile = self.verify_ssl and self.cacert or nil, + cafile = self.verify_ssl and self.cafile or nil, options = "all", }) if not sock then diff --git a/tests/test_https.lua b/tests/test_https.lua index 5106322..861d6e9 100644 --- a/tests/test_https.lua +++ b/tests/test_https.lua @@ -104,7 +104,7 @@ function test_validate_cert_ok() else rvn = raven:new(get_dsn(), { tags = { foo = "bar" }, - cacert = "./tests/certs/ca.cert.pem", + cafile = "./tests/certs/ca.cert.pem", }) local id = rvn:captureMessage("Sentry is a realtime event logging and aggregation platform.") assert_not_nil(id) @@ -124,7 +124,7 @@ function test_validate_cert_failure() -- load the certificate for another CA, it must fail rvn = raven:new(get_dsn(), { tags = { foo = "bar" }, - cacert = "./tests/certs/wrongca.cert.pem", + cafile = "./tests/certs/wrongca.cert.pem", }) local ok, err = rvn:captureMessage("Sentry is a realtime event logging and aggregation platform.") assert_nil(ok)