Skip to content

Commit a4d0d43

Browse files
author
tb
committed
Zap trailing whitespace
1 parent ca04a98 commit a4d0d43

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

src/lib/libcrypto/ec/ec_lib.c

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ec_lib.c,v 1.41 2021/09/12 16:23:19 tb Exp $ */
1+
/* $OpenBSD: ec_lib.c,v 1.42 2022/03/29 13:44:06 tb Exp $ */
22
/*
33
* Originally written by Bodo Moeller for the OpenSSL project.
44
*/
@@ -114,7 +114,7 @@ EC_GROUP_new(const EC_METHOD * meth)
114114
}
115115

116116

117-
void
117+
void
118118
EC_GROUP_free(EC_GROUP * group)
119119
{
120120
if (!group)
@@ -135,7 +135,7 @@ EC_GROUP_free(EC_GROUP * group)
135135
}
136136

137137

138-
void
138+
void
139139
EC_GROUP_clear_free(EC_GROUP * group)
140140
{
141141
if (!group)
@@ -157,7 +157,7 @@ EC_GROUP_clear_free(EC_GROUP * group)
157157
}
158158

159159

160-
int
160+
int
161161
EC_GROUP_copy(EC_GROUP * dest, const EC_GROUP * src)
162162
{
163163
EC_EXTRA_DATA *d;
@@ -247,7 +247,7 @@ EC_GROUP_method_of(const EC_GROUP *group)
247247
}
248248

249249

250-
int
250+
int
251251
EC_METHOD_get_field_type(const EC_METHOD *meth)
252252
{
253253
return meth->field_type;
@@ -300,7 +300,7 @@ ec_guess_cofactor(EC_GROUP *group)
300300
if (!BN_copy(q, &group->field))
301301
goto err;
302302
}
303-
303+
304304
/*
305305
* Compute
306306
* h = \lfloor (q + 1)/n \rceil = \lfloor (q + 1 + n/2) / n \rfloor.
@@ -328,7 +328,7 @@ ec_guess_cofactor(EC_GROUP *group)
328328
return ret;
329329
}
330330

331-
int
331+
int
332332
EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,
333333
const BIGNUM *order, const BIGNUM *cofactor)
334334
{
@@ -392,7 +392,7 @@ EC_GROUP_get0_generator(const EC_GROUP *group)
392392
}
393393

394394

395-
int
395+
int
396396
EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx)
397397
{
398398
if (!BN_copy(order, &group->order))
@@ -407,7 +407,7 @@ EC_GROUP_order_bits(const EC_GROUP *group)
407407
return group->meth->group_order_bits(group);
408408
}
409409

410-
int
410+
int
411411
EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx)
412412
{
413413
if (!BN_copy(cofactor, &group->cofactor))
@@ -417,50 +417,50 @@ EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx)
417417
}
418418

419419

420-
void
420+
void
421421
EC_GROUP_set_curve_name(EC_GROUP * group, int nid)
422422
{
423423
group->curve_name = nid;
424424
}
425425

426426

427-
int
427+
int
428428
EC_GROUP_get_curve_name(const EC_GROUP * group)
429429
{
430430
return group->curve_name;
431431
}
432432

433433

434-
void
434+
void
435435
EC_GROUP_set_asn1_flag(EC_GROUP * group, int flag)
436436
{
437437
group->asn1_flag = flag;
438438
}
439439

440440

441-
int
441+
int
442442
EC_GROUP_get_asn1_flag(const EC_GROUP * group)
443443
{
444444
return group->asn1_flag;
445445
}
446446

447447

448-
void
448+
void
449449
EC_GROUP_set_point_conversion_form(EC_GROUP * group,
450450
point_conversion_form_t form)
451451
{
452452
group->asn1_form = form;
453453
}
454454

455455

456-
point_conversion_form_t
456+
point_conversion_form_t
457457
EC_GROUP_get_point_conversion_form(const EC_GROUP * group)
458458
{
459459
return group->asn1_form;
460460
}
461461

462462

463-
size_t
463+
size_t
464464
EC_GROUP_set_seed(EC_GROUP * group, const unsigned char *p, size_t len)
465465
{
466466
if (group->seed) {
@@ -487,7 +487,7 @@ EC_GROUP_get0_seed(const EC_GROUP * group)
487487
}
488488

489489

490-
size_t
490+
size_t
491491
EC_GROUP_get_seed_len(const EC_GROUP * group)
492492
{
493493
return group->seed_len;
@@ -545,7 +545,7 @@ EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
545545
}
546546
#endif
547547

548-
int
548+
int
549549
EC_GROUP_get_degree(const EC_GROUP * group)
550550
{
551551
if (group->meth->group_get_degree == 0) {
@@ -556,7 +556,7 @@ EC_GROUP_get_degree(const EC_GROUP * group)
556556
}
557557

558558

559-
int
559+
int
560560
EC_GROUP_check_discriminant(const EC_GROUP * group, BN_CTX * ctx)
561561
{
562562
if (group->meth->group_check_discriminant == 0) {
@@ -567,7 +567,7 @@ EC_GROUP_check_discriminant(const EC_GROUP * group, BN_CTX * ctx)
567567
}
568568

569569

570-
int
570+
int
571571
EC_GROUP_cmp(const EC_GROUP * a, const EC_GROUP * b, BN_CTX * ctx)
572572
{
573573
int r = 0;
@@ -660,7 +660,7 @@ ec_point_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx)
660660
}
661661

662662
/* this has 'package' visibility */
663-
int
663+
int
664664
EC_EX_DATA_set_data(EC_EXTRA_DATA ** ex_data, void *data,
665665
void *(*dup_func) (void *),
666666
void (*free_func) (void *),
@@ -716,7 +716,7 @@ EC_EX_DATA_get_data(const EC_EXTRA_DATA * ex_data,
716716
}
717717

718718
/* this has 'package' visibility */
719-
void
719+
void
720720
EC_EX_DATA_free_data(EC_EXTRA_DATA ** ex_data,
721721
void *(*dup_func) (void *),
722722
void (*free_func) (void *),
@@ -743,7 +743,7 @@ EC_EX_DATA_free_data(EC_EXTRA_DATA ** ex_data,
743743
}
744744

745745
/* this has 'package' visibility */
746-
void
746+
void
747747
EC_EX_DATA_clear_free_data(EC_EXTRA_DATA ** ex_data,
748748
void *(*dup_func) (void *),
749749
void (*free_func) (void *),
@@ -770,7 +770,7 @@ EC_EX_DATA_clear_free_data(EC_EXTRA_DATA ** ex_data,
770770
}
771771

772772
/* this has 'package' visibility */
773-
void
773+
void
774774
EC_EX_DATA_free_all_data(EC_EXTRA_DATA ** ex_data)
775775
{
776776
EC_EXTRA_DATA *d;
@@ -791,7 +791,7 @@ EC_EX_DATA_free_all_data(EC_EXTRA_DATA ** ex_data)
791791
}
792792

793793
/* this has 'package' visibility */
794-
void
794+
void
795795
EC_EX_DATA_clear_free_all_data(EC_EXTRA_DATA ** ex_data)
796796
{
797797
EC_EXTRA_DATA *d;
@@ -842,7 +842,7 @@ EC_POINT_new(const EC_GROUP * group)
842842
}
843843

844844

845-
void
845+
void
846846
EC_POINT_free(EC_POINT * point)
847847
{
848848
if (!point)
@@ -854,7 +854,7 @@ EC_POINT_free(EC_POINT * point)
854854
}
855855

856856

857-
void
857+
void
858858
EC_POINT_clear_free(EC_POINT * point)
859859
{
860860
if (!point)
@@ -868,7 +868,7 @@ EC_POINT_clear_free(EC_POINT * point)
868868
}
869869

870870

871-
int
871+
int
872872
EC_POINT_copy(EC_POINT * dest, const EC_POINT * src)
873873
{
874874
if (dest->meth->point_copy == 0) {
@@ -913,7 +913,7 @@ EC_POINT_method_of(const EC_POINT * point)
913913
}
914914

915915

916-
int
916+
int
917917
EC_POINT_set_to_infinity(const EC_GROUP * group, EC_POINT * point)
918918
{
919919
if (group->meth->point_set_to_infinity == 0) {
@@ -1041,7 +1041,7 @@ EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, const EC_POINT *poin
10411041
}
10421042
#endif
10431043

1044-
int
1044+
int
10451045
EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
10461046
const EC_POINT *b, BN_CTX *ctx)
10471047
{
@@ -1057,7 +1057,7 @@ EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
10571057
}
10581058

10591059

1060-
int
1060+
int
10611061
EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
10621062
{
10631063
if (group->meth->dbl == 0) {
@@ -1072,7 +1072,7 @@ EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
10721072
}
10731073

10741074

1075-
int
1075+
int
10761076
EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
10771077
{
10781078
if (group->meth->invert == 0) {
@@ -1087,7 +1087,7 @@ EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
10871087
}
10881088

10891089

1090-
int
1090+
int
10911091
EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *point)
10921092
{
10931093
if (group->meth->is_at_infinity == 0) {
@@ -1102,7 +1102,7 @@ EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *point)
11021102
}
11031103

11041104

1105-
int
1105+
int
11061106
EC_POINT_is_on_curve(const EC_GROUP * group, const EC_POINT * point, BN_CTX * ctx)
11071107
{
11081108
if (group->meth->is_on_curve == 0) {
@@ -1117,7 +1117,7 @@ EC_POINT_is_on_curve(const EC_GROUP * group, const EC_POINT * point, BN_CTX * ct
11171117
}
11181118

11191119

1120-
int
1120+
int
11211121
EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
11221122
BN_CTX * ctx)
11231123
{
@@ -1133,7 +1133,7 @@ EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,
11331133
}
11341134

11351135

1136-
int
1136+
int
11371137
EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
11381138
{
11391139
if (group->meth->make_affine == 0) {
@@ -1148,7 +1148,7 @@ EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
11481148
}
11491149

11501150

1151-
int
1151+
int
11521152
EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[],
11531153
BN_CTX *ctx)
11541154
{
@@ -1169,7 +1169,7 @@ EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[],
11691169

11701170

11711171
/* Functions for point multiplication */
1172-
int
1172+
int
11731173
EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
11741174
size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx)
11751175
{
@@ -1184,22 +1184,22 @@ EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
11841184
ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
11851185
return 0;
11861186
}
1187-
1187+
11881188
/* Either bP or aG + bP, this is sane. */
11891189
if (num == 1 && points != NULL && scalars != NULL)
11901190
return EC_POINT_mul(group, r, scalar, points[0], scalars[0],
11911191
ctx);
1192-
1192+
11931193
/* aG, this is sane */
11941194
if (scalar != NULL && points == NULL && scalars == NULL)
11951195
return EC_POINT_mul(group, r, scalar, NULL, NULL, ctx);
1196-
1196+
11971197
/* anything else is an error */
11981198
ECerror(ERR_R_EC_LIB);
11991199
return 0;
12001200
}
12011201

1202-
int
1202+
int
12031203
EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar,
12041204
const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx)
12051205
{
@@ -1241,13 +1241,13 @@ EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar,
12411241
return group->meth->mul_double_nonct(group, r, g_scalar,
12421242
p_scalar, point, ctx);
12431243
}
1244-
1244+
12451245
/* Anything else is an error. */
12461246
ECerror(ERR_R_EC_LIB);
12471247
return 0;
12481248
}
12491249

1250-
int
1250+
int
12511251
EC_GROUP_precompute_mult(EC_GROUP * group, BN_CTX * ctx)
12521252
{
12531253
if (group->meth->precompute_mult != 0)
@@ -1256,7 +1256,7 @@ EC_GROUP_precompute_mult(EC_GROUP * group, BN_CTX * ctx)
12561256
return 1; /* nothing to do, so report success */
12571257
}
12581258

1259-
int
1259+
int
12601260
EC_GROUP_have_precompute_mult(const EC_GROUP * group)
12611261
{
12621262
if (group->meth->have_precompute_mult != 0)
@@ -1290,5 +1290,5 @@ ECParameters_dup(EC_KEY *key)
12901290
if ((len = i2d_ECParameters(key, &p)) > 0)
12911291
k = d2i_ECParameters(NULL, (const unsigned char **)&p, len);
12921292

1293-
return (k);
1293+
return (k);
12941294
}

0 commit comments

Comments
 (0)