[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] UTF-Signing Time

   "Z" stands for "UTC", or "GMT", they are equivalent (little difference: one is atomic-clock based, the other is astronomic-clock).
    If you are parsing a SignerInfo of a SignedData PKCS#7, you could try this:
    SignerInfo signer_info   =...; /*initialize signer_info from PKCS#7 data */;
 Attribute   signingTime  = signer_info.getAuthenticatedAttribute(ObjectID.signingTime);
    if(signingTime != null)
          ChoiceOfTime          cot              = new ChoiceOfTime( signingTime.getValue()[0] );
          java.util.Date            dt               = cot.getDate();
          SimpleDateFormat   f_DateTime  = new SimpleDateFormat ("dd/MM/yyyy HH:mm:ss");
          String                     dateStr        =  f_DateTime.format(dateSign);
    Hope this helps.
Tito Santini
NetIkos S.p.A.
56124 Pisa - via Matteucci, 34/b
Tel: 050 968.111
Fax: 050 968.525
email: t.santini@netikos.it