libdigidocpp 4.1.0
digidoc::XmlConfV5 Class Reference

Version 5 of XML Configuration class. More...

#include <XmlConf.h>

Inherits digidoc::ConfV5.

Public Member Functions

 XmlConfV5 (const std::string &path={}, const std::string &schema={})
 
 ~XmlConfV5 () override
 
int logLevel () const override
 
std::string logFile () const override
 
std::string PKCS11Driver () const override
 
std::string proxyHost () const override
 
std::string proxyPort () const override
 
std::string proxyUser () const override
 
std::string proxyPass () const override
 
bool proxyForceSSL () const override
 
bool proxyTunnelSSL () const override
 
std::string digestUri () const override
 
std::string signatureDigestUri () const override
 
std::string ocsp (const std::string &issuer) const override
 
std::set< std::string > OCSPTMProfiles () const override
 
std::vector< X509CertTSCerts () const override
 
std::string TSUrl () const override
 
X509Cert verifyServiceCert () const override
 
std::vector< X509CertverifyServiceCerts () const override
 
std::string verifyServiceUri () const override
 
DIGIDOCPP_DEPRECATED std::string PKCS12Cert () const override
 
DIGIDOCPP_DEPRECATED std::string PKCS12Pass () const override
 
DIGIDOCPP_DEPRECATED bool PKCS12Disable () const override
 
bool TSLAutoUpdate () const override
 
std::string TSLCache () const override
 
bool TSLOnlineDigest () const override
 
int TSLTimeOut () const override
 
virtual void setProxyHost (const std::string &host)
 
virtual void setProxyPort (const std::string &port)
 
virtual void setProxyUser (const std::string &user)
 
virtual void setProxyPass (const std::string &pass)
 
virtual void setProxyTunnelSSL (bool enable)
 
virtual DIGIDOCPP_DEPRECATED void setPKCS12Cert (const std::string &cert)
 
virtual DIGIDOCPP_DEPRECATED void setPKCS12Pass (const std::string &pass)
 
virtual DIGIDOCPP_DEPRECATED void setPKCS12Disable (bool disable)
 
virtual void setTSLOnlineDigest (bool enable)
 
virtual void setTSLTimeOut (int timeOut)
 
virtual void setTSUrl (const std::string &url)
 
virtual void setVerifyServiceUri (const std::string &url)
 
- Public Member Functions inherited from digidoc::ConfV5
 ConfV5 ()
 
 ~ConfV5 () override
 
- Public Member Functions inherited from digidoc::ConfV4
 ConfV4 ()
 
 ~ConfV4 () override
 
- Public Member Functions inherited from digidoc::ConfV3
 ConfV3 ()
 
 ~ConfV3 () override
 
- Public Member Functions inherited from digidoc::ConfV2
 ConfV2 ()
 
 ~ConfV2 () override
 
- Public Member Functions inherited from digidoc::Conf
 Conf ()
 
virtual ~Conf ()
 
virtual DIGIDOCPP_DEPRECATED std::string libdigidocConf () const
 
virtual DIGIDOCPP_DEPRECATED std::string certsPath () const
 
virtual std::string xsdPath () const
 
virtual bool TSLAllowExpired () const
 
virtual std::vector< X509CertTSLCerts () const
 
virtual std::string TSLUrl () const
 

Static Public Member Functions

static XmlConfV5instance ()
 
- Static Public Member Functions inherited from digidoc::ConfV5
static ConfV5instance ()
 
- Static Public Member Functions inherited from digidoc::ConfV4
static ConfV4instance ()
 
- Static Public Member Functions inherited from digidoc::ConfV3
static ConfV3instance ()
 
- Static Public Member Functions inherited from digidoc::ConfV2
static ConfV2instance ()
 
- Static Public Member Functions inherited from digidoc::Conf
static void init (Conf *conf)
 
static Confinstance ()
 

Detailed Description

Version 5 of XML Configuration class.

See also
digidoc::ConfV5

Constructor & Destructor Documentation

◆ XmlConfV5()

XmlConfV5::XmlConfV5 ( const std::string &  path = {},
const std::string &  schema = {} 
)
explicit

Initialize xml conf from path

◆ ~XmlConfV5()

XmlConfV5::~XmlConfV5 ( )
overridedefault

Member Function Documentation

◆ digestUri()

std::string digidoc::XmlConfV5::digestUri ( ) const
overridevirtual

Return default digest type as URI

Reimplemented from digidoc::Conf.

◆ instance()

XmlConfV5 * XmlConfV5::instance ( )
static

Return global config instance object

References digidoc::Conf::instance().

◆ logFile()

std::string digidoc::XmlConfV5::logFile ( ) const
overridevirtual

Gets log file location. Default log goes to standard out stream

Reimplemented from digidoc::Conf.

◆ logLevel()

int digidoc::XmlConfV5::logLevel ( ) const
overridevirtual

Returns log level. 0 = Error 1 = Warn 2 = Info 3 = Debug

Reimplemented from digidoc::Conf.

◆ ocsp()

string XmlConfV5::ocsp ( const std::string &  issuer) const
overridevirtual

Return OCSP request URL

Parameters
issuerOCSP issuer.

Reimplemented from digidoc::Conf.

References digidoc::Conf::ocsp().

◆ OCSPTMProfiles()

set< string > XmlConfV5::OCSPTMProfiles ( ) const
overridevirtual

Gets OCSP TM Profile OID-s

OCSP responder certificate policies that are used to identify if OCSP response is given with TM profile

Reimplemented from digidoc::ConfV3.

References digidoc::ConfV3::OCSPTMProfiles().

◆ PKCS11Driver()

std::string digidoc::XmlConfV5::PKCS11Driver ( ) const
overridevirtual

Returns PKCS11 driver file path

Reimplemented from digidoc::Conf.

◆ PKCS12Cert()

DIGIDOCPP_DEPRECATED std::string digidoc::XmlConfV5::PKCS12Cert ( ) const
overridevirtual

Gets PKCS12 certificate file location.

Used for signing OCSP request

Reimplemented from digidoc::Conf.

◆ PKCS12Disable()

DIGIDOCPP_DEPRECATED bool digidoc::XmlConfV5::PKCS12Disable ( ) const
overridevirtual

Gets PKCS12 usage.

See also
digidoc::Conf::PKCS12Cert

Reimplemented from digidoc::Conf.

◆ PKCS12Pass()

DIGIDOCPP_DEPRECATED std::string digidoc::XmlConfV5::PKCS12Pass ( ) const
overridevirtual

Gets PKCS12 password.

See also
digidoc::Conf::PKCS12Cert

Reimplemented from digidoc::Conf.

◆ proxyForceSSL()

bool digidoc::XmlConfV5::proxyForceSSL ( ) const
overridevirtual

Redirect SSL traffic over proxy server Default: false

Reimplemented from digidoc::Conf.

◆ proxyHost()

std::string digidoc::XmlConfV5::proxyHost ( ) const
overridevirtual

Gets proxy host address.

Reimplemented from digidoc::Conf.

◆ proxyPass()

std::string digidoc::XmlConfV5::proxyPass ( ) const
overridevirtual

Gets proxy login password.

Reimplemented from digidoc::Conf.

◆ proxyPort()

std::string digidoc::XmlConfV5::proxyPort ( ) const
overridevirtual

Gets proxy port number.

Reimplemented from digidoc::Conf.

◆ proxyTunnelSSL()

bool digidoc::XmlConfV5::proxyTunnelSSL ( ) const
overridevirtual

Tunnel SSL traffic over proxy server Default: false

Reimplemented from digidoc::Conf.

◆ proxyUser()

std::string digidoc::XmlConfV5::proxyUser ( ) const
overridevirtual

Gets proxy user name.

Reimplemented from digidoc::Conf.

◆ setPKCS12Cert()

void digidoc::XmlConfV5::setPKCS12Cert ( const std::string &  cert)
virtual

Sets a PKCS#12 certficate path. Also adds or replaces PKCS#12 certificate path in the user configuration file. By default the PKCS#12 certificate file should be located at default path, given by getUserConfDir() function.

Parameters
certPKCS#12 certificate location path.
Exceptions
Exceptionexception is thrown if saving a PKCS#12 certificate path into a user configuration file fails.

◆ setPKCS12Disable()

void digidoc::XmlConfV5::setPKCS12Disable ( bool  disable)
virtual

Sets a PKCS#12 certificate usage. Also adds or replaces PKCS#12 certificate usage in the user configuration file.

Parameters
disablePKCS#12 certificate usage.
Exceptions
Exceptionexception is thrown if saving a PKCS#12 certificate usage into a user configuration file fails.

◆ setPKCS12Pass()

void digidoc::XmlConfV5::setPKCS12Pass ( const std::string &  pass)
virtual

Sets a PKCS#12 certificate password. Also adds or replaces PKCS#12 certificate password in the user configuration file.

Parameters
passPKCS#12 certificate password.
Exceptions
Exceptionexception is thrown if saving a PKCS#12 certificate password into a user configuration file fails.

◆ setProxyHost()

void digidoc::XmlConfV5::setProxyHost ( const std::string &  host)
virtual

Sets a Proxy host address. Also adds or replaces proxy host data in the user configuration file.

Parameters
hostproxy host address.
Exceptions
Exceptionexception is thrown if saving a proxy host address into a user configuration file fails.

◆ setProxyPass()

void digidoc::XmlConfV5::setProxyPass ( const std::string &  pass)
virtual

Sets a Proxy password. Also adds or replaces proxy password in the user configuration file.

Parameters
passproxy password.
Exceptions
Exceptionexception is thrown if saving a proxy password into a user configuration file fails.

◆ setProxyPort()

void digidoc::XmlConfV5::setProxyPort ( const std::string &  port)
virtual

Sets a Proxy port number. Also adds or replaces proxy port data in the user configuration file.

Parameters
portproxy port number.
Exceptions
Exceptionexception is thrown if saving a proxy port number into a user configuration file fails.

◆ setProxyTunnelSSL()

void digidoc::XmlConfV5::setProxyTunnelSSL ( bool  enable)
virtual

Enables SSL proxy connections

Exceptions
Exceptionexception is thrown if saving into a user configuration file fails.

◆ setProxyUser()

void digidoc::XmlConfV5::setProxyUser ( const std::string &  user)
virtual

Sets a Proxy user name. Also adds or replaces proxy user name in the user configuration file.

Parameters
userproxy user name.
Exceptions
Exceptionexception is thrown if saving a proxy user name into a user configuration file fails.

◆ setTSLOnlineDigest()

void digidoc::XmlConfV5::setTSLOnlineDigest ( bool  enable)
virtual

Enables/Disables online digest check

Exceptions
Exceptionexception is thrown if saving a TSL online digest into a user configuration file fails.

◆ setTSLTimeOut()

void digidoc::XmlConfV5::setTSLTimeOut ( int  timeOut)
virtual

Sets TSL connection timeout

Parameters
timeOutTime out in seconds
Exceptions
Exceptionexception is thrown if saving a TSL timeout into a user configuration file fails.

◆ setTSUrl()

void digidoc::XmlConfV5::setTSUrl ( const std::string &  url)
virtual

Sets a TSA service URL. Also adds or replaces TSA service URL in the user configuration file.

Parameters
urlTarget URL to connect TSA service.
Exceptions
Exceptionexception is thrown if saving a TS service URL into a user configuration file fails.

◆ setVerifyServiceUri()

void digidoc::XmlConfV5::setVerifyServiceUri ( const std::string &  url)
virtual

Sets a Verify service URL. Also adds or replaces Verify service URL in the user configuration file.

Parameters
urlTarget URL to connect Verify service.
Exceptions
Exceptionexception is thrown if saving a Verify service URL into a user configuration file fails.

◆ signatureDigestUri()

std::string digidoc::XmlConfV5::signatureDigestUri ( ) const
overridevirtual

Gets signature digest URI

Reimplemented from digidoc::Conf.

◆ TSCerts()

vector< X509Cert > XmlConfV5::TSCerts ( ) const
overridevirtual

Gets verify service Certs

Reimplemented from digidoc::ConfV5.

References digidoc::ConfV5::TSCerts().

◆ TSLAutoUpdate()

bool digidoc::XmlConfV5::TSLAutoUpdate ( ) const
overridevirtual

Download new TSL list when it is expired or invalid

Reimplemented from digidoc::Conf.

◆ TSLCache()

std::string digidoc::XmlConfV5::TSLCache ( ) const
overridevirtual

TSL cache path in local file system

Reimplemented from digidoc::Conf.

◆ TSLOnlineDigest()

bool digidoc::XmlConfV5::TSLOnlineDigest ( ) const
overridevirtual

Compare local TSL digest with digest published online to check for newer version

Reimplemented from digidoc::Conf.

◆ TSLTimeOut()

int digidoc::XmlConfV5::TSLTimeOut ( ) const
overridevirtual

Gets TSL downloading connection's current timeout value

Reimplemented from digidoc::Conf.

◆ TSUrl()

std::string digidoc::XmlConfV5::TSUrl ( ) const
overridevirtual

Returns default time-stamp server URL

Reimplemented from digidoc::Conf.

◆ verifyServiceCert()

X509Cert XmlConfV5::verifyServiceCert ( ) const
overridevirtual

Gets verify service Cert

Reimplemented from digidoc::ConfV2.

References digidoc::ConfV2::verifyServiceCert().

◆ verifyServiceCerts()

vector< X509Cert > XmlConfV5::verifyServiceCerts ( ) const
overridevirtual

Gets verify service Certs

Reimplemented from digidoc::ConfV4.

References digidoc::ConfV4::verifyServiceCerts().

◆ verifyServiceUri()

std::string digidoc::XmlConfV5::verifyServiceUri ( ) const
overridevirtual

Gets verify service URI

Reimplemented from digidoc::Conf.


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