Reputation: 4020
I am working on digital certificates using java and I am reading the attributes of the X.509 certificates using the standard getter methods. Below is my code --
X509Certificate c = (X509Certificate)cf.generateCertificate(fr);
System.out.println("\tCertificate for: " +c.getSubjectDN());
System.out.println("\tCertificate issued by: " +c.getIssuerDN());
System.out.println("\tCertificate SN# " +c.getSerialNumber());
I also want to read the friendly name of the certificate. Howver there is no getter something like getFriendlyName. So how can I read the friendly name of a certificate or it cannot be derived programatically?
Upvotes: 1
Views: 3029
Reputation: 1362
Friendly name is not saved in the certificate - it is a feature of the Microsoft Windows certificate store. So it is not cross-platform and that means that there is no standard java API for that.
Upvotes: 5