aboutsummaryrefslogtreecommitdiffstats
path: root/regress/00-store-verify.lua
blob: f45ad7e4f936b2db53915fda37ab3b8d66269ad7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env lua

require"regress".export".*"

local st = store.new()

local ca_key, ca_crt = genkey()
st:add(ca_crt)

local key, crt = genkey("RSA", ca_key, ca_crt)

local ok, proof_or_reason = st:verify(crt)
check(ok, "%s", proof_or_reason)

--for _,crt in pairs(proof_or_reason) do
--	print(crt:text())
--end

say"OK"