mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-12 12:06:18 +08:00
smx509: remove unnecessary !Empty() check
This commit is contained in:
parent
e8c96eff71
commit
7484123c90
@ -362,7 +362,7 @@ func parseBasicConstraintsExtension(der cryptobyte.String) (bool, int, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
maxPathLen := -1
|
maxPathLen := -1
|
||||||
if !der.Empty() && der.PeekASN1Tag(cryptobyte_asn1.INTEGER) {
|
if der.PeekASN1Tag(cryptobyte_asn1.INTEGER) {
|
||||||
if !der.ReadASN1Integer(&maxPathLen) {
|
if !der.ReadASN1Integer(&maxPathLen) {
|
||||||
return false, 0, errors.New("x509: invalid basic constraints c")
|
return false, 0, errors.New("x509: invalid basic constraints c")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user