diff options
Diffstat (limited to 'src/util/test_crypto_ecc.c')
-rw-r--r-- | src/util/test_crypto_ecc.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/util/test_crypto_ecc.c b/src/util/test_crypto_ecc.c deleted file mode 100644 index ebfa04c45..000000000 --- a/src/util/test_crypto_ecc.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2002-2015 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | |||
20 | */ | ||
21 | /** | ||
22 | * @file util/test_crypto_ecc.c | ||
23 | * @brief test case for crypto_ecc.c GNUNET_CRYPTO_ecdsa_sign_raw() function | ||
24 | * @author Tristan Schwieren | ||
25 | */ | ||
26 | #include "platform.h" | ||
27 | #include "gnunet_util_lib.h" | ||
28 | |||
29 | static int | ||
30 | test_GNUNET_CRYPTO_ecdsa_sign_raw () | ||
31 | { | ||
32 | struct GNUNET_CRYPTO_EcdsaPrivateKey skey; | ||
33 | struct GNUNET_CRYPTO_EcdsaPublicKey pkey; | ||
34 | struct GNUNET_CRYPTO_EcdsaSignature sig; | ||
35 | const char *test_data = "Hello World!"; | ||
36 | |||
37 | /* Generate keys */ | ||
38 | GNUNET_CRYPTO_ecdsa_key_create (&skey); | ||
39 | GNUNET_CRYPTO_ecdsa_key_get_public (&skey, &pkey); | ||
40 | |||
41 | GNUNET_assert (GNUNET_OK == | ||
42 | GNUNET_CRYPTO_ecdsa_sign_raw (&skey, | ||
43 | test_data, | ||
44 | strlen (test_data), | ||
45 | &sig)); | ||
46 | |||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | int | ||
51 | main (int argc, char *argv[]) | ||
52 | { | ||
53 | return test_GNUNET_CRYPTO_ecdsa_sign_raw (); | ||
54 | } | ||
55 | |||
56 | |||
57 | /* end of test_crypto_ecc.c */ | ||