Country field with more than two English characters.
Main content:
Hello Developer, I have a CRL file where the Country value in the Issuer field is "USA." Normally, ISO 3166-1 specifies two English characters to represent a country name. Bouncy Castle 1.79 successfully printed the Issuer field information of this CRL file without any errors. So I would like to ask if this is a bug.
Version of Bouncy Castle used:
(bcprov-jdk18on-1.79.jar:bcpkix-jdk18on-1.79.jar)
Computer system: Ubuntu
How reproducible:
javac -cp ".:bcprov-jdk18on-1.79.jar:bcpkix-jdk18on-1.79.jar" CRLParserExample_USA_issuer.java
java -cp ".:bcprov-jdk18on-1.79.jar:bcpkix-jdk18on-1.79.jar" CRLParserExample_USA_issuer
Test case:
I would not say this is a bug. Is it useful to do this, another question altogether? It is tempting to try and stop people constructing wrong country codes, but that could well blow up as well - DNs are a bit of a free for all.