Better description of the behaviour of SSL_shutdown() as it is now, broken
[oweals/openssl.git] / crypto / des / enc_read.c
index eaf72d0d0ab00e33f80bf0c7e4687d4b627cc8ae..5881caf3d54cf4ab0c73073790d58db2af41cdd5 100644 (file)
@@ -63,7 +63,7 @@
 
 /* This has some uglies in it but it works - even over sockets. */
 /*extern int errno;*/
-GLOBAL int des_rw_mode=DES_PCBC_MODE;
+OPENSSL_IMPLEMENT_GLOBAL(int,des_rw_mode)=DES_PCBC_MODE;
 
 
 /*
@@ -84,8 +84,8 @@ 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;
@@ -103,17 +103,17 @@ int des_enc_read(int fd, void *buf, int len, des_key_schedule sched,
 
        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 */
@@ -147,7 +147,7 @@ int des_enc_read(int fd, void *buf, int len, des_key_schedule sched,
        /* 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
@@ -169,7 +169,7 @@ int des_enc_read(int fd, void *buf, int len, des_key_schedule sched,
        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