aboutsummaryrefslogtreecommitdiff
path: root/crypto/pem
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-06-10 19:45:25 +0000
committerBen Laurie <ben@openssl.org>1999-06-10 19:45:25 +0000
commit84757d677f403a083ea0b823df8563812423114a (patch)
tree3d46b96ba9ae1a58bb0be4f4baf19fcb43e59c60 /crypto/pem
parent522aefbb5a93bcaff998009686b4a07f6bacc655 (diff)
downloadopenssl-84757d677f403a083ea0b823df8563812423114a.zip
openssl-84757d677f403a083ea0b823df8563812423114a.tar.gz
openssl-84757d677f403a083ea0b823df8563812423114a.tar.bz2
Fix warnings.
Diffstat (limited to 'crypto/pem')
-rw-r--r--crypto/pem/pem.h4
-rw-r--r--crypto/pem/pem_lib.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h
index 6c7387b..3f89b0c 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 96221d8..ee6eba5 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;