Skip Menu |

This queue is for tickets about the Crypt-Passwd-XS CPAN distribution.

Report information
The Basics
Id: 63098
Status: resolved
Priority: 0/
Queue: Crypt-Passwd-XS

People
Owner: Nobody in particular
Requestors: TODDR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.501
Fixed in: (no value)



Subject: windows GOOOOD
Subject: patch.txt
commit 005559b1cda07f3835aeaccd051a03411e5d6ff8 Author: unknown <vmware@.(none)> Date: Wed Nov 17 14:36:38 2010 -0600 windows diff --git a/des.c b/des.c index a9a6831..a724029 100644 --- a/des.c +++ b/des.c @@ -60,10 +60,12 @@ */ #include <sys/types.h> #include <sys/param.h> -#include <pwd.h> #include <string.h> #include <arpa/inet.h> +#include <winsock2.h> +#define u_int32_t unsigned int + #define _PASSWORD_EFMT1 '_' /* extended encryption format */ /* We can't always assume gcc */ @@ -561,11 +563,13 @@ do_des( u_int32_t l_in, u_int32_t r_in, u_int32_t *l_out, u_int32_t *r_out, int return(0); } + + static int des_cipher(const u_char *in, u_char *out, long salt, int count) { - const uint32_t *in32; - uint32_t l_out, r_out, rawl, rawr, *out32; + const u_int32_t *in32; + u_int32_t l_out, r_out, rawl, rawr, *out32; int retval; if (!des_initialised) @@ -573,8 +577,8 @@ des_cipher(const u_char *in, u_char *out, long salt, int count) setup_salt(salt); - in32 = (const uint32_t *)in; - out32 = (uint32_t *)out; + in32 = (const u_int32_t *)in; + out32 = (u_int32_t *)out; rawl = ntohl(*in32++); rawr = ntohl(*in32); diff --git a/md5crypt.c b/md5crypt.c index 73f9aab..e81e641 100644 --- a/md5crypt.c +++ b/md5crypt.c @@ -15,7 +15,6 @@ #include <string.h> #include "md5.h" #include "crypt_to64.h" -#include <err.h> /* * UNIX password diff --git a/sha256crypt.c b/sha256crypt.c index bd16b72..0dbb8c2 100644 --- a/sha256crypt.c +++ b/sha256crypt.c @@ -14,6 +14,10 @@ #include <sys/param.h> #include <sys/types.h> +#define MIN(a,b) (a>b?b:a) +#define MAX(a,b) (a>b?a:b) + +#define u_int32_t unsigned int /* Structure to save state of computation between the single steps. */ struct sha256_ctx diff --git a/sha512crypt.c b/sha512crypt.c index 2d1f1e4..5bba4dd 100644 --- a/sha512crypt.c +++ b/sha512crypt.c @@ -13,6 +13,10 @@ #include <sys/param.h> #include <sys/types.h> +#define u_int64_t unsigned long long +#define MIN(a,b) (a>b?b:a) +#define MAX(a,b) (a>b?a:b) + /* Structure to save state of computation between the single steps. */ struct sha512_ctx {
From: john [...] nixnuts.net
Should be fixed in version 0.503
Fixed in 0.503. Thanks for the patch.