summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_xcbc_d.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-10-24 23:21:12 +0200
committerRichard Levitte <levitte@openssl.org>2001-10-24 23:21:12 +0200
commitc2e4f17c1a0d4d5115c6ede9492de1615fe392ac (patch)
tree14dda5edeaebac01b4baa3aa026c40a784a44266 /crypto/evp/e_xcbc_d.c
parentFix SSL handshake functions and SSL_clear() such that SSL_clear() (diff)
downloadopenssl-c2e4f17c1a0d4d5115c6ede9492de1615fe392ac.tar.xz
openssl-c2e4f17c1a0d4d5115c6ede9492de1615fe392ac.zip
Due to an increasing number of clashes between modern OpenSSL and
libdes (which is still used out there) or other des implementations, the OpenSSL DES functions are renamed to begin with DES_ instead of des_. Compatibility routines are provided and declared by including openssl/des_old.h. Those declarations are the same as were in des.h when the OpenSSL project started, which is exactly how libdes looked at that time, and hopefully still looks today. The compatibility functions will be removed in some future release, at the latest in version 1.0.
Diffstat (limited to 'crypto/evp/e_xcbc_d.c')
-rw-r--r--crypto/evp/e_xcbc_d.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/evp/e_xcbc_d.c b/crypto/evp/e_xcbc_d.c
index ab94630fd2..a6f849e93d 100644
--- a/crypto/evp/e_xcbc_d.c
+++ b/crypto/evp/e_xcbc_d.c
@@ -71,9 +71,9 @@ static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
typedef struct
{
- des_key_schedule ks;/* key schedule */
- des_cblock inw;
- des_cblock outw;
+ DES_key_schedule ks;/* key schedule */
+ DES_cblock inw;
+ DES_cblock outw;
} DESX_CBC_KEY;
#define data(ctx) ((DESX_CBC_KEY *)(ctx)->cipher_data)
@@ -100,9 +100,9 @@ const EVP_CIPHER *EVP_desx_cbc(void)
static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
- des_cblock *deskey = (des_cblock *)key;
+ DES_cblock *deskey = (DES_cblock *)key;
- des_set_key_unchecked(deskey,&data(ctx)->ks);
+ DES_set_key_unchecked(deskey,&data(ctx)->ks);
memcpy(&data(ctx)->inw[0],&key[8],8);
memcpy(&data(ctx)->outw[0],&key[16],8);
@@ -112,8 +112,8 @@ static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
- des_xcbc_encrypt(in,out,inl,&data(ctx)->ks,
- (des_cblock *)&(ctx->iv[0]),
+ DES_xcbc_encrypt(in,out,inl,&data(ctx)->ks,
+ (DES_cblock *)&(ctx->iv[0]),
&data(ctx)->inw,
&data(ctx)->outw,
ctx->encrypt);