Package org.digidoc4j.impl.ddoc
Class DDocSignature
java.lang.Object
org.digidoc4j.impl.ddoc.DDocSignature
- All Implemented Interfaces:
Serializable
,Signature
Signature implementation. Provides an interface for handling a signature and the
corresponding OCSP response properties.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns signature as XAdES XMLgetCertValueOfType
(int type) Retrieves CertValue element with the desired typegetCity()
Returns the signature production city.Returns the computer's time of signing.Returns the signature production country.getId()
Returns the signature id.int
Get index In array.Returns the signature OCSP responder certificate.byte[]
Returns the signature OCSP response nonce ornull
if OCSP response is not present or OCSP nonce is not found inside the OCSP response.This method returns OCSP response creation time (Date object), it can be null.Returns the signature production postal code.Returns the signature profile.Returns the signature method that was used for signing.Returns the signer's roles.Returns the signature certificate that was used for signing.Returns the signature production state or province.Returns the signature timestamp generation time.Returns the signature TimeStampToken certificate.This method returns OCSP response creation time (Date object), it can be null.Returns the identifier that uniquely identifies this signature.void
setCertificate
(X509Cert cert) Set certificate.void
setIndexInArray
(int indexInArray) Set index In array.Validates the signature.
-
Constructor Details
-
DDocSignature
- Parameters:
signature
- add description
-
-
Method Details
-
setCertificate
Set certificate.- Parameters:
cert
-
-
getCity
Description copied from interface:Signature
Returns the signature production city. -
getCountryName
Description copied from interface:Signature
Returns the signature production country.- Specified by:
getCountryName
in interfaceSignature
- Returns:
- production country
-
getId
Description copied from interface:Signature
Returns the signature id. -
getUniqueId
Description copied from interface:Signature
Returns the identifier that uniquely identifies this signature.- Specified by:
getUniqueId
in interfaceSignature
- Returns:
- unique identifier
-
getOCSPNonce
public byte[] getOCSPNonce()Description copied from interface:Signature
Returns the signature OCSP response nonce ornull
if OCSP response is not present or OCSP nonce is not found inside the OCSP response.- Specified by:
getOCSPNonce
in interfaceSignature
- Returns:
- OCSP response nonce or
null
if not found
-
getOCSPCertificate
Description copied from interface:Signature
Returns the signature OCSP responder certificate.- Specified by:
getOCSPCertificate
in interfaceSignature
- Returns:
- OCSP responder certificate
-
getPostalCode
Description copied from interface:Signature
Returns the signature production postal code.- Specified by:
getPostalCode
in interfaceSignature
- Returns:
- postal code
-
getOCSPResponseCreationTime
This method returns OCSP response creation time (Date object), it can be null.- Specified by:
getOCSPResponseCreationTime
in interfaceSignature
- Returns:
- date.
-
getTimeStampCreationTime
Description copied from interface:Signature
Returns the signature timestamp generation time.- Specified by:
getTimeStampCreationTime
in interfaceSignature
- Returns:
- generation timestamp
-
getTrustedSigningTime
This method returns OCSP response creation time (Date object), it can be null.- Specified by:
getTrustedSigningTime
in interfaceSignature
- Returns:
- date.
-
getProfile
Description copied from interface:Signature
Returns the signature profile.- Specified by:
getProfile
in interfaceSignature
- Returns:
- profile
-
getSignatureMethod
Description copied from interface:Signature
Returns the signature method that was used for signing.- Specified by:
getSignatureMethod
in interfaceSignature
- Returns:
- signature method
-
getSignerRoles
Description copied from interface:Signature
Returns the signer's roles.- Specified by:
getSignerRoles
in interfaceSignature
- Returns:
- signer roles
-
getSigningCertificate
Description copied from interface:Signature
Returns the signature certificate that was used for signing.- Specified by:
getSigningCertificate
in interfaceSignature
- Returns:
- signature certificate
-
getClaimedSigningTime
Description copied from interface:Signature
Returns the computer's time of signing.See also
Signature.getTrustedSigningTime()
- Specified by:
getClaimedSigningTime
in interfaceSignature
- Returns:
- signing time
-
getStateOrProvince
Description copied from interface:Signature
Returns the signature production state or province.- Specified by:
getStateOrProvince
in interfaceSignature
- Returns:
- production state or province
-
getTimeStampTokenCertificate
Description copied from interface:Signature
Returns the signature TimeStampToken certificate. For a DDOC Signature it throws a NotYetImplementedException.- Specified by:
getTimeStampTokenCertificate
in interfaceSignature
- Returns:
- TimeStampToken certificate
-
validateSignature
Description copied from interface:Signature
Validates the signature.- Specified by:
validateSignature
in interfaceSignature
- Returns:
- the validation result.
-
getCertValueOfType
Retrieves CertValue element with the desired type- Parameters:
type
- CertValue type- Returns:
- CertValue element or null if not found
-
getAdESSignature
public byte[] getAdESSignature()Description copied from interface:Signature
Returns signature as XAdES XML- Specified by:
getAdESSignature
in interfaceSignature
- Returns:
- signature as byte array
-
getIndexInArray
public int getIndexInArray()Get index In array.- Returns:
- integer.
-
setIndexInArray
public void setIndexInArray(int indexInArray) Set index In array.- Parameters:
indexInArray
-
-