summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Backported zero copy /dev/crypto operations from master.Nikos Mavrogiannopoulos2010-07-193-107/+442
|
* Don't recompile cryptodev_main.o all the timeMiloslav Trmač2010-07-191-1/+4
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Initialize hash name for NCR_OP_DIGESTMiloslav Trmač2010-07-191-0/+6
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Only set [ch]data->init = 1 on success.Miloslav Trmač2010-07-191-5/+2
| | | | | | Otherwise other members would be freed twice. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Free all data referenced by a session, in all casesMiloslav Trmač2010-07-191-7/+5
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Report errors from update implied by session_finalMiloslav Trmač2010-07-191-3/+9
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Remove unused variablesMiloslav Trmač2010-07-191-4/+0
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Refuse non-digest algorithms for pubkey sign/verify operationsMiloslav Trmač2010-07-191-0/+5
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Don't access key_item_st after freeing itMiloslav Trmač2010-07-191-2/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* sparse: Fix signedness missmatch (especially in *_export)Miloslav Trmač2010-07-191-1/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* sparse: Make one-bit bit fields explicitly unsignedMiloslav Trmač2010-07-191-6/+6
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Represent ENOKEY as a negative valueMiloslav Trmač2010-07-191-2/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* sparse: Avoid variable-length arraysMiloslav Trmač2010-07-191-4/+21
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* sparse: add missing 'static'Miloslav Trmač2010-07-193-12/+12
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Add __init and __exit markersMiloslav Trmač2010-07-191-2/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* sparse: Fix __user annotationsMiloslav Trmač2010-07-195-50/+52
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Fix copy_{from,to}_user error handlingMiloslav Trmač2010-07-196-98/+98
| | | | | | These functions return a positive number, not an error code, on failure. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Add missing error handling to {get,put}_userMiloslav Trmač2010-07-191-5/+11
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Free data on error its descriptor to user-spaceMiloslav Trmač2010-07-194-13/+53
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Fix error paths in ncr_key_storage_wrapMiloslav Trmač2010-07-191-1/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Fix error paths in ncr_key_wrapMiloslav Trmač2010-07-191-1/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* On async request error report the request errorMiloslav Trmač2010-07-191-1/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Avoid overflows when unwrapping from storageMiloslav Trmač2010-07-191-1/+5
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Use the supplied pid even if creating a new recordMiloslav Trmač2010-07-191-1/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Fix error paths in ncr_key_initMiloslav Trmač2010-07-191-1/+6
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Simplify clonefdMiloslav Trmač2010-07-191-2/+0
| | | | | | | get_unused_fd() already sets the right bit in open_fds, no need to do it again (compare e.g. sys_dup()). Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Fix error paths in crypto_runMiloslav Trmač2010-07-191-3/+3
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Remove a redundant variable assignmentMiloslav Trmač2010-07-191-2/+0
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Fix cryptodev_hash_deinitMiloslav Trmač2010-07-191-1/+5
| | | | | This function may be called even if hdata was never initialized, so only free the crypto API data structures if they are not NULL.
* Fix error paths in cryptodev_hash_initMiloslav Trmač2010-07-191-0/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Fix cipher_data deinitialization.Miloslav Trmač2010-07-191-4/+8
| | | | | | | | | Guard crypto API *free* with "if (ptr)"; it works without the guards, but that seems to be an implementation detail - at least in the case of crypto_ablkcipher. Free them in the opposite order of allocation, async.request points to async.result and async.s.
* Fix a race in ncr_data_set.Miloslav Trmač2010-07-191-3/+6
| | | | | | | | | | | More than one thread could could pass the if (... > max_data_size) test, leading to multiple executions of "data->data_size += get.data_size", resulting in data->data_size > data->max_data_size. This is a minimal fix that ensures kernel data structure consistency, but the behavior won't look atomic from user space (two threads appending N and M bytes could result in N, M, or N+M more bytes). It relies on the assumption that reads and writes of size_t are atomic.
* Describe why there is no integer overflow.Miloslav Trmač2010-07-191-0/+4
|
* Fix error paths in ncr_data_initMiloslav Trmač2010-07-191-6/+13
|
* Fix error paths in ncr_limits_add_and_checkMiloslav Trmač2010-07-191-2/+17
|
* Reduce stack usage.Nikos Mavrogiannopoulos2010-07-141-1/+2
|
* use mp_int* instead of void*Nikos Mavrogiannopoulos2010-07-142-4/+4
|
* Corrected RSA signature generation/verification.Nikos Mavrogiannopoulos2010-07-146-48/+352
| | | | Added Test for RSA and DSA signature generation and verification.
* DSA private keys are exported to a format that is compatible with openssl ↵Nikos Mavrogiannopoulos2010-07-142-19/+24
| | | | and gnutls.
* OP_MAC was deprecated by OP_SIGN.Nikos Mavrogiannopoulos2010-07-141-5/+5
|
* Separated PK operations.Nikos Mavrogiannopoulos2010-07-142-43/+49
|
* Added signature generation and verification.Nikos Mavrogiannopoulos2010-07-126-82/+439
|
* Initial additions to have PK encryption/decryption. Separated operationsNikos Mavrogiannopoulos2010-07-1210-128/+343
| | | | | on keys to read/write to prevent overwriting a key while using it. Several other cleanups.
* Allow import and export of keys.Nikos Mavrogiannopoulos2010-07-121-1/+1
|
* Allow import and export of keys.Nikos Mavrogiannopoulos2010-07-124-12/+60
|
* Removed the public key params get/set functionality. This can be achieved ↵Nikos Mavrogiannopoulos2010-07-122-89/+0
| | | | with import/export functionality and DER decoding.
* Several fixes. RSA key generation tested and works.Nikos Mavrogiannopoulos2010-07-079-61/+100
|
* additions to compile on 32-bit machines.Nikos Mavrogiannopoulos2010-07-071-2/+7
|
* Added test program for key generation.Nikos Mavrogiannopoulos2010-07-071-0/+345
|
* Public and private keys are being generated in a new workqueue. Some other ↵Nikos Mavrogiannopoulos2010-07-0711-57/+144
| | | | fixes and optimizations.