private ASN1EncodableVector buildUnauthenticatedAttributes(byte[] timeStampToken) throws IOException {
  if (timeStampToken == null)   return null;
  String ID_TIME_STAMP_TOKEN="1.2.840.113549.1.9.16.2.14";
  ASN1InputStream tempstream=new ASN1InputStream(new ByteArrayInputStream(timeStampToken));
  ASN1EncodableVector unauthAttributes=new ASN1EncodableVector();
  ASN1EncodableVector v=new ASN1EncodableVector();
  v.add(new ASN1ObjectIdentifier(ID_TIME_STAMP_TOKEN));
  ASN1Sequence seq=(ASN1Sequence)tempstream.readObject();
  v.add(new DERSet(seq));
  unauthAttributes.add(new DERSequence(v));
  return unauthAttributes;
}

private ASN1EncodableVector buildUnauthenticatedAttributes ( byte [ ] timeStampToken ) throws IOException { if ( timeStampToken == null ) return null ; String ID_TIME_STAMP_TOKEN = "1.2.840.113549.1.9.16.2.14" ; ASN1InputStream tempstream = new ASN1InputStream ( new ByteArrayInputStream ( timeStampToken ) ) ; ASN1EncodableVector unauthAttributes = new ASN1EncodableVector ( ) ; ASN1EncodableVector v = new ASN1EncodableVector ( ) ; v . add ( new ASN1ObjectIdentifier ( ID_TIME_STAMP_TOKEN ) ) ; ASN1Sequence seq = ( ASN1Sequence ) tempstream . readObject ( ) ; v . add ( new DERSet ( seq ) ) ; unauthAttributes . add ( new DERSequence ( v ) ) ; return unauthAttributes ; }
added by aiken sam , 2006 - 11 - 15 , modifed by martin brunecky 07 / 12 / 2007 to start with the timestamptoken ( signeddata 1 . 2 . 840 . 113549 . 1 . 7 . 2 ) . token is the tsa response without response status , which is usually handled by the ( vendor supplied ) tsa request / response interface ) .
