(_ *kingpin.ParseContext)
| 54 | } |
| 55 | |
| 56 | func (c *storageS3Flags) preActionLoadPEMPath(_ *kingpin.ParseContext) error { |
| 57 | if len(c.s3options.RootCA) > 0 { |
| 58 | return errors.New("root-ca-pem-base64 and root-ca-pem-path are mutually exclusive") |
| 59 | } |
| 60 | |
| 61 | data, err := os.ReadFile(c.rootCaPemPath) //#nosec |
| 62 | if err != nil { |
| 63 | return errors.Wrapf(err, "error opening root-ca-pem-path %v", c.rootCaPemPath) |
| 64 | } |
| 65 | |
| 66 | c.s3options.RootCA = data |
| 67 | |
| 68 | return nil |
| 69 | } |
| 70 | |
| 71 | func (c *storageS3Flags) preActionLoadPEMBase64(_ *kingpin.ParseContext) error { |
| 72 | caContent, err := base64.StdEncoding.DecodeString(c.rootCaPemBase64) |
no outgoing calls