1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef __CERTIFICATE_H__
8 #define __CERTIFICATE_H__
9 
10 enum tls_tag {
11 	/** The Certificate Authority public key */
12 	HTTP_SERVER_CA_CERTIFICATE_TAG,
13 	/** Used for both the public and private server keys */
14 	HTTP_SERVER_CERTIFICATE_TAG,
15 	/** Used for both the public and private client keys */
16 	HTTP_SERVER_CLIENT_CERTIFICATE_TAG,
17 	PSK_TAG,
18 };
19 
20 #if !defined(CONFIG_NET_SAMPLE_CERTS_WITH_SC)
21 static const unsigned char server_certificate[] = {
22 #include "https-server-cert.der.inc"
23 };
24 
25 /* This is the private key in pkcs#8 format. */
26 static const unsigned char private_key[] = {
27 #include "https-server-key.der.inc"
28 };
29 
30 #else
31 
32 static const unsigned char ca_certificate[] = {
33 #include "ca.der.inc"
34 };
35 
36 static const unsigned char server_certificate[] = {
37 #include "server.der.inc"
38 };
39 
40 /* This is the private key in pkcs#8 format. */
41 static const unsigned char private_key[] = {
42 #include "server_privkey.der.inc"
43 };
44 #endif
45 
46 #if defined(CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
47 #include CONFIG_NET_SAMPLE_PSK_HEADER_FILE
48 #endif
49 
50 #endif /* __CERTIFICATE_H__ */
51