Syntax: trust_pool pki_root [ ...] { authority ... } The 'authority' directive can be specified multiple times.
(d *caddyfile.Dispenser)
| 267 | // |
| 268 | // The 'authority' directive can be specified multiple times. |
| 269 | func (pkir *PKIRootCAPool) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { |
| 270 | d.Next() // consume module name |
| 271 | pkir.Authority = append(pkir.Authority, d.RemainingArgs()...) |
| 272 | for nesting := d.Nesting(); d.NextBlock(nesting); { |
| 273 | switch d.Val() { |
| 274 | case "authority": |
| 275 | pkir.Authority = append(pkir.Authority, d.RemainingArgs()...) |
| 276 | default: |
| 277 | return d.Errf("unrecognized directive: %s", d.Val()) |
| 278 | } |
| 279 | } |
| 280 | if len(pkir.Authority) == 0 { |
| 281 | return d.Err("no authorities specified") |
| 282 | } |
| 283 | return nil |
| 284 | } |
| 285 | |
| 286 | // return the certificate pool generated with root certificates from the PKI app |
| 287 | func (p PKIRootCAPool) CertPool() *x509.CertPool { |