From: Ben Laurie Date: Thu, 10 Jun 1999 19:45:25 +0000 (+0000) Subject: Fix warnings. X-Git-Tag: OpenSSL_0_9_4~181 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=84757d677f403a083ea0b823df8563812423114a;p=oweals%2Fopenssl.git Fix warnings. --- diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h index 6c7387b604..3f89b0cd9b 100644 --- a/crypto/pem/pem.h +++ b/crypto/pem/pem.h @@ -502,7 +502,7 @@ int PEM_write_DSAPrivateKey(FILE *fp,DSA *x,const EVP_CIPHER *enc, int PEM_write_PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc, unsigned char *kstr,int klen, pem_password_cb *); int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc, - unsigned char *kstr,int klen, pem_password_cb *); + char *kstr,int klen, pem_password_cb *); int PEM_write_PKCS7(FILE *fp,PKCS7 *x); #ifndef NO_DH int PEM_write_DHparams(FILE *fp,DH *x); @@ -553,7 +553,7 @@ int PEM_write_bio_DSAPrivateKey(BIO *fp,DSA *x,const EVP_CIPHER *enc, int PEM_write_bio_PrivateKey(BIO *fp,EVP_PKEY *x,const EVP_CIPHER *enc, unsigned char *kstr,int klen, pem_password_cb *); int PEM_write_bio_PKCS8PrivateKey(BIO *fp,EVP_PKEY *x,const EVP_CIPHER *enc, - unsigned char *kstr,int klen, pem_password_cb *); + char *kstr,int klen, pem_password_cb *); int PEM_write_bio_PKCS7(BIO *bp,PKCS7 *x); #ifndef NO_DH int PEM_write_bio_DHparams(BIO *bp,DH *x); diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 96221d869b..ee6eba50cd 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -75,6 +75,7 @@ const char *PEM_version="PEM" OPENSSL_VERSION_PTEXT; static int def_callback(char *buf, int num, int w); static int load_iv(unsigned char **fromp,unsigned char *to, int num); + static int def_callback(char *buf, int num, int w) { #ifdef NO_FP_API @@ -749,7 +750,8 @@ err: */ int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, - unsigned char *kstr, int klen, pem_password_cb *cb) + char *kstr, int klen, + pem_password_cb *cb) { X509_SIG *p8; PKCS8_PRIV_KEY_INFO *p8inf; @@ -774,7 +776,7 @@ int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, kstr = buf; } p8 = PKCS8_encrypt(-1, enc, kstr, klen, NULL, 0, 0, p8inf); - if(kstr == (unsigned char *)buf) memset(buf, 0, klen); + if(kstr == buf) memset(buf, 0, klen); PKCS8_PRIV_KEY_INFO_free(p8inf); ret = PEM_write_bio_PKCS8(bp, p8); X509_SIG_free(p8); @@ -787,7 +789,7 @@ int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, } int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, - unsigned char *kstr, int klen, pem_password_cb *cb) + char *kstr, int klen, pem_password_cb *cb) { BIO *bp; int ret;