aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/unit_ecc.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-02-21 12:36:53 -0500
committerJack Lloyd <[email protected]>2018-02-21 12:36:53 -0500
commitfdbcf2dcc45094f6eee2fe2f17ee287118dc6cfd (patch)
tree5b34695fcfd3e350150418244d53775904da0c6a /src/tests/unit_ecc.cpp
parenta706d6b6b4344388b9a5b0a2e506ce4cd3c83cf3 (diff)
Expose EC_Group::a_is_minus_3
Diffstat (limited to 'src/tests/unit_ecc.cpp')
-rw-r--r--src/tests/unit_ecc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/unit_ecc.cpp b/src/tests/unit_ecc.cpp
index 1a2f1d61c..166dfcd14 100644
--- a/src/tests/unit_ecc.cpp
+++ b/src/tests/unit_ecc.cpp
@@ -281,6 +281,13 @@ Test::Result test_groups()
result.confirm("EC_Group is known", !group.get_curve_oid().empty());
result.test_eq("EC_Group has correct bit size", group.get_p().bits(), group.get_p_bits());
result.test_eq("EC_Group has byte size", group.get_p().bytes(), group.get_p_bytes());
+
+ bool a_is_minus_3 = group.a_is_minus_3();
+
+ if(a_is_minus_3)
+ result.test_eq("Group A equals -3", group.get_a(), group.get_p() - 3);
+ else
+ result.test_ne("Group " + group_name + " A does not equal -3", group.get_a(), group.get_p() - 3);
}
return result;
}