mirror of
https://github.com/blacktop/ipsw.git
synced 2026-06-07 12:27:36 +00:00
23 lines
414 B
Go
23 lines
414 B
Go
package rootcert
|
|
|
|
import (
|
|
"crypto/x509"
|
|
_ "embed"
|
|
"fmt"
|
|
)
|
|
|
|
// https://www.apple.com/appleca/AppleIncRootCertificate.cer
|
|
//
|
|
//go:embed data/root.cer
|
|
var appleRootCert []byte
|
|
|
|
var AppleRootCA = NewAppleCert(appleRootCert)
|
|
|
|
func NewAppleCert(crt []byte) *x509.Certificate {
|
|
cert, err := x509.ParseCertificate(crt)
|
|
if err != nil {
|
|
panic(fmt.Errorf("rootcert: could not parse cert: %w", err))
|
|
}
|
|
return cert
|
|
}
|