SignerFromConfig creates a signer from a cli.Config as a helper for cli and serve
(c cli.Config)
| 99 | |
| 100 | // SignerFromConfig creates a signer from a cli.Config as a helper for cli and serve |
| 101 | func SignerFromConfig(c cli.Config) (ocsp.Signer, error) { |
| 102 | //if this is called from serve then we need to use the specific responder key file |
| 103 | //fallback to key for backwards-compatibility |
| 104 | k := c.ResponderKeyFile |
| 105 | if k == "" { |
| 106 | k = c.KeyFile |
| 107 | } |
| 108 | return ocsp.NewSignerFromFile(c.CAFile, c.ResponderFile, k, time.Duration(c.Interval)) |
| 109 | } |
| 110 | |
| 111 | // Command assembles the definition of Command 'ocsprefresh' |
| 112 | var Command = &cli.Command{UsageText: ocsprefreshUsageText, Flags: ocsprefreshFlags, Main: ocsprefreshMain} |
no test coverage detected
searching dependent graphs…