Skip to content

Commit 307117a

Browse files
author
Andrzej Kurek
committed
Move platform context comments
1 parent cf24b6a commit 307117a

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
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/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ class HelloHTTPS {
106106
mbedtls_platform_context* platform_ctx) :
107107
_domain(domain), _port(port)
108108
{
109-
109+
// The platform context can be used by cryptographic calls which require it.
110+
// Please refer to https://github.com/ARMmbed/mbedtls/issues/1200 for more information.
110111
_platform_ctx = platform_ctx;
111112
_gothello = false;
112113
_got200 = false;
@@ -443,8 +444,6 @@ int main() {
443444
return 1;
444445
}
445446

446-
// The platform context is passed just in case any crypto calls need it.
447-
// Please refer to https://github.com/ARMmbed/mbedtls/issues/1200 for more information.
448447
HelloHTTPS *hello = new HelloHTTPS(HTTPS_SERVER_NAME, HTTPS_SERVER_PORT, network, &platform_ctx);
449448
hello->startTest(HTTPS_PATH);
450449
delete hello;

0 commit comments

Comments
 (0)