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))); }
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);
136137138139140141142143144145146
{ version = (DERInteger)seq.getObjectAt(seqPos++); } else { version = new DERInteger(0); } signature = AlgorithmIdentifier.getInstance(seq.getObjectAt(seqPos++)); issuer = X509Name.getInstance(seq.getObjectAt(seqPos++)); thisUpdate = Time.getInstance(seq.getObjectAt(seqPos++));
138139140141142143144145146147148
*/ public DERObject toASN1Object() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERInteger(0)); v.add(algId); v.add(new DEROctetString(privKey)); if (attributes != null) {