From 6716be6aebb1c1d83dd598571f26d0b54f7a627d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Tue, 4 Mar 2014 08:51:54 +0000 Subject: [PATCH] fixed for QT4/5: Compile problem; refs #28 --- src/cryptoki.hxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cryptoki.hxx b/src/cryptoki.hxx index 846f699..a44c23e 100644 --- a/src/cryptoki.hxx +++ b/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")); }