/* This has some uglies in it but it works - even over sockets. */
/*extern int errno;*/
-int des_rw_mode=DES_PCBC_MODE;
+OPENSSL_IMPLEMENT_GLOBAL(int,des_rw_mode)=DES_PCBC_MODE;
/*
*/
-int des_enc_read(int fd, void *buf, int len, des_key_schedule sched,
- des_cblock iv)
+int des_enc_read(int fd, void *buf, int len, des_key_schedule *sched,
+ des_cblock *iv)
{
/* data to be unencrypted */
int net_num=0;
if (tmpbuf == NULL)
{
- tmpbuf=Malloc(BSIZE);
+ tmpbuf=OPENSSL_malloc(BSIZE);
if (tmpbuf == NULL) return(-1);
}
if (net == NULL)
{
- net=Malloc(BSIZE);
+ net=OPENSSL_malloc(BSIZE);
if (net == NULL) return(-1);
}
if (unnet == NULL)
{
- unnet=Malloc(BSIZE);
+ unnet=OPENSSL_malloc(BSIZE);
if (unnet == NULL) return(-1);
}
/* left over data from last decrypt */
/* first - get the length */
while (net_num < HDRSIZE)
{
- i=read(fd,&(net[net_num]),HDRSIZE-net_num);
+ i=read(fd,(void *)&(net[net_num]),HDRSIZE-net_num);
#ifdef EINTR
if ((i == -1) && (errno == EINTR)) continue;
#endif
net_num=0;
while (net_num < rnum)
{
- i=read(fd,&(net[net_num]),rnum-net_num);
+ i=read(fd,(void *)&(net[net_num]),rnum-net_num);
#ifdef EINTR
if ((i == -1) && (errno == EINTR)) continue;
#endif