public class EDOCSignatureContext extends Object
| Modifier and Type | Field and Description |
|---|---|
protected X509Certificate |
authCert |
protected String |
authCertificateAlias |
protected EDOCSignatureCallback |
edocSignatureCallback |
protected KeyAccessor |
keyAccessor |
protected SignatureType |
signatureType |
protected X509Certificate |
signCert |
protected String |
signCertificateAlias |
protected CertPath |
signCertPath |
protected X509Certificate |
signCertRoot |
protected PrivateKey |
signKey |
| Constructor and Description |
|---|
EDOCSignatureContext(KeyAccessor keyAccessor,
EDOCSignatureCallback edocSignatureCallback)
Creates an EDOCSignatureContext using the given KeyAccessor and EDOCSignatureCallback.
|
| Modifier and Type | Method and Description |
|---|---|
OCSPClient |
getSigningCertOCSPClient()
OCSPClient used to obtain OCSP responses for the signing certificate.
|
Map<String,String> |
getTimeStampRequestProperties()
Optional properties to add for the TimeStamp HTTP requests.
|
protected void |
onTimeStampResponse(TimeStamp timeStamp)
Notification for the requested TimeStamp response.
|
void |
setSigningCertOCSPClient(OCSPClient signingCertOCSPClient)
OCSPClient used to obtain OCSP responses for the signing certificate.
|
void |
setTimeStampRequestProperties(Map<String,String> timeStampRequestProperties)
Optional properties to add for the TimeStamp HTTP requests.
|
protected KeyAccessor keyAccessor
protected EDOCSignatureCallback edocSignatureCallback
protected SignatureType signatureType
protected String authCertificateAlias
protected X509Certificate authCert
protected String signCertificateAlias
protected X509Certificate signCert
protected CertPath signCertPath
protected X509Certificate signCertRoot
protected PrivateKey signKey
public EDOCSignatureContext(KeyAccessor keyAccessor, EDOCSignatureCallback edocSignatureCallback)
A KeyAccessor is used to access the document signing certificate.
Optionally a client authentication certificate can be required
when requesting a timestamp from the timestamping authority (TSA).
While creating the signature a communication with the user is required,
therefore you must specify an instance of EDOCSignatureCallback object
which implements the required callback methods.
keyAccessor - a KeyAccessor instance used to access cryptographic keys and certificates.edocSignatureCallback - callback object used to get user input.public OCSPClient getSigningCertOCSPClient()
public void setSigningCertOCSPClient(OCSPClient signingCertOCSPClient)
signingCertOCSPClient - OCSPClient.public Map<String,String> getTimeStampRequestProperties()
public void setTimeStampRequestProperties(Map<String,String> timeStampRequestProperties)
timeStampRequestProperties - properties.protected void onTimeStampResponse(TimeStamp timeStamp)
timeStamp - the newly-created TimeStamp object.