public abstract class SignatureExplorer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected SignaturePolicyCatalog |
acceptableExplicitPolicies |
protected RestPkiClient |
client |
protected java.lang.String |
defaultSignaturePolicyId |
protected boolean |
ignoreRevocationStatusUnknown |
protected java.lang.String |
securityContextId |
protected byte[] |
signatureFileContent |
protected boolean |
trustUncertifiedSigningTime |
protected boolean |
validate |
| Constructor and Description |
|---|
SignatureExplorer(RestPkiClient client) |
| Modifier and Type | Method and Description |
|---|---|
SignaturePolicyCatalog |
getAcceptableExplicitPolicies() |
RestPkiClient |
getClient() |
java.lang.String |
getDefaultSignaturePolicyId() |
protected com.lacunasoftware.restpki.OpenSignatureRequestModel |
getRequest(java.lang.String fileMimeType) |
java.lang.String |
getSecurityContextId() |
byte[] |
getSignatureFile() |
boolean |
isTrustUncertifiedSigningTime() |
boolean |
isValidate() |
void |
setAcceptableExplicitPolicies(SignaturePolicyCatalog policyCatalog)
Sets the "catalog" of explicit policies that should be accepted when validating signatures
with an explicit validation policy attribute.
|
void |
setClient(RestPkiClient client) |
void |
setDefaultSignaturePolicy(SignaturePolicy signaturePolicy)
Sets the default signature policy to be used to validate signatures.
|
void |
setIgnoreRevocationStatusUnknown(boolean ignoreRevocationStatusUnknown)
Sets the option of "IgnoreRevocationStatusUnknown".
|
void |
setSecurityContext(SecurityContext securityContext)
Sets the security context to be used to validate the signatures.
|
void |
setSignatureFile(byte[] content)
Sets the signature file to be opened
|
void |
setSignatureFile(java.nio.file.Path path)
Sets the file path of the signature file to be opened
|
void |
setSignatureFile(java.lang.String path)
Sets the file path of the signature file to be opened
|
void |
setTrustUncertifiedSigningTime(boolean trustUncertifiedSigningTime) |
void |
setValidate(boolean validate)
Sets whether the signature file should be validated or just opened
|
protected RestPkiClient client
protected byte[] signatureFileContent
protected boolean validate
protected java.lang.String defaultSignaturePolicyId
protected SignaturePolicyCatalog acceptableExplicitPolicies
protected java.lang.String securityContextId
protected boolean ignoreRevocationStatusUnknown
protected boolean trustUncertifiedSigningTime
public SignatureExplorer(RestPkiClient client)
public byte[] getSignatureFile()
public void setSignatureFile(byte[] content)
content - Binary content of the signature filepublic void setSignatureFile(java.lang.String path)
throws java.io.IOException
path - File path of the signature file to be signed.java.io.IOException - if an error occurs while reading the file.public void setSignatureFile(java.nio.file.Path path)
throws java.io.IOException
path - File path of the signature file to be opened.java.io.IOException - if an error occurs while reading the file.public boolean isValidate()
public void setValidate(boolean validate)
validate - Whether to validate the signature file or notpublic java.lang.String getDefaultSignaturePolicyId()
public void setDefaultSignaturePolicy(SignaturePolicy signaturePolicy)
signaturePolicy - The default signature policy for validation. Depending on the policy,
it might also be necessary to set a security context.public SignaturePolicyCatalog getAcceptableExplicitPolicies()
public void setAcceptableExplicitPolicies(SignaturePolicyCatalog policyCatalog)
policyCatalog - The signature policy catalog (for instance,
SignaturePolicyCatalog.getPkiBrazilCades() or
SignaturePolicyCatalog.getPkiBrazilPades())public java.lang.String getSecurityContextId()
public void setSecurityContext(SecurityContext securityContext)
securityContext - The security context to be used to validate the signatures on the
signature file.public RestPkiClient getClient()
public void setClient(RestPkiClient client)
public void setIgnoreRevocationStatusUnknown(boolean ignoreRevocationStatusUnknown)
ignoreRevocationStatusUnknown - The option of "IgnoreRevocationStatusUnknown".public boolean isTrustUncertifiedSigningTime()
public void setTrustUncertifiedSigningTime(boolean trustUncertifiedSigningTime)
protected com.lacunasoftware.restpki.OpenSignatureRequestModel getRequest(java.lang.String fileMimeType)