fixed wrong calculation of max pin len; refs #28
This commit is contained in:
@@ -1045,7 +1045,7 @@ namespace cryptoki {
|
|||||||
hardwareVersion(cInfo.hardwareVersion),
|
hardwareVersion(cInfo.hardwareVersion),
|
||||||
firmwareVersion(cInfo.firmwareVersion),
|
firmwareVersion(cInfo.firmwareVersion),
|
||||||
utcTime(cInfo.utcTime) {
|
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_VENDOR_DEFINED);
|
||||||
//attrs.push_back(CKA_IBM_OPAQUE);
|
//attrs.push_back(CKA_IBM_OPAQUE);
|
||||||
}
|
}
|
||||||
CK_ATTRIBUTE attr;
|
|
||||||
for (AttributeTypeList::const_iterator it(attrs.begin());
|
for (AttributeTypeList::const_iterator it(attrs.begin());
|
||||||
it!=attrs.end(); ++it) {
|
it!=attrs.end(); ++it) {
|
||||||
CK_ATTRIBUTE attr;
|
CK_ATTRIBUTE attr;
|
||||||
|
@@ -316,7 +316,7 @@ namespace suisseid {
|
|||||||
/// @copydoc Card::Card
|
/// @copydoc Card::Card
|
||||||
Post(std::shared_ptr<pcsc::Connection::Reader> reader,
|
Post(std::shared_ptr<pcsc::Connection::Reader> reader,
|
||||||
const cryptoki::Library& cryptoki):
|
const cryptoki::Library& cryptoki):
|
||||||
Card(reader, cryptoki), _minPinLen(0), _maxPinLen(0) {
|
Card(reader, cryptoki), _minPinLen(0), _maxPinLen((unsigned int)-1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual unsigned int minimalPinLength() {
|
virtual unsigned int minimalPinLength() {
|
||||||
@@ -361,6 +361,7 @@ namespace suisseid {
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
void evaluatePinLengths() {
|
void evaluatePinLengths() {
|
||||||
|
CRYPTOLOG("log");
|
||||||
pcsc::Connection::Reader::Transaction lock(_reader);
|
pcsc::Connection::Reader::Transaction lock(_reader);
|
||||||
selectPkcs15File("4408");
|
selectPkcs15File("4408");
|
||||||
cardos::BerValues res(readBerFile());
|
cardos::BerValues res(readBerFile());
|
||||||
|
Reference in New Issue
Block a user