The PKCS#11 standard requires the CKA_ALWAYS_AUTHENTICATE attribute
to be present in private key objects. Actually this attribute is not
set as one of the default attributes. Further, it will be rejected
when it's declared within the application defined key template.
This fix will add the CKA_ALWAYS_AUTHENTICATE attribute by default
to any private key object. The value is set to 'false'. The calling
application is free to overrule by setting the attribute value
within the key template to 'true'.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Increase the number of tokens that can be plugged to opencryptoki.
The new maximum number is set to 1024.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the token specific shared memory data with respect to the
newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the FindObject functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the GetAttributeValue function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the btree management with respect to the newly introduced
token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the destroy object helper function with respect to
the newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Extend the helper functions to initialize, load, save and delete
token data with respect to the newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the GetMechanismInfo function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt digest related cryptographic functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the create object helper function and object management functions
with respect to the newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt sign related cryptographic functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt verify related cryptographic functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt decrypt related cryptographic functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt encrypt related cryptographic functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt random related cryptographic functions with respect to the
newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt key generate related cryptographic functions with respect to
the newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt derive related cryptographic functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt wrap related cryptographic functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt unwrap related cryptographic functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the get object size helper function with respect to
the newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the copy object helper function with respect to
the newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt WaitSlotEvent function with respect to the newly introduced
token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt GetFunctionStatus and CancelFunction with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the SetAttributeValue function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the GetSessionInfo function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the Get-/SetOperationState functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the CloseSession function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the OpenSession function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the GetMechanismList function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the Logout function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the Login function with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the SetPin function with respect to the newly introduced
token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Adapt the InitPIN functions with respect to the newly
introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Extend the existing initialize functionality with respect to the
multi token support and thus newly introduced token data storage.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Introduce a new data structure that contains token specific information
that refers to an individual single token instance. Áll the local data
from within the shared token library are moved to this location.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Add new config option 'tokname' to setup an individual token
directory for each token instance.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Slightly adapted version of Ingo's patch:
Patch hunks needed relocation because of previous commits
in some files. Removed some trailing whitespaces.
Tested, works.
Signed-off-by: Ingo Franzki <ifranzki@de.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
1. Add -Wall to configure.in
2. Add missing prototypes to header files.
3. Fix compiler warning in api directory.
Signed-off-by: Vineetha Pai <vpishar@us.ibm.com>
- correlator parameter was still in stdll.h
- ica token had wrong parameter list (correlator) in init func
- ep11 token logging was done without newline at the end
- api_interface OCK_LOG_DEBUG preprocessor macro invocation was split across
multible lines
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
but forgot to modify the corresponding Slot_Info_t_64 structure
to do the same. This commit corrects the Slot_Info_t_64 structure too.
Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
the api. This is too huge so not all gets through in one read.
Also, most of the data is empty allocated space.
Reduced the data by:
1. Reduce NUMBER_SLOTS_MANAGED from 32 to 6. There are only 6
possible tokens. This number can be increased when a new token
is implemented into opencryptoki.
2. Reduce size of fields in Slot_Info_t_64 structure. These fields
are arrays with allocated space equal to PATH_MAX. We only
need the name of the file so can use NAME_MAX instead which is smaller.
Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>