public static X509CertificateHolder getX509CertificateHolder ( CertifiedPublicKey cert ) { if ( cert instanceof BcX509CertifiedPublicKey ) { return ( ( BcX509CertifiedPublicKey ) cert ) . getX509CertificateHolder ( ) ; } else { try { return new X509CertificateHolder ( cert . getEncoded ( ) ) ; } catch ( IOException e ) { // Very unlikely throw new IllegalArgumentException ( "Invalid certified public key, unable to encode." ) ; } } }
Convert certified public key to certificate holder .