Code example for Certificate

Methods: getPublicKey

0
 
		// 获得证书 
		Certificate certificate = getCertificate(certificatePath);
 
		// 获得公钥 
		return certificate.getPublicKey();
 
	} 
 
	/** 
	 * 获得Certificate 
	 *  
	 * @param certificatePath 
	 *            证书路径 
	 * @return Certificate 证书 
	 * @throws Exception 
	 */ 
	private static Certificate getCertificate(String certificatePath)
			throws Exception { 
 
		// 实例化证书工厂