Skip to content

Commit

Permalink
Fixed ca-certs generation (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer authored Oct 15, 2024
1 parent 1ff33b7 commit e5aaa24
Show file tree
Hide file tree
Showing 2 changed files with 2,062 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/build/dependencies-ca-certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"encoding/hex"
"encoding/pem"
"fmt"
"io"
Expand Down Expand Up @@ -107,10 +108,15 @@ func (this *dependenciesCaCerts) generate(ctx context.Context, to io.Writer) err
if err := ctx.Err(); err != nil {
return err
}
if cert.Trust != certparse.ServerTrustedDelegator {
if (cert.Trust & certparse.ServerTrustedDelegator) == 0 {
continue
}

log.With("subject", cert.Cert.Subject).
With("label", cert.Label).
With("serial", hex.EncodeToString(cert.Cert.SerialNumber.Bytes())).
Trace("ca cert added")

if err := pem.Encode(to, &pem.Block{
Type: "CERTIFICATE",
Bytes: cert.Data,
Expand Down
Loading

0 comments on commit e5aaa24

Please sign in to comment.