Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
pki: Add docs to some struct fields
Matthew Holt committed
May 18, 2020 at 13:50 UTC
c47ddbeffb0457d4ac7f65d89f77abae817df239
2 files changed
+14
-3
modules/caddypki/ca.go
+4
-1
@@ -51,7 +51,10 @@ type CA struct {
51
// and Mozilla Firefox trust stores. Default: true.
52
InstallTrust *bool `json:"install_trust,omitempty"`
53
54
- Root *KeyPair `json:"root,omitempty"`
54
+ // The root certificate to use; if empty, one will be generated.
55
+ Root *KeyPair `json:"root,omitempty"`
56
+
57
+ // The intermediate (signing) certificate; if empty, one will be generated.
58
Intermediate *KeyPair `json:"intermediate,omitempty"`
59
60
// Optionally configure a separate storage module associated with this
modules/caddypki/crypto.go
+10
-2
@@ -120,9 +120,17 @@ func trusted(cert *x509.Certificate) bool {
120
// KeyPair represents a public-private key pair, where the
121
// public key is also called a certificate.
122
type KeyPair struct {
123
+ // The certificate. By default, this should be the path to
124
+ // a PEM file unless format is something else.
125
Certificate string `json:"certificate,omitempty"`
124
- PrivateKey string `json:"private_key,omitempty"`
125
- Format string `json:"format,omitempty"`
126
+
127
+ // The private key. By default, this should be the path to
128
+ // a PEM file unless format is something else.
129
+ PrivateKey string `json:"private_key,omitempty"`
130
+
131
+ // The format in which the certificate and private
132
+ // key are provided. Default: pem_file
133
+ Format string `json:"format,omitempty"`
134
}
135
136
// Load loads the certificate and key.