Survive pedanticism.

This commit is contained in:
Ben Laurie 1999-06-08 18:37:43 +00:00
parent cfce2335e9
commit 72fbe87dc6
9 changed files with 22 additions and 14 deletions

View File

@ -460,7 +460,7 @@ BIO *BIO_new_fp_internal(FILE *stream, int close_flag);
# define BIO_new_fp BIO_new_fp_internal # define BIO_new_fp BIO_new_fp_internal
# else /* FP_API */ # else /* FP_API */
BIO_METHOD *BIO_s_file(void ); BIO_METHOD *BIO_s_file(void );
BIO *BIO_new_file(char *filename, char *mode); BIO *BIO_new_file(const char *filename, const char *mode);
BIO *BIO_new_fp(FILE *stream, int close_flag); BIO *BIO_new_fp(FILE *stream, int close_flag);
# define BIO_s_file_internal BIO_s_file # define BIO_s_file_internal BIO_s_file
# define BIO_new_file_internal BIO_new_file # define BIO_new_file_internal BIO_new_file

View File

@ -187,7 +187,8 @@ static int bio_puts(BIO *bio, char *str)
return bio_write(bio, str, strlen(str)); return bio_write(bio, str, strlen(str));
} }
/* Until bio_make_pair is used, make a dummy function use it for -pedantic */
void dummy() { bio_make_pair(NULL,NULL); }
static int bio_make_pair(BIO *bio1, BIO *bio2) static int bio_make_pair(BIO *bio1, BIO *bio2)
{ {

View File

@ -93,7 +93,7 @@ static BIO_METHOD methods_filep=
file_free, file_free,
}; };
BIO *BIO_new_file(char *filename, char *mode) BIO *BIO_new_file(const char *filename, const char *mode)
{ {
BIO *ret; BIO *ret;
FILE *file; FILE *file;

View File

@ -105,8 +105,13 @@ typedef struct dh_st
(unsigned char *)(x)) (unsigned char *)(x))
#define d2i_DHparams_bio(bp,x) (DH *)ASN1_d2i_bio((char *(*)())DH_new, \ #define d2i_DHparams_bio(bp,x) (DH *)ASN1_d2i_bio((char *(*)())DH_new, \
(char *(*)())d2i_DHparams,(bp),(unsigned char **)(x)) (char *(*)())d2i_DHparams,(bp),(unsigned char **)(x))
#ifdef __cplusplus
#define i2d_DHparams_bio(bp,x) ASN1_i2d_bio((int (*)())i2d_DHparams,(bp), \
(unsigned char *)(x))
#else
#define i2d_DHparams_bio(bp,x) ASN1_i2d_bio(i2d_DHparams,(bp), \ #define i2d_DHparams_bio(bp,x) ASN1_i2d_bio(i2d_DHparams,(bp), \
(unsigned char *)(x)) (unsigned char *)(x))
#endif
DH * DH_new(void); DH * DH_new(void);
void DH_free(DH *dh); void DH_free(DH *dh);

View File

@ -60,7 +60,7 @@
#include <string.h> #include <string.h>
#include <openssl/hmac.h> #include <openssl/hmac.h>
void HMAC_Init(HMAC_CTX *ctx, const unsigned char *key, int len, void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md) const EVP_MD *md)
{ {
int i,j,reset=0; int i,j,reset=0;
@ -133,8 +133,9 @@ void HMAC_cleanup(HMAC_CTX *ctx)
memset(ctx,0,sizeof(HMAC_CTX)); memset(ctx,0,sizeof(HMAC_CTX));
} }
unsigned char *HMAC(const EVP_MD *evp_md, const unsigned char *key, int key_len, unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
unsigned char *d, int n, unsigned char *md, unsigned int *md_len) unsigned char *d, int n, unsigned char *md,
unsigned int *md_len)
{ {
HMAC_CTX c; HMAC_CTX c;
static unsigned char m[EVP_MAX_MD_SIZE]; static unsigned char m[EVP_MAX_MD_SIZE];

View File

@ -83,13 +83,14 @@ typedef struct hmac_ctx_st
#define HMAC_size(e) (EVP_MD_size((e)->md)) #define HMAC_size(e) (EVP_MD_size((e)->md))
void HMAC_Init(HMAC_CTX *ctx, const unsigned char *key, int len, void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md); const EVP_MD *md);
void HMAC_Update(HMAC_CTX *ctx,unsigned char *key, int len); void HMAC_Update(HMAC_CTX *ctx,unsigned char *key, int len);
void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
void HMAC_cleanup(HMAC_CTX *ctx); void HMAC_cleanup(HMAC_CTX *ctx);
unsigned char *HMAC(const EVP_MD *evp_md, const unsigned char *key, int key_len, unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
unsigned char *d, int n, unsigned char *md, unsigned int *md_len); unsigned char *d, int n, unsigned char *md,
unsigned int *md_len);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -102,7 +102,7 @@ int days;
else else
x= *x509p; x= *x509p;
rsa=RSA_generate_key(bits,RSA_F4,callback); rsa=RSA_generate_key(bits,RSA_F4,callback,NULL);
if (!EVP_PKEY_assign_RSA(pk,rsa)) if (!EVP_PKEY_assign_RSA(pk,rsa))
{ {
abort(); abort();