summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-02-09 23:01:08 +0000
committerBen Laurie <ben@openssl.org>1999-02-09 23:01:08 +0000
commitbf5dcd135fb77dc23d8566b6456317a10e806b7d (patch)
treec4af8eeb22fcec5a1b58ec82d476e8757e57ef5f
parent119f62881a57ac10f1b347492da43589d16012f8 (diff)
More exactitude with function arguments.
-rw-r--r--crypto/bn/bn_rand.c2
-rw-r--r--crypto/md5/md5.h2
-rw-r--r--crypto/md5/md5_dgst.c5
-rw-r--r--crypto/rand/md_rand.c12
-rw-r--r--crypto/rand/rand.h6
-rw-r--r--crypto/rand/rand_lib.c3
-rw-r--r--crypto/rand/randfile.c2
-rw-r--r--ssl/s23_clnt.c2
-rw-r--r--ssl/s23_srvr.c2
-rw-r--r--ssl/s2_clnt.c2
-rw-r--r--ssl/s2_srvr.c2
-rw-r--r--ssl/s3_clnt.c2
-rw-r--r--ssl/s3_srvr.c2
13 files changed, 22 insertions, 22 deletions
diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c
index 75b6b0493b..7b21821fe6 100644
--- a/crypto/bn/bn_rand.c
+++ b/crypto/bn/bn_rand.c
@@ -85,7 +85,7 @@ int bottom;
/* make a random number and set the top and bottom bits */
time(&tim);
- RAND_seed((unsigned char *)&tim,sizeof(tim));
+ RAND_seed(&tim,sizeof(tim));
RAND_bytes(buf,(int)bytes);
if (top)
diff --git a/crypto/md5/md5.h b/crypto/md5/md5.h
index 357c6c625d..93e65731a3 100644
--- a/crypto/md5/md5.h
+++ b/crypto/md5/md5.h
@@ -80,7 +80,7 @@ typedef struct MD5state_st
#ifndef NOPROTO
void MD5_Init(MD5_CTX *c);
-void MD5_Update(MD5_CTX *c, unsigned char *data, unsigned long len);
+void MD5_Update(MD5_CTX *c, const void *data, unsigned long len);
void MD5_Final(unsigned char *md, MD5_CTX *c);
unsigned char *MD5(unsigned char *d, unsigned long n, unsigned char *md);
void MD5_Transform(MD5_CTX *c, unsigned char *b);
diff --git a/crypto/md5/md5_dgst.c b/crypto/md5/md5_dgst.c
index ffc870284b..78d8b9e0f6 100644
--- a/crypto/md5/md5_dgst.c
+++ b/crypto/md5/md5_dgst.c
@@ -97,11 +97,12 @@ MD5_CTX *c;
c->num=0;
}
-void MD5_Update(c, data, len)
+void MD5_Update(c, _data, len)
MD5_CTX *c;
-register unsigned char *data;
+const void *_data;
unsigned long len;
{
+ register const unsigned char *data=_data;
register ULONG *p;
int sw,sc;
ULONG l;
diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c
index c52d89babb..b04bb1e158 100644
--- a/crypto/rand/md_rand.c
+++ b/crypto/rand/md_rand.c
@@ -131,7 +131,7 @@ static long md_count[2]={0,0};
char *RAND_version="RAND part of OpenSSL 0.9.2 31-Dec-1998";
static void ssleay_rand_cleanup(void);
-static void ssleay_rand_seed(unsigned char *buf, int num);
+static void ssleay_rand_seed(const void *buf, int num);
static void ssleay_rand_bytes(unsigned char *buf, int num);
RAND_METHOD rand_ssleay_meth={
@@ -156,7 +156,7 @@ static void ssleay_rand_cleanup()
}
static void ssleay_rand_seed(buf,num)
-unsigned char *buf;
+const void *buf;
int num;
{
int i,j,k,st_idx,st_num;
@@ -249,15 +249,15 @@ int num;
CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
/* put in some default random data, we need more than
* just this */
- RAND_seed((unsigned char *)&m,sizeof(m));
+ RAND_seed(&m,sizeof(m));
#ifndef MSDOS
l=getpid();
- RAND_seed((unsigned char *)&l,sizeof(l));
+ RAND_seed(&l,sizeof(l));
l=getuid();
- RAND_seed((unsigned char *)&l,sizeof(l));
+ RAND_seed(&l,sizeof(l));
#endif
l=time(NULL);
- RAND_seed((unsigned char *)&l,sizeof(l));
+ RAND_seed(&l,sizeof(l));
/* #ifdef DEVRANDOM */
/*
diff --git a/crypto/rand/rand.h b/crypto/rand/rand.h
index 34ef90373e..7baac68ee5 100644
--- a/crypto/rand/rand.h
+++ b/crypto/rand/rand.h
@@ -66,7 +66,7 @@ extern "C" {
typedef struct rand_meth_st
{
#ifndef NOPROTO
- void (*seed)(unsigned char *buf, int num);
+ void (*seed)(const void *buf, int num);
void (*bytes)(unsigned char *buf, int num);
void (*cleanup)(void);
#else
@@ -81,8 +81,8 @@ void RAND_set_rand_method(RAND_METHOD *meth);
RAND_METHOD *RAND_get_rand_method(void );
RAND_METHOD *RAND_SSLeay(void);
void RAND_cleanup(void );
-void RAND_bytes( unsigned char *buf,int num);
-void RAND_seed( unsigned char *buf,int num);
+void RAND_bytes(unsigned char *buf,int num);
+void RAND_seed(const void *buf,int num);
int RAND_load_file(const char *file,long max_bytes);
int RAND_write_file(const char *file);
char *RAND_file_name(char *file,int num);
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 4503215e1d..6bea09211c 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -57,7 +57,6 @@
*/
#include <stdio.h>
-#include "cryptlib.h"
#include <sys/types.h>
#include <time.h>
#include "rand.h"
@@ -87,7 +86,7 @@ void RAND_cleanup()
}
void RAND_seed(buf,num)
-unsigned char *buf;
+const void *buf;
int num;
{
if (rand_meth != NULL)
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index 8ee23b61d1..3ae95f9012 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -84,7 +84,7 @@ long bytes;
i=stat(file,&sb);
/* If the state fails, put some crap in anyway */
- RAND_seed((unsigned char *)&sb,sizeof(sb));
+ RAND_seed(&sb,sizeof(sb));
ret+=sizeof(sb);
if (i < 0) return(0);
if (bytes <= 0) return(ret);
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c
index b607f623e4..1b4c06838b 100644
--- a/ssl/s23_clnt.c
+++ b/ssl/s23_clnt.c
@@ -113,7 +113,7 @@ SSL *s;
int ret= -1;
int new_state,state;
- RAND_seed((unsigned char *)&Time,sizeof(Time));
+ RAND_seed(&Time,sizeof(Time));
ERR_clear_error();
clear_sys_error();
diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c
index 5dd9253f9f..6c8afeb857 100644
--- a/ssl/s23_srvr.c
+++ b/ssl/s23_srvr.c
@@ -111,7 +111,7 @@ SSL *s;
int ret= -1;
int new_state,state;
- RAND_seed((unsigned char *)&Time,sizeof(Time));
+ RAND_seed(&Time,sizeof(Time));
ERR_clear_error();
clear_sys_error();
diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c
index 91fea92e6b..0c13842014 100644
--- a/ssl/s2_clnt.c
+++ b/ssl/s2_clnt.c
@@ -122,7 +122,7 @@ SSL *s;
void (*cb)()=NULL;
int new_state,state;
- RAND_seed((unsigned char *)&l,sizeof(l));
+ RAND_seed(&l,sizeof(l));
ERR_clear_error();
clear_sys_error();
diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c
index 3477d43853..7e8732f9cc 100644
--- a/ssl/s2_srvr.c
+++ b/ssl/s2_srvr.c
@@ -123,7 +123,7 @@ SSL *s;
void (*cb)()=NULL;
int new_state,state;
- RAND_seed((unsigned char *)&l,sizeof(l));
+ RAND_seed(&l,sizeof(l));
ERR_clear_error();
clear_sys_error();
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 88f33d5162..436215094a 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -137,7 +137,7 @@ SSL *s;
BIO *under;
int new_state,state,skip=0;;
- RAND_seed((unsigned char *)&Time,sizeof(Time));
+ RAND_seed(&Time,sizeof(Time));
ERR_clear_error();
clear_sys_error();
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index 9bb4560e32..ddf377c122 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -138,7 +138,7 @@ SSL *s;
BIO *under;
int new_state,state,skip=0;
- RAND_seed((unsigned char *)&Time,sizeof(Time));
+ RAND_seed(&Time,sizeof(Time));
ERR_clear_error();
clear_sys_error();