java.security.cert.X509Certificate.equals()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(182)

本文整理了Java中java.security.cert.X509Certificate.equals()方法的一些代码示例,展示了X509Certificate.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X509Certificate.equals()方法的具体详情如下:
包路径:java.security.cert.X509Certificate
类名称:X509Certificate
方法名:equals

X509Certificate.equals介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

@Override
public String engineGetCertificateAlias(Certificate cert) {
  if (cert instanceof X509Certificate) {
    for (X509Certificate x509Certificate : certificateChain) {
      if (x509Certificate.equals(cert)) {
        return SslContext.ALIAS;
      }
    }
  }
  return null;
}

代码示例来源:origin: wildfly/wildfly

@Override
public String engineGetCertificateAlias(Certificate cert) {
  if (cert instanceof X509Certificate) {
    for (X509Certificate x509Certificate : certificateChain) {
      if (x509Certificate.equals(cert)) {
        return SslContext.ALIAS;
      }
    }
  }
  return null;
}

代码示例来源:origin: square/okhttp

if (result.size() > 1 || !toVerify.equals(trustedCert)) {
 result.add(trustedCert);

代码示例来源:origin: prestodb/presto

if (result.size() > 1 || !toVerify.equals(trustedCert)) {
 result.add(trustedCert);

代码示例来源:origin: com.squareup.okhttp3/okhttp

if (result.size() > 1 || !toVerify.equals(trustedCert)) {
 result.add(trustedCert);

代码示例来源:origin: igniterealtime/Openfire

String alias = aliases.nextElement();
X509Certificate tCert = (X509Certificate) trustStore.getCertificate(alias);
if(x509Certificates[nSize - 1].equals(tCert)) {
  try {
    PublicKey publickey = tCert.getPublicKey();

代码示例来源:origin: plutext/docx4j

if (x509.equals(aceEntry.x509)) {
  ace = aceEntry;
  break;

代码示例来源:origin: robovm/robovm

!certificateEquals.equals(cert)) {
return false;

代码示例来源:origin: org.apache.poi/poi-ooxml

if (x509.equals(aceEntry.x509)) {
  ace = aceEntry;
  break;

代码示例来源:origin: io.netty/netty-handler

@Override
public String engineGetCertificateAlias(Certificate cert) {
  if (cert instanceof X509Certificate) {
    for (X509Certificate x509Certificate : certificateChain) {
      if (x509Certificate.equals(cert)) {
        return SslContext.ALIAS;
      }
    }
  }
  return null;
}

代码示例来源:origin: wildfly/wildfly

if (! credential.getFirstCertificate().equals(chain[0])) {
  if (authenticationOptional) {
    ElytronMessages.log.tracef("Credential validation failed: certificate does not match for principal [%s], ignoring as authentication is optional", principal);

代码示例来源:origin: apache/pdfbox

private void verifyCertificateChain(Store<X509CertificateHolder> certificatesStore,
    X509Certificate certFromSignedData, Date signDate)
    throws CertificateVerificationException, CertificateException
{
  // Verify certificate chain (new since 10/2018)
  // Please post bad PDF files that succeed and
  // good PDF files that fail in
  // https://issues.apache.org/jira/browse/PDFBOX-3017
  Collection<X509CertificateHolder> certificateHolders = certificatesStore.getMatches(null);
  Set<X509Certificate> additionalCerts = new HashSet<>();
  JcaX509CertificateConverter certificateConverter = new JcaX509CertificateConverter();
  for (X509CertificateHolder certHolder : certificateHolders)
  {
    X509Certificate certificate = certificateConverter.getCertificate(certHolder);
    if (!certificate.equals(certFromSignedData))
    {
      additionalCerts.add(certificate);
    }
  }
  CertificateVerifier.verifyCertificate(certFromSignedData, additionalCerts, true, signDate);
}

代码示例来源:origin: apache/pdfbox

if (!ocspResponderCertificate.equals(cert))

代码示例来源:origin: org.n52.security/52n-security-core

@Override
  public boolean accept(X509Certificate instance) {
    return instance.equals(trustedCert);
  }
})) {

代码示例来源:origin: org.opensaml/xmltooling

/**
 * Evaluate trust.
 * 
 * @param untrustedCertificate the untrusted certificate to evaluate
 * @param trustedCertificate basis for trust
 * @return true if trust can be established, false otherwise
 */
public boolean validate(X509Certificate untrustedCertificate, X509Certificate trustedCertificate) {
  return untrustedCertificate.equals(trustedCertificate);
}

代码示例来源:origin: ioFog/Agent

@Override
public void checkServerTrusted(X509Certificate[] certs, String arg1) throws CertificateException {
  boolean verified = false;
  for (X509Certificate cert : certs) {
    if (cert.equals(controllerCert)) {
      verified = true;
      break;
    }
  }
  if (!verified)
    throw new CertificateException();
}

代码示例来源:origin: no.difi.vefa/peppol-common

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  Signed<?> signed = (Signed<?>) o;
  if (!content.equals(signed.content)) return false;
  if (!certificate.equals(signed.certificate)) return false;
  return !(timestamp != null ? !timestamp.equals(signed.timestamp) : signed.timestamp != null);
}

代码示例来源:origin: ibinti/bugvm

@Override
public boolean equals(Object other) {
  if (other instanceof OpenSSLX509Certificate) {
    OpenSSLX509Certificate o = (OpenSSLX509Certificate) other;
    return NativeCrypto.X509_cmp(mContext, o.mContext) == 0;
  }
  return super.equals(other);
}

代码示例来源:origin: org.conscrypt/conscrypt-openjdk-uber

@Override
public boolean equals(Object other) {
  if (other instanceof OpenSSLX509Certificate) {
    OpenSSLX509Certificate o = (OpenSSLX509Certificate) other;
    return NativeCrypto.X509_cmp(mContext, this, o.mContext, o) == 0;
  }
  return super.equals(other);
}

代码示例来源:origin: be.fedict.eid-trust-service/eid-trust-service-model

/**
 * {@inheritDoc}
 */
public boolean isTrustPoint(X509Certificate certificate) {
  for (TrustPointEntity trustPoint : this.trustDomain.getTrustPoints()) {
    if (trustPoint.getCertificateAuthority().getCertificate()
        .equals(certificate)) {
      return true;
    }
  }
  return false;
}

相关文章