protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; int [] accuracy = new int [3]; for (int i = 0; i < 3; i++) { if (values[i] != null) { accuracy[i] = ASN1Integer.toIntValue(values[i]); if (i > 0 && (accuracy[i] < 0 || accuracy[i] > 999)) { throw new RuntimeException("Time-stamp accuracy value is incorrect: " + accuracy[i]); } } } return accuracy; }
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; int maximum = -1; // is optional maximum missing? if (values[2] != null) { maximum = ASN1Integer.toIntValue(values[2]); // no! } return new GeneralSubtree((GeneralName) values[0], ASN1Integer.toIntValue(values[1]), maximum); }
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new SignedData( ASN1Integer.toIntValue(values[0]), (List<?>) values[1], (ContentInfo) values[2], (List<Certificate>) values[3], (List<CertificateList>) values[4], (List<SignerInfo>) values[5] ); } };
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new SignerInfo( ASN1Integer.toIntValue(values[0]), (Object[]) values[1], (AlgorithmIdentifier) values[2], (AuthenticatedAttributes) values[3], (AlgorithmIdentifier) values[4], (byte[]) values[5], (List) values[6] ); } };
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; BigInteger nonce = (values[7] == null) ? null : new BigInteger( (byte[]) values[7]); return new TSTInfo( ASN1Integer.toIntValue(values[0]), ObjectIdentifier.toString((int[]) values[1]), (MessageImprint) values[2], new BigInteger((byte[]) values[3]), (Date) values[4], (int []) values[5], (Boolean) values[6], nonce, (GeneralName) values[8], (Extensions) values[9]); }
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new CertificationRequestInfo( ASN1Integer.toIntValue(values[0]), (Name) values[1], (SubjectPublicKeyInfo) values[2], (List<?>) values[3], in.getEncoded()); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new PrivateKeyInfo(ASN1Integer.toIntValue(values[0]), (AlgorithmIdentifier) values[1], (byte[]) values[2], (List) values[3], in.getEncoded()); }
@Override protected Object getDecodedObject(BerInputStream in) throws IOException { Object[] values = (Object[]) in.content; return new TBSCertList( (values[0] == null) ? 1 : ASN1Integer.toIntValue(values[0])+1, (AlgorithmIdentifier) values[1], (Name) values[2], (Date) values[3], (Date) values[4], (List<RevokedCertificate>) values[5], (Extensions) values[6], in.getEncoded() ); }
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; boolean[] issuerUniqueID = (values[7] == null) ? null : ((BitString) values[7]).toBooleanArray(); boolean[] subjectUniqueID = (values[8] == null) ? null : ((BitString) values[8]).toBooleanArray(); return new TBSCertificate( ASN1Integer.toIntValue(values[0]), new BigInteger((byte[]) values[1]), (AlgorithmIdentifier) values[2], (Name) values[3], (Validity) values[4], (Name) values[5], (SubjectPublicKeyInfo) values[6], issuerUniqueID, subjectUniqueID, (Extensions) values[9], in.getEncoded() ); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; String objID = (values[2] == null) ? null : ObjectIdentifier .toString((int[]) values[2]); BigInteger nonce = (values[3] == null) ? null : new BigInteger( (byte[]) values[3]); if (values[5] == null) { return new TimeStampReq( ASN1Integer.toIntValue(values[0]), (MessageImprint) values[1], objID, nonce, (Boolean) values[4], null, in.getEncoded() ); } else { return new TimeStampReq( ASN1Integer.toIntValue(values[0]), (MessageImprint) values[1], objID, nonce, (Boolean) values[4], (Extensions) values[5], in.getEncoded() ); } }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; int failInfoValue = -1; if (values[2] != null) { boolean[] failInfoBoolArray = ((BitString) values[2]).toBooleanArray(); for (int i = 0; i < failInfoBoolArray.length; i++) { if (failInfoBoolArray[i]) { failInfoValue = i; break; } } } return new PKIStatusInfo( PKIStatus.getInstance(ASN1Integer.toIntValue(values[0])), (List)values[1], PKIFailureInfo.getInstance(failInfoValue)); } };
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; int maximum = -1; // is optional maximum missing? if (values[2] != null) { maximum = ASN1Integer.toIntValue(values[2]); // no! } return new GeneralSubtree((GeneralName) values[0], ASN1Integer.toIntValue(values[1]), maximum); }
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; int maximum = -1; // is optional maximum missing? if (values[2] != null) { maximum = ASN1Integer.toIntValue(values[2]); // no! } return new GeneralSubtree((GeneralName) values[0], ASN1Integer.toIntValue(values[1]), maximum); }
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new SignedData( ASN1Integer.toIntValue(values[0]), (List<?>) values[1], (ContentInfo) values[2], (List<Certificate>) values[3], (List<CertificateList>) values[4], (List<SignerInfo>) values[5] ); } };
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new SignedData( ASN1Integer.toIntValue(values[0]), (List<?>) values[1], (ContentInfo) values[2], (List<Certificate>) values[3], (List<CertificateList>) values[4], (List<SignerInfo>) values[5] ); } };
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new PrivateKeyInfo(ASN1Integer.toIntValue(values[0]), (AlgorithmIdentifier) values[1], (byte[]) values[2], (List) values[3], in.getEncoded()); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new PrivateKeyInfo(ASN1Integer.toIntValue(values[0]), (AlgorithmIdentifier) values[1], (byte[]) values[2], (List) values[3], in.getEncoded()); }
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new CertificationRequestInfo( ASN1Integer.toIntValue(values[0]), (Name) values[1], (SubjectPublicKeyInfo) values[2], (List<?>) values[3], in.getEncoded()); }
@Override protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new CertificationRequestInfo( ASN1Integer.toIntValue(values[0]), (Name) values[1], (SubjectPublicKeyInfo) values[2], (List<?>) values[3], in.getEncoded()); }
protected Object getDecodedObject(BerInputStream in) { Object[] values = (Object[]) in.content; return new PrivateKeyInfo(ASN1Integer.toIntValue(values[0]), (AlgorithmIdentifier) values[1], (byte[]) values[2], (List) values[3], in.getEncoded()); }