summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Modified NCR-USER API to "simplify" and allow setting of size of ↵Nikos Mavrogiannopoulos2010-07-2312-1242/+105
| | | | | | data structure without special system call." This reverts commit 5689c9734223fb349bba526d620823a803c3b67e.
* Fix error handling in cryptodev_hash_initMiloslav Trmač2010-07-211-1/+3
|
* Fix more incorrect copy_*_user error handlingMiloslav Trmač2010-07-211-5/+10
|
* Modified NCR-USER API to "simplify" and allow setting of size of data ↵Nikos Mavrogiannopoulos2010-07-2112-105/+1242
| | | | structure without special system call.
* der_en/decode_subject_public_key_info were moved to x509/ subdirectory.Nikos Mavrogiannopoulos2010-07-213-2/+2
|
* initial support for userspace data.Nikos Mavrogiannopoulos2010-07-2114-187/+770
|
* Public Keys are being exported to SubjectPublicKeyInfo format, instead of ↵Nikos Mavrogiannopoulos2010-07-1913-88/+437
| | | | custom formats. For RSA keys the PKCS #1 format can be used as well.
* hash_reset() was combined with hash_init() to avoid requiring two calls for ↵Nikos Mavrogiannopoulos2010-07-194-24/+7
| | | | hash initialization.
* Implemented RSA blinding.Nikos Mavrogiannopoulos2010-07-191-4/+38
|
* updated.Nikos Mavrogiannopoulos2010-07-191-0/+1
|
* Fixed RSA encryption and decryption.Nikos Mavrogiannopoulos2010-07-193-72/+232
|
* Added NULL cipher and a speed program to compare old cryptodev operations ↵Nikos Mavrogiannopoulos2010-07-193-7/+130
| | | | and ncr ones.
* Added CAMELLIA-ECB and AES-CTR as well as CAMELLIA-CTR.Nikos Mavrogiannopoulos2010-07-192-2/+10
|
* 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
|