Code example for X509Certificate

Methods: getIssuerDN, getSubjectDN

0
 
			return; 
		} 
		System.out.println(session.getPeerHost()
				+ " has presented a certificate belonging to" + "[" 
				+ cert.getSubjectDN() + "]\n"
				+ "The certificate was issued by: \t" + "[" 
				+ cert.getIssuerDN() + "]");
 
	} 
 
	public static void main(String[] args) throws Exception {
 
		SSLServerSocket serverSocket = SSLSecurity.getSSLServerSocket(
				CERT_SERVER, PASSWORD_SERVER, CERT_CA, PASSWORD_CA, PORT);
 
		new Test().start();
 
		SSLSocket socket = (SSLSocket) serverSocket.accept();
		try { 
			socket.startHandshake();