Gilles Peskine
92587dbf2b
Write missing bit of the documentation of psa_key_derivation
2018-11-14 21:15:37 +01:00
Ron Eldor
ae3a631518
Reduce buffer size of okm
...
Reduce the buffer size of okm to 128, to reduce stack usage.
2018-11-14 20:22:03 +02:00
Jaeden Amero
c11be0943e
Merge pull request #196 from ARMmbed/psa-remove-rsa_get_bitlen-2
...
remove mbedtls_rsa_get_bitlen
2018-11-13 17:55:14 +00:00
Ron Eldor
732ccc4b06
Reduce Stack usage of hkdf test function
...
`test_hkdf` in the hkdf test suites consumed stack of ~6KB with
6 buffers of ~1KB each. This causes stack overflow on some platforms
with smaller stack. The buffer sizes were reduced. By testing, the sizes
can be reduced even further, as the largest seen size is 82 bytes(for okm).
2018-11-13 19:03:32 +02:00
Gilles Peskine
e19b7d54d0
Revert "New function mbedtls_rsa_get_bitlen"
...
This reverts commit 1d26709dbd
.
2018-11-12 19:14:34 +01:00
Gilles Peskine
64a43ce48e
Revert "fixup! New function mbedtls_rsa_get_bitlen"
...
This reverts commit c939f6fcba
.
2018-11-12 19:14:34 +01:00
Gilles Peskine
86a440b638
Reject non-byte-aligned RSA keys
...
On key import and key generation, for RSA, reject key sizes that are
not a multiple of 8. Such keys are not well-supported in Mbed TLS and
are hardly ever used in practice.
The previous commit removed support for non-byte-aligned keys at the
PSA level. This commit actively rejects such keys and adds
corresponding tests (test keys generated with "openssl genrsa").
2018-11-12 19:14:18 +01:00
Gilles Peskine
aac64a2839
Remove support for non-byte-aligned RSA keys
...
Remove the need for an extra function mbedtls_rsa_get_bitlen. Use
mbedtls_rsa_get_len, which is only correct for keys whose size is a
multiple of 8. Key sizes that aren't a multiple of 8 are extremely
rarely used, so in practice this is not a problematic limitation.
2018-11-12 18:37:42 +01:00
Janos Follath
09e53b6ff3
Remove Circle CI script
...
We are running an equivalent set of test by other means and therefore
this script is no longer needed.
2018-11-12 15:37:16 +00:00
Simon Butcher
06d80cf172
Fix merge of Changelog 128bit CTR_DRBG entry
...
The entry describing support for 128-bit keys in CTR_DRBG was merged into the
wrong version.
2018-11-12 14:30:19 +00:00
Simon Butcher
de13963d66
Merge remote-tracking branch 'restricted/pr/520' into development-restricted-proposed
2018-11-12 14:30:16 +00:00
Simon Butcher
cdd1a6c872
Merge remote-tracking branch 'restricted/pr/510' into development-restricted-proposed
2018-11-12 14:29:14 +00:00
Junhwan Park
39bdab791d
x509.c: Fix potential memory leak in X.509 self test
...
Found and fixed by Junhwan Park in #2106 .
Signed-off-by: Junhwan Park <semoking@naver.com>
2018-11-10 20:22:54 +09:00
Simon Butcher
2ab14bb2ca
Clarified new platform errors in the ChangeLog
...
Clarified new platform errors and error code deprecations in the ChangeLog.
2018-11-09 20:09:33 +00:00
Simon Butcher
e51d4b336b
Merge remote-tracking branch 'public/pr/2054' into development-proposed
2018-11-09 19:57:53 +00:00
Ron Eldor
6aa9fb4916
Add ChangeLog entry
...
Add the ChangeLog entry describing the change.
2018-11-09 15:01:09 +00:00
Ron Eldor
9924bdc792
Deprecate hardware acceleration errors
...
Deprecate the module-specific XXX_HW_ACCEL_FAILED and
XXX_FEATURE_UNAVAILABLE errors, as alternative implementations should now
return `MBEDTLS_ERR_PLATFORM_HW_FAILED` and
`MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED`.
2018-11-09 15:01:07 +00:00
Ron Eldor
bcca58c6cd
Add common feature unavailable error
...
Add a common error for the feature unavailable, in the
platform module.
2018-11-09 13:57:37 +00:00
Gilles Peskine
9eaab02607
Merge pull request #193 from ARMmbed/dev/Patater/fix-snprintf-truncation
...
psa: test: Fix truncation of message by snprintf
2018-11-08 18:56:58 +01:00
Jaeden Amero
594a330eb7
psa: test: Fix truncation of message by snprintf
...
We had only allocated 40 bytes for printing into, but we wanted to print 46
bytes. Update the buffer to be 47 bytes, which is large enough to hold what
we want to print plus a terminating null byte.
2018-11-08 17:32:45 +00:00
Jaeden Amero
db2717b091
Merge pull request #192 from ARMmbed/psa-fix-curves-20181108
...
Fix curves.pl
2018-11-08 10:06:55 +00:00
Gilles Peskine
728944718a
Fix a test case with incorrect dependency
...
Simplify the test case "PSA export a slot after a failed import of an
EC keypair": use an invalid private value for the specified curve. Now
the dependencies match the test data, so this fixes curves.pl.
2018-11-08 10:00:08 +01:00
Jaeden Amero
30b90cb406
Merge pull request #175 from ARMmbed/coverage_tests
...
add tests that increase key slot management code coverage slightly
2018-11-07 16:59:17 +00:00
Moran Peker
ce50007f90
Add tests of using cipher in bad state cases
...
- cipher setup after import key failure.
- cipher setup after set key policy but no key material
creation.
2018-11-07 16:20:07 +02:00
Moran Peker
3455009116
Add tests that check export failures after illegal behavior
...
- export a key after import key failure.
- export a key after the key was destroyed.
- export a key after set key policy but no key material
creation.
2018-11-07 16:19:34 +02:00
Moran Peker
28a38e6e38
Add tests that checks key management corner cases
...
- import a key into a non empty key slot.
- export a key from invalid slot number.
2018-11-07 16:18:24 +02:00
Simon Butcher
d83448b736
Merge remote-tracking branch 'public/pr/2052' into development-restricted-proposed
2018-11-07 12:59:14 +00:00
Simon Butcher
53b45ec881
Merge remote-tracking branch 'public/pr/2079' into development-restricted-proposed
2018-11-07 12:58:44 +00:00
Simon Butcher
bbc31b4827
Merge remote-tracking branch 'public/pr/2085' into development-restricted-proposed
2018-11-07 12:57:38 +00:00
Simon Butcher
93a9b497e0
Merge remote-tracking branch 'public/pr/2077' into development-restricted-proposed
2018-11-07 12:57:24 +00:00
Simon Butcher
361ce6c302
Merge remote-tracking branch 'public/pr/2127' into development-restricted-proposed
2018-11-07 12:57:01 +00:00
Simon Butcher
c81813153c
Merge remote-tracking branch 'public/pr/2140' into development-restricted-proposed
2018-11-07 12:56:05 +00:00
Simon Butcher
241823aab8
Merge remote-tracking branch 'public/pr/1641' into development-restricted-proposed
2018-11-07 12:55:47 +00:00
Simon Butcher
42ab4ae033
Merge remote-tracking branch 'public/pr/2167' into development-restricted-proposed
2018-11-07 12:54:45 +00:00
Hanno Becker
f6d6e30820
Fix incomplete assertion in ssl_write_handshake_msg()
...
ssl_write_handshake_msg() includes the assertion that
`ssl->handshake != NULL` when handling a record which is
(a) a handshake message, and NOT
(b) a HelloRequest.
However, it later calls `ssl_append_flight()` for any
record different from a HelloRequest handshake record,
that is, records satisfying !(a) || !(b), instead of
(a) && !(b) as covered by the assertion (specifically,
CCS or Alert records).
Since `ssl_append_flight()` assumes that `ssl->handshake != NULL`,
this rightfully triggers static analyzer warnings.
This commit expands the scope of the assertion to check
that `ssl->handshake != NULL` for any record which is not
a HelloRequest.
2018-11-07 11:57:51 +00:00
Simon Butcher
51b6abbbf2
Merge remote-tracking branch 'public/pr/2165' into development-proposed
2018-11-06 22:55:14 +00:00
Hanno Becker
f143a78011
Adapt ChangeLog
2018-11-06 17:59:28 +00:00
Jaeden Amero
0d1caacf55
Merge pull request #189 from ARMmbed/psa-fix-asymmetric_apis_coverage-test_data
...
Fix test data in an old format
2018-11-06 16:07:51 +00:00
Gilles Peskine
8739da830e
Fix test data in an old format
...
Update some test data from the asymmetric_apis_coverage branch that
wasn't updated to the new format from the
psa-asymmetric-format-raw_private_key branch.
2018-11-06 15:15:05 +01:00
Hanno Becker
fe936c35c1
Adapt ChangeLog
2018-11-06 13:35:47 +00:00
Hanno Becker
9772da8792
Add missing bracket
...
Wasn't spotted earlier because it's guarded by `! HAVE_GETRANDOM`.
2018-11-06 13:12:47 +00:00
Jaeden Amero
c0a0855793
Merge pull request #171 from ARMmbed/asymmetric_apis_coverage
...
Increase asymmetric APIs coverage
2018-11-06 13:00:35 +00:00
Mohammad AboMokh
2d65cf0b16
Fix sign test dependencies and used algorithm
2018-11-06 11:56:45 +02:00
Jaeden Amero
fe9f771e88
Merge pull request #170 from ARMmbed/increase_psa_key_derivation_code_coverage
...
add tests that increase key derivation code coverage slightly
2018-11-06 09:17:19 +00:00
Jaeden Amero
40f1cb104f
Merge pull request #182 from ARMmbed/psa-asymmetric-format-raw_private_key
...
Asymmetric import/export format: raw private EC keys
2018-11-06 09:02:25 +00:00
Jaeden Amero
728e5793b9
Merge pull request #169 from ARMmbed/hash_testing
...
Hash Testing
2018-11-06 08:59:01 +00:00
Mohammad AboMokh
392952df93
Fix test dependencies lists
2018-11-06 08:11:10 +02:00
Ron Eldor
7213744b07
Fix typo in comment
...
Change from from lower case to upper case in XXX_ALT
comment in `MBEDTLS_ECP_RESTARTABLE` description.
2018-11-05 22:31:32 +02:00
Hanno Becker
e2dae7e1f5
Add explicit integer to enumeration casts to programs/pkey/gen_key.c
...
Fixes #2170 .
2018-11-05 16:54:40 +00:00
itayzafrir
27e6945f43
Refactor and rename test hash_verify_bad_paths to hash_verify_bad_args
...
1. Updated test scenarios.
2. Renamed test and updated test description.
3. Some documentation updates.
4. Test dependency moved to .function file.
2018-11-05 18:36:05 +02:00