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);
0 Comments