From 8b13fe96b7b99abbc6d1c8c12b47b24b73929b7e Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 11 Nov 2022 12:18:25 +0000 Subject: Tidy includes, fix comment style and mop up some blank lines. --- src/lib/libcrypto/bf/bf_cbc.c | 4 ++-- src/lib/libcrypto/bf/bf_cfb64.c | 7 ++++--- src/lib/libcrypto/bf/bf_ecb.c | 9 +++++---- src/lib/libcrypto/bf/bf_enc.c | 6 ++++-- src/lib/libcrypto/bf/bf_ofb64.c | 7 ++++--- src/lib/libcrypto/bf/bf_skey.c | 6 +++--- 6 files changed, 22 insertions(+), 17 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/bf/bf_cbc.c b/src/lib/libcrypto/bf/bf_cbc.c index 58e85b63c8..b13ea12961 100644 --- a/src/lib/libcrypto/bf/bf_cbc.c +++ b/src/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/src/lib/libcrypto/bf/bf_cfb64.c b/src/lib/libcrypto/bf/bf_cfb64.c index 4ef15b94c6..7db0aed1ea 100644 --- a/src/lib/libcrypto/bf/bf_cfb64.c +++ b/src/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/src/lib/libcrypto/bf/bf_ecb.c b/src/lib/libcrypto/bf/bf_ecb.c index 3421b5f514..2430455c39 100644 --- a/src/lib/libcrypto/bf/bf_ecb.c +++ b/src/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/src/lib/libcrypto/bf/bf_enc.c b/src/lib/libcrypto/bf/bf_enc.c index 464d36d345..780e703805 100644 --- a/src/lib/libcrypto/bf/bf_enc.c +++ b/src/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/src/lib/libcrypto/bf/bf_ofb64.c b/src/lib/libcrypto/bf/bf_ofb64.c index 83a76550f9..e7aefef09d 100644 --- a/src/lib/libcrypto/bf/bf_ofb64.c +++ b/src/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/src/lib/libcrypto/bf/bf_skey.c b/src/lib/libcrypto/bf/bf_skey.c index 8c214f7428..03f494f63b 100644 --- a/src/lib/libcrypto/bf/bf_skey.c +++ b/src/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]; } } - -- cgit v1.2.3-55-g6feb