List of usage examples for org.bouncycastle.asn1.esf OtherHash getHashAlgorithm
public AlgorithmIdentifier getHashAlgorithm()
From source file:eu.europa.ec.markt.dss.validation102853.crl.CRLRef.java
License:Open Source License
/** * The default constructor for CRLRef./*from w ww .jav a 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()); digestValue = crlHash.getHashValue(); } catch (ParseException ex) { throw new DSSException(ex); } }
From source file:eu.europa.ec.markt.dss.validation102853.ocsp.OCSPRef.java
License:Open Source License
/** * The default constructor for OCSPRef./*from www . jav a2 s . c o m*/ */ public OCSPRef(OcspResponsesID ocsp, boolean matchOnlyBasicOCSPResponse) { final OtherHash otherHash = ocsp.getOcspRepHash(); this.digestAlgorithm = DigestAlgorithm.forOID(otherHash.getHashAlgorithm().getAlgorithm()); this.digestValue = ocsp.getOcspRepHash().getHashValue(); this.matchOnlyBasicOCSPResponse = matchOnlyBasicOCSPResponse; }
From source file:eu.europa.esig.dss.validation.CRLRef.java
License:Open Source License
/** * The default constructor for CRLRef./*from ww w . jav a 2 s . c o m*/ * * @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); } }
From source file:eu.europa.esig.dss.validation.OCSPRef.java
License:Open Source License
/** * The default constructor for OCSPRef.//from ww w. jav a2 s. co m */ public OCSPRef(final OtherHash otherHash, final boolean matchOnlyBasicOCSPResponse) { if (otherHash != null) { // -444 this.digestAlgorithm = DigestAlgorithm.forOID(otherHash.getHashAlgorithm().getAlgorithm().getId()); this.digestValue = otherHash.getHashValue(); } this.matchOnlyBasicOCSPResponse = matchOnlyBasicOCSPResponse; }