diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec_asn1.c')
-rw-r--r-- | src/lib/libcrypto/ec/ec_asn1.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c index 6bf7e47d7d..baa58b5183 100644 --- a/src/lib/libcrypto/ec/ec_asn1.c +++ b/src/lib/libcrypto/ec/ec_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_asn1.c,v 1.37 2022/05/24 20:06:32 tb Exp $ */ | 1 | /* $OpenBSD: ec_asn1.c,v 1.38 2022/11/19 07:00:57 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -67,7 +67,7 @@ | |||
67 | #include "asn1_locl.h" | 67 | #include "asn1_locl.h" |
68 | #include "ec_lcl.h" | 68 | #include "ec_lcl.h" |
69 | 69 | ||
70 | int | 70 | int |
71 | EC_GROUP_get_basis_type(const EC_GROUP * group) | 71 | EC_GROUP_get_basis_type(const EC_GROUP * group) |
72 | { | 72 | { |
73 | int i = 0; | 73 | int i = 0; |
@@ -90,7 +90,7 @@ EC_GROUP_get_basis_type(const EC_GROUP * group) | |||
90 | } | 90 | } |
91 | 91 | ||
92 | #ifndef OPENSSL_NO_EC2M | 92 | #ifndef OPENSSL_NO_EC2M |
93 | int | 93 | int |
94 | EC_GROUP_get_trinomial_basis(const EC_GROUP * group, unsigned int *k) | 94 | EC_GROUP_get_trinomial_basis(const EC_GROUP * group, unsigned int *k) |
95 | { | 95 | { |
96 | if (group == NULL) | 96 | if (group == NULL) |
@@ -108,7 +108,7 @@ EC_GROUP_get_trinomial_basis(const EC_GROUP * group, unsigned int *k) | |||
108 | return 1; | 108 | return 1; |
109 | } | 109 | } |
110 | 110 | ||
111 | int | 111 | int |
112 | EC_GROUP_get_pentanomial_basis(const EC_GROUP * group, unsigned int *k1, | 112 | EC_GROUP_get_pentanomial_basis(const EC_GROUP * group, unsigned int *k1, |
113 | unsigned int *k2, unsigned int *k3) | 113 | unsigned int *k2, unsigned int *k3) |
114 | { | 114 | { |
@@ -268,7 +268,7 @@ static const ASN1_ADB_TABLE X9_62_CHARACTERISTIC_TWO_adbtbl[] = { | |||
268 | .field_name = "p.onBasis", | 268 | .field_name = "p.onBasis", |
269 | .item = &ASN1_NULL_it, | 269 | .item = &ASN1_NULL_it, |
270 | }, | 270 | }, |
271 | 271 | ||
272 | }, | 272 | }, |
273 | { | 273 | { |
274 | .value = NID_X9_62_tpBasis, | 274 | .value = NID_X9_62_tpBasis, |
@@ -279,7 +279,7 @@ static const ASN1_ADB_TABLE X9_62_CHARACTERISTIC_TWO_adbtbl[] = { | |||
279 | .field_name = "p.tpBasis", | 279 | .field_name = "p.tpBasis", |
280 | .item = &ASN1_INTEGER_it, | 280 | .item = &ASN1_INTEGER_it, |
281 | }, | 281 | }, |
282 | 282 | ||
283 | }, | 283 | }, |
284 | { | 284 | { |
285 | .value = NID_X9_62_ppBasis, | 285 | .value = NID_X9_62_ppBasis, |
@@ -290,7 +290,7 @@ static const ASN1_ADB_TABLE X9_62_CHARACTERISTIC_TWO_adbtbl[] = { | |||
290 | .field_name = "p.ppBasis", | 290 | .field_name = "p.ppBasis", |
291 | .item = &X9_62_PENTANOMIAL_it, | 291 | .item = &X9_62_PENTANOMIAL_it, |
292 | }, | 292 | }, |
293 | 293 | ||
294 | }, | 294 | }, |
295 | }; | 295 | }; |
296 | 296 | ||
@@ -370,7 +370,7 @@ static const ASN1_ADB_TABLE X9_62_FIELDID_adbtbl[] = { | |||
370 | .field_name = "p.prime", | 370 | .field_name = "p.prime", |
371 | .item = &ASN1_INTEGER_it, | 371 | .item = &ASN1_INTEGER_it, |
372 | }, | 372 | }, |
373 | 373 | ||
374 | }, | 374 | }, |
375 | { | 375 | { |
376 | .value = NID_X9_62_characteristic_two_field, | 376 | .value = NID_X9_62_characteristic_two_field, |
@@ -381,7 +381,7 @@ static const ASN1_ADB_TABLE X9_62_FIELDID_adbtbl[] = { | |||
381 | .field_name = "p.char_two", | 381 | .field_name = "p.char_two", |
382 | .item = &X9_62_CHARACTERISTIC_TWO_it, | 382 | .item = &X9_62_CHARACTERISTIC_TWO_it, |
383 | }, | 383 | }, |
384 | 384 | ||
385 | }, | 385 | }, |
386 | }; | 386 | }; |
387 | 387 | ||
@@ -798,7 +798,7 @@ ec_asn1_group2fieldid(const EC_GROUP * group, X9_62_FIELDID * field) | |||
798 | return (ok); | 798 | return (ok); |
799 | } | 799 | } |
800 | 800 | ||
801 | static int | 801 | static int |
802 | ec_asn1_group2curve(const EC_GROUP * group, X9_62_CURVE * curve) | 802 | ec_asn1_group2curve(const EC_GROUP * group, X9_62_CURVE * curve) |
803 | { | 803 | { |
804 | BIGNUM *tmp_1 = NULL, *tmp_2 = NULL; | 804 | BIGNUM *tmp_1 = NULL, *tmp_2 = NULL; |
@@ -1308,7 +1308,7 @@ d2i_ECPKParameters(EC_GROUP ** a, const unsigned char **in, long len) | |||
1308 | return (group); | 1308 | return (group); |
1309 | } | 1309 | } |
1310 | 1310 | ||
1311 | int | 1311 | int |
1312 | i2d_ECPKParameters(const EC_GROUP * a, unsigned char **out) | 1312 | i2d_ECPKParameters(const EC_GROUP * a, unsigned char **out) |
1313 | { | 1313 | { |
1314 | int ret = 0; | 1314 | int ret = 0; |
@@ -1420,7 +1420,7 @@ d2i_ECPrivateKey(EC_KEY ** a, const unsigned char **in, long len) | |||
1420 | return (NULL); | 1420 | return (NULL); |
1421 | } | 1421 | } |
1422 | 1422 | ||
1423 | int | 1423 | int |
1424 | i2d_ECPrivateKey(EC_KEY * a, unsigned char **out) | 1424 | i2d_ECPrivateKey(EC_KEY * a, unsigned char **out) |
1425 | { | 1425 | { |
1426 | int ret = 0, ok = 0; | 1426 | int ret = 0, ok = 0; |
@@ -1504,7 +1504,7 @@ i2d_ECPrivateKey(EC_KEY * a, unsigned char **out) | |||
1504 | return (ok ? ret : 0); | 1504 | return (ok ? ret : 0); |
1505 | } | 1505 | } |
1506 | 1506 | ||
1507 | int | 1507 | int |
1508 | i2d_ECParameters(EC_KEY * a, unsigned char **out) | 1508 | i2d_ECParameters(EC_KEY * a, unsigned char **out) |
1509 | { | 1509 | { |
1510 | if (a == NULL) { | 1510 | if (a == NULL) { |
@@ -1569,7 +1569,7 @@ o2i_ECPublicKey(EC_KEY ** a, const unsigned char **in, long len) | |||
1569 | return ret; | 1569 | return ret; |
1570 | } | 1570 | } |
1571 | 1571 | ||
1572 | int | 1572 | int |
1573 | i2o_ECPublicKey(const EC_KEY * a, unsigned char **out) | 1573 | i2o_ECPublicKey(const EC_KEY * a, unsigned char **out) |
1574 | { | 1574 | { |
1575 | size_t buf_len = 0; | 1575 | size_t buf_len = 0; |