1224 return (CKR_TEMPLATE_INCOMPLETE);
1225 }
1226 if (ulCount == 0) {
1227 return (CKR_TEMPLATE_INCOMPLETE);
1228 }
1229 if (! Valid_Session((Session_Struct_t *)hSession, &rSession)) {
1230 return (CKR_SESSION_HANDLE_INVALID);
1231 }
1232 if (FuncList.ST_GetAttributeValue) {
1233 rv = FuncList.ST_GetAttributeValue(rSession, hObject,
1234 pTemplate, ulCount);
1235 } else {
1236 rv = CKR_FUNCTION_NOT_SUPPORTED;
1237 }
1238 return (rv);
1239 }
1240
1241 CK_RV
1242 C_GetFunctionList(CK_FUNCTION_LIST_PTR_PTR ppFunctionList)
1243 {
1244 _init();
1245
1246 PK11_Functions.version.major = VERSION_MAJOR;
1247 PK11_Functions.version.minor = VERSION_MINOR;
1248 PK11_Functions.C_Initialize = C_Initialize;
1249 PK11_Functions.C_Finalize = C_Finalize;
1250 PK11_Functions.C_GetInfo = C_GetInfo;
1251 PK11_Functions.C_GetFunctionList = C_GetFunctionList;
1252 PK11_Functions.C_GetSlotList = C_GetSlotList;
1253 PK11_Functions.C_GetSlotInfo = C_GetSlotInfo;
1254 PK11_Functions.C_GetTokenInfo = C_GetTokenInfo;
1255 PK11_Functions.C_GetMechanismList = C_GetMechanismList;
1256 PK11_Functions.C_GetMechanismInfo = C_GetMechanismInfo;
1257 PK11_Functions.C_InitToken = C_InitToken;
1258 PK11_Functions.C_InitPIN = C_InitPIN;
1259 PK11_Functions.C_SetPIN = C_SetPIN;
1260 PK11_Functions.C_OpenSession = C_OpenSession;
1261 PK11_Functions.C_CloseSession = C_CloseSession;
1262 PK11_Functions.C_CloseAllSessions = C_CloseAllSessions;
1263 PK11_Functions.C_GetSessionInfo = C_GetSessionInfo;
1264 PK11_Functions.C_GetOperationState = C_GetOperationState;
1265 PK11_Functions.C_SetOperationState = C_SetOperationState;
|
1224 return (CKR_TEMPLATE_INCOMPLETE);
1225 }
1226 if (ulCount == 0) {
1227 return (CKR_TEMPLATE_INCOMPLETE);
1228 }
1229 if (! Valid_Session((Session_Struct_t *)hSession, &rSession)) {
1230 return (CKR_SESSION_HANDLE_INVALID);
1231 }
1232 if (FuncList.ST_GetAttributeValue) {
1233 rv = FuncList.ST_GetAttributeValue(rSession, hObject,
1234 pTemplate, ulCount);
1235 } else {
1236 rv = CKR_FUNCTION_NOT_SUPPORTED;
1237 }
1238 return (rv);
1239 }
1240
1241 CK_RV
1242 C_GetFunctionList(CK_FUNCTION_LIST_PTR_PTR ppFunctionList)
1243 {
1244 PK11_Functions.version.major = VERSION_MAJOR;
1245 PK11_Functions.version.minor = VERSION_MINOR;
1246 PK11_Functions.C_Initialize = C_Initialize;
1247 PK11_Functions.C_Finalize = C_Finalize;
1248 PK11_Functions.C_GetInfo = C_GetInfo;
1249 PK11_Functions.C_GetFunctionList = C_GetFunctionList;
1250 PK11_Functions.C_GetSlotList = C_GetSlotList;
1251 PK11_Functions.C_GetSlotInfo = C_GetSlotInfo;
1252 PK11_Functions.C_GetTokenInfo = C_GetTokenInfo;
1253 PK11_Functions.C_GetMechanismList = C_GetMechanismList;
1254 PK11_Functions.C_GetMechanismInfo = C_GetMechanismInfo;
1255 PK11_Functions.C_InitToken = C_InitToken;
1256 PK11_Functions.C_InitPIN = C_InitPIN;
1257 PK11_Functions.C_SetPIN = C_SetPIN;
1258 PK11_Functions.C_OpenSession = C_OpenSession;
1259 PK11_Functions.C_CloseSession = C_CloseSession;
1260 PK11_Functions.C_CloseAllSessions = C_CloseAllSessions;
1261 PK11_Functions.C_GetSessionInfo = C_GetSessionInfo;
1262 PK11_Functions.C_GetOperationState = C_GetOperationState;
1263 PK11_Functions.C_SetOperationState = C_SetOperationState;
|