libdigidocpp
|
Public Member Functions | |
PKCS11SignerPrivate () | |
PKCS11Signer::PKCS11Cert | createPKCS11Cert (CK_TOKEN_INFO *slot, const X509Cert &cert) const |
bool | attribute (CK_SESSION_HANDLE session, CK_OBJECT_HANDLE obj, CK_ATTRIBUTE_TYPE type, CK_VOID_PTR value, CK_ULONG &size) const |
std::vector< CK_OBJECT_HANDLE > | findObject (CK_SESSION_HANDLE session, CK_OBJECT_CLASS cls) const |
bool | load (const std::string &driver) |
void * | resolve (const char *symbol) |
void | unload () |
Public Attributes | |
CK_FUNCTION_LIST * | f |
void * | h |
SignSlot | sign |
CK_SLOT_ID_PTR | slots |
CK_ULONG | numberOfSlots |
Static Public Attributes | |
static const unsigned char | sha1 [] |
static const unsigned char | sha224 [] |
static const unsigned char | sha256 [] |
static const unsigned char | sha384 [] |
static const unsigned char | sha512 [] |
Definition at line 47 of file PKCS11Signer.cpp.
|
inline |
Definition at line 50 of file PKCS11Signer.cpp.
References digidoc::SignSlot::cert, sign, and digidoc::SignSlot::slot.
bool PKCS11SignerPrivate::attribute | ( | CK_SESSION_HANDLE | session, |
CK_OBJECT_HANDLE | obj, | ||
CK_ATTRIBUTE_TYPE | type, | ||
CK_VOID_PTR | value, | ||
CK_ULONG & | size | ||
) | const |
Definition at line 126 of file PKCS11Signer.cpp.
References ck_function_list::C_GetAttributeValue, CKR_OK, f, and value.
PKCS11Signer::PKCS11Cert PKCS11SignerPrivate::createPKCS11Cert | ( | CK_TOKEN_INFO * | token, |
const X509Cert & | cert | ||
) | const |
Helper method, creates PKCS11Cert struct. NB! token should not be NULL.
slot | slot to be used to init PKCS11Cert. |
cert | cert to be used to init PKCS11Cert. |
Definition at line 442 of file PKCS11Signer.cpp.
References digidoc::PKCS11Signer::PKCS11Cert::cert, digidoc::X509Cert::getSubjectName(), digidoc::PKCS11Signer::PKCS11Token::label, digidoc::PKCS11Signer::PKCS11Cert::label, ck_token_info::label, digidoc::PKCS11Signer::PKCS11Token::manufacturer, digidoc::PKCS11Signer::PKCS11Token::model, ck_token_info::model, digidoc::PKCS11Signer::PKCS11Token::serialNr, and digidoc::PKCS11Signer::PKCS11Cert::token.
std::vector< CK_OBJECT_HANDLE > PKCS11SignerPrivate::findObject | ( | CK_SESSION_HANDLE | session, |
CK_OBJECT_CLASS | cls | ||
) | const |
Definition at line 135 of file PKCS11Signer.cpp.
References ck_function_list::C_FindObjects, ck_function_list::C_FindObjectsFinal, ck_function_list::C_FindObjectsInit, CKA_CLASS, CKR_OK, and f.
|
inline |
Definition at line 77 of file PKCS11Signer.cpp.
References h.
|
inline |
Definition at line 80 of file PKCS11Signer.cpp.
References h.
|
inline |
Definition at line 83 of file PKCS11Signer.cpp.
References h.
CK_FUNCTION_LIST* digidoc::PKCS11SignerPrivate::f |
Definition at line 87 of file PKCS11Signer.cpp.
Referenced by attribute(), and findObject().
void* digidoc::PKCS11SignerPrivate::h |
Definition at line 91 of file PKCS11Signer.cpp.
CK_ULONG digidoc::PKCS11SignerPrivate::numberOfSlots |
Definition at line 96 of file PKCS11Signer.cpp.
|
static |
Definition at line 98 of file PKCS11Signer.cpp.
Referenced by digidoc::PKCS11Signer::sign().
|
static |
Definition at line 99 of file PKCS11Signer.cpp.
Referenced by digidoc::PKCS11Signer::sign().
|
static |
Definition at line 100 of file PKCS11Signer.cpp.
Referenced by digidoc::PKCS11Signer::sign().
|
static |
Definition at line 101 of file PKCS11Signer.cpp.
Referenced by digidoc::PKCS11Signer::sign().
|
static |
Definition at line 102 of file PKCS11Signer.cpp.
Referenced by digidoc::PKCS11Signer::sign().
SignSlot digidoc::PKCS11SignerPrivate::sign |
Definition at line 94 of file PKCS11Signer.cpp.
Referenced by PKCS11SignerPrivate().
CK_SLOT_ID_PTR digidoc::PKCS11SignerPrivate::slots |
Definition at line 95 of file PKCS11Signer.cpp.