File: 00-store-verify.lua

package info (click to toggle)
lua-luaossl 20220711-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,364 kB
  • sloc: ansic: 12,795; sh: 1,070; makefile: 19
file content (19 lines) | stat: -rwxr-xr-x 323 bytes parent folder | download | duplicates (3)
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"