summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko2021-04-27 00:40:40 +0200
committerDenys Vlasenko2021-04-27 00:40:40 +0200
commite52e43c72f9dce8bc524a8e6770e6abe3e97db09 (patch)
tree887b16d00c444ec4951f50ad91541ebebcdff95f /networking
parentd728a30c211c2df6adccd64c6e2fc23387b341f2 (diff)
downloadbusybox-e52e43c72f9dce8bc524a8e6770e6abe3e97db09.zip
busybox-e52e43c72f9dce8bc524a8e6770e6abe3e97db09.tar.gz
tls: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/tls_fe.c24
-rw-r--r--networking/tls_pstm.c8
-rw-r--r--networking/tls_rsa.c4
-rw-r--r--networking/tls_sp_c32.c4
4 files changed, 19 insertions, 21 deletions
diff --git a/networking/tls_fe.c b/networking/tls_fe.c
index 3b3578c..e96b332 100644
--- a/networking/tls_fe.c
+++ b/networking/tls_fe.c
@@ -64,8 +64,8 @@ static void fprime_select(byte *dst, const byte *zero, const byte *one, byte con
#endif
static void fe_select(byte *dst,
- const byte *zero, const byte *one,
- byte condition)
+ const byte *zero, const byte *one,
+ byte condition)
{
const byte mask = -condition;
int i;
@@ -163,11 +163,11 @@ static void fprime_mul(byte *r, const byte *a, const byte *b,
const byte bit = (b[i >> 3] >> (i & 7)) & 1;
byte plusa[F25519_SIZE];
- for (j = 0; j < F25519_SIZE; j++) {
- c |= ((word16)r[j]) << 1;
- r[j] = (byte)c;
- c >>= 8;
- }
+ for (j = 0; j < F25519_SIZE; j++) {
+ c |= ((word16)r[j]) << 1;
+ r[j] = (byte)c;
+ c >>= 8;
+ }
raw_try_sub(r, modulus);
fprime_copy(plusa, r);
@@ -315,7 +315,7 @@ static void fe_mul__distinct(byte *r, const byte *a, const byte *b)
for (; j < F25519_SIZE; j++)
c += ((word32)a[j]) *
- ((word32)b[i + F25519_SIZE - j]) * 38;
+ ((word32)b[i + F25519_SIZE - j]) * 38;
r[i] = c;
}
@@ -474,9 +474,9 @@ static void fe_sqrt(byte *r, const byte *a)
/* Differential addition */
static void xc_diffadd(byte *x5, byte *z5,
- const byte *x1, const byte *z1,
- const byte *x2, const byte *z2,
- const byte *x3, const byte *z3)
+ const byte *x1, const byte *z1,
+ const byte *x2, const byte *z2,
+ const byte *x3, const byte *z3)
{
/* Explicit formulas database: dbl-1987-m3
*
@@ -516,7 +516,7 @@ static void xc_diffadd(byte *x5, byte *z5,
/* Double an X-coordinate */
static void xc_double(byte *x3, byte *z3,
- const byte *x1, const byte *z1)
+ const byte *x1, const byte *z1)
{
/* Explicit formulas database: dbl-1987-m
*
diff --git a/networking/tls_pstm.c b/networking/tls_pstm.c
index e5544ab..9992903 100644
--- a/networking/tls_pstm.c
+++ b/networking/tls_pstm.c
@@ -438,9 +438,9 @@ int32 FAST_FUNC pstm_read_unsigned_bin(pstm_int *a, unsigned char *b, int32 c)
int32 idx = (c - 1) & ~3;
switch (c % 4) {
case 0: do { pd[idx+0] = *b++;
- case 3: pd[idx+1] = *b++;
- case 2: pd[idx+2] = *b++;
- case 1: pd[idx+3] = *b++;
+ case 3: pd[idx+1] = *b++;
+ case 2: pd[idx+2] = *b++;
+ case 1: pd[idx+3] = *b++;
idx -= 4;
} while ((c -= 4) > 0);
}
@@ -1427,7 +1427,7 @@ static int32 pstm_div(psPool_t *pool, pstm_int *a, pstm_int *b, pstm_int *c,
}
/* while (q{i-t-1} * (yt * b + y{t-1})) >
- xi * b**2 + xi-1 * b + xi-2
+ xi * b**2 + xi-1 * b + xi-2
do q{i-t-1} -= 1;
*/
diff --git a/networking/tls_rsa.c b/networking/tls_rsa.c
index 5fda1cb..2dd5a02 100644
--- a/networking/tls_rsa.c
+++ b/networking/tls_rsa.c
@@ -15,7 +15,7 @@
pkcs1Pad(in, inlen, out, outlen, cryptType)
static //bbox
int32 pkcs1Pad(unsigned char *in, uint32 inlen, unsigned char *out,
- uint32 outlen, int32 cryptType, void *userPtr)
+ uint32 outlen, int32 cryptType, void *userPtr)
{
unsigned char *c;
int32 randomLen;
@@ -60,7 +60,7 @@ int32 pkcs1Pad(unsigned char *in, uint32 inlen, unsigned char *out,
psRsaCrypt( in, inlen, out, outlen, key, type)
static //bbox
int32 psRsaCrypt(psPool_t *pool, const unsigned char *in, uint32 inlen,
- unsigned char *out, uint32 *outlen, psRsaKey_t *key, int32 type,
+ unsigned char *out, uint32 *outlen, psRsaKey_t *key, int32 type,
void *data)
{
pstm_int tmp, tmpa, tmpb;
diff --git a/networking/tls_sp_c32.c b/networking/tls_sp_c32.c
index 72a3be5..1f14031 100644
--- a/networking/tls_sp_c32.c
+++ b/networking/tls_sp_c32.c
@@ -506,12 +506,10 @@ static void sp_256_sqr_10(sp_digit* r, const sp_digit* a)
break;
if (j < 0)
continue;
-
c += ((int64_t)a[i]) * a[j] * 2;
}
if (i == j)
- c += ((int64_t)a[i]) * a[i];
-
+ c += ((int64_t)a[i]) * a[i];
r[k + 2] += c >> 52;
r[k + 1] = (c >> 26) & 0x3ffffff;
c = (c & 0x3ffffff) << 26;