Skip to content

Commit 3781f08

Browse files
Andrzej KurekPatater
authored andcommitted
Move platform context comments
1 parent 93b8992 commit 3781f08

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

authcrypt/authcrypt.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ const char Authcrypt::metadata[] = "eg sequence number, routing info";
4141

4242
Authcrypt::Authcrypt(mbedtls_platform_context* platform_ctx)
4343
{
44+
// The platform context can be used by cryptographic calls which require it.
45+
// Please refer to https://github.com/ARMmbed/mbedtls/issues/1200 for more information.
4446
_platform_ctx = platform_ctx;
4547
memset(ciphertext, 0, sizeof(ciphertext));
4648
memset(decrypted, 0, sizeof(decrypted));

authcrypt/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ int main() {
3030
}
3131

3232
int exit_code = MBEDTLS_EXIT_SUCCESS;
33-
// The platform context is passed just in case any crypto calls need it.
34-
// Please refer to https://github.com/ARMmbed/mbedtls/issues/1200 for more information.
3533
Authcrypt *authcrypt = new Authcrypt(&platform_ctx);
3634

3735
if (authcrypt->run() != 0) {

tls-client/HelloHttpsClient.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ HelloHttpsClient::HelloHttpsClient(const char *in_server_name,
7575
socket(),
7676
server_name(in_server_name),
7777
server_port(in_server_port),
78+
/* The platform context is passed just in case any crypto calls need it.
79+
* Please refer to https://github.com/ARMmbed/mbedtls/issues/1200 for more
80+
* information. */
7881
platform_ctx(in_platform_ctx)
7982
{
8083
mbedtls_entropy_init(&entropy);

tls-client/main.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ int main()
7070
printf("Using Mbed OS from master.\n");
7171
#endif /* MBEDTLS_MAJOR_VERSION */
7272

73-
/* Allocate a HTTPS client
74-
*
75-
* The platform context is passed just in case any crypto calls need it.
76-
* Please refer to https://github.com/ARMmbed/mbedtls/issues/1200 for more
77-
* information. */
73+
/* Allocate a HTTPS client */
7874
client = new (std::nothrow) HelloHttpsClient(SERVER_NAME, SERVER_PORT,
7975
&platform_ctx);
8076
if (client == NULL) {

0 commit comments

Comments
 (0)