|
libdigidocpp
|
#include <RSASigner.h>


Public Member Functions | |
| RSASigner (X509 *cert, RSA *privateKey) throw (SignException) | |
| virtual | ~RSASigner () |
| X509 * | getCert () const throw (SignException) |
| void | sign (const Digest &digest, Signature &signature) throw (SignException) |
Public Member Functions inherited from digidoc::Signer | |
| virtual | ~Signer () |
| virtual int | type () const |
| void | setSignatureProductionPlace (const SignatureProductionPlace &signatureProductionPlace) |
| SignatureProductionPlace | getSignatureProductionPlace () const |
| void | setSignerRole (const SignerRole &signerRole) |
| SignerRole | getSignerRole () const |
Private Attributes | |
| X509 * | cert |
| RSA * | privateKey |
Implements Signer interface for signing with RSA private key.
Definition at line 33 of file RSASigner.h.
| digidoc::RSASigner::RSASigner | ( | X509 * | cert, |
| RSA * | privateKey | ||
| ) | throw (SignException) |
Initializes the RSA signer with X.509 certificate and private key pair.
| cert | X.509 certificate of the private key. |
| privateKey | private key, should match the X.509 certificate. |
| SignException | throws exception if the certificate or the private key is NULL. |
Definition at line 38 of file RSASigner.cpp.
References THROW_SIGNEXCEPTION.
|
virtual |
Definition at line 56 of file RSASigner.cpp.
|
virtual |
Returns the X.509 certificate used for signing.
| throws | never thrown. |
Implements digidoc::Signer.
Definition at line 66 of file RSASigner.cpp.
References DEBUG.
|
virtual |
Signs the provided digest using the private key that matches the X.509 certificate.
| digest | digest, which is being signed. |
| signature | memory for the signature that is created. Struct parameter length is set to the actual signature length. |
| SignException | throws exception if the signing operation failed or not enough memory allocated for the signature. |
Implements digidoc::Signer.
Definition at line 81 of file RSASigner.cpp.
References DEBUG, e, int(), digidoc::RSACrypt::sign(), sign(), THROW_SIGNEXCEPTION, and THROW_SIGNEXCEPTION_CAUSE.
Referenced by testRSASigner().


|
private |
Definition at line 43 of file RSASigner.h.
|
private |
Definition at line 44 of file RSASigner.h.