I am trying to set the depth level for certificate chain verification

时间:2019-04-08 13:14:58

标签: lua

I am trying to use

store = require "openssl.x509.store"

So that I can set the depth level of certificate chain verification.
However store.depth() function is not accessible.

1 个答案:

答案 0 :(得分:0)

从参考资料中我了解到,您首先必须使用新函数创建x509_store类的实例。 depth不是商店库的成员,而是x509_store类的成员。

https://zhaozg.github.io/lua-openssl/modules/x509.store.html

尝试

store = require "openssl.x509.store"
local myStore = store.new({})
print(myStore.depth)

看看是否是nil