CertificationRequest ::= SEQUENCE { certificationRequestInfo CertificationRequestInfo, signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }}, signature BIT STRING }
222223224225226227228229230231232
PrivateKey signingKey, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, SignatureException { DERObjectIdentifier sigOID = (DERObjectIdentifier)algorithms.get(signatureAlgorithm.toUpperCase()); if (sigOID == null) { throw new IllegalArgumentException("Unknown signature type requested"); }
676869707172737475767778
while (it.hasMoreElements()) { String idp = (String) it.nextElement(); String sdp = (String) mappings.get(idp); ASN1EncodableVector dv = new ASN1EncodableVector(); dv.add(new DERObjectIdentifier(idp)); dv.add(new DERObjectIdentifier(sdp)); dev.add(new DERSequence(dv)); } seq = new DERSequence(dev); }
73747576777879
} public AlgorithmIdentifier( String objectId) { this.objectId = new DERObjectIdentifier(objectId); }
76777879808182838485868788899091
HashSet set = new HashSet(); Enumeration e = extensions.oids(); while (e.hasMoreElements()) { DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement(); X509Extension ext = extensions.getExtension(oid); if (critical == ext.isCritical()) { set.add(oid.getId()); } } return set; }
107108109110111112113114115116117
{ X509Extensions exts = c.getExtensions(); if (exts != null) { X509Extension ext = exts.getExtension(new DERObjectIdentifier(oid)); if (ext != null) { try {
178179180181182183184185186187188
{ buf.append(" crlEntryExtensions:" + nl); while ( e.hasMoreElements() ) { DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement(); X509Extension ext = extensions.getExtension(oid); buf.append(ext); } } }
151152153154155156157158159160161
this.pkcs12Ordering = new Vector(); ByteArrayInputStream bIn = new ByteArrayInputStream((byte[])obj); ASN1InputStream aIn = new ASN1InputStream(bIn); DERObjectIdentifier oid; while ((oid = (DERObjectIdentifier)aIn.readObject()) != null) { this.setBagAttribute(oid, aIn.readObject()); }
140141142143144145146147148149150
{ ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERInteger(0)); v.add(algId); v.add(new DEROctetString(privKey)); if (attributes != null) { v.add(new DERTaggedObject(false, 0, attributes)); }
280281282283284285286287288289290291292
sig.initSign(signingKey); try { ByteArrayOutputStream bOut = new ByteArrayOutputStream(); DEROutputStream dOut = new DEROutputStream(bOut); dOut.writeObject(reqInfo); sig.update(bOut.toByteArray()); } catch (Exception e) {
390391392393394395396397398399400401402
sig.initVerify(this.getPublicKey(provider)); try { ByteArrayOutputStream bOut = new ByteArrayOutputStream(); DEROutputStream dOut = new DEROutputStream(bOut); dOut.writeObject(reqInfo); sig.update(bOut.toByteArray()); } catch (Exception e) {