diff options
-rw-r--r-- | lib/libc/compat-43/sigvec.3 | 6 | ||||
-rw-r--r-- | lib/libc/crypt/bcrypt.c | 14 | ||||
-rw-r--r-- | lib/libc/crypt/blowfish.c | 87 | ||||
-rw-r--r-- | lib/libc/crypt/md5crypt.c | 6 |
4 files changed, 56 insertions, 57 deletions
diff --git a/lib/libc/compat-43/sigvec.3 b/lib/libc/compat-43/sigvec.3 index b3918c42e76..bf329210fbe 100644 --- a/lib/libc/compat-43/sigvec.3 +++ b/lib/libc/compat-43/sigvec.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: sigvec.3,v 1.2 1996/08/19 08:19:44 tholo Exp $ +.\" $OpenBSD: sigvec.3,v 1.3 1997/07/23 20:58:26 kstailey Exp $ .\" .Dd April 29, 1991 .Dt SIGVEC 3 @@ -41,7 +41,7 @@ .Fd #include <signal.h> .Bd -literal struct sigvec { - void (*sv_handler)(); + void (*sv_handler)(); sigset_t sv_mask; int sv_flags; }; @@ -134,7 +134,7 @@ The following is a list of all signals with names as in the include file .Aq Pa signal.h : .Bl -column SIGVTALARMXX "create core imagexxx" -.It Sy " NAME " " Default Action " " Description" +.It Sy " NAME " " Default Action " " Description" .It Dv SIGHUP No " terminate process" " terminal line hangup" .It Dv SIGINT No " terminate process" " interrupt program" .It Dv SIGQUIT No " create core image" " quit program" diff --git a/lib/libc/crypt/bcrypt.c b/lib/libc/crypt/bcrypt.c index 6f78afdddfe..42418767eea 100644 --- a/lib/libc/crypt/bcrypt.c +++ b/lib/libc/crypt/bcrypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcrypt.c,v 1.7 1997/07/09 01:08:18 millert Exp $ */ +/* $OpenBSD: bcrypt.c,v 1.8 1997/07/23 20:58:26 kstailey Exp $ */ /* * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> @@ -218,17 +218,17 @@ bcrypt(key, salt) /* Check for minor versions */ if (salt[1] != '$') { - switch(salt[1]) { + switch(salt[1]) { case 'a': - /* 'ab' should not yield the same as 'abab' */ - minor = salt[1]; + /* 'ab' should not yield the same as 'abab' */ + minor = salt[1]; salt++; break; default: - return error; + return error; } } else - minor = 0; + minor = 0; /* Discard version + "$" identifier */ salt += 2; @@ -282,7 +282,7 @@ bcrypt(key, salt) encrypted[i++] = '$'; encrypted[i++] = BCRYPT_VERSION; if (minor) - encrypted[i++] = minor; + encrypted[i++] = minor; encrypted[i++] = '$'; snprintf(encrypted + i, 4, "%2.2u$", logr); diff --git a/lib/libc/crypt/blowfish.c b/lib/libc/crypt/blowfish.c index 46568d23188..b9cd41f960f 100644 --- a/lib/libc/crypt/blowfish.c +++ b/lib/libc/crypt/blowfish.c @@ -1,4 +1,4 @@ -/* $OpenBSD: blowfish.c,v 1.4 1997/04/30 05:57:05 tholo Exp $ */ +/* $OpenBSD: blowfish.c,v 1.5 1997/07/23 20:58:27 kstailey Exp $ */ /* * Blowfish block cipher for OpenBSD * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> @@ -429,13 +429,13 @@ Blowfish_initstate(c) 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6} }, - { - 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, - 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, - 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, - 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, - 0x9216d5d9, 0x8979fb1b - } }; + { + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b + } }; *c = initstate; @@ -475,44 +475,43 @@ Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes) #else void Blowfish_expand0state(c, key, keybytes) - blf_ctx *c; - const u_int8_t *key; - u_int16_t keybytes; + blf_ctx *c; + const u_int8_t *key; + u_int16_t keybytes; #endif { - u_int16_t i; - u_int16_t j; - u_int16_t k; - u_int32_t temp; - u_int32_t datal; - u_int32_t datar; - - j = 0; - for (i = 0; i < BLF_N + 2; i++) { - /* Extract 4 int8 to 1 int32 from keystream */ - temp = Blowfish_stream2word(key, keybytes, &j); - c->P[i] = c->P[i] ^ temp; - } - - j = 0; - datal = 0x00000000; - datar = 0x00000000; - for (i = 0; i < BLF_N + 2; i += 2) { - Blowfish_encipher(c, &datal, &datar); - - c->P[i] = datal; - c->P[i + 1] = datar; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - Blowfish_encipher(c, &datal, &datar); - - c->S[i][k] = datal; - c->S[i][k + 1] = datar; - } - } - + u_int16_t i; + u_int16_t j; + u_int16_t k; + u_int32_t temp; + u_int32_t datal; + u_int32_t datar; + + j = 0; + for (i = 0; i < BLF_N + 2; i++) { + /* Extract 4 int8 to 1 int32 from keystream */ + temp = Blowfish_stream2word(key, keybytes, &j); + c->P[i] = c->P[i] ^ temp; + } + + j = 0; + datal = 0x00000000; + datar = 0x00000000; + for (i = 0; i < BLF_N + 2; i += 2) { + Blowfish_encipher(c, &datal, &datar); + + c->P[i] = datal; + c->P[i + 1] = datar; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + Blowfish_encipher(c, &datal, &datar); + + c->S[i][k] = datal; + c->S[i][k + 1] = datar; + } + } } diff --git a/lib/libc/crypt/md5crypt.c b/lib/libc/crypt/md5crypt.c index 318626a2e64..7ec60f38e0c 100644 --- a/lib/libc/crypt/md5crypt.c +++ b/lib/libc/crypt/md5crypt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5crypt.c,v 1.8 1997/06/29 05:48:02 deraadt Exp $ */ +/* $OpenBSD: md5crypt.c,v 1.9 1997/07/23 20:58:27 kstailey Exp $ */ /* * ---------------------------------------------------------------------------- @@ -13,7 +13,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.8 1997/06/29 05:48:02 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: md5crypt.c,v 1.9 1997/07/23 20:58:27 kstailey Exp $"; #endif /* LIBC_SCCS and not lint */ #include <unistd.h> @@ -146,7 +146,7 @@ md5crypt(pw, salt) l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; to64(p,l,4); p += 4; l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; to64(p,l,4); p += 4; l = (final[ 4]<<16) | (final[10]<<8) | final[ 5]; to64(p,l,4); p += 4; - l = final[11] ; to64(p,l,2); p += 2; + l = final[11] ; to64(p,l,2); p += 2; *p = '\0'; /* Don't leave anything around in vm they could use. */ |