mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Constify tokenInfo() and findUniqueID()
No functional change
This commit is contained in:
parent
affc2dca6b
commit
46e82e254e
@ -389,7 +389,7 @@ void pkcs11::initToken(const slotid &slot, unsigned char *pin, int pinlen,
|
||||
pk11error(slot, "C_InitToken", rv);
|
||||
}
|
||||
|
||||
tkInfo pkcs11::tokenInfo(const slotid &slot)
|
||||
tkInfo pkcs11::tokenInfo(const slotid &slot) const
|
||||
{
|
||||
tkInfo ti;
|
||||
CK_RV rv = tokenInfo(slot, &ti);
|
||||
@ -400,7 +400,7 @@ tkInfo pkcs11::tokenInfo(const slotid &slot)
|
||||
return ti;
|
||||
}
|
||||
|
||||
CK_RV pkcs11::tokenInfo(const slotid &slot, tkInfo *tkinfo)
|
||||
CK_RV pkcs11::tokenInfo(const slotid &slot, tkInfo *tkinfo) const
|
||||
{
|
||||
CK_TOKEN_INFO token_info;
|
||||
CK_RV rv;
|
||||
@ -452,7 +452,7 @@ int pkcs11::deleteObjects(QList<CK_OBJECT_HANDLE> objects)
|
||||
}
|
||||
|
||||
#define ID_LEN 8
|
||||
pk11_attr_data pkcs11::findUniqueID(unsigned long oclass)
|
||||
pk11_attr_data pkcs11::findUniqueID(unsigned long oclass) const
|
||||
{
|
||||
pk11_attr_data id(CKA_ID);
|
||||
pk11_attr_ulong class_att(CKA_CLASS, oclass);
|
||||
@ -576,7 +576,7 @@ pk11_attr_data pkcs11::generateKey(QString name, unsigned long mech,
|
||||
return new_id;
|
||||
}
|
||||
|
||||
QList<CK_OBJECT_HANDLE> pkcs11::objectList(pk11_attlist &atts)
|
||||
QList<CK_OBJECT_HANDLE> pkcs11::objectList(pk11_attlist &atts) const
|
||||
{
|
||||
CK_RV rv;
|
||||
CK_OBJECT_HANDLE objects[256];
|
||||
|
||||
10
lib/pkcs11.h
10
lib/pkcs11.h
@ -115,9 +115,9 @@ class pkcs11
|
||||
pkcs11();
|
||||
~pkcs11();
|
||||
|
||||
CK_RV tokenInfo(const slotid &slot, tkInfo *tkinfo);
|
||||
tkInfo tokenInfo(const slotid &slot);
|
||||
tkInfo tokenInfo()
|
||||
CK_RV tokenInfo(const slotid &slot, tkInfo *tkinfo) const;
|
||||
tkInfo tokenInfo(const slotid &slot) const;
|
||||
tkInfo tokenInfo() const
|
||||
{
|
||||
return tokenInfo(p11slot);
|
||||
}
|
||||
@ -145,7 +145,7 @@ class pkcs11
|
||||
CK_OBJECT_HANDLE object);
|
||||
void storeAttribute(pk11_attribute &attribute,
|
||||
CK_OBJECT_HANDLE object);
|
||||
QList<CK_OBJECT_HANDLE> objectList(pk11_attlist &atts);
|
||||
QList<CK_OBJECT_HANDLE> objectList(pk11_attlist &atts) const;
|
||||
QString tokenLogin(QString name, bool so, bool force=false);
|
||||
void getRandom();
|
||||
void logout();
|
||||
@ -155,7 +155,7 @@ class pkcs11
|
||||
void setPin(unsigned char *oldPin, unsigned long oldPinLen,
|
||||
unsigned char *pin, unsigned long pinLen);
|
||||
CK_OBJECT_HANDLE createObject(pk11_attlist &attrs);
|
||||
pk11_attr_data findUniqueID(unsigned long oclass);
|
||||
pk11_attr_data findUniqueID(unsigned long oclass) const;
|
||||
pk11_attr_data generateKey(QString name,
|
||||
unsigned long ec_rsa_mech, unsigned long bits, int nid);
|
||||
int deleteObjects(QList<CK_OBJECT_HANDLE> objects);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user