UserNotice
CertificatePolicies
UserNotice ::= SEQUENCE { noticeRef NoticeReference OPTIONAL, explicitText DisplayText OPTIONAL}
315316317318319320321
v.add(tbsCrl); v.add(sigAlgId); v.add(new DERBitString(sig.sign())); return new X509CRLObject(new CertificateList(new DERSequence(v))); }
158159160161162163164
InputStream in) throws IOException { DERInputStream dIn = new DERInputStream(in); return new X509CRLObject(new CertificateList((ASN1Sequence)dIn.readObject())); }
129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
{ byte[] hash = new byte[digest.getDigestSize()]; digest.doFinal(hash, 0); DigestInfo digInfo; byte[] sig; try { sig = cipher.processBlock(sigBytes, 0, sigBytes.length); digInfo = derDecode(sig); } catch (Exception e) { return false; } if (!digInfo.getAlgorithmId().equals(algId)) { return false; } byte[] sigHash = digInfo.getDigest(); if (hash.length != sigHash.length) { return false; }
196197198199200201202203204205206
byte[] hash) throws IOException { ByteArrayOutputStream bOut = new ByteArrayOutputStream(); DEROutputStream dOut = new DEROutputStream(bOut); DigestInfo dInfo = new DigestInfo(algId, hash); dOut.writeObject(dInfo); return bOut.toByteArray(); }
210211212213214215216
throws IOException { ByteArrayInputStream bIn = new ByteArrayInputStream(encoding); DERInputStream dIn = new DERInputStream(bIn); return new DigestInfo((ASN1Sequence)dIn.readObject()); }
773774775776777778779780781
} private byte[] derEncode(ASN1ObjectIdentifier oid, byte[] hash) throws IOException { AlgorithmIdentifier algId = new AlgorithmIdentifier(oid, DERNull.INSTANCE); DigestInfo dInfo = new DigestInfo(algId, hash); return dInfo.getEncoded(ASN1Encoding.DER); }
784785786787788789790791792793794
CRLDistPoint crldp, ExtendedPKIXParameters pkixParams) throws AnnotatedException { if (crldp != null) { DistributionPoint dps[] = null; try { dps = crldp.getDistributionPoints(); } catch (Exception e)
796797798799800801802803804805806807808809810811812813
throw new AnnotatedException( "Distribution points could not be read.", e); } for (int i = 0; i < dps.length; i++) { DistributionPointName dpn = dps[i].getDistributionPoint(); // look for URIs in fullName if (dpn != null) { if (dpn.getType() == DistributionPointName.FULL_NAME) { GeneralName[] genNames = GeneralNames.getInstance( dpn.getName()).getNames(); // look for an URI for (int j = 0; j < genNames.length; j++) { if (genNames[j].getTagNo() == GeneralName.uniformResourceIdentifier) {
852853854855856857858859860861862
{ List issuers = new ArrayList(); // indirect CRL if (dp.getCRLIssuer() != null) { GeneralName genNames[] = dp.getCRLIssuer().getNames(); // look for a DN for (int j = 0; j < genNames.length; j++) { if (genNames[j].getTagNo() == GeneralName.directoryName) {
50515253545556
this.usage = usage; } public DERObject getDERObject() { return new KeyUsage(usage); }