1 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 b64SenderNonce = null; 25 private String b64RecipientNonce = null; 26 private String b64TransId = null; 27 private GeneralName recipient = null; 28 private GeneralName sender = null; 29 private String protectionType = null; 30 private String pbeDigestAlg = null; 31 private String pbeMacAlg = null; 32 private int pbeIterationCount = 1024; 33 private String pbeKeyId = null; 34 private String pbeKey = null; 35 36 public void setSenderNonce(String b64nonce) { 37 this.b64SenderNonce = b64nonce; 38 } 39 public String getSenderNonce() { 40 return b64SenderNonce; 41 } 42 public void setRecipientNonce(String b64nonce) { 43 this.b64RecipientNonce = b64nonce; 44 } 45 public String getRecipientNonce() { 46 return b64RecipientNonce; 47 } 48 49 public void setTransactionId(String b64transid) { 50 this.b64TransId = b64transid; 51 } 52 public String 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 getProtectionType() { 78 return protectionType; 79 } 80 public void setProtectionType(String protectionType) { 81 this.protectionType = protectionType; 82 } 83 public void setPbeParameters(String keyId, String key, String digestAlg, String 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 getPbeDigestAlg() { 91 return pbeDigestAlg; 92 } 93 public String getPbeKey() { 94 return pbeKey; 95 } 96 public String getPbeKeyId() { 97 return pbeKeyId; 98 } 99 public String getPbeMacAlg() { 100 return pbeMacAlg; 101 } 102 public int getPbeIterationCount() { 103 return pbeIterationCount; 104 } 105 106 } 107 | Popular Tags |