summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-10-28 21:20:30 +0000
committertb <>2024-10-28 21:20:30 +0000
commit598a8ed1aff8a5e7bf2f2b68aa78806fd2fc04d8 (patch)
tree0adbe0bf901645673def08171c8e4254a3ccafa9 /src
parent479a0a8c7b8fdd258226aefac51baf99cbfa3fac (diff)
downloadopenbsd-598a8ed1aff8a5e7bf2f2b68aa78806fd2fc04d8.tar.gz
openbsd-598a8ed1aff8a5e7bf2f2b68aa78806fd2fc04d8.tar.bz2
openbsd-598a8ed1aff8a5e7bf2f2b68aa78806fd2fc04d8.zip
unifdef -m -DCORRECT_PRIV_KEY_PADDING=1 ec_asn1_test.c
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/ec/ec_asn1_test.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/regress/lib/libcrypto/ec/ec_asn1_test.c b/src/regress/lib/libcrypto/ec/ec_asn1_test.c
index 6c84736ab4..058d0d0067 100644
--- a/src/regress/lib/libcrypto/ec/ec_asn1_test.c
+++ b/src/regress/lib/libcrypto/ec/ec_asn1_test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_asn1_test.c,v 1.19 2024/10/28 18:44:12 tb Exp $ */ 1/* $OpenBSD: ec_asn1_test.c,v 1.20 2024/10/28 21:20:30 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2024 Theo Buehler <tb@openbsd.org>
@@ -26,8 +26,6 @@
26 26
27/* set to 0 if/when we are going to enforce 0 <= a,b < p. */ 27/* set to 0 if/when we are going to enforce 0 <= a,b < p. */
28#define NEGATIVE_CURVE_COEFFICIENTS_ALLOWED 1 28#define NEGATIVE_CURVE_COEFFICIENTS_ALLOWED 1
29/* unifdef once private key padding in i2d_ECPrivateKey() is fixed. */
30#define CORRECT_PRIV_KEY_PADDING 1
31 29
32static const uint8_t ec_secp256r1_pkparameters_named_curve[] = { 30static const uint8_t ec_secp256r1_pkparameters_named_curve[] = {
33 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 31 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03,
@@ -1040,7 +1038,6 @@ static const struct ec_private_key {
1040 0xe2, 1038 0xe2,
1041 }, 1039 },
1042 }, 1040 },
1043#if CORRECT_PRIV_KEY_PADDING
1044 { 1041 {
1045 .name = "secp160k1", 1042 .name = "secp160k1",
1046 .der_len = 83, 1043 .der_len = 83,
@@ -1137,7 +1134,6 @@ static const struct ec_private_key {
1137 0x63, 1134 0x63,
1138 }, 1135 },
1139 }, 1136 },
1140#endif
1141 { 1137 {
1142 .name = "secp192k1", 1138 .name = "secp192k1",
1143 .der_len = 94, 1139 .der_len = 94,
@@ -1173,7 +1169,6 @@ static const struct ec_private_key {
1173 0xdc, 1169 0xdc,
1174 }, 1170 },
1175 }, 1171 },
1176#if CORRECT_PRIV_KEY_PADDING
1177 { 1172 {
1178 .name = "secp224k1", 1173 .name = "secp224k1",
1179 .der_len = 107, 1174 .der_len = 107,
@@ -1213,7 +1208,6 @@ static const struct ec_private_key {
1213 0x0b, 1208 0x0b,
1214 }, 1209 },
1215 }, 1210 },
1216#endif
1217 { 1211 {
1218 .name = "secp224r1", 1212 .name = "secp224r1",
1219 .der_len = 106, 1213 .der_len = 106,
@@ -1718,7 +1712,6 @@ static const struct ec_private_key {
1718 0xfe, 0x7a, 0xb1, 0xa2, 0x74, 1712 0xfe, 0x7a, 0xb1, 0xa2, 0x74,
1719 }, 1713 },
1720 }, 1714 },
1721#if CORRECT_PRIV_KEY_PADDING
1722 { 1715 {
1723 .name = "wap-wsg-idm-ecid-wtls7", 1716 .name = "wap-wsg-idm-ecid-wtls7",
1724 .der_len = 83, 1717 .der_len = 83,
@@ -1809,7 +1802,6 @@ static const struct ec_private_key {
1809 0x3c, 1802 0x3c,
1810 }, 1803 },
1811 }, 1804 },
1812#endif
1813 { 1805 {
1814 .name = "wap-wsg-idm-ecid-wtls12", 1806 .name = "wap-wsg-idm-ecid-wtls12",
1815 .der_len = 106, 1807 .der_len = 106,