use a more specific type

This commit is contained in:
Andrew Ayer 2025-05-01 19:23:25 -04:00
parent 0cd0c7d602
commit 0dbe647121
3 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ type Entry interface {
ExtraData(context.Context, IssuerGetter) ([]byte, error)
// Returns an error if this is not a well-formed precert entry
Precertificate() ([]byte, error)
Precertificate() (cttypes.ASN1Cert, error)
// Returns an error if this is not a well-formed x509 or precert entry
ChainFingerprints() ([][32]byte, error)

View File

@ -172,7 +172,7 @@ func (entry *RFC6962LogEntry) ExtraData(context.Context, IssuerGetter) ([]byte,
return entry.Extra_data, nil
}
func (entry *RFC6962LogEntry) Precertificate() ([]byte, error) {
func (entry *RFC6962LogEntry) Precertificate() (cttypes.ASN1Cert, error) {
if !entry.isPrecert() {
return nil, fmt.Errorf("not a precertificate entry")
}

View File

@ -347,7 +347,7 @@ func (entry *StaticLogEntry) ExtraData(ctx context.Context, issuerGetter IssuerG
return b.Bytes()
}
func (entry *StaticLogEntry) Precertificate() ([]byte, error) {
func (entry *StaticLogEntry) Precertificate() (cttypes.ASN1Cert, error) {
if entry.precertificate == nil {
return nil, fmt.Errorf("not a precertificate entry")
}