fixed wrong calculation of max pin len; refs #28

This commit is contained in:
Marc Wäckerlin
2014-04-04 11:27:08 +00:00
parent 8e16b09839
commit 4092176786
2 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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());