Java 类sun.security.x509.X509CRLImpl 实例源码

项目:OpenJSharp    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:jdk8u-jdk    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:openjdk-jdk10    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:openjdk9    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:Java8CN    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:jdk8u_jdk    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:VarJ    文件:X509CRL.java   
/**
    * Compares this CRL for equality with the given 
    * object. If the <code>other</code> object is an 
    * <code>instanceof</code> <code>X509CRL</code>, then
    * its encoded form is retrieved and compared with the
    * encoded form of this CRL.
    * 
    * @param other the object to test for equality with this CRL.
    * 
    * @return true iff the encoded forms of the two CRLs
    * match, false otherwise.
    */  
   public boolean equals(Object other) {
       if (this == other) {
           return true;
}
       if (!(other instanceof X509CRL)) {
           return false;
}
       try {
           byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
           byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

    return Arrays.equals(thisCRL, otherCRL);
       } catch (CRLException e) {
    return false;
       }
   }
项目:jdk-1.7-annotated    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the <code>other</code> object is an
 * <code>instanceof</code> <code>X509CRL</code>, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:infobip-open-jdk-8    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:jdk8u-dev-jdk    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:jdk7-jdk    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the <code>other</code> object is an
 * <code>instanceof</code> <code>X509CRL</code>, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:openjdk-source-code-learn    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the <code>other</code> object is an
 * <code>instanceof</code> <code>X509CRL</code>, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:OLD-OpenJDK8    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the {@code other} object is an
 * {@code instanceof} {@code X509CRL}, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:openjdk-jdk7u-jdk    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the <code>other</code> object is an
 * <code>instanceof</code> <code>X509CRL</code>, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:openjdk-icedtea7    文件:X509CRL.java   
/**
 * Compares this CRL for equality with the given
 * object. If the <code>other</code> object is an
 * <code>instanceof</code> <code>X509CRL</code>, then
 * its encoded form is retrieved and compared with the
 * encoded form of this CRL.
 *
 * @param other the object to test for equality with this CRL.
 *
 * @return true iff the encoded forms of the two CRLs
 * match, false otherwise.
 */
public boolean equals(Object other) {
    if (this == other) {
        return true;
    }
    if (!(other instanceof X509CRL)) {
        return false;
    }
    try {
        byte[] thisCRL = X509CRLImpl.getEncodedInternal(this);
        byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other);

        return Arrays.equals(thisCRL, otherCRL);
    } catch (CRLException e) {
        return false;
    }
}
项目:OpenJSharp    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:OpenJSharp    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 */
static void check(PublicKey key, X509CRL crl)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId);
}
项目:jdk8u-jdk    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:jdk8u-jdk    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 */
static void check(PublicKey key, X509CRL crl)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId);
}
项目:openjdk-jdk10    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:openjdk-jdk10    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 * @param variant is the Validator variants of the operation. A null value
 *                passed will set it to Validator.GENERIC.
 */
static void check(PublicKey key, X509CRL crl, String variant)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId, variant);
}
项目:openjdk9    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:openjdk9    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 */
static void check(PublicKey key, X509CRL crl)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId);
}
项目:Java8CN    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:jdk8u_jdk    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:jdk8u_jdk    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 * @param variant is the Validator variants of the operation. A null value
 *                passed will set it to Validator.GENERIC.
 */
static void check(PublicKey key, X509CRL crl, String variant)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId, variant);
}
项目:lookaside_java-1.8.0-openjdk    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 * @param variant is the Validator variants of the operation. A null value
 *                passed will set it to Validator.GENERIC.
 */
static void check(PublicKey key, X509CRL crl, String variant)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId, variant);
}
项目:VarJ    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */  
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:jdk-1.7-annotated    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:infobip-open-jdk-8    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:infobip-open-jdk-8    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 */
static void check(PublicKey key, X509CRL crl)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId);
}
项目:jdk8u-dev-jdk    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:jdk8u-dev-jdk    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 */
static void check(PublicKey key, X509CRL crl)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId);
}
项目:jdk7-jdk    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:jdk7-jdk    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 */
static void check(PublicKey key, X509CRL crl)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId);
}
项目:jdk7-jdk    文件:X509Factory.java   
private Collection<? extends java.security.cert.CRL>
    parseX509orPKCS7CRL(InputStream is)
    throws CRLException, IOException
{
    Collection<X509CRLImpl> coll = new ArrayList<>();
    byte[] data = readOneBlock(is);
    if (data == null) {
        return new ArrayList<>(0);
    }
    try {
        PKCS7 pkcs7 = new PKCS7(data);
        X509CRL[] crls = pkcs7.getCRLs();
        // CRLs are optional in PKCS #7
        if (crls != null) {
            return Arrays.asList(crls);
        } else {
            // no crls provided
            return new ArrayList<>(0);
        }
    } catch (ParsingException e) {
        while (data != null) {
            coll.add(new X509CRLImpl(data));
            data = readOneBlock(is);
        }
    }
    return coll;
}
项目:openjdk-source-code-learn    文件:X509CRL.java   
/**
 * Returns a hashcode value for this CRL from its
 * encoded form.
 *
 * @return the hashcode value.
 */
public int hashCode() {
    int retval = 0;
    try {
        byte[] crlData = X509CRLImpl.getEncodedInternal(this);
        for (int i = 1; i < crlData.length; i++) {
             retval += crlData[i] * i;
        }
        return retval;
    } catch (CRLException e) {
        return retval;
    }
}
项目:openjdk-source-code-learn    文件:AlgorithmChecker.java   
/**
 * Check the signature algorithm with the specified public key.
 *
 * @param key the public key to verify the CRL signature
 * @param crl the target CRL
 */
static void check(PublicKey key, X509CRL crl)
                    throws CertPathValidatorException {

    X509CRLImpl x509CRLImpl = null;
    try {
        x509CRLImpl = X509CRLImpl.toImpl(crl);
    } catch (CRLException ce) {
        throw new CertPathValidatorException(ce);
    }

    AlgorithmId algorithmId = x509CRLImpl.getSigAlgId();
    check(key, algorithmId);
}