summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-06-08 18:37:43 +0000
committerBen Laurie <ben@openssl.org>1999-06-08 18:37:43 +0000
commit72fbe87dc6259d486d361f4f81af0e75116f4679 (patch)
treec13a1f3701330b8213d67f0ecba0c8625688ac1a
parentcfce2335e942c35bc278b4f0ffcae7455d537b8b (diff)
Survive pedanticism.
-rw-r--r--crypto/bio/bio.h2
-rw-r--r--crypto/bio/bss_bio.c3
-rw-r--r--crypto/bio/bss_file.c2
-rw-r--r--crypto/dh/dh.h5
-rw-r--r--crypto/evp/evp.h4
-rw-r--r--crypto/evp/p5_crpt2.c4
-rw-r--r--crypto/hmac/hmac.c7
-rw-r--r--crypto/hmac/hmac.h7
-rw-r--r--demos/selfsign.c2
9 files changed, 22 insertions, 14 deletions
diff --git a/crypto/bio/bio.h b/crypto/bio/bio.h
index 405e769494..f75e77b941 100644
--- a/crypto/bio/bio.h
+++ b/crypto/bio/bio.h
@@ -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
diff --git a/crypto/bio/bss_bio.c b/crypto/bio/bss_bio.c
index 4636665c8c..cae5917036 100644
--- a/crypto/bio/bss_bio.c
+++ b/crypto/bio/bss_bio.c
@@ -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)
{
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c
index 232e63669c..52c0c39df0 100644
--- a/crypto/bio/bss_file.c
+++ b/crypto/bio/bss_file.c
@@ -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;
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h
index affafd256b..2cc3797a94 100644
--- a/crypto/dh/dh.h
+++ b/crypto/dh/dh.h
@@ -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);
diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h
index 28814c8073..e7b55a5885 100644
--- a/crypto/evp/evp.h
+++ b/crypto/evp/evp.h
@@ -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);
diff --git a/crypto/evp/p5_crpt2.c b/crypto/evp/p5_crpt2.c
index 78fd0ef14d..ef3f941a7e 100644
--- a/crypto/evp/p5_crpt2.c
+++ b/crypto/evp/p5_crpt2.c
@@ -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;
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 0825536393..5c349bbb56 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -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];
diff --git a/crypto/hmac/hmac.h b/crypto/hmac/hmac.h
index 57204985d3..f928975fcd 100644
--- a/crypto/hmac/hmac.h
+++ b/crypto/hmac/hmac.h
@@ -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
diff --git a/demos/selfsign.c b/demos/selfsign.c
index 07711343a3..ea9b3ff1c8 100644
--- a/demos/selfsign.c
+++ b/demos/selfsign.c
@@ -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();