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

x33g5p2x  于2022-01-18 转载在 其他  
字(10.8k)|赞(0)|评价(0)|浏览(101)

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

CertPath.equals介绍

[英]Returns true if Certificates in the list are the same type and the lists are equal (and by implication the certificates contained within are the same).
[中]

代码示例

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

/**
 * Compares the specified object with this {@code Timestamp} for equality
 * and returns {@code true} if the specified object is equal, {@code false}
 * otherwise. The given object is equal to this {@code Timestamp}, if it is
 * an instance of {@code Timestamp}, the two timestamps have an equal date
 * and time and their certificate paths are equal.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            Timestamp}.
 * @return {@code true} if the specified object is equal to this {@code
 *         Timestamp}, otherwise {@code false}.
 * @see #hashCode
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof Timestamp) {
    Timestamp that = (Timestamp) obj;
    return timestamp.equals(that.timestamp)
        && signerCertPath.equals(that.signerCertPath);
  }
  return false;
}

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

/**
 * Compares the specified object with this {@code CodeSigner} for equality.
 * Returns {@code true} if the specified object is also an instance of
 * {@code CodeSigner}, the two {@code CodeSigner} encapsulate the same
 * certificate path and the same time stamp, if present in both.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            CodeSigner}.
 * @return {@code true} if the specified object is equal to this {@code
 *         CodeSigner}, otherwise {@code false}.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof CodeSigner) {
    CodeSigner that = (CodeSigner) obj;
    if (!signerCertPath.equals(that.signerCertPath)) {
      return false;
    }
    return timestamp == null ? that.timestamp == null : timestamp
        .equals(that.timestamp);
  }
  return false;
}

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

/**
 * Compares the specified object with this {@code Timestamp} for equality
 * and returns {@code true} if the specified object is equal, {@code false}
 * otherwise. The given object is equal to this {@code Timestamp}, if it is
 * an instance of {@code Timestamp}, the two timestamps have an equal date
 * and time and their certificate paths are equal.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            Timestamp}.
 * @return {@code true} if the specified object is equal to this {@code
 *         Timestamp}, otherwise {@code false}.
 * @see #hashCode
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof Timestamp) {
    Timestamp that = (Timestamp) obj;
    return timestamp.equals(that.timestamp)
        && signerCertPath.equals(that.signerCertPath);
  }
  return false;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Compares the specified object with this {@code Timestamp} for equality
 * and returns {@code true} if the specified object is equal, {@code false}
 * otherwise. The given object is equal to this {@code Timestamp}, if it is
 * an instance of {@code Timestamp}, the two timestamps have an equal date
 * and time and their certificate paths are equal.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            Timestamp}.
 * @return {@code true} if the specified object is equal to this {@code
 *         Timestamp}, otherwise {@code false}.
 * @see #hashCode
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof Timestamp) {
    Timestamp that = (Timestamp) obj;
    return timestamp.equals(that.timestamp)
        && signerCertPath.equals(that.signerCertPath);
  }
  return false;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Compares the specified object with this {@code Timestamp} for equality
 * and returns {@code true} if the specified object is equal, {@code false}
 * otherwise. The given object is equal to this {@code Timestamp}, if it is
 * an instance of {@code Timestamp}, the two timestamps have an equal date
 * and time and their certificate paths are equal.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            Timestamp}.
 * @return {@code true} if the specified object is equal to this {@code
 *         Timestamp}, otherwise {@code false}.
 * @see #hashCode
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof Timestamp) {
    Timestamp that = (Timestamp) obj;
    return timestamp.equals(that.timestamp)
        && signerCertPath.equals(that.signerCertPath);
  }
  return false;
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Compares the specified object with this {@code Timestamp} for equality
 * and returns {@code true} if the specified object is equal, {@code false}
 * otherwise. The given object is equal to this {@code Timestamp}, if it is
 * an instance of {@code Timestamp}, the two timestamps have an equal date
 * and time and their certificate paths are equal.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            Timestamp}.
 * @return {@code true} if the specified object is equal to this {@code
 *         Timestamp}, otherwise {@code false}.
 * @see #hashCode
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof Timestamp) {
    Timestamp that = (Timestamp) obj;
    return timestamp.equals(that.timestamp)
        && signerCertPath.equals(that.signerCertPath);
  }
  return false;
}

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

/**
 * Compares the specified object with this {@code Timestamp} for equality
 * and returns {@code true} if the specified object is equal, {@code false}
 * otherwise. The given object is equal to this {@code Timestamp}, if it is
 * an instance of {@code Timestamp}, the two timestamps have an equal date
 * and time and their certificate paths are equal.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            Timestamp}.
 * @return {@code true} if the specified object is equal to this {@code
 *         Timestamp}, otherwise {@code false}.
 * @see #hashCode
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof Timestamp) {
    Timestamp that = (Timestamp) obj;
    return timestamp.equals(that.timestamp)
        && signerCertPath.equals(that.signerCertPath);
  }
  return false;
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Compares the specified object with this {@code Timestamp} for equality
 * and returns {@code true} if the specified object is equal, {@code false}
 * otherwise. The given object is equal to this {@code Timestamp}, if it is
 * an instance of {@code Timestamp}, the two timestamps have an equal date
 * and time and their certificate paths are equal.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            Timestamp}.
 * @return {@code true} if the specified object is equal to this {@code
 *         Timestamp}, otherwise {@code false}.
 * @see #hashCode
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof Timestamp) {
    Timestamp that = (Timestamp) obj;
    return timestamp.equals(that.timestamp)
        && signerCertPath.equals(that.signerCertPath);
  }
  return false;
}

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

/**
 * Compares the specified object with this {@code CodeSigner} for equality.
 * Returns {@code true} if the specified object is also an instance of
 * {@code CodeSigner}, the two {@code CodeSigner} encapsulate the same
 * certificate path and the same time stamp, if present in both.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            CodeSigner}.
 * @return {@code true} if the specified object is equal to this {@code
 *         CodeSigner}, otherwise {@code false}.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof CodeSigner) {
    CodeSigner that = (CodeSigner) obj;
    if (!signerCertPath.equals(that.signerCertPath)) {
      return false;
    }
    return timestamp == null ? that.timestamp == null : timestamp
        .equals(that.timestamp);
  }
  return false;
}

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

/**
 * Compares the specified object with this {@code CodeSigner} for equality.
 * Returns {@code true} if the specified object is also an instance of
 * {@code CodeSigner}, the two {@code CodeSigner} encapsulate the same
 * certificate path and the same time stamp, if present in both.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            CodeSigner}.
 * @return {@code true} if the specified object is equal to this {@code
 *         CodeSigner}, otherwise {@code false}.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof CodeSigner) {
    CodeSigner that = (CodeSigner) obj;
    if (!signerCertPath.equals(that.signerCertPath)) {
      return false;
    }
    return timestamp == null ? that.timestamp == null : timestamp
        .equals(that.timestamp);
  }
  return false;
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Compares the specified object with this {@code CodeSigner} for equality.
 * Returns {@code true} if the specified object is also an instance of
 * {@code CodeSigner}, the two {@code CodeSigner} encapsulate the same
 * certificate path and the same time stamp, if present in both.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            CodeSigner}.
 * @return {@code true} if the specified object is equal to this {@code
 *         CodeSigner}, otherwise {@code false}.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof CodeSigner) {
    CodeSigner that = (CodeSigner) obj;
    if (!signerCertPath.equals(that.signerCertPath)) {
      return false;
    }
    return timestamp == null ? that.timestamp == null : timestamp
        .equals(that.timestamp);
  }
  return false;
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Compares the specified object with this {@code CodeSigner} for equality.
 * Returns {@code true} if the specified object is also an instance of
 * {@code CodeSigner}, the two {@code CodeSigner} encapsulate the same
 * certificate path and the same time stamp, if present in both.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            CodeSigner}.
 * @return {@code true} if the specified object is equal to this {@code
 *         CodeSigner}, otherwise {@code false}.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof CodeSigner) {
    CodeSigner that = (CodeSigner) obj;
    if (!signerCertPath.equals(that.signerCertPath)) {
      return false;
    }
    return timestamp == null ? that.timestamp == null : timestamp
        .equals(that.timestamp);
  }
  return false;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Compares the specified object with this {@code CodeSigner} for equality.
 * Returns {@code true} if the specified object is also an instance of
 * {@code CodeSigner}, the two {@code CodeSigner} encapsulate the same
 * certificate path and the same time stamp, if present in both.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            CodeSigner}.
 * @return {@code true} if the specified object is equal to this {@code
 *         CodeSigner}, otherwise {@code false}.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof CodeSigner) {
    CodeSigner that = (CodeSigner) obj;
    if (!signerCertPath.equals(that.signerCertPath)) {
      return false;
    }
    return timestamp == null ? that.timestamp == null : timestamp
        .equals(that.timestamp);
  }
  return false;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Compares the specified object with this {@code CodeSigner} for equality.
 * Returns {@code true} if the specified object is also an instance of
 * {@code CodeSigner}, the two {@code CodeSigner} encapsulate the same
 * certificate path and the same time stamp, if present in both.
 *
 * @param obj
 *            object to be compared for equality with this {@code
 *            CodeSigner}.
 * @return {@code true} if the specified object is equal to this {@code
 *         CodeSigner}, otherwise {@code false}.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (obj instanceof CodeSigner) {
    CodeSigner that = (CodeSigner) obj;
    if (!signerCertPath.equals(that.signerCertPath)) {
      return false;
    }
    return timestamp == null ? that.timestamp == null : timestamp
        .equals(that.timestamp);
  }
  return false;
}

代码示例来源:origin: net.jxta/jxta-jxse

/**
 * {@inheritDoc}
 */
@Override
public boolean equals(Object target) {
  if (this == target) {
    return true;
  }
  if (target instanceof PSECredential) {
    PSECredential asCred = (PSECredential) target;
    boolean result = peerID.equals(asCred.peerID)
        && source.group.getPeerGroupID().equals(asCred.source.group.getPeerGroupID());
    result &= certs.equals(asCred.certs);
    return result;
  }
  return false;
}

相关文章