Lines 220-238
Link Here
|
220 |
#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ |
220 |
#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ |
221 |
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ |
221 |
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ |
222 |
{ \ |
222 |
{ \ |
223 |
return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read))(d2i_##asn1, str,fp,x,cb,u)); \ |
223 |
return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,void *))__PEM_ASN1_read)(d2i_##asn1, str,fp,x,cb,u)); \ |
224 |
} |
224 |
} |
225 |
|
225 |
|
226 |
#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ |
226 |
#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ |
227 |
int PEM_write_##name(FILE *fp, type *x) \ |
227 |
int PEM_write_##name(FILE *fp, type *x) \ |
228 |
{ \ |
228 |
{ \ |
229 |
return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ |
229 |
return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ |
230 |
} |
230 |
} |
231 |
|
231 |
|
232 |
#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ |
232 |
#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ |
233 |
int PEM_write_##name(FILE *fp, const type *x) \ |
233 |
int PEM_write_##name(FILE *fp, const type *x) \ |
234 |
{ \ |
234 |
{ \ |
235 |
return(((int (*)(I2D_OF_const(type),const char *,FILE *, const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ |
235 |
return(((int (*)(I2D_OF_const(type),const char *,FILE *, const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL)); \ |
236 |
} |
236 |
} |
237 |
|
237 |
|
238 |
#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ |
238 |
#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ |
Lines 240-246
Link Here
|
240 |
unsigned char *kstr, int klen, pem_password_cb *cb, \ |
243 |
unsigned char *kstr, int klen, pem_password_cb *cb, \ |
241 |
void *u) \ |
244 |
void *u) \ |
242 |
{ \ |
245 |
{ \ |
243 |
return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ |
246 |
return(((int (*)(I2D_OF(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ |
244 |
} |
247 |
} |
245 |
|
248 |
|
246 |
#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ |
249 |
#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ |
Lines 248-254
Link Here
|
248 |
unsigned char *kstr, int klen, pem_password_cb *cb, \ |
252 |
unsigned char *kstr, int klen, pem_password_cb *cb, \ |
249 |
void *u) \ |
253 |
void *u) \ |
250 |
{ \ |
254 |
{ \ |
251 |
return(((int (*)(I2D_OF_const(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write))(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ |
255 |
return(((int (*)(I2D_OF_const(type),const char *,FILE *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write)(i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u)); \ |
252 |
} |
256 |
} |
253 |
|
257 |
|
254 |
#endif |
258 |
#endif |
Lines 256-288
Link Here
|
256 |
#define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ |
261 |
#define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ |
257 |
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ |
262 |
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ |
258 |
{ \ |
263 |
{ \ |
259 |
return(((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i_##asn1, str,bp,x,cb,u)); \ |
264 |
return(((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))__PEM_ASN1_read_bio)(d2i_##asn1, str,bp,x,cb,u)); \ |
260 |
} |
265 |
} |
261 |
|
266 |
|
262 |
#define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ |
267 |
#define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ |
263 |
int PEM_write_bio_##name(BIO *bp, type *x) \ |
268 |
int PEM_write_bio_##name(BIO *bp, type *x) \ |
264 |
{ \ |
269 |
{ \ |
265 |
return(((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ |
270 |
return(((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ |
266 |
} |
271 |
} |
267 |
|
272 |
|
268 |
#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ |
273 |
#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ |
269 |
int PEM_write_bio_##name(BIO *bp, const type *x) \ |
274 |
int PEM_write_bio_##name(BIO *bp, const type *x) \ |
270 |
{ \ |
275 |
{ \ |
271 |
return(((int (*)(I2D_OF_const(type),const char *,BIO *,const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ |
276 |
return(((int (*)(I2D_OF_const(type),const char *,BIO *,const type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL)); \ |
272 |
} |
277 |
} |
273 |
|
278 |
|
274 |
#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ |
279 |
#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ |
275 |
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ |
280 |
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ |
276 |
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ |
281 |
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ |
277 |
{ \ |
282 |
{ \ |
278 |
return(((int (*)(I2D_OF(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ |
283 |
return(((int (*)(I2D_OF(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ |
279 |
} |
284 |
} |
280 |
|
285 |
|
281 |
#define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ |
286 |
#define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ |
282 |
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ |
287 |
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ |
283 |
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ |
288 |
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ |
284 |
{ \ |
289 |
{ \ |
285 |
return(((int (*)(I2D_OF_const(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ |
290 |
return(((int (*)(I2D_OF_const(type),const char *,BIO *,type *,const EVP_CIPHER *,unsigned char *,int,pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u)); \ |
286 |
} |
291 |
} |
287 |
|
292 |
|
288 |
#define IMPLEMENT_PEM_write(name, type, str, asn1) \ |
293 |
#define IMPLEMENT_PEM_write(name, type, str, asn1) \ |
Lines 545-557
Link Here
|
545 |
pem_password_cb *cb, void *u); |
555 |
pem_password_cb *cb, void *u); |
546 |
void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, |
556 |
void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, |
547 |
void **x, pem_password_cb *cb, void *u); |
557 |
void **x, pem_password_cb *cb, void *u); |
|
|
558 |
extern const void *__PEM_ASN1_read_bio; |
548 |
#define PEM_ASN1_read_bio_of(type,d2i,name,bp,x,cb,u) \ |
559 |
#define PEM_ASN1_read_bio_of(type,d2i,name,bp,x,cb,u) \ |
549 |
((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))openssl_fcast(PEM_ASN1_read_bio))(d2i,name,bp,x,cb,u) |
560 |
((type *(*)(D2I_OF(type),const char *,BIO *,type **,pem_password_cb *,void *))__PEM_ASN1_read_bio)(d2i,name,bp,x,cb,u) |
550 |
int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp,char *x, |
561 |
int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp,char *x, |
551 |
const EVP_CIPHER *enc,unsigned char *kstr,int klen, |
562 |
const EVP_CIPHER *enc,unsigned char *kstr,int klen, |
552 |
pem_password_cb *cb, void *u); |
563 |
pem_password_cb *cb, void *u); |
|
|
564 |
extern const void *__PEM_ASN1_write_bio; |
553 |
#define PEM_ASN1_write_bio_of(type,i2d,name,bp,x,enc,kstr,klen,cb,u) \ |
565 |
#define PEM_ASN1_write_bio_of(type,i2d,name,bp,x,enc,kstr,klen,cb,u) \ |
554 |
((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))openssl_fcast(PEM_ASN1_write_bio))(i2d,name,bp,x,enc,kstr,klen,cb,u) |
566 |
((int (*)(I2D_OF(type),const char *,BIO *,type *, const EVP_CIPHER *,unsigned char *,int, pem_password_cb *,void *))__PEM_ASN1_write_bio)(i2d,name,bp,x,enc,kstr,klen,cb,u) |
555 |
|
567 |
|
556 |
STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); |
568 |
STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); |
557 |
int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, |
569 |
int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, |
Lines 566-576
Link Here
|
566 |
int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); |
566 |
int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); |
567 |
void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, |
567 |
void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, |
568 |
pem_password_cb *cb, void *u); |
568 |
pem_password_cb *cb, void *u); |
|
|
569 |
extern const void *__PEM_ASN1_read; |
569 |
int PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp, |
570 |
int PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp, |
570 |
char *x,const EVP_CIPHER *enc,unsigned char *kstr, |
571 |
char *x,const EVP_CIPHER *enc,unsigned char *kstr, |
571 |
int klen,pem_password_cb *callback, void *u); |
572 |
int klen,pem_password_cb *callback, void *u); |
572 |
STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, |
573 |
STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, |
573 |
pem_password_cb *cb, void *u); |
574 |
pem_password_cb *cb, void *u); |
|
|
575 |
extern const void *__PEM_ASN1_write; |
574 |
#endif |
576 |
#endif |
575 |
|
577 |
|
576 |
int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, |
578 |
int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, |