From 908eb7b85aff18930cf4829395ab6d106351c873 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulf=20M=C3=B6ller?= Date: Tue, 8 Jun 1999 16:35:11 +0000 Subject: [PATCH] Call our crypt implementation des_crypt(). crypt() now is a wrapper if there is no system crypt() available. --- CHANGES | 3 +++ crypto/des/des.h | 9 +-------- crypto/des/fcrypt.c | 14 ++++++-------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index 6f3d2c9937..fd6f2a2d36 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ Changes between 0.9.3a and 0.9.4 + *) DES library cleanups. + [Ulf Möller] + *) Add support for PKCS#5 v2.0 PBE algorithms. This will permit PKCS#8 to be used with any cipher unlike PKCS#5 v1.5 which can at most handle 64 bit ciphers. NOTE: although the key derivation function has been verified diff --git a/crypto/des/des.h b/crypto/des/des.h index c2aae6595e..7c029e01ee 100644 --- a/crypto/des/des.h +++ b/crypto/des/des.h @@ -198,16 +198,9 @@ int des_enc_read(int fd,void *buf,int len,des_key_schedule sched, int des_enc_write(int fd,const void *buf,int len,des_key_schedule sched, des_cblock *iv); char *des_fcrypt(const char *buf,const char *salt, char *ret); -#if defined(PERL5) || defined(__FreeBSD__) char *des_crypt(const char *buf,const char *salt); -#else -/* some stupid compilers complain because I have declared char instead - * of const char */ -#ifdef HEADER_DES_LOCL_H +#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) char *crypt(const char *buf,const char *salt); -#else -char *crypt(); -#endif #endif void des_ofb_encrypt(const unsigned char *in,unsigned char *out,int numbits, long length,des_key_schedule schedule,des_cblock *ivec); diff --git a/crypto/des/fcrypt.c b/crypto/des/fcrypt.c index 697167bd0a..b59855c724 100644 --- a/crypto/des/fcrypt.c +++ b/crypto/des/fcrypt.c @@ -62,16 +62,14 @@ static unsigned const char cov_2char[64]={ void fcrypt_body(DES_LONG *out,des_key_schedule ks, DES_LONG Eswap0, DES_LONG Eswap1); -#if defined(PERL5) || defined(__FreeBSD__) -char *des_crypt(const char *buf,const char *salt); -#else -char *crypt(const char *buf,const char *salt); -#endif -#if defined(PERL5) || defined(__FreeBSD__) -char *des_crypt(const char *buf, const char *salt) -#else +#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) char *crypt(const char *buf, const char *salt) + { + return(des_crypt(buf, salt)); + } #endif + +char *des_crypt(const char *buf, const char *salt) { static char buff[14]; -- 2.25.1