[pkg-opensc-commit] [libp11] 157/239: Add missing token flags into libp11 structure.
Eric Dorland
eric at moszumanska.debian.org
Sat Oct 17 06:21:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libp11.
commit 2398c56a29dcc7405f412c69430b16f39de9a703
Author: Martin Paljak <martin at martinpaljak.net>
Date: Fri Jul 23 07:54:14 2010 +0000
Add missing token flags into libp11 structure.
Patch by Kalev Lember
---
src/libp11.h | 9 +++++++++
src/p11_slot.c | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/src/libp11.h b/src/libp11.h
index 763532f..89604ff 100644
--- a/src/libp11.h
+++ b/src/libp11.h
@@ -80,6 +80,15 @@ typedef struct PKCS11_token_st {
unsigned char secureLogin;
unsigned char userPinSet;
unsigned char readOnly;
+ unsigned char hasRng;
+ unsigned char userPinCountLow;
+ unsigned char userPinFinalTry;
+ unsigned char userPinLocked;
+ unsigned char userPinToBeChanged;
+ unsigned char soPinCountLow;
+ unsigned char soPinFinalTry;
+ unsigned char soPinLocked;
+ unsigned char soPinToBeChanged;
void *_private;
} PKCS11_TOKEN;
diff --git a/src/p11_slot.c b/src/p11_slot.c
index 84acea7..40b47f1 100644
--- a/src/p11_slot.c
+++ b/src/p11_slot.c
@@ -388,6 +388,15 @@ static int pkcs11_check_token(PKCS11_CTX * ctx, PKCS11_SLOT * slot)
token->secureLogin = (info.flags & CKF_PROTECTED_AUTHENTICATION_PATH) ? 1 : 0;
token->userPinSet = (info.flags & CKF_USER_PIN_INITIALIZED) ? 1 : 0;
token->readOnly = (info.flags & CKF_WRITE_PROTECTED) ? 1 : 0;
+ token->hasRng = (info.flags & CKF_RNG) ? 1 : 0;
+ token->userPinCountLow = (info.flags & CKF_USER_PIN_COUNT_LOW) ? 1 : 0;
+ token->userPinFinalTry = (info.flags & CKF_USER_PIN_FINAL_TRY) ? 1 : 0;
+ token->userPinLocked = (info.flags & CKF_USER_PIN_LOCKED) ? 1 : 0;
+ token->userPinToBeChanged = (info.flags & CKF_USER_PIN_TO_BE_CHANGED) ? 1 : 0;
+ token->soPinCountLow = (info.flags & CKF_SO_PIN_COUNT_LOW) ? 1 : 0;
+ token->soPinFinalTry = (info.flags & CKF_SO_PIN_FINAL_TRY) ? 1 : 0;
+ token->soPinLocked = (info.flags & CKF_SO_PIN_LOCKED) ? 1 : 0;
+ token->soPinToBeChanged = (info.flags & CKF_SO_PIN_TO_BE_CHANGED) ? 1 : 0;
token->_private = tpriv;
return 0;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git
More information about the pkg-opensc-commit
mailing list