1
0
mirror of https://github.com/opencryptoki/opencryptoki.git synced 2026-10-24 05:39:17 +03:00

88 Commits

Author SHA1 Message Date
Eduardo Barretto
0c7a1d00ac Remove unnecessary executable permission
Some files had a legacy executable permission that in not necessary. So, removed
it.

Signed-off-by: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
2017-11-23 17:08:05 -02:00
Ingo Tuchscherer
8d0b563658 Fix CKA_ALWAYS_AUTHENTICATE attribute for priv. keys
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>
2017-10-17 13:55:39 -02:00
Ingo Tuchscherer
d6619af8ee MTI [PATCH 85/85]: Increase token number limit
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
415ab181f3 MTI [PATCH 74/85]: Adapt shared memory data
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
d256ec2461 MTI [PATCH 72/85]: Adapt FindObject
Adapt the FindObject functions with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
29089cd62b MTI [PATCH 70/85]: Adapt GetAttributeValue
Adapt the GetAttributeValue function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
b2a06d199c MTI [PATCH 68/85]: Adapt btree management
Adapt the btree management with respect to the newly introduced
token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
65b27069f4 MTI [PATCH 61/85]: Adapt object destroy
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
b096edeb22 MTI [PATCH 59/85]: Manage token data
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
d08a410701 MTI [PATCH 58/85]: Adapt GetMechanismInfo
Adapt the GetMechanismInfo function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
d9b1946b01 MTI [PATCH 53/85]: Adapt digest crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
342ab61db4 MTI [PATCH 32/85]: Adapt object create and object management
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
a63a9cd7da MTI [PATCH 30/85]: Adapt sign crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
e89dd05e0a MTI [PATCH 29/85]: Adapt verify crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
afb10772bc MTI [PATCH 27/85]: Adapt decrypt crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
a81258ec6a MTI [PATCH 26/85]: Adapt encrypt crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
c33cb0cc6e MTI [PATCH 25/85]: Adapt random crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
e48af0293e MTI [PATCH 24/85]: Adapt keygen crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
7b0604968a MTI [PATCH 23/85]: Adapt derive crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
da1946d1db MTI [PATCH 22/85]: Adapt wrap crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
b8e42494cc MTI [PATCH 21/85]: Adapt unwrap crypto functions
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
37b0e6047b MTI [PATCH 20/85]: Adapt get object size
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
01570ad29f MTI [PATCH 19/85]: Adapt object copy
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
123322b78f MTI [PATCH 17/85]: Adapt WaitSlotEvent
Adapt WaitSlotEvent function with respect to the newly introduced
token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
bb79a79c7b MTI [PATCH 16/85]: Adapt GetFunctionState, CancelFunction
Adapt GetFunctionStatus and CancelFunction with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
95eea85136 MTI [PATCH 15/85]: Adapt SetAttributeValue
Adapt the SetAttributeValue function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
c148c43d49 MTI [PATCH 14/85]: Adapt GetSessionInfo
Adapt the GetSessionInfo function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
30a9902551 MTI [PATCH 13/85]: Adapt Get-/SetOperationState
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
73ee83438f MTI [PATCH 12/85]: Adapt CloseSession
Adapt the CloseSession function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
7f01da10f7 MTI [PATCH 11/85]: Adapt OpenSession
Adapt the OpenSession function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
6c3a0d4a0a MTI [PATCH 10/85]: Adapt GetMechanismList
Adapt the GetMechanismList function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
a6d366029a MTI [PATCH 08/85]: Adapt Logout
Adapt the Logout function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
d4efe7f537 MTI [PATCH 07/85]: Adapt Login
Adapt the Login function with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
b992dd4f6f MTI [PATCH 06/85]: Adapt SetPIN
Adapt the SetPin function with respect to the newly introduced
token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
0726a2fa59 MTI [PATCH 05/85]: Adapt InitPIN
Adapt the InitPIN functions with respect to the newly
introduced token data storage.

Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
39a7685295 MTI [PATCH 04/85]: Initialize token
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
dd1b9ebb6a MTI [PATCH 03/85]: Introduce token data structure
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>
2017-10-06 15:39:43 -03:00
Ingo Tuchscherer
5dfadcdea2 MTI [PATCH 01/85]: add config option 'tokname'
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>
2017-10-06 15:39:43 -03:00
Ingo Franzki
d509a33528 ep11 token, cca token: Add ECDSA SHA2 support
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>
2017-04-05 13:33:48 -03:00
Paulo Vital
25a05a8209 Remove unecessary CVS header content
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com>
2017-03-15 16:37:46 -03:00
Paulo Vital
d0874c2fc1 Update license header of source code files to CPL-1.0
Signed-off-by: Paulo Vital <pvital@linux.vnet.ibm.com>
2017-03-15 16:37:46 -03:00
Vineetha Pai
3f12ca3538 Fix few more compiler warnings
Signed-off-by: Vineetha Pai <vpishar@us.ibm.com>
2016-04-22 16:00:32 -04:00
Vineetha Pai
6687261399 Added few missing pkcs11#v2.2 constants
Signed-off-by: Vineetha Pai <vpishar@us.ibm.com>
2016-04-12 21:30:24 -04:00
Ingo Tuchscherer
ba4f228de1 Add GCM support to opencryptoki base infrastructure.
Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
2015-10-09 17:47:57 -05:00
Vineetha Pai
98a9109b9e Fix compiler warnings for pkcsslotd.
Signed-off-by: Vineetha Pai <vpishar@us.ibm.com>
Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
2015-06-26 15:07:51 -05:00
Vineetha Pai
4619770fe0 Compile opencryptoki with -Wall enabled.
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>
2015-06-26 15:03:34 -05:00
Harald Freudenberger
ef30ce0bee Minor cleanup and rework:
- 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>
2014-07-17 11:55:00 -05:00
Joy Latten
6168489bca Remove reference to a correlator since it is not used.
Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
2014-07-01 16:38:50 -05:00
Joy Latten
b4f376f577 Slot_Info_t structure was modified to reduce size of fields
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>
2014-07-01 15:52:21 -05:00
Joy Latten
ee513a14c7 pkcsslotd attempts to transfer ~400000 bytes of slot info via a socket to
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>
2014-06-26 16:44:14 -05:00