Files
actions-go/go-cache-plugin-src/cmd/go-cache-plugin/addca_default.go
Eric Liu 6e45f50874
Some checks failed
Go CI with S3 Caching / build-and-test (push) Failing after 4s
feat(cache): add Cloudflare SigV4 S3 signature compatibility fix and compile locally
2026-05-19 21:28:45 -07:00

30 lines
810 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
//go:build !linux
package main
import (
"errors"
"log"
"github.com/creachadair/atomicfile"
"github.com/creachadair/command"
"github.com/creachadair/tlsutil"
)
func installSigningCert(env *command.Env, cert tlsutil.Certificate) error {
const certFile = "revproxy-ca.crt"
if err := atomicfile.WriteData(certFile, cert.CertPEM(), 0644); err != nil {
log.Printf("WARNING: Unable to write cert file: %v", err)
} else {
log.Printf("Wrote signing cert to %s", certFile)
}
// TODO(creachadair): Maybe crib some other cases from mkcert, if we need
// them, for example:
// https://github.com/FiloSottile/mkcert/blob/master/truststore_darwin.go
return errors.New("unable to install a certificate on this system")
}