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); }
291292293294295296297
catch (Exception e) { throw new SecurityException("exception encoding TBS cert request - " + e); } this.sigBits = new DERBitString(sig.sign()); }
313314315316317318319320321322323
{ SubjectPublicKeyInfo subjectPKInfo = reqInfo.getSubjectPublicKeyInfo(); try { X509EncodedKeySpec xspec = new X509EncodedKeySpec(new DERBitString(subjectPKInfo).getBytes()); AlgorithmIdentifier keyAlg = subjectPKInfo.getAlgorithmId (); try { if (provider == null) { return KeyFactory.getInstance(keyAlg.getObjectId().getId ()).generatePublic(xspec);
280281282283284285286287288
ASN1EncodableVector v = new ASN1EncodableVector(); v.add(tbsCert); v.add(sigAlgId); v.add(new DERBitString(sig.sign())); return new X509CertificateObject(new X509CertificateStructure(new DERSequence(v))); }
182183184185186187188189190191192
Enumeration e = this.getBagAttributeKeys(); while (e.hasMoreElements()) { DEREncodable oid = (DEREncodable)e.nextElement(); aOut.writeObject(oid); aOut.writeObject(pkcs12Attributes.get(oid)); }
63646566676869
* <code>String</code>. */ public PolicyQualifierInfo (String cps) { policyQualifierId = PolicyQualifierId.id_qt_cps; qualifier = new DERIA5String (cps); }
5657585960616263646566
throw new RuntimeException("can't recode value for oid " + oid.getId()); } } else if (oid.equals(X509Name.EmailAddress)) { return new DERIA5String(value); } else if (canBePrintable(value)) { return new DERPrintableString(value); }
979899100101102103
* set the serial number for the certificate. */ public void setSerialNumber( BigInteger serialNumber) { tbsGen.setSerialNumber(new DERInteger(serialNumber)); }
6566676869707172737475
if (o instanceof Integer) { Enumeration it = numbers.elements(); while (it.hasMoreElements()) { Integer nm = (Integer) it.nextElement(); DERInteger di = new DERInteger(nm.intValue()); av.add (di); } } noticeNumbers = new DERSequence(av);