Example usage for org.bouncycastle.asn1.esf CrlValidatedID getCrlHash

List of usage examples for org.bouncycastle.asn1.esf CrlValidatedID getCrlHash

Introduction

In this page you can find the example usage for org.bouncycastle.asn1.esf CrlValidatedID getCrlHash.

Prototype

public OtherHash getCrlHash() 

Source Link

Usage

From source file:eu.europa.ec.markt.dss.validation.CRLRef.java

License:Open Source License

/**
 * //from   w  ww  .j  av a2s.  c o  m
 * The default constructor for CRLRef.
 * 
 * @param cmsRef
 * @throws ParseException
 */
public CRLRef(CrlValidatedID cmsRef) {
    try {
        crlIssuer = cmsRef.getCrlIdentifier().getCrlIssuer();
        crlIssuedTime = cmsRef.getCrlIdentifier().getCrlIssuedTime().getDate();
        crlNumber = cmsRef.getCrlIdentifier().getCrlNumber();
        algorithm = cmsRef.getCrlHash().getHashAlgorithm().getAlgorithm().getId();
        digestValue = cmsRef.getCrlHash().getHashValue();
    } catch (ParseException ex) {
        throw new RuntimeException(ex);
    }
}

From source file:eu.europa.ec.markt.dss.validation102853.crl.CRLRef.java

License:Open Source License

/**
 * The default constructor for CRLRef.//w  w  w .  j a  v a2  s  . com
 *
 * @param cmsRef
 * @throws ParseException
 */
public CRLRef(CrlValidatedID cmsRef) {
    try {

        final CrlIdentifier crlIdentifier = cmsRef.getCrlIdentifier();
        if (crlIdentifier != null) {
            crlIssuer = crlIdentifier.getCrlIssuer();
            crlIssuedTime = crlIdentifier.getCrlIssuedTime().getDate();
            crlNumber = crlIdentifier.getCrlNumber();
        }
        final OtherHash crlHash = cmsRef.getCrlHash();

        digestAlgorithm = DigestAlgorithm.forOID(crlHash.getHashAlgorithm().getAlgorithm());
        digestValue = crlHash.getHashValue();
    } catch (ParseException ex) {
        throw new DSSException(ex);
    }
}

From source file:eu.europa.esig.dss.validation.CRLRef.java

License:Open Source License

/**
 * The default constructor for CRLRef.// ww  w .j ava  2s .  c om
 *
 * @param cmsRef
 * @throws ParseException
 */
public CRLRef(CrlValidatedID cmsRef) {
    try {

        final CrlIdentifier crlIdentifier = cmsRef.getCrlIdentifier();
        if (crlIdentifier != null) {
            crlIssuer = crlIdentifier.getCrlIssuer();
            crlIssuedTime = crlIdentifier.getCrlIssuedTime().getDate();
            crlNumber = crlIdentifier.getCrlNumber();
        }
        final OtherHash crlHash = cmsRef.getCrlHash();

        digestAlgorithm = DigestAlgorithm.forOID(crlHash.getHashAlgorithm().getAlgorithm().getId());
        digestValue = crlHash.getHashValue();
    } catch (ParseException ex) {
        throw new DSSException(ex);
    }
}