Implements Signer
interface for PKCS#12 files.
More...
#include <PKCS12Signer.h>
Inherits digidoc::Signer.
|
| PKCS12Signer (const std::string &path, const std::string &pass) |
|
| ~PKCS12Signer () override |
|
X509Cert | cert () const override |
|
std::vector< unsigned char > | sign (const std::string &method, const std::vector< unsigned char > &digest) const override |
|
virtual | ~Signer () |
|
virtual X509Cert | cert () const =0 |
|
virtual std::vector< unsigned char > | sign (const std::string &method, const std::vector< unsigned char > &digest) const =0 |
|
virtual std::string | method () const |
|
std::string | profile () const |
|
std::string | userAgent () const |
|
bool | usingENProfile () const |
|
std::string | city () const |
|
std::string | streetAddress () const |
|
std::string | stateOrProvince () const |
|
std::string | postalCode () const |
|
std::string | countryName () const |
|
std::vector< std::string > | signerRoles () const |
|
void | setMethod (const std::string &method) |
|
void | setProfile (const std::string &profile) |
|
void | setUserAgent (const std::string &userAgent) |
|
void | setENProfile (bool enable) |
|
void | setSignatureProductionPlace (const std::string &city, const std::string &stateOrProvince, const std::string &postalCode, const std::string &countryName) |
|
void | setSignatureProductionPlaceV2 (const std::string &city, const std::string &streetAddress, const std::string &stateOrProvince, const std::string &postalCode, const std::string &countryName) |
|
void | setSignerRoles (const std::vector< std::string > &signerRoles) |
|
Implements Signer
interface for PKCS#12 files.
◆ PKCS12Signer()
PKCS12Signer::PKCS12Signer |
( |
const std::string & |
path, |
|
|
const std::string & |
pass |
|
) |
| |
Initializes the PKCS12 signer with PKCS#12 file and password.
- Parameters
-
path | PKCS#12 file path |
pass | PKCS#12 file password |
- Exceptions
-
Exception | throws exception if the file is not found or wrong password |
◆ ~PKCS12Signer()
PKCS12Signer::~PKCS12Signer |
( |
| ) |
|
|
override |
◆ cert()
Returns signer certificate. Must be reimplemented when subclassing
Implements digidoc::Signer.
◆ sign()
vector< unsigned char > PKCS12Signer::sign |
( |
const std::string & |
method, |
|
|
const std::vector< unsigned char > & |
digest |
|
) |
| const |
|
overridevirtual |
Signs message digest. Must be reimplemented when subclassing
- Parameters
-
method | digest method to be used |
digest | digest to sign |
- Returns
- signature signed result
- Exceptions
-
Implements digidoc::Signer.
References digidoc::Signer::method().
The documentation for this class was generated from the following files:
- PKCS12Signer.h
- PKCS12Signer.cpp