-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Aiman Ismail
committed
Nov 12, 2019
1 parent
47b0794
commit 2723b8f
Showing
3 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (C) 2018 Inria | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @ingroup tests | ||
* @{ | ||
* | ||
* @file | ||
* @brief tlsman test application (PSK and ECC keys) | ||
* | ||
* Small test for TLSMAN. Many definitions defined here are also available at | ||
* sock_secure (and are intended to be used in standard applications) | ||
* | ||
* @author Raul Fuentes <raul.fuentes-samaniego@inria.fr> | ||
* | ||
* @} | ||
*/ | ||
|
||
#ifdef MODULE_SOCK_DTLS | ||
#ifdef DTLS_PSK | ||
const char psk_key[] = "secretPSK"; | ||
const char psk_id[] = "Client_identity"; | ||
const unsigned psk_key_len = sizeof(psk_key) - 1; | ||
const unsigned psk_id_len = sizeof(psk_id) - 1; | ||
#endif /* DTLS_PSK */ | ||
|
||
#ifdef DTLS_ECC | ||
const unsigned char ecdsa_priv_key[] = { | ||
0x41, 0xC1, 0xCB, 0x6B, 0x51, 0x24, 0x7A, 0x14, | ||
0x43, 0x21, 0x43, 0x5B, 0x7A, 0x80, 0xE7, 0x14, | ||
0x89, 0x6A, 0x33, 0xBB, 0xAD, 0x72, 0x94, 0xCA, | ||
0x40, 0x14, 0x55, 0xA1, 0x94, 0xA9, 0x49, 0xFA | ||
}; | ||
|
||
const unsigned char ecdsa_pub_key_x[] = { | ||
0x36, 0xDF, 0xE2, 0xC6, 0xF9, 0xF2, 0xED, 0x29, | ||
0xDA, 0x0A, 0x9A, 0x8F, 0x62, 0x68, 0x4E, 0x91, | ||
0x63, 0x75, 0xBA, 0x10, 0x30, 0x0C, 0x28, 0xC5, | ||
0xE4, 0x7C, 0xFB, 0xF2, 0x5F, 0xA5, 0x8F, 0x52 | ||
}; | ||
|
||
const unsigned char ecdsa_pub_key_y[] = { | ||
0x71, 0xA0, 0xD4, 0xFC, 0xDE, 0x1A, 0xB8, 0x78, | ||
0x5A, 0x3C, 0x78, 0x69, 0x35, 0xA7, 0xCF, 0xAB, | ||
0xE9, 0x3F, 0x98, 0x72, 0x09, 0xDA, 0xED, 0x0B, | ||
0x4F, 0xAB, 0xC3, 0x6F, 0xC7, 0x72, 0xF8, 0x29 | ||
}; | ||
#endif /* DTLS_ECC */ | ||
#endif /* MODULE_SOCK_DTLS */ | ||
|
||
typedef int unused_workaround; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters