fixed for QT4/5: Compile problem; refs #28

master
Marc Wäckerlin 11 years ago
parent 1db3c98a29
commit 6716be6aeb
  1. 6
      src/cryptoki.hxx

@ -1061,17 +1061,19 @@ namespace cryptoki {
bool inittoken(std::string pin, FixString<32> label) {
CRYPTOLOG("log");
//! calls @c C_InitToken
std::string in(label);
in.resize(32, ' ');
if (pin.size())
return check(_library->C_InitToken
(_slot,
(unsigned char*)&pin[0], pin.size(),
(unsigned char*)&label.fix()[0]),
(unsigned char*)&in[0]),
CRYPTOKI_FN_LOG("C_InitToken"));
else
return check(_library->C_InitToken
(_slot,
0, 0, // pin from external pin pad
(unsigned char*)&label.fix()[0]),
(unsigned char*)&in[0]),
CRYPTOKI_FN_LOG("C_InitToken"));
}

Loading…
Cancel
Save