Skip to content

Commit

Permalink
crypto/x509: return err ans1.Marshal gives an error
Browse files Browse the repository at this point in the history
  • Loading branch information
cuiweixie committed Jan 21, 2022
1 parent 897b3da commit fcb6a29
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/crypto/x509/x509.go
Original file line number Diff line number Diff line change
Expand Up @@ -1307,10 +1307,7 @@ func marshalBasicConstraints(isCA bool, maxPathLen int, maxPathLenZero bool) (pk
}
var err error
ext.Value, err = asn1.Marshal(basicConstraints{isCA, maxPathLen})
if err != nil {
return ext, nil
}
return ext, nil
return ext, err
}

func marshalCertificatePolicies(policyIdentifiers []asn1.ObjectIdentifier) (pkix.Extension, error) {
Expand Down

0 comments on commit fcb6a29

Please sign in to comment.