SignerFromConfig creates a signer from a cli.Config as a helper for cli and serve
(c cli.Config)
| 80 | |
| 81 | // SignerFromConfig creates a signer from a cli.Config as a helper for cli and serve |
| 82 | func SignerFromConfig(c cli.Config) (ocsp.Signer, error) { |
| 83 | // if this is called from serve then we need to use the specific responder key file |
| 84 | // fallback to key for backwards-compatibility |
| 85 | k := c.ResponderKeyFile |
| 86 | if k == "" { |
| 87 | k = c.KeyFile |
| 88 | } |
| 89 | return ocsp.NewSignerFromFile(c.CAFile, c.ResponderFile, k, time.Duration(c.Interval)) |
| 90 | } |
| 91 | |
| 92 | // Command assembles the definition of Command 'ocspsign' |
| 93 | var Command = &cli.Command{UsageText: ocspSignerUsageText, Flags: ocspSignerFlags, Main: ocspSignerMain} |
no test coverage detected
searching dependent graphs…