|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.digisigner.api.SigningData
public class SigningData
Holds the data required to create a digital signature in the document.
Method Summary | |
---|---|
static SigningData |
fromJksFile(String jksStoreFilename,
String jksStorePassword,
String keyPassword)
Creates a SigningData object from a JKS (Java Key Store) file with only one valid key. |
static SigningData |
fromJksFile(String jksStoreFilename,
String jksStorePassword,
String keyAlias,
String keyPassword)
Creates a SigningData object from a JKS (Java Key Store) file. |
static SigningData |
fromKeyStore(KeyStore keyStore,
String keyAlias,
String keyPassword)
Creates a SigningData object from a general KeyStore . |
static SigningData |
fromPkcs11Token(String libraryFilename,
String tokenPin)
Creates a SigningData object from a PKCS#11 token with only one valid key. |
static SigningData |
fromPkcs11Token(String libraryFilename,
String keyAlias,
String tokenPin)
Creates a SigningData object from a PKCS#11 token. |
static SigningData |
fromPkcs12File(String pkcs12StoreFilename,
String pkcs12StorePassword)
Creates a SigningData object from a PKCS#12 (also known as PFX) file
with only one valid key. |
static SigningData |
fromPkcs12File(String pkcs12StoreFilename,
String pkcs12StorePassword,
String keyAlias)
Creates a SigningData object from a PKCS#12 (also known as PFX) file. |
static SigningData |
fromWindowsKeyStore()
Creates a SigningData object from Windows key store with only one valid key. |
static SigningData |
fromWindowsKeyStore(String keyAlias)
Creates a SigningData object from Windows key store. |
SignatureAppearanceData |
getAppearanceData()
Returns signature appearance data. |
CertificationLevelEnum |
getCertificationLevel()
Returns the certification level of the signature. |
String |
getContact()
Returns the contact information of the signer. |
String |
getFieldName()
Returns the name of the signature field, where the signature will be created. |
Rectangle2D.Float |
getFieldRectangle()
Returns the rectangle with coordinates for the new signature field, where the digital signature will be placed. |
HashAlgorithmEnum |
getHashAlgorithm()
Returns the hash algorithm that will be used by creating the signature. |
String |
getKeyAlias()
Returns the alias of the key that will be used for signing. |
String |
getKeyPassword()
Returns the key password. |
KeyStore |
getKeyStore()
Returns the key store with the key. |
String |
getLocation()
Returns the geographic location, where the signature is created. |
int |
getPageNumber()
Returns the page number, where the signature will be created. |
Provider |
getProvider()
Returns the provider that was used to load key store. |
String |
getProxyServerHost()
Returns the address of the proxy server host. |
int |
getProxyServerPort()
Returns the port of the proxy server host. |
String |
getReason()
Return the reason of the signature. |
String |
getTsaServerAccount()
Returns your account name (login information) on the time stamp server. |
String |
getTsaServerPassword()
Returns the password for your account on the time stamp server. |
String |
getTsaServerPolicyOid()
Returns the policy OID for the time stamp server. |
String |
getTsaServerUrl()
Return the URL of the time stamp server. |
boolean |
isIncludeCrls()
Returns true if signature will include CRLs (Certificate Revocation Lists). |
boolean |
isIncludeOcspResponse()
Returns true if signature will include OCSP response (Online Certificate Status Protocol). |
void |
setAppearanceData(SignatureAppearanceData appearanceData)
Specifies signature appearance data, that is how the signature will look like. |
void |
setCertificationLevel(CertificationLevelEnum certificationLevel)
With the certification level for your signature you can specify what changes are allowed on your document after signing. |
void |
setContact(String contact)
Specifies the contact information of the signer, like email address or phone number. |
void |
setFieldName(String fieldName)
Specifies the name of some existing empty signature field in the document, where the signature will be created. |
void |
setFieldRectangle(Rectangle2D.Float fieldRectangle)
Specifies the rectangle coordinates for the new signature field, that will be created before signing the document. |
void |
setHashAlgorithm(HashAlgorithmEnum hashAlgorithm)
Sets the hash algorithm that will be used by creating the signature. |
void |
setIncludeCrls(boolean includeCrls)
Specifies if the signature should include CRLs (Certificate Revocation Lists). |
void |
setIncludeOcspResponse(boolean includeOcspReponse)
Specifies if the signature should include OCSP response (Online Certificate Status Protocol). |
void |
setLocation(String location)
Returns the geographic location, where the signature is created. |
void |
setPageNumber(int pageNumber)
Specifies the page number, where the signature will be created. |
void |
setProvider(Provider provider)
Sets the provider that was used to load the key store. |
void |
setProxyServerHost(String proxyServerHost)
Sets the address of the proxy server host. |
void |
setProxyServerPort(int proxyServerPort)
Sets the prot of the proxy server host. |
void |
setReason(String reason)
Specifies the reason of the signature. |
void |
setTsaServerAccount(String tsaServerAccount)
Sets your account name (login information) for the time stamp server. |
void |
setTsaServerPassword(String tsaServerPassword)
Sets the password for your account on the time stamp server. |
void |
setTsaServerPolicyOid(String tsaServerPolicyOid)
Sets the policy OID for your time stamp server. |
void |
setTsaServerUrl(String tsaServerUrl)
Sets the URL of the time stamp server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SigningData fromKeyStore(KeyStore keyStore, String keyAlias, String keyPassword)
SigningData
object from a general KeyStore
.
keyStore
- key store objectkeyAlias
- alias of the key in the key store that will be used for signingkeyPassword
- password required to access the key
SigningData
objectpublic static SigningData fromPkcs12File(String pkcs12StoreFilename, String pkcs12StorePassword, String keyAlias)
SigningData
object from a PKCS#12 (also known as PFX) file.
pkcs12StoreFilename
- name of the PKCS#12 file with the key storepkcs12StorePassword
- key store passwordkeyAlias
- alias of the key in the key store that will be used for signing
SigningData
objectpublic static SigningData fromPkcs12File(String pkcs12StoreFilename, String pkcs12StorePassword)
SigningData
object from a PKCS#12 (also known as PFX) file
with only one valid key.
No key alias is required for this method. Use it when you have only one valid
key in your key store. If you have more than one valid key, the key will be
used, that will expire as first.
pkcs12StoreFilename
- name of the PKCS#12 file with the key storepkcs12StorePassword
- key store password
SigningData
objectpublic static SigningData fromJksFile(String jksStoreFilename, String jksStorePassword, String keyAlias, String keyPassword)
SigningData
object from a JKS (Java Key Store) file.
jksStoreFilename
- name of the JKS file with the key storejksStorePassword
- key store passwordkeyAlias
- alias of the key in the key store that will be used for signingkeyPassword
- password required to access the key
SigningData
objectpublic static SigningData fromJksFile(String jksStoreFilename, String jksStorePassword, String keyPassword)
SigningData
object from a JKS (Java Key Store) file with only one valid key.
No key alias is required for this method. Use it when you have only one valid
key in your key store. If you have more than one valid key, the key will be
used, that will expire as first.
jksStoreFilename
- name of the JKS file with the key storejksStorePassword
- key store passwordkeyPassword
- password required to access the key
SigningData
objectpublic static SigningData fromPkcs11Token(String libraryFilename, String keyAlias, String tokenPin)
SigningData
object from a PKCS#11 token.
libraryFilename
- name of the PKCS#11 library filekeyAlias
- alias of the key on the token that will be used for signingtokenPin
- token pin
SigningData
objectpublic static SigningData fromPkcs11Token(String libraryFilename, String tokenPin)
SigningData
object from a PKCS#11 token with only one valid key.
No key alias is required for this method. Use it when you have only one valid
key on your token. If you have more than one valid key, the key will be
used, that will expire as first.
libraryFilename
- name of the PKCS#11 library filetokenPin
- token pin
SigningData
objectpublic static SigningData fromWindowsKeyStore(String keyAlias)
SigningData
object from Windows key store.
keyAlias
- alias of the key in Windows Key store that will be used for signing
SigningData
objectpublic static SigningData fromWindowsKeyStore()
SigningData
object from Windows key store with only one valid key.
No key alias is required for this method. Use it when you have only one valid
key in the Windows key store. If you have more than one valid key, the key will be
used, that will expire as first.
keyAlias
- alias of the key in Windows Key store that will be used for signing
SigningData
objectpublic KeyStore getKeyStore()
public String getKeyAlias()
public String getKeyPassword()
public String getFieldName()
setFieldName(String)
.
public void setFieldName(String fieldName)
setFieldRectangle(java.awt.geom.Rectangle2D.Float)
then the
signature field name will be ignored.
fieldName
- signature field name where the signature will be createdpublic Rectangle2D.Float getFieldRectangle()
public void setFieldRectangle(Rectangle2D.Float fieldRectangle)
fieldRectangle
- new signature field rectangle, where the signature will be createdpublic int getPageNumber()
public void setPageNumber(int pageNumber)
pageNumber
- page number, where the signature will be createdpublic SignatureAppearanceData getAppearanceData()
public void setAppearanceData(SignatureAppearanceData appearanceData)
appearanceData
- signature appearance datapublic String getReason()
public void setReason(String reason)
reason
- signature reasonpublic String getLocation()
public void setLocation(String location)
location
- signature locationpublic String getContact()
public void setContact(String contact)
contact
- signer contact informationpublic CertificationLevelEnum getCertificationLevel()
public void setCertificationLevel(CertificationLevelEnum certificationLevel)
certificationLevel
- signature certification levelCertificationLevelEnum
public String getTsaServerUrl()
public void setTsaServerUrl(String tsaServerUrl)
tsaServerUrl
- time stamp server URLpublic String getTsaServerAccount()
public void setTsaServerAccount(String tsaServerAccount)
tsaServerAccount
- account name on the time stamp serverpublic String getTsaServerPassword()
public void setTsaServerPassword(String tsaServerPassword)
tsaServerPassword
- password for the account on the time stamp serverpublic String getTsaServerPolicyOid()
public void setTsaServerPolicyOid(String tsaServerPolicyOid)
tsaServerPolicyOid
- time stamp server policy OIDpublic boolean isIncludeCrls()
true
if signature will include CRLs (Certificate Revocation Lists).
See setIncludeCrls(boolean)
for more information.
public void setIncludeCrls(boolean includeCrls)
true
, for every certificate in your certificate chain
the corresponding list of revoked certificates will be downloaded from the
web site of responsible certificate authority. Those lists will be encoded in the
digital signature.
includeCrls
- flag indicating if include CRLs in the signaturepublic boolean isIncludeOcspResponse()
true
if signature will include OCSP response (Online Certificate Status Protocol).
See setIncludeOcspResponse(boolean)
for more information.
public void setIncludeOcspResponse(boolean includeOcspReponse)
true
, for your signing certificate the request to the OCSP server
of the responsible certificate authority will be made. The result of the request will be saved
in the digital signature.
includeOcspReponse
- flag indicating if include OCSP response in the signaturepublic String getProxyServerHost()
public void setProxyServerHost(String proxyServerHost)
proxyServerHost
- proxy server host addresspublic int getProxyServerPort()
public void setProxyServerPort(int proxyServerPort)
proxyServerPort
- port of the proxy server hostpublic HashAlgorithmEnum getHashAlgorithm()
HashAlgorithmEnum
public void setHashAlgorithm(HashAlgorithmEnum hashAlgorithm)
hashAlgorithm
- signature hash algorithmHashAlgorithmEnum
public Provider getProvider()
public void setProvider(Provider provider)
provider
- provider that was used to load the key store
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |