From ccaedddb21787d64b97f6a731861bfa5c115a2c6 Mon Sep 17 00:00:00 2001 From: jsing Date: Fri, 11 Nov 2022 12:18:25 +0000 Subject: [PATCH] Tidy includes, fix comment style and mop up some blank lines. --- lib/libcrypto/bf/bf_cbc.c | 4 ++-- lib/libcrypto/bf/bf_cfb64.c | 7 ++++--- lib/libcrypto/bf/bf_ecb.c | 9 +++++---- lib/libcrypto/bf/bf_enc.c | 6 ++++-- lib/libcrypto/bf/bf_ofb64.c | 7 ++++--- lib/libcrypto/bf/bf_skey.c | 6 +++--- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/lib/libcrypto/bf/bf_cbc.c b/lib/libcrypto/bf/bf_cbc.c index 58e85b63c81..b13ea129615 100644 --- a/lib/libcrypto/bf/bf_cbc.c +++ b/lib/libcrypto/bf/bf_cbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_cbc.c,v 1.6 2022/11/11 12:08:29 jsing Exp $ */ +/* $OpenBSD: bf_cbc.c,v 1.7 2022/11/11 12:18:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,6 +57,7 @@ */ #include + #include "bf_locl.h" void @@ -134,4 +135,3 @@ BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; tin[0] = tin[1] = 0; } - diff --git a/lib/libcrypto/bf/bf_cfb64.c b/lib/libcrypto/bf/bf_cfb64.c index 4ef15b94c6c..7db0aed1ead 100644 --- a/lib/libcrypto/bf/bf_cfb64.c +++ b/lib/libcrypto/bf/bf_cfb64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_cfb64.c,v 1.6 2022/11/11 12:08:29 jsing Exp $ */ +/* $OpenBSD: bf_cfb64.c,v 1.7 2022/11/11 12:18:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,9 +57,11 @@ */ #include + #include "bf_locl.h" -/* The input and output encrypted as though 64bit cfb mode is being +/* + * The input and output encrypted as though 64bit cfb mode is being * used. The extra state information to record how much of the * 64bit block we have used is contained in *num; */ @@ -120,4 +122,3 @@ BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, v0 = v1 = ti[0] = ti[1] = t=c = cc = 0; *num = n; } - diff --git a/lib/libcrypto/bf/bf_ecb.c b/lib/libcrypto/bf/bf_ecb.c index 3421b5f5147..2430455c398 100644 --- a/lib/libcrypto/bf/bf_ecb.c +++ b/lib/libcrypto/bf/bf_ecb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_ecb.c,v 1.7 2022/11/11 12:08:29 jsing Exp $ */ +/* $OpenBSD: bf_ecb.c,v 1.8 2022/11/11 12:18:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,10 +57,12 @@ */ #include -#include "bf_locl.h" #include -/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' +#include "bf_locl.h" + +/* + * Blowfish as implemented from 'Blowfish: Springer-Verlag paper' * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993) */ @@ -97,4 +99,3 @@ BF_ecb_encrypt(const unsigned char *in, unsigned char *out, l2n(l, out); l = d[0] = d[1] = 0; } - diff --git a/lib/libcrypto/bf/bf_enc.c b/lib/libcrypto/bf/bf_enc.c index 464d36d3458..780e7038054 100644 --- a/lib/libcrypto/bf/bf_enc.c +++ b/lib/libcrypto/bf/bf_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_enc.c,v 1.7 2022/11/11 12:08:29 jsing Exp $ */ +/* $OpenBSD: bf_enc.c,v 1.8 2022/11/11 12:18:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,9 +57,11 @@ */ #include + #include "bf_locl.h" -/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper' +/* + * Blowfish as implemented from 'Blowfish: Springer-Verlag paper' * (From LECTURE NOTES IN COMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION, * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993) */ diff --git a/lib/libcrypto/bf/bf_ofb64.c b/lib/libcrypto/bf/bf_ofb64.c index 83a76550f9f..e7aefef09d0 100644 --- a/lib/libcrypto/bf/bf_ofb64.c +++ b/lib/libcrypto/bf/bf_ofb64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_ofb64.c,v 1.6 2022/11/11 12:08:29 jsing Exp $ */ +/* $OpenBSD: bf_ofb64.c,v 1.7 2022/11/11 12:18:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -57,9 +57,11 @@ */ #include + #include "bf_locl.h" -/* The input and output encrypted as though 64bit ofb mode is being +/* + * The input and output encrypted as though 64bit ofb mode is being * used. The extra state information to record how much of the * 64bit block we have used is contained in *num; */ @@ -107,4 +109,3 @@ BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, t = v0 = v1 = ti[0] = ti[1] = 0; *num = n; } - diff --git a/lib/libcrypto/bf/bf_skey.c b/lib/libcrypto/bf/bf_skey.c index 8c214f74281..03f494f63bb 100644 --- a/lib/libcrypto/bf/bf_skey.c +++ b/lib/libcrypto/bf/bf_skey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bf_skey.c,v 1.13 2022/11/11 12:08:29 jsing Exp $ */ +/* $OpenBSD: bf_skey.c,v 1.14 2022/11/11 12:18:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,8 +58,10 @@ #include #include + #include #include + #include "bf_locl.h" #include "bf_pi.h" @@ -70,7 +72,6 @@ BF_set_key(BF_KEY *key, int len, const unsigned char *data) BF_LONG *p, ri, in[2]; const unsigned char *d, *end; - memcpy(key, &bf_init, sizeof(BF_KEY)); p = key->P; @@ -117,4 +118,3 @@ BF_set_key(BF_KEY *key, int len, const unsigned char *data) p[i + 1] = in[1]; } } - -- 2.20.1