More exactitude with function arguments.

This commit is contained in:
Ben Laurie 1999-02-09 23:01:08 +00:00
parent 119f62881a
commit bf5dcd135f
13 changed files with 22 additions and 22 deletions

View file

@ -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)

View file

@ -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);

View file

@ -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;

View file

@ -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 */
/*

View file

@ -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);

View file

@ -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)

View file

@ -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);

View file

@ -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();

View file

@ -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();

View file

@ -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();

View file

@ -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();

View file

@ -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();

View file

@ -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();