CertificationRequest ::= SEQUENCE { certificationRequestInfo CertificationRequestInfo, signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }}, signature BIT STRING }
103104105106107108109110111112
{ data[index] |= (byte)(right - 'a' + 10); } } ASN1InputStream aIn = new ASN1InputStream( new ByteArrayInputStream(data)); return aIn.readObject(); }
87888990919293949596979899
algId = new AlgorithmIdentifier((ASN1Sequence)e.nextElement()); try { ByteArrayInputStream bIn = new ByteArrayInputStream(((ASN1OctetString)e.nextElement()).getOctets()); ASN1InputStream aIn = new ASN1InputStream(bIn); privKey = aIn.readObject(); } catch (IOException ex) { throw new IllegalArgumentException("Error recoverying private key from sequence"); }
26272829303132333435363738
public static void main( String args[]) throws Exception { FileInputStream fIn = new FileInputStream(args[0]); ASN1InputStream bIn = new ASN1InputStream(fIn); Object obj = null; while ((obj = bIn.readObject()) != null) { System.out.println(ASN1Dump.dumpAsString(obj)); } }
149150151152153154155156157158159160161162163164165
{ this.pkcs12Attributes = new Hashtable(); 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()); } } this.privateExponent = (BigInteger)in.readObject(); }
176177178179180181182183184185186187188189190191192193194195
out.writeObject(pkcs12Ordering); } else { ByteArrayOutputStream bOut = new ByteArrayOutputStream(); ASN1OutputStream aOut = new ASN1OutputStream(bOut); Enumeration e = this.getBagAttributeKeys(); while (e.hasMoreElements()) { DEREncodable oid = (DEREncodable)e.nextElement(); aOut.writeObject(oid); aOut.writeObject(pkcs12Attributes.get(oid)); } out.writeObject(bOut.toByteArray()); }
154155156157158159160161162163164165166167168169
} if (seqPos < seq.size() && !(seq.getObjectAt(seqPos) instanceof DERTaggedObject)) { ASN1Sequence certs = (ASN1Sequence)seq.getObjectAt(seqPos++); revokedCertificates = new CRLEntry[certs.size()]; for ( int i = 0; i < revokedCertificates.length; i++) { revokedCertificates[i] = new CRLEntry((ASN1Sequence)certs.getObjectAt(i)); } } if (seqPos < seq.size() && seq.getObjectAt(seqPos) instanceof DERTaggedObject)
229230231232233234235236237238239
throws Exception { String sigalg = cert.getSigAlgName(); X509Name subject = new X509Name(cert.getSubjectDN().toString()); PublicKey publicKey = cert.getPublicKey(); ASN1Set attributes = null; PKCS10CertificationRequest csr = new PKCS10CertificationRequest(sigalg, subject, publicKey, attributes, signingKey); if (!csr.verify()) {
72737475767778798081828384
{ this.seq = seq; for (int i = 0; i != seq.size(); i++) { ASN1TaggedObject o = (ASN1TaggedObject)seq.getObjectAt(i); switch (o.getTagNo()) { case 0: break; case 1: onlyContainsUserCerts = DERBoolean.getInstance(o, false).isTrue();
363738394041424344454647
ASN1Sequence seq) { Enumeration e = seq.getObjects(); while (e.hasMoreElements()) { ASN1TaggedObject o = (ASN1TaggedObject)e.nextElement(); switch (o.getTagNo()) { case 0: permitted = ASN1Sequence.getInstance(o, false); break; case 1:
67686970717273
else if (canBeUTF8(value)) { return new DERUTF8String(value); } return new DERBMPString(value); }