Skip to content

Commit b7954c9

Browse files
rluboscfriedt
authored andcommitted
samples: net: http_get: Update root CA certificate
The root CA used so far (GlobalSign R2) is about to expire soon (December 2021) and Google have switched to a new certificate, signed by GlobalSign R1 (valid until 2028). Therefore we need to replace the root CA used by the sample to the new one, in order to establish secure connection to with google.com. Additionally, the new certificate chain sent by Google is larger again, so it's needed to increase mbed TLS max content length parameter in order to process it correctly. This also implies an increase in heap usage, so increase the heap size as well. Signed-off-by: Robert Lubos <[email protected]>
1 parent 3a39b78 commit b7954c9

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

samples/net/sockets/http_get/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/)
1414

1515
generate_inc_file_for_target(
1616
app
17-
src/globalsign_r2.der
18-
${gen_dir}/globalsign_r2.der.inc
17+
src/globalsign_r1.der
18+
${gen_dir}/globalsign_r1.der.inc
1919
)

samples/net/sockets/http_get/overlay-tls.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CONFIG_MAIN_STACK_SIZE=4096
44
CONFIG_MBEDTLS=y
55
CONFIG_MBEDTLS_BUILTIN=y
66
CONFIG_MBEDTLS_ENABLE_HEAP=y
7-
CONFIG_MBEDTLS_HEAP_SIZE=30000
8-
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=6144
7+
CONFIG_MBEDTLS_HEAP_SIZE=40000
8+
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=7168
99

1010
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

samples/net/sockets/http_get/src/ca_certificate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
* certificate in PEM format, you can enable support for it in Kconfig.
1414
*/
1515

16-
/* GlobalSign Root CA - R2 for https://google.com */
16+
/* GlobalSign Root CA - R1 for https://google.com */
1717
#if defined(CONFIG_TLS_CREDENTIAL_FILENAMES)
18-
static const unsigned char ca_certificate[] = "globalsign_r2.der";
18+
static const unsigned char ca_certificate[] = "globalsign_r1.der";
1919
#else
2020
static const unsigned char ca_certificate[] = {
21-
#include "globalsign_r2.der.inc"
21+
#include "globalsign_r1.der.inc"
2222
};
2323
#endif
2424

889 Bytes
Binary file not shown.
-958 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)