{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/4846","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/4846/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/4846/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/4846/events","html_url":"https://github.com/ARMmbed/mbed-os/pull/4846","id":247386192,"node_id":"MDExOlB1bGxSZXF1ZXN0MTMzNzA2MjQx","number":4846,"title":"Integrate mbed OS RTC with mbed TLS","user":{"login":"andresag01","id":3746901,"node_id":"MDQ6VXNlcjM3NDY5MDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3746901?v=4","gravatar_id":"","url":"https://api.github.com/users/andresag01","html_url":"https://github.com/andresag01","followers_url":"https://api.github.com/users/andresag01/followers","following_url":"https://api.github.com/users/andresag01/following{/other_user}","gists_url":"https://api.github.com/users/andresag01/gists{/gist_id}","starred_url":"https://api.github.com/users/andresag01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresag01/subscriptions","organizations_url":"https://api.github.com/users/andresag01/orgs","repos_url":"https://api.github.com/users/andresag01/repos","events_url":"https://api.github.com/users/andresag01/events{/privacy}","received_events_url":"https://api.github.com/users/andresag01/received_events","type":"User","site_admin":false},"labels":[{"id":521940966,"node_id":"MDU6TGFiZWw1MjE5NDA5NjY=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/component:%20tls","name":"component: tls","color":"5319e7","default":false},{"id":144902129,"node_id":"MDU6TGFiZWwxNDQ5MDIxMjk=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/needs:%20work","name":"needs: work","color":"fbca04","default":false},{"id":426508266,"node_id":"MDU6TGFiZWw0MjY1MDgyNjY=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/tracking","name":"tracking","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2017-08-02T13:19:30Z","updated_at":"2018-07-17T09:03:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/4846","html_url":"https://github.com/ARMmbed/mbed-os/pull/4846","diff_url":"https://github.com/ARMmbed/mbed-os/pull/4846.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/4846.patch"},"body":"## Description\r\nThis change integrates the mbed OS Real-Time Clock (RTC) into mbed TLS.\r\n\r\nThe integration is simply to define the macro `MBEDTLS_HAVE_TIME_DATE`\r\nin the `features/mbedtls/platform/inc/platform_mbed.h`. The default\r\nimplementation of the `mbedtls_time()` function provided by mbed TLS is\r\nsufficient to work with mbed OS because both use POSIX functions.\r\n\r\n## Status\r\nIN DEVELOPMENT\r\n\r\n## Migrations\r\nThis patch modifies the behaviour of the X509 module in mbed TLS because now the certificate verification process will check that the certificates date/time validity is correct when it previously did not. For this to work correctly, the application needs to correctly set up the RTC with a call to [`set_time()`](https://github.com/ARMmbed/mbed-os/blob/4890261c9860dd3d8f5df14bb070c3cb8e538732/platform/mbed_rtc_time.h#L75). For example, this change causes the mbed TLS example application [tls-client](https://github.com/ARMmbed/mbed-os-example-tls/tree/master/tls-client) to fail.\r\n\r\nYES \r\n\r\n## Todos\r\n- [ ] Tests\r\n- [ ] Documentation\r\n\r\n## Steps to test or reproduce\r\nUse mbed OS as normal. When verifying certificates, now the date/time validity checks will be exercised by the mbed TLS X509 module.\r\n"},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/405512475","html_url":"https://github.com/ARMmbed/mbed-os/pull/4846#issuecomment-405512475","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/4846","id":405512475,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTUxMjQ3NQ==","user":{"login":"k-stachowiak","id":2103379,"node_id":"MDQ6VXNlcjIxMDMzNzk=","avatar_url":"https://avatars3.githubusercontent.com/u/2103379?v=4","gravatar_id":"","url":"https://api.github.com/users/k-stachowiak","html_url":"https://github.com/k-stachowiak","followers_url":"https://api.github.com/users/k-stachowiak/followers","following_url":"https://api.github.com/users/k-stachowiak/following{/other_user}","gists_url":"https://api.github.com/users/k-stachowiak/gists{/gist_id}","starred_url":"https://api.github.com/users/k-stachowiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k-stachowiak/subscriptions","organizations_url":"https://api.github.com/users/k-stachowiak/orgs","repos_url":"https://api.github.com/users/k-stachowiak/repos","events_url":"https://api.github.com/users/k-stachowiak/events{/privacy}","received_events_url":"https://api.github.com/users/k-stachowiak/received_events","type":"User","site_admin":false},"created_at":"2018-07-17T09:03:12Z","updated_at":"2018-07-17T09:03:12Z","author_association":"CONTRIBUTOR","body":"@andresag01 My aim was to check if the proposed code builds. I took the `hashing` example, deployed mbed-os tree based on this branch, but rebased to the then current master, and built the application for `K64F` and for `LPC1768`. I checked two things: 1) that both cases build, 2) that the proper source is generated, by placing an `#error` directive in the parts of the source that I expected to be compiled in the respective cases.\r\n\r\nThe only problem that I encountered was lack of the platform initialization/teardown API in the MbedTLS. Since I deployed your branch, based of an older Mbed OS version into the up to date example programs, there was an incompatibility. The aforementioned rebase solved the problem without any other patches.\r\n\r\nI did not test it with other examples, and I did not deploy the program to the target board."}}
{"actor":{"display_login":"k-stachowiak"}}