fixed wrong calculation of max pin len; refs #28

master
Marc Wäckerlin 11 years ago
parent 8e16b09839
commit 4092176786
  1. 3
      src/cryptoki.hxx
  2. 3
      src/suisseid.hxx

@ -1045,7 +1045,7 @@ namespace cryptoki {
hardwareVersion(cInfo.hardwareVersion),
firmwareVersion(cInfo.firmwareVersion),
utcTime(cInfo.utcTime) {
CRYPTOLOG("log *this={"<<std::endl<<*this);//<<std::endl<<'}');
CRYPTOLOG("log *this={"<<*this<<'}');
}
};
@ -2139,7 +2139,6 @@ namespace cryptoki {
attrs.push_back(CKA_VENDOR_DEFINED);
//attrs.push_back(CKA_IBM_OPAQUE);
}
CK_ATTRIBUTE attr;
for (AttributeTypeList::const_iterator it(attrs.begin());
it!=attrs.end(); ++it) {
CK_ATTRIBUTE attr;

@ -316,7 +316,7 @@ namespace suisseid {
/// @copydoc Card::Card
Post(std::shared_ptr<pcsc::Connection::Reader> reader,
const cryptoki::Library& cryptoki):
Card(reader, cryptoki), _minPinLen(0), _maxPinLen(0) {
Card(reader, cryptoki), _minPinLen(0), _maxPinLen((unsigned int)-1) {
}
virtual unsigned int minimalPinLength() {
@ -361,6 +361,7 @@ namespace suisseid {
private:
void evaluatePinLengths() {
CRYPTOLOG("log");
pcsc::Connection::Reader::Transaction lock(_reader);
selectPkcs15File("4408");
cardos::BerValues res(readBerFile());

Loading…
Cancel
Save