@marcel91200 / caddy Mirror · read-only
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 11, 01:00 UTC

master
go 70 lines 1.16 KB
Raw
1 package integration
2
3 import (
4 "testing"
5
6 "github.com/caddyserver/caddy/v2/caddytest"
7 )
8
9 func TestLeafCertLoaders(t *testing.T) {
10 tester := caddytest.NewTester(t)
11 tester.InitServer(`
12 {
13 "admin": {
14 "listen": "localhost:2999"
15 },
16 "apps": {
17 "http": {
18 "http_port": 9080,
19 "https_port": 9443,
20 "grace_period": 1,
21 "servers": {
22 "srv0": {
23 "listen": [
24 ":9443"
25 ],
26 "routes": [
27 {
28 "match": [
29 {
30 "host": [
31 "localhost"
32 ]
33 }
34 ],
35 "terminal": true
36 }
37 ],
38 "tls_connection_policies": [
39 {
40 "client_authentication": {
41 "verifiers": [
42 {
43 "verifier": "leaf",
44 "leaf_certs_loaders": [
45 {
46 "loader": "file",
47 "files": ["../leafcert.pem"]
48 },
49 {
50 "loader": "folder",
51 "folders": ["../"]
52 },
53 {
54 "loader": "storage"
55 },
56 {
57 "loader": "pem"
58 }
59 ]
60 }
61 ]
62 }
63 }
64 ]
65 }
66 }
67 }
68 }
69 }`, "json")
70 }