Only ST, not S and SP accepted for State or Province,
Currently the code that parses the Distinguished Name (DN) in the Bouncy Castle certificate parser is only able to recognize ST for State or Province. Although this is the preferred identifier, the older S and SP should also be recognized. Currently I have received a certificate that uses S instead of ST, and when I try to retrieve the field BC will try and retrieve it using the OID (2.5.4.8). However, that will return null - and I don't see any other way to directly access S or SP.
This seems to go for most X500 "styles" such as BCStyle:
public static final ASN1ObjectIdentifier ST = new ASN1ObjectIdentifier("2.5.4.8").intern();
The certificate can't be using S or ST it will be using the OID "2.5.4.8". You are welcome to parse string representations as you wish.
@owlstead @dghgit can this issue be closed?