Commit graph

9148 commits

Author SHA1 Message Date
Andrzej Kurek eb342241a5 ssl_tls: use PSA to compute running handshake hash for TLS 1.2 2019-01-29 09:14:33 -05:00
k-stachowiak f4ab6b21bd Improve wording in the ChangeLog 2019-01-29 11:55:11 +01:00
Hanno Becker 62efb9c3ba Update crypto submodule to merge commit of sibling PR 2019-01-29 10:14:20 +00:00
k-stachowiak 21daa3c1ee Reduce the timing tests complexity 2019-01-29 10:19:49 +01:00
Hanno Becker ccf574e030 Fix outdated comment in ecdsa_verify_wrap() 2019-01-29 08:26:15 +00:00
Andrzej Kurek 2d4faa6afa ssl_tls: remove redundant status check 2019-01-29 03:14:15 -05:00
Ron Eldor 17233f5a5c Increase okm_hex buffer to contain null character
Add an additional byte for the `okm_hex` buffer, to assure
it is null-terminated in case `okm` is 128 bytes long.
2019-01-28 15:18:15 +02:00
Andrzej Kurek 2f76075b78 ssl_tls: adjust to the new key policy initialization and key allocation 2019-01-28 08:08:15 -05:00
Ron Eldor bc93219f66 Minor modifications to hkdf test
1. Fix comment grammar.
2. Rename `okm_string` to `okm_hex`.
2019-01-28 15:07:55 +02:00
Ron Eldor 1a3a7e5fc7 Add explanation for okm_string size
Add explanation for why the size of `okm_string` buffer
is twice as `okm` buffer.
2019-01-28 15:01:53 +02:00
Andrzej Kurek ac5dc3423a Fix key allocation for tls_prf_generic 2019-01-28 07:49:56 -05:00
Andrzej Kurek 3317126819 ssl_tls: add missing return brackets 2019-01-28 07:49:56 -05:00
Andrzej Kurek 70737ca827 ssl_tls: add key destruction upon generator failure 2019-01-28 07:49:56 -05:00
Andrzej Kurek c929a82a6b Implement tls_prf_generic using the PSA API 2019-01-28 07:49:56 -05:00
Jaeden Amero 7b9575c654 Merge remote-tracking branch 'origin/pr/2376' into development-psa
Resolve conflict in updating crypto submodule by manually pointing the
submodule to 2169a5e54d ("PSA: Adapt pk.c, pk_wrap.c, cipher.c to new
key policy init API").
2019-01-28 12:28:49 +00:00
Andrzej Kurek 5615dabeef ssl_tls: remove line breaks from a debug message 2019-01-28 07:04:19 -05:00
Andrzej Kurek e85414edd0 ssl-opt: add a check for PSA computation of digest of ServerKeyExchange 2019-01-28 07:04:19 -05:00
Andrzej Kurek 814feffd15 Whitespace, logging and documentation fixes
Introduce a psa_status_t status to handle return values.
Add a debug message with API usage description.
2019-01-28 07:04:19 -05:00
Andrzej Kurek d6db9be598 Adapt mbedtls_ssl_get_key_exchange_md_tls1_2 to PSA hashing 2019-01-28 07:04:19 -05:00
Hanno Becker af01b4b387 Update crypto submodule to sibling commit 2019-01-28 11:47:25 +00:00
Hanno Becker a98511164f Adapt ecdsa_verify_wrap() to new EC public key format
Previously, PSA used SubjectPublicKeyInfo structures to serialize EC public keys.
This has recently been changed to using ECPoint structures instead, but the wrapper
making PSA ECDSA verification available through Mbed TLS' PK API hasn't yet been
adapted accordingly - which is what this commit does.

Luckily, Mbed TLS' PK API offers two functions mbedtls_pk_write_pubkey()
and mbedtls_pk_write_pubkey_der(), the latter exporting a SubjectPublicKeyInfo
structure and the former exporting an ECPoint structure in case of EC public
keys. For the adaptation of the ECDSA wrapper ecdsa_verify_wrap() it is therefore
sufficient to use mbedtls_pk_write_pubkey() instead of mbedtls_pk_write_pubkey_der().
2019-01-28 11:45:19 +00:00
Manuel Pégourié-Gonnard 430a66f19a Fix backwards config dependency on oid.c
The file oid.c had conditional inclusion of functions based on a config.h
define that belongs to X.509, which is backwards. For now, just include those
functions unconditionally and rely on the linker to garbage-collect them if
not used.

In the longer term X.509-specific functions are likely to be removed from
libmbedcrypto, but at this step the goal is to preserve the API (and even ABI)
of libmbedcrypto for as long as possible while separating the source trees of
Mbed Crypto and Mbed TLS.
2019-01-28 10:31:39 +01:00
Manuel Pégourié-Gonnard c49ada41d4 Fix backwards include of x509.h in oid.h
As agreed during the workshop, temporarily move definitions to oid.h even if
they might not semantically belong here, as a short-term measure allowing to
build libmbecrypto on its own (without X.509 files present in the source tree)
but still provide all the things Mbed TLS currently expects, and more
specifically preserve the API and ABI exposed by libmbedtls.
2019-01-28 09:26:19 +01:00
Hanno Becker 2192c27720 Update crypto submodule to sibling PR 2019-01-25 15:18:46 +00:00
Hanno Becker f99c2ec9d7 PSA: Adapt pk.c, pk_wrap.c, cipher.c to new key policy init API 2019-01-25 14:36:07 +00:00
Hanno Becker e34f636f8d PSA: Adapt cipher.c, pk.c, pk_wrap.c to new key slot allocation API 2019-01-25 14:31:06 +00:00
Hanno Becker 32809e8c70 PSA: Adapt ssl_server2 to modified key allocation API 2019-01-25 14:31:00 +00:00
Hanno Becker 9bd8842c77 PSA: Adapt ssl_server2 to hew key policy initialization API 2019-01-25 14:27:01 +00:00
Hanno Becker 1387124c89 PSA: Adapt ssl_client2 to new key policy initialization API 2019-01-25 14:26:26 +00:00
Hanno Becker 37519ea5f8 PSA: Adapt ssl_client2 to modified key slot allocation API 2019-01-25 14:26:01 +00:00
Hanno Becker 8d865dfe37 PSA: Adapt PK test suite to new key policy initialization API 2019-01-25 14:25:16 +00:00
Hanno Becker 353295ac70 PSA: Adapt PK test suite to modified key slot allocation mechanism 2019-01-25 14:25:00 +00:00
Hanno Becker 4a2949ba29 Update crypto submodule
Includes PRs #6, #18, #19.
2019-01-25 14:23:06 +00:00
Andrzej Kurek 4b5686537f Update crypto version to use new key allocation 2019-01-25 03:16:49 -05:00
Andrzej Kurek 4687ea0271 Revert .gitmodules update - point back to development 2019-01-25 03:15:37 -05:00
Antonin Décimo 36e89b5b71 Fix #2370, minor typos and spelling mistakes 2019-01-24 10:37:40 +01:00
Andrzej Kurek dae1768de7 Update .gitmodules file to point to a sibling branch in mbed-crypto 2019-01-23 06:38:45 -05:00
Simon Butcher 8e763329ad Merge remote-tracking branch 'public/pr/2040' into development 2019-01-23 10:28:25 +01:00
Simon Butcher 442ca5710b Merge remote-tracking branch 'public/pr/1375' into development 2019-01-23 10:27:05 +01:00
Simon Butcher a3c821d143 Merge remote-tracking branch 'public/pr/2319' into development 2019-01-23 10:21:05 +01:00
Simon Butcher 38cb940692 Merge remote-tracking branch 'public/pr/2231' into development 2019-01-23 10:20:08 +01:00
Simon Butcher 0999ca3063 Merge remote-tracking branch 'public/pr/2326' into development 2019-01-23 10:19:25 +01:00
Simon Butcher d4e327c4ff Merge remote-tracking branch 'public/pr/2345' into development 2019-01-23 10:14:52 +01:00
Simon Butcher d253bb49e7 Merge remote-tracking branch 'public/pr/2352' into development-psa 2019-01-23 09:43:50 +01:00
Andrzej Kurek c847d9ff8d Change PSA submodule url 2019-01-22 07:13:10 -05:00
Andrzej Kurek 7deba18576 Remove unnecessary "#" sign from PSA macros 2019-01-22 06:29:45 -05:00
Ron Eldor 276bd00414 Change Perl to Python in test builds
Change references to Perl when mentioning building the tests, to Python,
as this is now the script that builds the tests. Fixes #2078.
2019-01-17 17:51:55 -06:00
Ron Eldor 574ac577b0 Specify server certificate to use in SHA-1 test
Specify the SHA-1 server certificate to use in the SHA-1 test,
because now the default certificates use SHA256 certificates.
2019-01-17 00:36:42 +02:00
ILUXONCHIK acfee8eb04 refactor CA and SRV certificates into separate blocks 2019-01-17 00:35:40 +02:00
ILUXONCHIK 2bd7f99685 refactor SHA-1 certificate defintions and assignment
As per refactoring suggestion that I made in #1520.
2019-01-17 00:32:36 +02:00