summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2018-03-27 23:07:50 +0200
committerNiels Möller <nisse@lysator.liu.se>2018-03-27 23:07:50 +0200
commit442e04385ffe9134fdefe198726b431849decf6e (patch)
tree4bb7a4a0d35b6320df183f203d789ff210456598 /testsuite
parent51661cb3009750fbfd24f9df0bb67d4ecb7c0830 (diff)
parent8bf4747d9cca7fd2cdd6ca8e14bce7cb334b2a7a (diff)
downloadnettle-442e04385ffe9134fdefe198726b431849decf6e.tar.gz
Merge branch 'rename-data-symbols' into master-updates
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ecc-mod-test.c16
-rw-r--r--testsuite/ecdh-test.c10
-rw-r--r--testsuite/ecdsa-sign-test.c10
-rw-r--r--testsuite/ecdsa-verify-test.c6
-rw-r--r--testsuite/testutils.c10
5 files changed, 26 insertions, 26 deletions
diff --git a/testsuite/ecc-mod-test.c b/testsuite/ecc-mod-test.c
index 17e35a92..41933b6f 100644
--- a/testsuite/ecc-mod-test.c
+++ b/testsuite/ecc-mod-test.c
@@ -105,23 +105,23 @@ test_fixed (void)
/* Triggered a bug reported by Hanno Böck. */
mpz_set_str (r, "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFF001C2C00", 16);
mpz_mul_2exp (r, r, 256);
- test_one ("p", &nettle_secp_256r1.p, r);
- test_one ("q", &nettle_secp_256r1.q, r);
+ test_one ("p", &_nettle_secp_256r1.p, r);
+ test_one ("q", &_nettle_secp_256r1.q, r);
mpz_set_str (r, "ffffffff00000001fffffffeffffffffffffffffffffffffffffffc0000000000007ffffffffffffffffffffffffffff00000000000000000fffffffffffffff", 16);
- test_one ("p", &nettle_secp_256r1.p, r);
- test_one ("q", &nettle_secp_256r1.q, r);
+ test_one ("p", &_nettle_secp_256r1.p, r);
+ test_one ("q", &_nettle_secp_256r1.q, r);
/* Triggered a bug reported by Hanno Böck. */
mpz_set_str (r, "4c9000000000000000000000000000000000000000000000004a604db486e000000000000000000000000000000000000000121025be29575adb2c8ffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16);
- test_one ("p", &nettle_secp_384r1.p, r);
- test_one ("q", &nettle_secp_384r1.q, r);
+ test_one ("p", &_nettle_secp_384r1.p, r);
+ test_one ("q", &_nettle_secp_384r1.q, r);
/* Triggered a carry bug in development version. */
mpz_set_str (r, "e64a84643150260640e4677c19ffc4faef06042132b86af6e9ee33fe1850222e57a514d5f1d6d444008bb896a96a43d5629945e57548f5e12f66be132b24110cbb2df6d7d3dd3aaadc98b0bbf29573843ad72e57f59fc5d4f56cc599da18bb99", 16);
- test_one ("p", &nettle_secp_384r1.p, r);
- test_one ("q", &nettle_secp_384r1.q, r);
+ test_one ("p", &_nettle_secp_384r1.p, r);
+ test_one ("q", &_nettle_secp_384r1.q, r);
mpz_clear (r);
}
diff --git a/testsuite/ecdh-test.c b/testsuite/ecdh-test.c
index 5a2b39d5..2bfffd68 100644
--- a/testsuite/ecdh-test.c
+++ b/testsuite/ecdh-test.c
@@ -138,7 +138,7 @@ test_dh (const char *name, const struct ecc_curve *ecc,
void
test_main(void)
{
- test_dh ("secp-192r1", &nettle_secp_192r1,
+ test_dh ("secp-192r1", &_nettle_secp_192r1,
"3406157206141798348095184987208239421004566462391397236532",
"1050363442265225480786760666329560655512990381040021438562",
"5298249600854377235107392014200406283816103564916230704184",
@@ -148,7 +148,7 @@ test_main(void)
"149293809021051532782730990145509724807636529827149481690",
"2891131861147398318714693938158856874319184314120776776192");
- test_dh ("secp-224r1", &nettle_secp_224r1,
+ test_dh ("secp-224r1", &_nettle_secp_224r1,
"1321072106881784386340709783538698930880431939595776773514895067682",
"6768311794185371282972144247871764855860666277647541840973645586477",
"2880077809069104378181313860274147139049600284805670362929579614547",
@@ -158,7 +158,7 @@ test_main(void)
"8330362698029245839097779050425944245826040430538860338085968752913",
"24167244512472228715617822000878192535267113543393576038737592837010");
- test_dh ("secp-256r1", &nettle_secp_256r1,
+ test_dh ("secp-256r1", &_nettle_secp_256r1,
"94731533361265297353914491124013058635674217345912524033267198103710636378786",
"22441589863306126152768848344973918725077248391248404659242620344938484650846",
"8673475622926171928656873398933611700804732317466515884933832073457396747355",
@@ -168,7 +168,7 @@ test_main(void)
"102958799567030688009123101477538973715497039396202015119148334812951370853564",
"29188877854984806245046208182450375893010623119030341548941791125497546766367");
- test_dh ("secp-384r1", &nettle_secp_384r1,
+ test_dh ("secp-384r1", &_nettle_secp_384r1,
"39086550219018474560700767788227987514008150214902287969462741484831311917159729009715909108606822193356890811565070",
"15536343869384820642787280162462493474000839389760580357050317691132784247078954166759523572989472049798969369413707",
"23268351460749985365652822073294615614961429585671989812206213135127969284347174876010177880230302801199500921999966",
@@ -178,7 +178,7 @@ test_main(void)
"27780263733159299625371532605243698753833039933618994121416145881861678645978369807598146716869504289033472077532789",
"12327518461490664021199432424728005314646140038116972426756705356672414772151215711157356913456651047992140493843405");
- test_dh ("secp-521r1", &nettle_secp_521r1,
+ test_dh ("secp-521r1", &_nettle_secp_521r1,
"1177787298234877762125077260641419691552146813662613924864132680693789861345339466386194840381422980702458955378518702648732728796955434922249345867267377826",
"3168153642368000846168628288850857848098131369578410603904155841373678828215434925507474033105518841999665785152501356092020415699294327720257651796364374116",
"278603899104240796379373331240296114411332466119196525390128418935585486485808560319073463912513286987331907013829243645911963547435764718505394265715321106",
diff --git a/testsuite/ecdsa-sign-test.c b/testsuite/ecdsa-sign-test.c
index 559de8e1..23275357 100644
--- a/testsuite/ecdsa-sign-test.c
+++ b/testsuite/ecdsa-sign-test.c
@@ -60,7 +60,7 @@ test_main (void)
{
/* Test cases for the smaller groups, verified with a
proof-of-concept implementation done for Yubico AB. */
- test_ecdsa (&nettle_secp_192r1,
+ test_ecdsa (&_nettle_secp_192r1,
"DC51D3866A15BACDE33D96F992FCA99D"
"A7E6EF0934E70975", /* z */
@@ -76,7 +76,7 @@ test_main (void)
"a91fb738f9f175d72f9c98527e881c36"
"8de68cb55ffe589"); /* s */
- test_ecdsa (&nettle_secp_224r1,
+ test_ecdsa (&_nettle_secp_224r1,
"446df0a771ed58403ca9cb316e617f6b"
"158420465d00a69601e22858", /* z */
@@ -93,7 +93,7 @@ test_main (void)
"f2715c38a95c31a2b486995f"); /* s */
/* From RFC 4754 */
- test_ecdsa (&nettle_secp_256r1,
+ test_ecdsa (&_nettle_secp_256r1,
"DC51D386 6A15BACD E33D96F9 92FCA99D"
"A7E6EF09 34E70975 59C27F16 14C88A7F", /* z */
@@ -108,7 +108,7 @@ test_main (void)
"86FA3BB4 E26CAD5B F90B7F81 899256CE"
"7594BB1E A0C89212 748BFF3B 3D5B0315"); /* s */
- test_ecdsa (&nettle_secp_384r1,
+ test_ecdsa (&_nettle_secp_384r1,
"0BEB6466 34BA8773 5D77AE48 09A0EBEA"
"865535DE 4C1E1DCB 692E8470 8E81A5AF"
"62E528C3 8B2A81B3 5309668D 73524D9F", /* z */
@@ -128,7 +128,7 @@ test_main (void)
"09F417BC A112674C 528262A4 0A629AF1"
"CBB9F516 CE0FA7D2 FF630863 A00E8B9F"); /* s*/
- test_ecdsa (&nettle_secp_521r1,
+ test_ecdsa (&_nettle_secp_521r1,
"0065FDA3 409451DC AB0A0EAD 45495112"
"A3D813C1 7BFD34BD F8C1209D 7DF58491"
"20597779 060A7FF9 D704ADF7 8B570FFA"
diff --git a/testsuite/ecdsa-verify-test.c b/testsuite/ecdsa-verify-test.c
index 76a182ba..971988c3 100644
--- a/testsuite/ecdsa-verify-test.c
+++ b/testsuite/ecdsa-verify-test.c
@@ -82,7 +82,7 @@ void
test_main (void)
{
/* From RFC 4754 */
- test_ecdsa (&nettle_secp_256r1,
+ test_ecdsa (&_nettle_secp_256r1,
"2442A5CC 0ECD015F A3CA31DC 8E2BBC70"
"BF42D60C BCA20085 E0822CB0 4235E970", /* x */
@@ -97,7 +97,7 @@ test_main (void)
"86FA3BB4 E26CAD5B F90B7F81 899256CE"
"7594BB1E A0C89212 748BFF3B 3D5B0315"); /* s */
- test_ecdsa (&nettle_secp_384r1,
+ test_ecdsa (&_nettle_secp_384r1,
"96281BF8 DD5E0525 CA049C04 8D345D30"
"82968D10 FEDF5C5A CA0C64E6 465A97EA"
"5CE10C9D FEC21797 41571072 1F437922", /* x */
@@ -117,7 +117,7 @@ test_main (void)
"09F417BC A112674C 528262A4 0A629AF1"
"CBB9F516 CE0FA7D2 FF630863 A00E8B9F"); /* s*/
- test_ecdsa (&nettle_secp_521r1,
+ test_ecdsa (&_nettle_secp_521r1,
"0151518F 1AF0F563 517EDD54 85190DF9"
"5A4BF57B 5CBA4CF2 A9A3F647 4725A35F"
"7AFE0A6D DEB8BEDB CD6A197E 592D4018"
diff --git a/testsuite/testutils.c b/testsuite/testutils.c
index 5ee9eda3..1812ff4f 100644
--- a/testsuite/testutils.c
+++ b/testsuite/testutils.c
@@ -1577,11 +1577,11 @@ test_dsa_key(const struct dsa_params *params,
}
const struct ecc_curve * const ecc_curves[] = {
- &nettle_secp_192r1,
- &nettle_secp_224r1,
- &nettle_secp_256r1,
- &nettle_secp_384r1,
- &nettle_secp_521r1,
+ &_nettle_secp_192r1,
+ &_nettle_secp_224r1,
+ &_nettle_secp_256r1,
+ &_nettle_secp_384r1,
+ &_nettle_secp_521r1,
&_nettle_curve25519,
NULL
};