Hi,

In our application we generate certificates for internal entities like
platform and user. Our internal entities are identified by custom DNs:

  • Platform DN: p=platformName
  • User DN: cn=userName,p=platformName



We tried to generate X.509 certificate for platform or user with BouncyCastle library:

Java Code:
 X509Principal subject = new X509Principal(new
X500Principal("p=platformName").getEncoded());
However, it does not accept/recognize keyword "P" or require certain
keywords like "CN" in certificate subject DN:

Java Code:
java.lang.IllegalArgumentException: improperly specified input name:
p=platformName
In openssl this problem requires introducing new OIDs for DN attributes.

How to issue certificate to an entity with custom DN format?

Thank you,
Maciej