Get Common Name from X509 Certificate

We can Extract CommonName from a X509Certificate.We can use bouncycastle provider from this implementaion.And code like this.

String  commonName= (String)PrincipalUtil.getIssuerX509Principal(certificate).getValues(X509Name.CN).get(0);


Reactions

Post a Comment

0 Comments