Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The range of IA5String #853

Open
zzzsz opened this issue Jun 12, 2024 · 3 comments
Open

The range of IA5String #853

zzzsz opened this issue Jun 12, 2024 · 3 comments

Comments

@zzzsz
Copy link

zzzsz commented Jun 12, 2024

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
}

@CBonnell
Copy link
Contributor

See clauses 35 (b) (c), and clause 38 of X.680 2002-07 for the character repertoire of IA5String.

@cardonator
Copy link
Contributor

It does seem like a comment pointing to the spec would be helpful there.

@zzzsz
Copy link
Author

zzzsz commented Jun 13, 2024

有关 的字符集,请参阅X.680 2002-07的第 35(b)(c)条和第 38 条IA5String

Thank you for clearing up my confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants