From 7484123c906138e57b20a76df0eeb94ea882c137 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 31 Mar 2023 08:56:24 +0800 Subject: [PATCH] smx509: remove unnecessary !Empty() check --- smx509/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smx509/parser.go b/smx509/parser.go index bac32c8..58f24b8 100644 --- a/smx509/parser.go +++ b/smx509/parser.go @@ -362,7 +362,7 @@ func parseBasicConstraintsExtension(der cryptobyte.String) (bool, int, error) { } } maxPathLen := -1 - if !der.Empty() && der.PeekASN1Tag(cryptobyte_asn1.INTEGER) { + if der.PeekASN1Tag(cryptobyte_asn1.INTEGER) { if !der.ReadASN1Integer(&maxPathLen) { return false, 0, errors.New("x509: invalid basic constraints c") }