1 13 14 package org.ejbca.core.protocol; 15 16 import java.io.IOException ; 17 import java.io.Serializable ; 18 import java.security.InvalidKeyException ; 19 import java.security.NoSuchAlgorithmException ; 20 import java.security.NoSuchProviderException ; 21 import java.security.PrivateKey ; 22 import java.security.cert.CRL ; 23 import java.security.cert.Certificate ; 24 import java.security.cert.CertificateEncodingException ; 25 import java.security.cert.X509Certificate ; 26 27 import org.ejbca.core.model.ca.SignRequestException; 28 import org.ejbca.core.model.ra.NotFoundException; 29 30 48 public interface IResponseMessage extends Serializable { 49 50 55 public void setCertificate(Certificate cert); 56 57 62 public void setCrl(CRL crl); 63 64 70 public void setIncludeCACert(boolean incCACert); 71 72 77 public byte[] getResponseMessage() throws IOException , CertificateEncodingException ; 78 79 84 public void setStatus(ResponseStatus status); 85 86 91 public ResponseStatus getStatus(); 92 93 98 public void setFailInfo(FailInfo failInfo); 99 100 105 public FailInfo getFailInfo(); 106 107 112 public void setFailText(String failText); 113 114 119 public String getFailText(); 120 121 138 public boolean create() 139 throws IOException , InvalidKeyException , NoSuchAlgorithmException , NoSuchProviderException , SignRequestException, NotFoundException; 140 141 147 public boolean requireSignKeyInfo(); 148 149 155 public boolean requireEncKeyInfo(); 156 157 167 public void setSignKeyInfo(X509Certificate cert, PrivateKey key, String provider); 168 169 179 public void setEncKeyInfo(X509Certificate cert, PrivateKey key, String provider); 180 181 186 public void setSenderNonce(String senderNonce); 187 188 193 public void setRecipientNonce(String recipientNonce); 194 195 200 public void setTransactionId(String transactionId); 201 202 207 public void setRecipientKeyInfo(byte[] recipientKeyInfo); 208 209 215 public void setPreferredDigestAlg(String digest); 216 217 222 public void setRequestType(int reqtype); 223 224 229 public void setRequestId(int reqid); 230 231 236 public void setProtectionParamsFromRequest(IRequestMessage reqMsg); 237 } 238 | Popular Tags |