Code example for X509Certificate

Methods: getTBSCertificate

0
	 * @param cert an X509Certificate 
	 * @return an X500Name 
	 */ 
	public static X500Name getIssuerFields(X509Certificate cert) {
	    try { 
	        return new X500Name((ASN1Sequence)CertificateInfo.getIssuer(cert.getTBSCertificate()));
	    } 
	    catch (Exception e) {
	        throw new ExceptionConverter(e);
	    } 
	} 
 
	/** 
	 * Get the "issuer" from the TBSCertificate bytes that are passed in 
	 * @param enc a TBSCertificate in a byte array 
	 * @return a ASN1Primitive 
	 */ 
	public static ASN1Primitive getIssuer(byte[] enc) {
	    try { 
	        ASN1InputStream in = new ASN1InputStream(new ByteArrayInputStream(enc));
	        ASN1Sequence seq = (ASN1Sequence)in.readObject();