code: public static String getIdentity(X509Certificate cert) {
      	if (cert == null) {
      		return null;
      	}
  
      	String subjectDN = cert.getSubjectX500Principal().getName(X500Principal.RFC2253);
      	X509Name name = new X509Name(true, subjectDN);
  	    return X509NameHelper.toString(name);
      }
docs: Returns the subject DN of the given certificate in the Globus format.
  
  @param cert the certificate to get the subject of. The certificate
  must be of <code>X509CertificateObject</code> type.
  @return the subject DN of the certificate in the Globus format.