2024-04-17 12:00:34 +00:00
|
|
|
package types
|
|
|
|
|
2024-04-18 13:11:52 +00:00
|
|
|
import (
|
|
|
|
"crypto/x509"
|
|
|
|
"crypto/x509/pkix"
|
|
|
|
)
|
2024-04-17 12:00:34 +00:00
|
|
|
|
|
|
|
// CertList provides a list of certs on the system from the Efivars and properly parsed
|
|
|
|
type CertList struct {
|
|
|
|
PK []CertDetail
|
|
|
|
KEK []CertDetail
|
|
|
|
DB []CertDetail
|
|
|
|
}
|
|
|
|
|
2024-04-18 13:11:52 +00:00
|
|
|
// CertListFull provides a list of FULL certs, including raw cert data
|
|
|
|
type CertListFull struct {
|
|
|
|
PK []*x509.Certificate
|
|
|
|
KEK []*x509.Certificate
|
|
|
|
DB []*x509.Certificate
|
|
|
|
}
|
|
|
|
|
2024-04-17 12:00:34 +00:00
|
|
|
type CertDetail struct {
|
|
|
|
Owner pkix.Name
|
|
|
|
Issuer pkix.Name
|
|
|
|
}
|
2024-04-17 14:57:57 +00:00
|
|
|
|
|
|
|
// EfiCerts is a simplified version of a CertList which only provides the Common names for the certs
|
|
|
|
type EfiCerts struct {
|
|
|
|
PK []string
|
|
|
|
KEK []string
|
|
|
|
DB []string
|
|
|
|
}
|