de183416f8
Update the behavior of key handles
...
* open output distinct key handles
* each handle must be closed
* destroying a key does not invalidate other handles
* closing a key can/might fail an active operation (but not required)
2019-09-05 09:38:06 +01:00
3b5975641e
Fix return code warnings
...
- Remove STORAGE_FAILURE from hash and abort functions
- Remove BUFFER_TOO_SMALL from psa_mac_verify
2019-09-04 19:20:32 +01:00
8096969905
Merge pull request #139 from Patater/des-faster-and-typo-fix
...
Make DES self-test faster, and fix a typo
2019-09-04 12:18:39 +01:00
fa2cefa001
Fix warnings
2019-09-04 11:36:15 +01:00
f483973c37
Add PSA_ERROR_STORAGE_FAILURE to psa_cipher_generate_iv
2019-09-04 11:35:32 +01:00
599c712668
Remove errorneous insert
2019-09-04 11:35:32 +01:00
1505b2108a
Add STORAGE_FAILURE everywhere + add missing codes
2019-09-04 11:35:32 +01:00
1f1e1a5253
Add storage failure to psa_mac_verify_finish
2019-09-04 11:35:32 +01:00
56b32b126c
Add storage failure to psa_mac_sign_finish
2019-09-04 11:35:32 +01:00
22bc8fff0c
Add PSA_ERROR_STORAGE_FAILURE to psa_aead_*_setup functions
2019-09-04 11:35:06 +01:00
8f7cd1ee55
Added PSA_ERROR_BAD_STATE to functions with operations
...
In the case that the operation object has not been initialized
appropriately.
2019-09-04 11:34:22 +01:00
97d3bc3674
Added extra bad state case to psa_hash_setup
2019-09-04 11:34:22 +01:00
2364924619
Add missing return codes to psa_generate_key
2019-09-04 11:34:22 +01:00
1f42a84a13
Add PSA_ERROR_BUFFER_TOO_SMALL to psa_mac_compute
2019-09-04 11:33:32 +01:00
650229ba38
Added PSA_ERROR_STORAGE_FAILURE to psa_mac_compute
...
In case the key could not be retrieved from
storage.
2019-09-04 11:31:14 +01:00
2a889781c5
Add PSA_ERROR_STORAGE_FAILURE to psa_export_public_key
...
The same reason that it is included in psa_export_key
2019-09-04 11:31:14 +01:00
11638b99a0
Added PSA_ERROR_INSUFFICIENT_MEMORY to psa_export_public_key
...
For the same reasons that psa_export_key can fail with this error
2019-09-04 11:31:14 +01:00
7f1863c905
Add PSA_ERROR_INSUFFICIENT_MEMORY to psa_export_key
...
It may be possible that the implementation runs out of
memory when exporting a key from storage or a secure
element. For example, it may not be possible to directly
move the data from storage to the caller, so the implementation
will have to buffer the material temporarily (an issue if dynamic
memory allocation scheme is used). For a large key
this is more likely to return.
2019-09-04 11:31:14 +01:00
15731c1422
Added PSA_ERROR_STORAGE_FAILURE to psa_export_key
...
It may be possible that an implementation does not
fetch key material until a command like
this is called and such an error may occur if an
off-chip secure storage dependency may have been wiped.
2019-09-04 11:31:14 +01:00
23c006f45e
Added missing return codes to get_key_attributes
...
Note that PSA_ERROR_NOT_PERMITTED is not included
because I can't think of a scenario where you have
a valid key handle but aren't allowed to read the
attributes
2019-09-04 11:31:14 +01:00
39797aa34c
Fix erroneous cut and paste
2019-09-04 11:30:18 +01:00
fbf7f121f9
Separate return codes for unsupported and invalid algorithms
2019-09-04 11:30:18 +01:00
66200c4e98
Add PSA_ERROR_STORAGE_FAILURE to psa_cipher_generate_iv
2019-09-04 11:30:18 +01:00
f97c8523ee
Add CORRUPTION_DETECTED to psa_close_key
2019-09-04 11:30:18 +01:00
6725757cec
Remove errorneous insert
2019-09-04 11:30:18 +01:00
484ba88a0f
Add STORAGE_FAILURE everywhere + add missing codes
2019-09-04 11:30:18 +01:00
dc5bf5c8e7
Add storage failure to (encrypt/decrypt)_setup
2019-09-04 11:30:18 +01:00
d9e9024885
Add storage failure to psa_mac_verify_finish
2019-09-04 11:30:18 +01:00
263223689f
Add storage failure to psa_mac_sign_finish
2019-09-04 11:30:18 +01:00
8d0bcf27ec
Add PSA_ERROR_INVALID_ARGUMENT to psa_hash_compare
2019-09-04 11:30:17 +01:00
df3c7ac645
Remove trailing whitespace
2019-09-04 11:30:17 +01:00
d789dc13da
Added a few more return codes
2019-09-04 11:30:17 +01:00
3e41249417
Add PSA_ERROR_STORAGE_FAILURE to psa_aead_*_setup functions
2019-09-04 11:30:17 +01:00
71b33ffcf8
Add missing error codes to psa_generate_random
2019-09-04 11:30:17 +01:00
0d280b9873
Add missing error codes for psa_raw_key_agreement
2019-09-04 11:30:17 +01:00
a3f6ba5843
Added PSA_ERROR_STORAGE_FAILURE to psa_cipher_(encrypt/decrypt)
2019-09-04 11:30:17 +01:00
320659b54c
Added PSA_ERROR_BAD_STATE to functions with operations
...
In the case that the operation object has not been initialized
appropriately.
2019-09-04 11:30:17 +01:00
e970d65273
Added extra bad state case to psa_hash_setup
2019-09-04 11:30:17 +01:00
6e758c9bb8
Add missing return codes to psa_asymmetric_verify
2019-09-04 11:30:17 +01:00
27c121574b
Add missing parameters to psa_asymmetric_sign
2019-09-04 11:30:17 +01:00
d21c6e6566
Add missing return codes to psa_generate_key
2019-09-04 11:30:17 +01:00
c207ba376e
Added missing return codes to psa_aead_decrypt
2019-09-04 11:30:17 +01:00
96f31ada18
Add missing return codes to psa_asymmetric_decrypt
2019-09-04 11:30:17 +01:00
f961d5c9e6
Add missing return codes to psa_asymmetric_encrypt
2019-09-04 11:30:17 +01:00
53d90c5199
Only return PSA_ERROR_DOES_NOT_EXIST from psa_open_key
2019-09-04 11:30:17 +01:00
9770d0e0f8
Add PSA_ERROR_STORAGE_FAILURE to psa_mac_verify_setup
2019-09-04 11:30:17 +01:00
2409ba0429
Added PSA_ERROR_STORAGE_FAILURE to psa_mac_sign_setup
2019-09-04 11:30:17 +01:00
7563ed17ab
Remove PSA_ERROR_DOES_NOT_EXIST from psa_mac_sign_setup
2019-09-04 11:30:17 +01:00
d5ae06b1e3
Add PSA_ERROR_BUFFER_TOO_SMALL to psa_mac_compute
2019-09-04 11:30:17 +01:00
dec47b6f9d
Added the possibility of PSA_ERROR_BAD_STATE to all functions
2019-09-04 11:30:17 +01:00