KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > protocol > cmp > BaseCmpMessage


1 /*************************************************************************
2  * *
3  * EJBCA: The OpenSource Certificate Authority *
4  * *
5  * This software is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or any later version. *
9  * *
10  * See terms of license at gnu.org. *
11  * *
12  *************************************************************************/

13
14 package org.ejbca.core.protocol.cmp;
15
16 import org.bouncycastle.asn1.x509.GeneralName;
17
18 import com.novosec.pkix.asn1.cmp.PKIHeader;
19 import com.novosec.pkix.asn1.cmp.PKIMessage;
20
21 public abstract class BaseCmpMessage {
22
23     private PKIMessage msg = null;
24     private String JavaDoc b64SenderNonce = null;
25     private String JavaDoc b64RecipientNonce = null;
26     private String JavaDoc b64TransId = null;
27     private GeneralName recipient = null;
28     private GeneralName sender = null;
29     private String JavaDoc protectionType = null;
30     private String JavaDoc pbeDigestAlg = null;
31     private String JavaDoc pbeMacAlg = null;
32     private int pbeIterationCount = 1024;
33     private String JavaDoc pbeKeyId = null;
34     private String JavaDoc pbeKey = null;
35
36     public void setSenderNonce(String JavaDoc b64nonce) {
37         this.b64SenderNonce = b64nonce;
38     }
39     public String JavaDoc getSenderNonce() {
40         return b64SenderNonce;
41     }
42     public void setRecipientNonce(String JavaDoc b64nonce) {
43         this.b64RecipientNonce = b64nonce;
44     }
45     public String JavaDoc getRecipientNonce() {
46         return b64RecipientNonce;
47     }
48
49     public void setTransactionId(String JavaDoc b64transid) {
50         this.b64TransId = b64transid;
51     }
52     public String JavaDoc getTransactionId() {
53         return b64TransId;
54     }
55
56     public GeneralName getRecipient() {
57         return recipient;
58     }
59     public void setRecipient(GeneralName recipient) {
60         this.recipient = recipient;
61     }
62     public GeneralName getSender() {
63         return sender;
64     }
65     public void setSender(GeneralName sender) {
66         this.sender = sender;
67     }
68     public PKIHeader getHeader() {
69         return msg.getHeader();
70     }
71     public PKIMessage getMessage() {
72         return msg;
73     }
74     public void setMessage(PKIMessage msg) {
75         this.msg = msg;
76     }
77     public String JavaDoc getProtectionType() {
78         return protectionType;
79     }
80     public void setProtectionType(String JavaDoc protectionType) {
81         this.protectionType = protectionType;
82     }
83     public void setPbeParameters(String JavaDoc keyId, String JavaDoc key, String JavaDoc digestAlg, String JavaDoc macAlg, int iterationCount) {
84         this.pbeKeyId = keyId;
85         this.pbeKey = key;
86         this.pbeDigestAlg = digestAlg;
87         this.pbeMacAlg = macAlg;
88         this.pbeIterationCount = iterationCount;
89     }
90     public String JavaDoc getPbeDigestAlg() {
91         return pbeDigestAlg;
92     }
93     public String JavaDoc getPbeKey() {
94         return pbeKey;
95     }
96     public String JavaDoc getPbeKeyId() {
97         return pbeKeyId;
98     }
99     public String JavaDoc getPbeMacAlg() {
100         return pbeMacAlg;
101     }
102     public int getPbeIterationCount() {
103         return pbeIterationCount;
104     }
105     
106 }
107
Popular Tags