From ee1735b01b8fc561a9748b5d87ddcebfee1fc275 Mon Sep 17 00:00:00 2001 From: Liam Murphy Date: Tue, 26 Mar 2024 01:41:59 +0000 Subject: [PATCH] Just add critical bool to MarshalSubjectAltName --- x509/x509ext.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/x509/x509ext.go b/x509/x509ext.go index c7a83db9..bc780d64 100644 --- a/x509/x509ext.go +++ b/x509/x509ext.go @@ -149,14 +149,9 @@ func forEachSAN(extension []byte, callback func(ext asn1.RawValue) error) error return nil } -// MarshalSubjectAltName converts a SubjectAltName struct into a pkix.Extension. -func MarshalSubjectAltName(san *SubjectAltName) (pkix.Extension, error) { - return MarshalSubjectAltNameWithCriticality(san, false) -} - -// MarshalSubjectAltNameWithCriticality converts a SubjectAltName struct into a pkix.Extension, +// MarshalSubjectAltName converts a SubjectAltName struct into a pkix.Extension, // allowing callers to specify if the extension is critical. -func MarshalSubjectAltNameWithCriticality(san *SubjectAltName, critical bool) (pkix.Extension, error) { +func MarshalSubjectAltName(san *SubjectAltName, critical bool) (pkix.Extension, error) { var generalNames []asn1.RawValue for _, permID := range san.PermanentIdentifiers { val, err := marshalOtherName(oidPermanentIdentifier, permID)