Survive pedanticism.
This commit is contained in:
parent
cfce2335e9
commit
72fbe87dc6
@ -460,7 +460,7 @@ BIO *BIO_new_fp_internal(FILE *stream, int close_flag);
|
||||
# define BIO_new_fp BIO_new_fp_internal
|
||||
# else /* FP_API */
|
||||
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);
|
||||
# define BIO_s_file_internal BIO_s_file
|
||||
# define BIO_new_file_internal BIO_new_file
|
||||
|
@ -187,7 +187,8 @@ static int bio_puts(BIO *bio, char *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)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ static BIO_METHOD methods_filep=
|
||||
file_free,
|
||||
};
|
||||
|
||||
BIO *BIO_new_file(char *filename, char *mode)
|
||||
BIO *BIO_new_file(const char *filename, const char *mode)
|
||||
{
|
||||
BIO *ret;
|
||||
FILE *file;
|
||||
|
@ -105,8 +105,13 @@ typedef struct dh_st
|
||||
(unsigned char *)(x))
|
||||
#define d2i_DHparams_bio(bp,x) (DH *)ASN1_d2i_bio((char *(*)())DH_new, \
|
||||
(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), \
|
||||
(unsigned char *)(x))
|
||||
#endif
|
||||
|
||||
DH * DH_new(void);
|
||||
void DH_free(DH *dh);
|
||||
|
@ -641,8 +641,8 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
|
||||
ASN1_TYPE *param, EVP_CIPHER *cipher, EVP_MD *md,
|
||||
int en_de);
|
||||
int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
int keylen, unsigned char *out);
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
int keylen, unsigned char *out);
|
||||
int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
|
||||
ASN1_TYPE *param, EVP_CIPHER *cipher, EVP_MD *md,
|
||||
int en_de);
|
||||
|
@ -69,8 +69,8 @@
|
||||
*/
|
||||
|
||||
int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
int keylen, unsigned char *out)
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
int keylen, unsigned char *out)
|
||||
{
|
||||
unsigned char digtmp[SHA_DIGEST_LENGTH], *p, itmp[4];
|
||||
int cplen, j, k;
|
||||
|
@ -60,7 +60,7 @@
|
||||
#include <string.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)
|
||||
{
|
||||
int i,j,reset=0;
|
||||
@ -133,8 +133,9 @@ void HMAC_cleanup(HMAC_CTX *ctx)
|
||||
memset(ctx,0,sizeof(HMAC_CTX));
|
||||
}
|
||||
|
||||
unsigned char *HMAC(const EVP_MD *evp_md, const unsigned char *key, int key_len,
|
||||
unsigned char *d, int n, unsigned char *md, unsigned int *md_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)
|
||||
{
|
||||
HMAC_CTX c;
|
||||
static unsigned char m[EVP_MAX_MD_SIZE];
|
||||
|
@ -83,13 +83,14 @@ typedef struct hmac_ctx_st
|
||||
#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);
|
||||
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_cleanup(HMAC_CTX *ctx);
|
||||
unsigned char *HMAC(const EVP_MD *evp_md, const unsigned char *key, int key_len,
|
||||
unsigned char *d, int n, unsigned char *md, unsigned int *md_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);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -102,7 +102,7 @@ int days;
|
||||
else
|
||||
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))
|
||||
{
|
||||
abort();
|
||||
|
Loading…
Reference in New Issue
Block a user