This is the mail archive of the cygwin-apps-cvs mailing list for the cygwin-apps project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[crypt - a library implementing the hopelessly outdated 56 bit DES encryption] branch master, updated. 6141192b5aeadc20347f69cf1cee423f96c1006c




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/crypt.git;h=6141192b5aeadc20347f69cf1cee423f96c1006c

commit 6141192b5aeadc20347f69cf1cee423f96c1006c
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Jun 9 16:59:30 2016 +0200

    Fix README version and remove really old Windows 9x description
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/crypt.git;h=534b17b87bb0318bc339125369039f8ef5eddae5

commit 534b17b87bb0318bc339125369039f8ef5eddae5
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Jun 9 16:57:26 2016 +0200

    Fix setkey prototype and definition
    
    Also fix "array subscript has type â??charâ??" compiler warnings.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/crypt.git;h=4f8d340c1fc457b81507ad366f9abcc87b9c552e

commit 4f8d340c1fc457b81507ad366f9abcc87b9c552e
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Fri Mar 18 11:04:31 2016 +0100

    Add auto-image-base option when building DLL
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>


Diff:
---
 Makefile     |    6 ++++--
 crypt.README |    9 +--------
 encrypt.c    |    8 ++++----
 encrypt.h    |    2 +-
 4 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index e1bb705..846ca2c 100644
--- a/Makefile
+++ b/Makefile
@@ -27,8 +27,10 @@ $(STATICLIB): encrypt.o
 	$(AR) rv $@ encrypt.o
 
 $(SHAREDLIB): encrypt.o
-	$(CC) -shared -Wl,--gc-sections -Wl,--out-implib=$(IMPORTLIB) crypt.def \
-	$^ -o $@
+	$(CC) -shared -Wl,--enable-auto-image-base \
+	      -Wl,--gc-sections -Wl,--out-implib=$(IMPORTLIB) \
+	      crypt.def \
+	      $^ -o $@
 
 encrypt.o: encrypt.h
 
diff --git a/crypt.README b/crypt.README
index d7ee763..e20aff8 100644
--- a/crypt.README
+++ b/crypt.README
@@ -1,4 +1,4 @@
-This is the DES-crypt package Version 1.1
+This is the DES-crypt package Version 1.4
 
 It provides a static library libcrypt.a as well as a shared library
 cygcrypt-0.dll together with a link lib libcrypt.dll.a, which export
@@ -16,13 +16,6 @@ which is a tool to generate encrypted passwords from cleartext
 passwords.  The encrypted password is written to stdout with a trailing
 line feed. 
 
-Use this tool to create password entries in /etc/passwd on 9x systems. 
-On 9x machines, this DES password authentication is used in applications
-like e. g. login(1) or ftpd(8).  Note that the password entry in
-/etc/passwd is not used on NT systems.  Instead, users are authenticated
-using the NT password itself.  So crypt.exe is mainly a convenience for
-9x users.
-
 Note that this tool does *not* provide the crypt(1) functionality known
 from e. g. SUN Solaris(tm) machines.  The encryption used here is
 incompatible with the encryption used there.
diff --git a/encrypt.c b/encrypt.c
index 7195912..35a3238 100644
--- a/encrypt.c
+++ b/encrypt.c
@@ -161,7 +161,7 @@ perm (a, e, pc, n)
      int n;
 {
   for (; n--; pc++, a++)
-    *a = e[*pc];
+    *a = e[*(unsigned char *) pc];
 }
 
 static void 
@@ -178,7 +178,7 @@ crypt_main (nachr_l, nachr_r, schl)
   for (i = 0; i < 8; i++)
     {
       for (j = 0, sbval = 0; j < 6; j++)
-	sbval = (sbval << 1) | (nachr_r[*e++] ^ *schl++);
+	sbval = (sbval << 1) | (nachr_r[*(unsigned char *) e++] ^ *schl++);
       sbval = S_BOX[i][sbval];
       for (tp += 4, j = 4; j--; sbval >>= 1)
 	*--tp = sbval & 1;
@@ -187,7 +187,7 @@ crypt_main (nachr_l, nachr_r, schl)
 
   e = PERM;
   for (i = 0; i < BS2; i++)
-    *nachr_l++ ^= tmp[*e++];
+    *nachr_l++ ^= tmp[*(unsigned char *) e++];
 }
 
 void 
@@ -217,7 +217,7 @@ encrypt (char *nachr, int decr)
 }
 
 void 
-setkey (char *schl)
+setkey (const char *schl)
 {
   char tmp1[IS];
   register unsigned int ls = 0x7efc;
diff --git a/encrypt.h b/encrypt.h
index 00ec10d..df053e7 100644
--- a/encrypt.h
+++ b/encrypt.h
@@ -25,7 +25,7 @@ extern "C"
 #endif
 
 void encrypt (char *block, int edflag);
-void setkey (char *key);
+void setkey (const char *key);
 char *crypt (const char *key, const char *salt);
 
 #ifdef __cplusplus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]