UPDATE: Add '-no-sys' flag to skip certificate installation and system proxy setup; update README with usage examples; increment release version to 1.2-02
Build and Release / release (push) Successful in 43s
Build and Release / release (push) Successful in 43s
This commit is contained in:
@@ -10,7 +10,11 @@ import (
|
||||
|
||||
const caCertName = "firefly-go-proxy-ca.crt"
|
||||
|
||||
func setupCertificate() (*tls.Certificate, error) {
|
||||
func setupCertificate(installSystemCA bool) (*tls.Certificate, error) {
|
||||
if !installSystemCA {
|
||||
return &goproxy.GoproxyCa, nil
|
||||
}
|
||||
|
||||
if _, err := os.Stat(caCertName); os.IsNotExist(err) {
|
||||
if err := os.WriteFile(caCertName, goproxy.GoproxyCa.Certificate[0], 0644); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user