Java tutorial
//package com.java2s; //License from project: LGPL import java.security.cert.X509Certificate; import javax.security.auth.x500.X500Principal; public class Main { protected static X500Principal getSubjectPrincipal(X509Certificate cert) { return cert.getSubjectX500Principal(); } }