Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 59c9125

Browse files
author
Antti Kauppila
authored
Merge pull request #35 from ARMmbed/TRNG_fix
Added error for devices not having TRNG
2 parents 13e41d2 + e4c80b1 commit 59c9125

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# TLSSocket example for Mbed OS
22

33
This examples application demonstrates the usage of `TLSSocket` API. To understand how secure sockets work in Mbed OS, please refer to the [Documentation](#documentation) section below.
4+
**NOTE**: This example works only on devices having TRNG supported!
45

56
### Selecting the network interface
67

main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#include "mbed.h"
22
#include "mbed_trace.h"
33

4+
#ifndef DEVICE_TRNG
5+
#error "mbed-os-example-tls-socket requires a device which supports TRNG"
6+
#else
7+
48
const char cert[] = \
59
"-----BEGIN CERTIFICATE-----\n"
610
"MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU\n"
@@ -105,3 +109,4 @@ int main(void)
105109
net->disconnect();
106110
printf("Done\n");
107111
}
112+
#endif

0 commit comments

Comments
 (0)