Skip to content

Commit

Permalink
crypto: return err instead of nil
Browse files Browse the repository at this point in the history
Fixed: #50663
  • Loading branch information
cuiweixie committed Jan 18, 2022
1 parent 897b3da commit 2af70aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/x509/x509.go
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,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, err
}
return ext, nil
}
Expand Down

0 comments on commit 2af70aa

Please sign in to comment.