diff options
Diffstat (limited to '')
-rwxr-xr-x | regress/00-store-verify.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/regress/00-store-verify.lua b/regress/00-store-verify.lua new file mode 100755 index 0000000..f45ad7e --- /dev/null +++ b/regress/00-store-verify.lua | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/usr/bin/env lua | ||
2 | |||
3 | require"regress".export".*" | ||
4 | |||
5 | local st = store.new() | ||
6 | |||
7 | local ca_key, ca_crt = genkey() | ||
8 | st:add(ca_crt) | ||
9 | |||
10 | local key, crt = genkey("RSA", ca_key, ca_crt) | ||
11 | |||
12 | local ok, proof_or_reason = st:verify(crt) | ||
13 | check(ok, "%s", proof_or_reason) | ||
14 | |||
15 | --for _,crt in pairs(proof_or_reason) do | ||
16 | -- print(crt:text()) | ||
17 | --end | ||
18 | |||
19 | say"OK" | ||