libdigidocpp
|
Public Member Functions | |
PKCS11ConsolePinSigner (const std::string &driver) throw (SignException) | |
virtual | ~PKCS11ConsolePinSigner () |
![]() | |
PKCS11Signer () throw (SignException) | |
PKCS11Signer (const std::string &driver) throw (SignException) | |
virtual | ~PKCS11Signer () |
X509 * | getCert () const throw (SignException) |
void | sign (const Digest &digest, Signature &signature) throw (SignException) |
void | loadDriver () throw (SignException) |
void | loadDriver (const std::string &driver) throw (SignException) |
void | unloadDriver () |
virtual std::string | getPin (const PKCS11Cert &certificate)=0 throw (SignException) |
![]() | |
virtual | ~Signer () |
virtual int | type () const |
void | setSignatureProductionPlace (const SignatureProductionPlace &signatureProductionPlace) |
SignatureProductionPlace | getSignatureProductionPlace () const |
void | setSignerRole (const SignerRole &signerRole) |
SignerRole | getSignerRole () const |
Protected Member Functions | |
virtual PKCS11Signer::PKCS11Cert | selectSigningCertificate (std::vector< PKCS11Signer::PKCS11Cert > certificates) throw (SignException) |
virtual std::string | getPin (PKCS11Signer::PKCS11Cert certificate) throw (SignException) |
![]() | |
virtual PKCS11Cert | selectSigningCertificate (const std::vector< PKCS11Cert > &certificates) const =0 throw (SignException) |
Private Member Functions | |
void | printPKCS11Cert (const PKCS11Signer::PKCS11Cert &cert) |
Implements cert selection and PIN acquisition.
Definition at line 86 of file main_test-1.cpp.
PKCS11ConsolePinSigner::PKCS11ConsolePinSigner | ( | const std::string & | driver | ) | throw (SignException) |
Implements cert selection and PIN acquisition.
Definition at line 1105 of file main_test-1.cpp.
|
virtual |
Definition at line 1110 of file main_test-1.cpp.
|
protectedvirtual |
Ask PIN from the user and return it. If you want to cancel the signing process throw an exception.
certificate | the certificate, which PIN code is asked. |
SignException | should throw an exception to cancel login process. |
Definition at line 1141 of file main_test-1.cpp.
References THROW_SIGNEXCEPTION.
|
private |
Prints certificate information.
cert | X.509 certificate. |
Definition at line 1181 of file main_test-1.cpp.
References DEBUG, digidoc::PKCS11Signer::PKCS11Token::label, digidoc::PKCS11Signer::PKCS11Cert::label, digidoc::PKCS11Signer::PKCS11Token::manufacturer, digidoc::PKCS11Signer::PKCS11Token::model, digidoc::PKCS11Signer::PKCS11Token::serialNr, and digidoc::PKCS11Signer::PKCS11Cert::token.
|
protectedvirtual |
Show available signing certificates and choose the one used to sign.
Definition at line 1117 of file main_test-1.cpp.
References DEBUG, digidoc::PKCS11Signer::PKCS11Token::label, and digidoc::PKCS11Signer::PKCS11Cert::token.