summaryrefslogtreecommitdiffstats
path: root/crypto/pem
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2005-03-31 13:57:54 +0000
committerBen Laurie <ben@openssl.org>2005-03-31 13:57:54 +0000
commit8bb826ee53b726a9a2a42792ecb861194578404d (patch)
treec126ee7ea60bbc6893be7664518544ded9d725ce /crypto/pem
parent5d1430f390bbd1fdc6e97e8ae498192935ee9220 (diff)
Consistency.
Diffstat (limited to 'crypto/pem')
-rw-r--r--crypto/pem/pem.h14
-rw-r--r--crypto/pem/pem_info.c15
-rw-r--r--crypto/pem/pem_lib.c9
-rw-r--r--crypto/pem/pem_oth.c3
4 files changed, 19 insertions, 22 deletions
diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h
index 9a5fa03e2a..3f67a996dd 100644
--- a/crypto/pem/pem.h
+++ b/crypto/pem/pem.h
@@ -529,12 +529,11 @@ int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data,
long len);
int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp,
pem_password_cb *cb, void *u);
-void * PEM_ASN1_read_bio(void *(*d2i)(void **,const unsigned char **,long),
- const char *name,BIO *bp,void **x,
- pem_password_cb *cb, void *u);
+void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp,
+ void **x, pem_password_cb *cb, void *u);
#define PEM_ASN1_read_bio_of(type,d2i,name,bp,x,cb,u) \
((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))PEM_ASN1_read_bio)(d2i,name,bp,x,cb,u)
-int PEM_ASN1_write_bio(int (*i2d)(void *,unsigned char **),const char *name,BIO *bp,char *x,
+int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp,char *x,
const EVP_CIPHER *enc,unsigned char *kstr,int klen,
pem_password_cb *cb, void *u);
#define PEM_ASN1_write_bio_of(type,i2d,name,bp,x,enc,kstr,klen,cb,u) \
@@ -549,10 +548,9 @@ int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc,
int PEM_read(FILE *fp, char **name, char **header,
unsigned char **data,long *len);
int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len);
-void * PEM_ASN1_read(void *(*d2i)(void **,const unsigned char **,long),
- const char *name,FILE *fp,void **x,pem_password_cb *cb,
- void *u);
-int PEM_ASN1_write(int (*i2d)(void *,unsigned char **),const char *name,FILE *fp,
+void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
+ pem_password_cb *cb, void *u);
+int PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp,
char *x,const EVP_CIPHER *enc,unsigned char *kstr,
int klen,pem_password_cb *callback, void *u);
STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c
index b9e2ab51f3..14e0643129 100644
--- a/crypto/pem/pem_info.c
+++ b/crypto/pem/pem_info.c
@@ -87,14 +87,15 @@ STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_p
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u)
{
X509_INFO *xi=NULL;
- char *name=NULL,*header=NULL,**pp;
+ char *name=NULL,*header=NULL;
+ void *pp;
unsigned char *data=NULL;
const unsigned char *p;
long len,error=0;
int ok=0;
STACK_OF(X509_INFO) *ret=NULL;
unsigned int i,raw;
- char *(*d2i)(void *,const unsigned char **,long);
+ d2i_of_void *d2i;
if (sk == NULL)
{
@@ -133,7 +134,7 @@ start:
if ((xi=X509_INFO_new()) == NULL) goto err;
goto start;
}
- pp=(char **)&(xi->x509);
+ pp=&(xi->x509);
}
else if ((strcmp(name,PEM_STRING_X509_TRUSTED) == 0))
{
@@ -144,7 +145,7 @@ start:
if ((xi=X509_INFO_new()) == NULL) goto err;
goto start;
}
- pp=(char **)&(xi->x509);
+ pp=&(xi->x509);
}
else if (strcmp(name,PEM_STRING_X509_CRL) == 0)
{
@@ -155,7 +156,7 @@ start:
if ((xi=X509_INFO_new()) == NULL) goto err;
goto start;
}
- pp=(char **)&(xi->crl);
+ pp=&(xi->crl);
}
else
#ifndef OPENSSL_NO_RSA
@@ -176,7 +177,7 @@ start:
if ((xi->x_pkey->dec_pkey=EVP_PKEY_new()) == NULL)
goto err;
xi->x_pkey->dec_pkey->type=EVP_PKEY_RSA;
- pp=(char **)&(xi->x_pkey->dec_pkey->pkey.rsa);
+ pp=&(xi->x_pkey->dec_pkey->pkey.rsa);
if ((int)strlen(header) > 10) /* assume encrypted */
raw=1;
}
@@ -224,7 +225,7 @@ start:
if ((xi->x_pkey->dec_pkey=EVP_PKEY_new()) == NULL)
goto err;
xi->x_pkey->dec_pkey->type=EVP_PKEY_EC;
- pp=(char **)&(xi->x_pkey->dec_pkey->pkey.eckey);
+ pp=&(xi->x_pkey->dec_pkey->pkey.eckey);
if ((int)strlen(header) > 10) /* assume encrypted */
raw=1;
}
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c
index 6e1bb4a62a..9f47853b20 100644
--- a/crypto/pem/pem_lib.c
+++ b/crypto/pem/pem_lib.c
@@ -158,9 +158,8 @@ void PEM_dek_info(char *buf, const char *type, int len, char *str)
}
#ifndef OPENSSL_NO_FP_API
-void *PEM_ASN1_read(void *(*d2i)(void **,const unsigned char **,long),
- const char *name, FILE *fp,void **x,pem_password_cb *cb,
- void *u)
+void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
+ pem_password_cb *cb, void *u)
{
BIO *b;
void *ret;
@@ -261,7 +260,7 @@ err:
}
#ifndef OPENSSL_NO_FP_API
-int PEM_ASN1_write(int (*i2d)(void *,unsigned char **), const char *name, FILE *fp,
+int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,
char *x, const EVP_CIPHER *enc, unsigned char *kstr,
int klen, pem_password_cb *callback, void *u)
{
@@ -280,7 +279,7 @@ int PEM_ASN1_write(int (*i2d)(void *,unsigned char **), const char *name, FILE *
}
#endif
-int PEM_ASN1_write_bio(int (*i2d)(void *,unsigned char **), const char *name, BIO *bp,
+int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
char *x, const EVP_CIPHER *enc, unsigned char *kstr,
int klen, pem_password_cb *callback, void *u)
{
diff --git a/crypto/pem/pem_oth.c b/crypto/pem/pem_oth.c
index a5e9204590..b33868d25a 100644
--- a/crypto/pem/pem_oth.c
+++ b/crypto/pem/pem_oth.c
@@ -67,8 +67,7 @@
/* Handle 'other' PEMs: not private keys */
-void *PEM_ASN1_read_bio(void *(*d2i)(void **,const unsigned char **,long),
- const char *name, BIO *bp, void **x,
+void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
pem_password_cb *cb, void *u)
{
const unsigned char *p=NULL;