public CertificateToken(X509Certificate x509Certificate){
  if (x509Certificate == null) {
    throw new NullPointerException("X509 certificate is missing");
  }
  this.x509Certificate=x509Certificate;
  this.issuerX500Principal=x509Certificate.getIssuerX500Principal();
  this.signatureAlgorithm=SignatureAlgorithm.forOID(x509Certificate.getSigAlgOID());
  this.digestAlgorithm=signatureAlgorithm.getDigestAlgorithm();
  this.encryptionAlgorithm=signatureAlgorithm.getEncryptionAlgorithm();
  super.extraInfo=this.extraInfo=new CertificateTokenValidationExtraInfo();
}

public CertificateToken ( X509Certificate x509Certificate ) { if ( x509Certificate == null ) { throw new NullPointerException ( "X509 certificate is missing" ) ; } this . x509Certificate = x509Certificate ; this . issuerX500Principal = x509Certificate . getIssuerX500Principal ( ) ; this . signatureAlgorithm = SignatureAlgorithm . forOID ( x509Certificate . getSigAlgOID ( ) ) ; this . digestAlgorithm = signatureAlgorithm . getDigestAlgorithm ( ) ; this . encryptionAlgorithm = signatureAlgorithm . getEncryptionAlgorithm ( ) ; super . extraInfo = this . extraInfo = new CertificateTokenValidationExtraInfo ( ) ; }
creates a certificatetoken wrapping the provided x509certificate .
