当前位置: 首页>>代码示例>>Java>>正文


Java X509CRLImpl类代码示例

本文整理汇总了Java中sun.security.x509.X509CRLImpl的典型用法代码示例。如果您正苦于以下问题:Java X509CRLImpl类的具体用法?Java X509CRLImpl怎么用?Java X509CRLImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


X509CRLImpl类属于sun.security.x509包,在下文中一共展示了X509CRLImpl类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: equals

import sun.security.x509.X509CRLImpl; //导入依赖的package包/类
/**
 * 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;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:X509CRL.java

示例2: equals

import sun.security.x509.X509CRLImpl; //导入依赖的package包/类
/**
    * 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;
       }
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:29,代码来源:X509CRL.java

示例3: equals

import sun.security.x509.X509CRLImpl; //导入依赖的package包/类
/**
 * 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;
    }
}
 
开发者ID:ZhaoX,项目名称:jdk-1.7-annotated,代码行数:29,代码来源:X509CRL.java

示例4: hashCode

import sun.security.x509.X509CRLImpl; //导入依赖的package包/类
/**
 * 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;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:X509CRL.java

示例5: check

import sun.security.x509.X509CRLImpl; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:AlgorithmChecker.java

示例6: check

import sun.security.x509.X509CRLImpl; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:AlgorithmChecker.java

示例7: hashCode

import sun.security.x509.X509CRLImpl; //导入依赖的package包/类
/**
 * 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;
    }
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:19,代码来源:X509CRL.java

示例8: parseX509orPKCS7CRL

import sun.security.x509.X509CRLImpl; //导入依赖的package包/类
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;
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:28,代码来源:X509Factory.java


注:本文中的sun.security.x509.X509CRLImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。