libdigidocpp 4.1.0
digidoc::Signature Class Referenceabstract

Signature interface. Provides interface for handling a signature and the corresponding OCSP response properties. More...

#include <Signature.h>

Classes

class  Validator
 

Public Member Functions

virtual ~Signature ()
 
virtual std::string id () const =0
 
virtual std::string claimedSigningTime () const =0
 
virtual std::string trustedSigningTime () const =0
 
virtual X509Cert signingCertificate () const =0
 
virtual std::string signatureMethod () const =0
 
virtual void validate () const =0
 
virtual std::vector< unsigned char > dataToSign () const =0
 
virtual void setSignatureValue (const std::vector< unsigned char > &signatureValue)=0
 
virtual DIGIDOCPP_DEPRECATED void extendSignatureProfile (const std::string &profile)
 
virtual std::string policy () const
 
virtual std::string SPUri () const
 
virtual std::string profile () const =0
 
virtual std::string city () const
 
virtual std::string stateOrProvince () const
 
virtual std::string postalCode () const
 
virtual std::string countryName () const
 
virtual std::vector< std::string > signerRoles () const
 
virtual std::string OCSPProducedAt () const
 
virtual X509Cert OCSPCertificate () const
 
virtual DIGIDOCPP_DEPRECATED std::vector< unsigned char > OCSPNonce () const
 
virtual X509Cert TimeStampCertificate () const
 
virtual std::string TimeStampTime () const
 
virtual X509Cert ArchiveTimeStampCertificate () const
 
virtual std::string ArchiveTimeStampTime () const
 
virtual std::string streetAddress () const
 
virtual std::string signedBy () const
 
virtual void validate (const std::string &policy) const
 
virtual std::vector< unsigned char > messageImprint () const
 
virtual void extendSignatureProfile (Signer *signer)
 

Static Public Attributes

static const std::string POLv1 = "POLv1"
 
static const std::string POLv2 = "POLv2"
 

Protected Member Functions

 Signature ()
 

Detailed Description

Signature interface. Provides interface for handling a signature and the corresponding OCSP response properties.

Constructor & Destructor Documentation

◆ ~Signature()

Signature::~Signature ( )
virtualdefault

Releases signature.

◆ Signature()

Signature::Signature ( )
protecteddefault

Creates an new empty signature.

Member Function Documentation

◆ ArchiveTimeStampCertificate()

X509Cert Signature::ArchiveTimeStampCertificate ( ) const
virtual

Returns signature Archive TimeStampToken certificate.

◆ ArchiveTimeStampTime()

string Signature::ArchiveTimeStampTime ( ) const
virtual

Returns signature Archive TimeStampToken time.

◆ city()

string Signature::city ( ) const
virtual

Returns signature production city.

◆ claimedSigningTime()

digidoc::Signature::claimedSigningTime ( ) const
pure virtual

Returns signature computer time that was used for signing.

◆ countryName()

string Signature::countryName ( ) const
virtual

Returns signature production country.

◆ dataToSign()

digidoc::Signature::dataToSign ( ) const
pure virtual

Digest to sign with token

◆ extendSignatureProfile() [1/2]

void Signature::extendSignatureProfile ( const std::string &  profile)
virtual

Extends signature to selected profile

Parameters
profileTarget profile

References extendSignatureProfile(), and profile().

Referenced by extendSignatureProfile().

◆ extendSignatureProfile() [2/2]

void Signature::extendSignatureProfile ( Signer signer)
virtual

Extends signature to selected profile

Parameters
signerSigner parameters

◆ id()

digidoc::Signature::id ( ) const
pure virtual

Returns signature id.

◆ messageImprint()

vector< unsigned char > Signature::messageImprint ( ) const
virtual

Returns signed signature hash message imprint value (TM - OCSP Nonce, TS - TimeStamp value)

Referenced by OCSPNonce().

◆ OCSPCertificate()

X509Cert Signature::OCSPCertificate ( ) const
virtual

Returns signature OCSP responder certificate.

◆ OCSPNonce()

vector< unsigned char > Signature::OCSPNonce ( ) const
virtual

Returns signed signature message imprint in OCSP response nonce.

Deprecated:
Use messageImprint()

References messageImprint().

◆ OCSPProducedAt()

string Signature::OCSPProducedAt ( ) const
virtual

Returns signature OCSP producedAt timestamp.

◆ policy()

string Signature::policy ( ) const
virtual

Returns signature policy when it is available or empty string.

◆ postalCode()

string Signature::postalCode ( ) const
virtual

Returns signature production postal code.

◆ profile()

digidoc::Signature::profile ( ) const
pure virtual

Returns signature profile.

Referenced by extendSignatureProfile().

◆ setSignatureValue()

digidoc::Signature::setSignatureValue ( const std::vector< unsigned char > &  signatureValue)
pure virtual

Signed digest will be added to SignatureValue element

See also
dataToSign

◆ signatureMethod()

digidoc::Signature::signatureMethod ( ) const
pure virtual

Returns signature method that was used for signing.

◆ signedBy()

string Signature::signedBy ( ) const
virtual

Return signer's certificate common name

References signingCertificate(), and digidoc::X509Cert::subjectName().

◆ signerRoles()

vector< string > Signature::signerRoles ( ) const
virtual

Returns signer's roles.

◆ signingCertificate()

digidoc::Signature::signingCertificate ( ) const
pure virtual

Returns signature certificate that was used for signing.

Referenced by signedBy().

◆ SPUri()

string Signature::SPUri ( ) const
virtual

Returns signature policy uri when it is available or empty string.

◆ stateOrProvince()

string Signature::stateOrProvince ( ) const
virtual

Returns signature production state or province.

◆ streetAddress()

string Signature::streetAddress ( ) const
virtual

Returns signature production street address.

◆ TimeStampCertificate()

X509Cert Signature::TimeStampCertificate ( ) const
virtual

Returns signature TimeStampToken certificate.

◆ TimeStampTime()

string Signature::TimeStampTime ( ) const
virtual

Returns signature TimeStampToken time.

◆ trustedSigningTime()

digidoc::Signature::trustedSigningTime ( ) const
pure virtual

Time value that is regarded as trusted signing time, denoting the earliest time when it can be trusted by the validation application (because proven by some Proof-of-Existence present in the signature) that a signature has existed.

◆ validate() [1/2]

digidoc::Signature::validate ( ) const
pure virtual

Validates signature

Referenced by validate(), and digidoc::Signature::Validator::Validator().

◆ validate() [2/2]

void Signature::validate ( const std::string &  policy) const
virtual

Validates signature

See also
POLv1
POLv2

References validate().

Member Data Documentation

◆ POLv1

◆ POLv2


The documentation for this class was generated from the following files: