Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ task:
install_script:
- apt-get update
# bind9-dnsutils contains dig
- apt-get install -y dnssec-trigger bind9-dnsutils xxd
- apt-get install -y dnssec-trigger bind9-dnsutils libnss3-tools xxd
- if [ "$CI_DISTRO" = "ubuntu" ]; then curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && apt-get update && apt-get install -y google-chrome-stable; else apt-get install -y chromium; fi
# Namecoin Core
# Temporarily downgrade Namecoin Core until deterministic salts with descriptor wallets are fixed.
#- BITCOIND_URL=$(curl https://www.namecoin.org/download/ | grep x86_64-linux-gnu.tar.gz | grep -v 0.13.99 | grep --only-matching https://.*.tar.gz)
Expand Down Expand Up @@ -162,7 +163,7 @@ task:
- chown encaya:encaya testdata/*.pem
# Curiously, relative paths don't work here, they cause the .pem files to
# not be detected. Maybe file a bug with Hugo?
- encaya -conf "$(pwd)/testdata/encaya.conf"
- encaya -conf "$(pwd)/testdata/encaya.conf" -encaya.namecoinrpcaddress 127.0.0.1:18554 -encaya.namecoinrpcusername doggman -encaya.namecoinrpcpassword donkey
regtest_script:
- sleep 15s
- testdata/regtest.sh
Expand Down
8 changes: 4 additions & 4 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
cfg Config

rootCert []byte
rootPriv interface{}

Check failure on line 51 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L51

any: interface{} can be replaced by any (modernize)

Check failure on line 51 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L51

any: interface{} can be replaced by any (modernize)
rootCertPem []byte
rootCertPemString string
rootPrivPem []byte
tldCert []byte
tldPriv interface{}

Check failure on line 56 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L56

any: interface{} can be replaced by any (modernize)

Check failure on line 56 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L56

any: interface{} can be replaced by any (modernize)
tldCertPem []byte
tldCertPemString string

Expand Down Expand Up @@ -228,8 +228,8 @@

func (s *Server) doRunListenerTCP() {
tcpSrv := &http.Server{
ReadTimeout: 5 * time.Second,

Check failure on line 231 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L231

Magic number: 5, in <assign> detected (mnd)

Check failure on line 231 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L231

Magic number: 5, in <assign> detected (mnd)
WriteTimeout: 10 * time.Second,

Check failure on line 232 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L232

Magic number: 10, in <assign> detected (mnd)

Check failure on line 232 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L232

Magic number: 10, in <assign> detected (mnd)
}

err := tcpSrv.Serve(s.tcpListener)
Expand All @@ -238,8 +238,8 @@

func (s *Server) doRunListenerTLS() {
tlsSrv := &http.Server{
ReadTimeout: 5 * time.Second,

Check failure on line 241 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L241

Magic number: 5, in <assign> detected (mnd)

Check failure on line 241 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L241

Magic number: 5, in <assign> detected (mnd)
WriteTimeout: 10 * time.Second,

Check failure on line 242 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L242

Magic number: 10, in <assign> detected (mnd)

Check failure on line 242 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L242

Magic number: 10, in <assign> detected (mnd)
}

err := tlsSrv.ServeTLS(s.tlsListener, s.cfg.ListenChain, s.cfg.ListenKey)
Expand All @@ -251,14 +251,14 @@
results := [][]byte{}

s.domainCertCacheMutex.RLock()
for _, cert := range s.domainCertCache[commonName] {

Check failure on line 254 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L254

missing whitespace above this line (invalid statement above range) (wsl_v5)

Check failure on line 254 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L254

missing whitespace above this line (invalid statement above range) (wsl_v5)
if time.Until(cert.expiration) > safetlsa.ValidityShortTerm()/2 {
needRefresh = false
}

results = append(results, cert.certDer)
}
s.domainCertCacheMutex.RUnlock()

Check failure on line 261 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L261

missing whitespace above this line (invalid statement above expr) (wsl_v5)

Check failure on line 261 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L261

missing whitespace above this line (invalid statement above expr) (wsl_v5)

return results, needRefresh
}
Expand Down Expand Up @@ -297,7 +297,7 @@
results := [][]byte{}

s.negativeCertCacheMutex.RLock()
for _, cert := range s.negativeCertCache[commonName] {

Check failure on line 300 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L300

missing whitespace above this line (invalid statement above range) (wsl_v5)

Check failure on line 300 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L300

missing whitespace above this line (invalid statement above range) (wsl_v5)
// Negative certs don't expire
needRefresh = false

Expand All @@ -306,7 +306,7 @@
// We only need 1 negative cert
break
}
s.negativeCertCacheMutex.RUnlock()

Check failure on line 309 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L309

missing whitespace above this line (invalid statement above expr) (wsl_v5)

Check failure on line 309 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L309

missing whitespace above this line (invalid statement above expr) (wsl_v5)

return results, needRefresh
}
Expand All @@ -331,7 +331,7 @@
results := [][]byte{}

s.originalCertCacheMutex.RLock()
for _, cert := range s.originalCertCache[serial] {

Check failure on line 334 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L334

missing whitespace above this line (invalid statement above range) (wsl_v5)

Check failure on line 334 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L334

missing whitespace above this line (invalid statement above range) (wsl_v5)
// Original certs don't expire
needRefresh = false

Expand All @@ -340,7 +340,7 @@
// We only need 1 original cert
break
}
s.originalCertCacheMutex.RUnlock()

Check failure on line 343 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L343

missing whitespace above this line (invalid statement above expr) (wsl_v5)

Check failure on line 343 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L343

missing whitespace above this line (invalid statement above expr) (wsl_v5)

return results, needRefresh
}
Expand Down Expand Up @@ -403,7 +403,7 @@
if err != nil {
return nil, err
}
if !ok {

Check failure on line 406 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L406

missing whitespace above this line (invalid statement above if) (wsl_v5)

Check failure on line 406 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L406

missing whitespace above this line (invalid statement above if) (wsl_v5)
return nil, nil
}

Expand All @@ -420,15 +420,15 @@

return &dns.TLSA{
Hdr: dns.RR_Header{Name: "", Rrtype: dns.TypeTLSA, Class: dns.ClassINET,
Ttl: 600},

Check failure on line 423 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L423

Magic number: 600, in <assign> detected (mnd)

Check failure on line 423 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L423

Magic number: 600, in <assign> detected (mnd)
Usage: 2,

Check failure on line 424 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L424

Magic number: 2, in <assign> detected (mnd)

Check failure on line 424 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L424

Magic number: 2, in <assign> detected (mnd)
Selector: 1,
MatchingType: 0,
Certificate: strings.ToUpper(pubHex),
}, nil
}

func (s *Server) lookupDNS(req *http.Request, domain string) (tlsa *dns.TLSA, err error) {

Check failure on line 431 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L431

cognitive complexity 52 of func `(*Server).lookupDNS` is high (> 30) (gocognit)

Check failure on line 431 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L431

cognitive complexity 52 of func `(*Server).lookupDNS` is high (> 30) (gocognit)
log.Debugf("querying for pubkey via DNS: %s", domain)

qparams := qlib.DefaultParams()
Expand Down Expand Up @@ -456,24 +456,24 @@

if result.ResponseMsg == nil {
// A DNS error occurred (nil response).
return nil, fmt.Errorf("qlib error: nil response")

Check failure on line 459 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L459

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"qlib error: nil response\")" (err113)

Check failure on line 459 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L459

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"qlib error: nil response\")" (err113)
}

dnsResponse := result.ResponseMsg
if dnsResponse.MsgHdr.Rcode != dns.RcodeSuccess && dnsResponse.MsgHdr.Rcode != dns.RcodeNameError {
if dnsResponse.Rcode != dns.RcodeSuccess && dnsResponse.Rcode != dns.RcodeNameError {
// A DNS error occurred (return code wasn't Success or NXDOMAIN).
return nil, fmt.Errorf("qlib error: return code not Success or NXDOMAIN")

Check failure on line 465 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L465

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"qlib error: return code not Success or NXDOMAIN\")" (err113)

Check failure on line 465 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L465

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"qlib error: return code not Success or NXDOMAIN\")" (err113)
}

if dnsResponse.MsgHdr.Rcode == dns.RcodeNameError {
if dnsResponse.Rcode == dns.RcodeNameError {
// Wildcard subdomain doesn't exist.
// That means the domain doesn't use Namecoin-form DANE.
// Return no cert.
log.Debugf("wildcard subdomain doesn't exist: %s", domain)
return nil, nil
}

if !dnsResponse.MsgHdr.AuthenticatedData && !dnsResponse.MsgHdr.Authoritative {
if !dnsResponse.AuthenticatedData && !dnsResponse.Authoritative {
// For security reasons, we only trust records that are
// authenticated (e.g. server is Unbound and has verified
// DNSSEC sigs) or authoritative (e.g. server is ncdns and is
Expand Down Expand Up @@ -511,7 +511,7 @@

// CA not in user's trust store; public key; unspecified hash
if tlsa.Usage == 2 && tlsa.Selector == 1 {
if tlsa.MatchingType == 0 { // Not hashed

Check failure on line 514 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L514

ifElseChain: rewrite if-else to switch statement (gocritic)

Check failure on line 514 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L514

ifElseChain: rewrite if-else to switch statement (gocritic)
tlsaPubBytes, err := hex.DecodeString(tlsa.Certificate)
if err != nil {
// TLSA record is malformed
Expand All @@ -528,7 +528,7 @@
tlsaPubSHA256 := sha256.Sum256(tlsaPubBytes)
// TODO: Special-case empty stapled pubkey. We should remove this
// special-case once stapled pubkeys are used everywhere.
//if !bytes.Equal(pubSHA256, tlsaPubSHA256[:]) {

Check failure on line 531 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L531

commentFormatting: put a space between `//` and comment text (gocritic)

Check failure on line 531 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L531

commentFormatting: put a space between `//` and comment text (gocritic)
if len(pubSHA256) > 0 && !bytes.Equal(pubSHA256, tlsaPubSHA256[:]) {
// TLSA record doesn't match requested public key hash
continue
Expand All @@ -548,7 +548,7 @@
// Fill in verified preimage into TLSA record
tlsa.MatchingType = 0
tlsa.Certificate = hex.EncodeToString(pubBytes)
} else if tlsa.MatchingType == 2 { // SHA-512

Check failure on line 551 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L551

Magic number: 2, in <condition> detected (mnd)

Check failure on line 551 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L551

Magic number: 2, in <condition> detected (mnd)
tlsaPubSHA512, err := hex.DecodeString(tlsa.Certificate)
if err != nil {
// TLSA record is malformed
Expand Down Expand Up @@ -576,10 +576,10 @@
return nil, nil
}

func (s *Server) lookupCert(req *http.Request) (certDer []byte, shortTerm bool, err error) {

Check failure on line 579 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L579

calculated cyclomatic complexity for function lookupCert is 14, max is 10 (cyclop)

Check failure on line 579 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L579

calculated cyclomatic complexity for function lookupCert is 14, max is 10 (cyclop)
commonName := req.FormValue("domain")

if commonName == "Namecoin Root CA" {

Check failure on line 582 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L582

string `Namecoin Root CA` has 3 occurrences, make it a constant (goconst)

Check failure on line 582 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L582

string `Namecoin Root CA` has 3 occurrences, make it a constant (goconst)
return s.rootCert, false, nil
}

Expand Down Expand Up @@ -661,7 +661,7 @@
func (s *Server) lookupHandler(writer http.ResponseWriter, req *http.Request) {
writer.Header().Set("Content-Type", "application/x-pem-file")

commonName := req.FormValue("domain")

Check failure on line 664 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L664

G120: Parsing form data without limiting request body size can allow memory exhaustion (use http.MaxBytesReader) (gosec)

log.Debugf("PEM lookup: %s", commonName)

Expand Down Expand Up @@ -709,7 +709,7 @@
func (s *Server) aiaHandler(writer http.ResponseWriter, req *http.Request) {
writer.Header().Set("Content-Type", "application/pkix-cert")

commonName := req.FormValue("domain")

Check failure on line 712 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L712

G120: Parsing form data without limiting request body size can allow memory exhaustion (use http.MaxBytesReader) (gosec)

log.Debugf("DER lookup: %s", commonName)

Expand All @@ -728,13 +728,13 @@

if shortTerm {
// Set short-term caching duration of half the cert validity
maxAge := safetlsa.ValidityShortTerm() / 2

Check failure on line 731 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L731

Magic number: 2, in <operation> detected (mnd)

Check failure on line 731 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L731

Magic number: 2, in <operation> detected (mnd)
maxAgeSeconds := int(maxAge / time.Second)
maxAgeStr := strconv.Itoa(maxAgeSeconds)
writer.Header().Set("Cache-Control", "max-age="+maxAgeStr)
}

_, err = io.WriteString(writer, string(requestedCert))
_, err = writer.Write(requestedCert)

Check failure on line 737 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux New

server/server.go#L737

G705: XSS via taint analysis (gosec)

Check failure on line 737 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L737

G705: XSS via taint analysis (gosec)

Check failure on line 737 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows New

server/server.go#L737

G705: XSS via taint analysis (gosec)

Check failure on line 737 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L737

G705: XSS via taint analysis (gosec)
if err != nil {
log.Debuge(err, "write error")
}
Expand All @@ -752,7 +752,7 @@
})
restrictCertPemString := string(restrictCertPem)

restrictPrivBytes, err := x509.MarshalECPrivateKey(restrictPriv.(*ecdsa.PrivateKey))

Check failure on line 755 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L755

right hand must be only type assertion (forcetypeassert)

Check failure on line 755 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L755

right hand must be only type assertion (forcetypeassert)
if err != nil {
log.Debuge(err, "Unable to marshal ECDSA private key")
}
Expand Down Expand Up @@ -782,9 +782,9 @@
func (s *Server) crossSignCAHandler(writer http.ResponseWriter, req *http.Request) {
var err error

toSignPEM := req.FormValue("to-sign")

Check failure on line 785 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L785

G120: Parsing form data without limiting request body size can allow memory exhaustion (use http.MaxBytesReader) (gosec)
signerCertPEM := req.FormValue("signer-cert")

Check failure on line 786 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L786

G120: Parsing form data without limiting request body size can allow memory exhaustion (use http.MaxBytesReader) (gosec)
signerKeyPEM := req.FormValue("signer-key")

Check failure on line 787 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L787

G120: Parsing form data without limiting request body size can allow memory exhaustion (use http.MaxBytesReader) (gosec)

cacheKeyArray := sha256.Sum256([]byte(toSignPEM + "\n\n" + signerCertPEM + "\n\n" + signerKeyPEM + "\n\n"))
cacheKey := hex.EncodeToString(cacheKeyArray[:])
Expand Down Expand Up @@ -835,7 +835,7 @@
}

func (s *Server) originalFromSerialHandler(writer http.ResponseWriter, req *http.Request) {
serial := req.FormValue("serial")

Check failure on line 838 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L838

G120: Parsing form data without limiting request body size can allow memory exhaustion (use http.MaxBytesReader) (gosec)

cacheResults, needRefresh := s.getCachedOriginalFromSerial(serial)
if !needRefresh {
Expand All @@ -843,7 +843,7 @@
}
}

func GenerateCerts(cfg *Config) {

Check failure on line 846 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L846

calculated cyclomatic complexity for function GenerateCerts is 13, max is 10 (cyclop)

Check failure on line 846 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L846

calculated cyclomatic complexity for function GenerateCerts is 13, max is 10 (cyclop)
var (
err error
listenCertPem []byte
Expand Down Expand Up @@ -888,7 +888,7 @@
})
srv.tldCertPemString = string(srv.tldCertPem)

serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)

Check failure on line 891 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L891

Magic number: 128, in <argument> detected (mnd)

Check failure on line 891 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L891

Magic number: 128, in <argument> detected (mnd)

serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
if err != nil {
Expand All @@ -912,7 +912,7 @@
SerialNumber: "Namecoin TLS Certificate",
},
NotBefore: time.Now().Add(-1 * time.Hour),
NotAfter: time.Now().Add(43800 * time.Hour),

Check failure on line 915 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L915

Magic number: 43800, in <argument> detected (mnd)

Check failure on line 915 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L915

Magic number: 43800, in <argument> detected (mnd)

KeyUsage: x509.KeyUsageDigitalSignature,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
Expand Down Expand Up @@ -943,12 +943,12 @@
Bytes: listenPrivBytes,
})

err = os.WriteFile(srv.cfg.RootCert, srv.rootCertPem, 0600)

Check failure on line 946 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L946

Magic number: 0600, in <argument> detected (mnd)

Check failure on line 946 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L946

Magic number: 0600, in <argument> detected (mnd)
if err != nil {
log.Fatalef(err, "Unable to write %s", srv.cfg.RootCert)
}

err = os.WriteFile(srv.cfg.RootKey, srv.rootPrivPem, 0600)

Check failure on line 951 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L951

Magic number: 0600, in <argument> detected (mnd)

Check failure on line 951 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L951

Magic number: 0600, in <argument> detected (mnd)
if err != nil {
log.Fatalef(err, "Unable to write %s", srv.cfg.RootKey)
}
Expand All @@ -956,7 +956,7 @@
listenChainPemString := listenCertPemString + "\n\n" + srv.tldCertPemString + "\n\n" + srv.rootCertPemString
listenChainPem := []byte(listenChainPemString)

err = os.WriteFile(srv.cfg.ListenChain, listenChainPem, 0600)

Check failure on line 959 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint windows

server/server.go#L959

Magic number: 0600, in <argument> detected (mnd)

Check failure on line 959 in server/server.go

View check run for this annotation

Cirrus CI / Go Lint linux

server/server.go#L959

Magic number: 0600, in <argument> detected (mnd)
if err != nil {
log.Fatalef(err, "Unable to write %s", srv.cfg.ListenChain)
}
Expand Down
Loading
Loading