Syntax: trust_pool pki_intermediate [<ca_name>...] { authority <ca_name>... } The 'authority' directive can be specified multiple times.
(d *caddyfile.Dispenser)
| 352 | // |
| 353 | // The 'authority' directive can be specified multiple times. |
| 354 | func (pic *PKIIntermediateCAPool) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { |
| 355 | d.Next() // consume module name |
| 356 | pic.Authority = append(pic.Authority, d.RemainingArgs()...) |
| 357 | for nesting := d.Nesting(); d.NextBlock(nesting); { |
| 358 | switch d.Val() { |
| 359 | case "authority": |
| 360 | pic.Authority = append(pic.Authority, d.RemainingArgs()...) |
| 361 | default: |
| 362 | return d.Errf("unrecognized directive: %s", d.Val()) |
| 363 | } |
| 364 | } |
| 365 | if len(pic.Authority) == 0 { |
| 366 | return d.Err("no authorities specified") |
| 367 | } |
| 368 | return nil |
| 369 | } |
| 370 | |
| 371 | // return the certificate pool generated with intermediate certificates from the PKI app |
| 372 | func (p PKIIntermediateCAPool) CertPool() *x509.CertPool { |