KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > oyster > cms > SigningTimeAttribute


1 /*
2  * Title: Oyster Project
3  * Description: S/MIME email sending capabilities
4  * @Author Vladimir Radisic
5  * @Version 2.1.5
6  */

7
8
9 package org.enhydra.oyster.cms;
10
11 import org.enhydra.oyster.exception.SMIMEException;
12 import org.enhydra.oyster.der.DERUTCTime;
13 import org.enhydra.oyster.der.DERSet;
14
15
16 /**
17  * Signing Time Attribute is signed attribute and it is used in creating CMS
18  * objects for signed messages. It defines time of signing according to
19  * Greenwich Mean Time.
20  */

21 public class SigningTimeAttribute extends Attribute {
22
23 /**
24  * Signing time is taken from system clock, and is increased or decreased due to
25  * a time zone offset in order to implement Greenwich Mean Time.
26  * @exception SMIMEException thrown in super class constructor or super class
27  * addContent method.
28  */

29   public SigningTimeAttribute () throws SMIMEException
30   {
31     super("ID_SIGNINGTIME", "NAME_STRING");
32     DERUTCTime utc = new DERUTCTime(); // Generating utc signing time (this moment)
33
DERSet utcVal = new DERSet();
34     utcVal.addContent(utc.getDEREncoded());
35     super.addContent(utcVal.getDEREncoded());
36   }
37 }
38
39
40
41
Popular Tags