Skip to content

Commit

Permalink
Disable certs list in state (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka committed May 14, 2024
1 parent d16d672 commit c643cb5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/itchyny/gojq"
"github.com/jaypipes/ghw"
"github.com/jaypipes/ghw/pkg/block"
"github.com/kairos-io/kairos-sdk/signatures"
"github.com/kairos-io/kairos-sdk/types"
"github.com/kairos-io/kairos-sdk/utils"
"github.com/rs/zerolog"
Expand Down Expand Up @@ -326,7 +325,9 @@ func detectKairos(r *Runtime) {
k.Version = v
}
k.Init = utils.GetInit()
k.EfiCerts = getEfiCertsCommonNames()
// go-uefi calls os.exit directly if it fails which breaks state. we cannot tolerate that as for us state is
// mainly optional data, not a failure if we cant find it
//k.EfiCerts = getEfiCertsCommonNames()
k.SecureBoot = efi.GetSecureBoot()
r.Kairos = *k

Expand Down Expand Up @@ -359,8 +360,10 @@ func detectEncryptedPartitions(runtime *Runtime) {
}

// getEfiCertsCommonNames returns a simple list of the Common names of the certs
/*
func getEfiCertsCommonNames() types.EfiCerts {
var data types.EfiCerts
certs, _ := signatures.GetAllCerts() // Ignore errors here, we dont care about them, we only want the presentation of the names
for _, c := range certs.PK {
data.PK = append(data.PK, c.Issuer.CommonName)
Expand All @@ -373,6 +376,7 @@ func getEfiCertsCommonNames() types.EfiCerts {
}
return data
}
*/

func NewRuntimeWithLogger(logger zerolog.Logger) (Runtime, error) {
logger.Info().Msg("creating a runtime")
Expand Down

0 comments on commit c643cb5

Please sign in to comment.