Open zzzsz opened 5 months ago
See clauses 35 (b) (c), and clause 38 of X.680 2002-07 for the character repertoire of IA5String
.
It does seem like a comment pointing to the spec would be helpful there.
有关 的字符集,请参阅X.680 2002-07的第 35(b)(c)条和第 38 条
IA5String
。
Thank you for clearing up my confusion.
I noticed that Zlint judges the range of IA5String as follows, I'd like to know where I can find the definition of the IA5String range. All I saw in RFC5280 is: “IA5String is limited to the set of ASCII characters.” But this only proves that IA5String is less than or equal to ASCII, but does not mean it is equal to ASCII. In the following range determination, the range determination basis of ASCII is used.
// IsIA5String returns true if raw is an IA5String, and returns false otherwise. func IsIA5String(raw []byte) bool { for _, b := range raw { i := int(b) if i > 127 || i < 0 { return false } } return true }