-
Notifications
You must be signed in to change notification settings - Fork 3k
Change MbedTLS configuration to use the Mbed OS configuration system #9669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
05c2203
Add Mbed OS JSON configuration options to the MbedTLS Library
dreemkiller 1bae578
Added license headers and changed coding style (where appropriate)
dreemkiller 526b301
Removed some spaces to comply with the style guidelines
dreemkiller 37e95a7
Removed the MBED_CLOUD_CLIENT and MBED_MINI_CLOUD_CLIENT config options
dreemkiller 2b3cd6d
Changed mbed_cloud_client_* to pelion_client
dreemkiller 37f9c7c
Removed mini client test case
dreemkiller 5e6c905
A small amount of cleanup
dreemkiller b2d6731
Removed the mbedtls.config connection test as it's redundant to the T…
dreemkiller 2388a84
style changes to satisfy astyle
dreemkiller 4a7d56d
style changes to satisfy astyle
dreemkiller c87af06
Changed mbedtls configuration parameters to lowercase
dreemkiller 98f9306
More astyle changes
dreemkiller 60545ee
Changed the app-config-file option to be additive instead of comprehe…
dreemkiller c18af74
Changed the order of the options so that app-config-file has the last…
dreemkiller 819d711
Changed the return code being checked for unsupported algorithms in a…
dreemkiller 093c243
Moved mbedtls_config_reader.h to the mbedtls/platform directory
dreemkiller 6cde4ef
Added checks for platforms with no entropy source
dreemkiller 2d5d3f2
Removed stray SHA256 define
dreemkiller 07186e6
Removed a stray #define
dreemkiller 42af1df
Removed a merge-indicator from mbedtls_config_reader.h
dreemkiller 9ef60ed
Restored the configuration test jsons to make testing easier in the f…
dreemkiller a759e8b
Added null testcase for mbedtls.config so cases[] is not empty when n…
dreemkiller 733609d
Added an mbedtls.config all-off configuration for testing non-entropy…
dreemkiller c23623c
removbed the default defines from mbedtls mbed_lib.json
dreemkiller 2c0a7bc
modified mbedtls adjust_config.sh for new config changes. updated con…
dreemkiller c090a89
modified mbedtls_config_reader.h to enable builds no no-entropy platf…
dreemkiller 5498b5e
Changed the way non-entropy platforms are configured, enabling builds…
dreemkiller 3889a1e
added #warning for inconsistent mbedtls ocnfigurations
dreemkiller 5099e0e
Fixed a typo in one of the MBed TLS #defines
dreemkiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) 2013-2018, ARM Limited, All Rights Reserved | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef __AES_TEST_H__ | ||
#define __AES_TEST_H__ | ||
|
||
int mbedtls_aes_ecb_test_mbedos(int verbose); | ||
int mbedtls_aes_cbc_test_mbedos(int verbose); | ||
int mbedtls_aes_cfb_test_mbedos(int verbose); | ||
int mbedtls_aes_ctr_test_mbedos(int verbose); | ||
|
||
#endif // __AES_TEST_H__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (c) 2013-2018, ARM Limited, All Rights Reserved | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <string.h> | ||
#include "mbed.h" | ||
#include "greentea-client/test_env.h" | ||
#include "unity/unity.h" | ||
#include "utest/utest.h" | ||
#include "mbedtls/ecdh.h" | ||
#include "ecdh_test.h" | ||
|
||
#if defined (MBEDTLS_ECDH_C) | ||
/* Tests whether the mbedtls_ecdh_* functions are included in the build configuration | ||
* It never generates asserts. Instead, failures should show up at compile time | ||
*/ | ||
int mbedtls_ecdh_test_mbedos(int verbose) | ||
{ | ||
mbedtls_ecdh_make_params(NULL, NULL, NULL, 0, NULL, NULL); | ||
|
||
return 0; | ||
} | ||
#endif // MBEDTLS_ECDH_C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2013-2018, ARM Limited, All Rights Reserved | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef __ECDH_TEST_H__ | ||
#define __ECDH_TEST_H__ | ||
|
||
int mbedtls_ecdh_test_mbedos(int verbose); | ||
|
||
#endif // __ECDH_TEST_H__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2013-2018, ARM Limited, All Rights Reserved | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
#include <stdio.h> | ||
#include <string.h> | ||
#include "mbed.h" | ||
#include "greentea-client/test_env.h" | ||
#include "unity/unity.h" | ||
#include "utest/utest.h" | ||
#include "mbedtls/ecdsa.h" | ||
#include "ecdsa_test.h" | ||
|
||
#if defined(MBEDTLS_ECDSA_C) | ||
/* Tests whether the mbedtls_ecdsa_* functions are included in the build configuration | ||
* This test does not generate asserts. Instead, a failure will cause a compile error | ||
* Testing the functionality of the ecdsa functions is beyond the scope | ||
*/ | ||
int mbedtls_ecdsa_test_mbedos(int verbose) | ||
{ | ||
mbedtls_ecp_group group; | ||
group.N.p = NULL; // will cause the ecdsa function to exit early | ||
mbedtls_ecdsa_sign(&group, NULL, NULL, NULL, NULL, 0, NULL, NULL); | ||
|
||
return 0; | ||
} | ||
#endif // MBEDTLS_ECDSA_C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2013-2018, ARM Limited, All Rights Reserved | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef __ECDSA_TEST_H__ | ||
#define __ECDSA_TEST_H__ | ||
|
||
int mbedtls_ecdsa_test_mbedos(int verbose); | ||
|
||
#endif // __ECDSA_TEST_H__ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Please update the copyright date in all the new files.