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 |
static void *__PEM_ASN1_read=openssl_fcast(PEM_ASN1_read); \ |
|
|
224 |
return(((type *(*)(D2I_OF(type),char *,FILE *,type **,pem_password_cb *,void *))__PEM_ASN1_read)(d2i_##asn1, str,fp,x,cb,u)); \ |
224 |
} \ |
225 |
} \ |
225 |
|
226 |
|
226 |
#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ |
227 |
#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ |
227 |
int PEM_write_##name(FILE *fp, type *x) \ |
228 |
int PEM_write_##name(FILE *fp, type *x) \ |
228 |
{ \ |
229 |
{ \ |
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)); \ |
230 |
static void *__PEM_ASN1_write=openssl_fcast(PEM_ASN1_write); \ |
|
|
231 |
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 |
} |
232 |
} |
231 |
|
233 |
|
232 |
#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ |
234 |
#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ |
233 |
int PEM_write_##name(FILE *fp, const type *x) \ |
235 |
int PEM_write_##name(FILE *fp, const type *x) \ |
234 |
{ \ |
236 |
{ \ |
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)); \ |
237 |
static void *__PEM_ASN1_write=openssl_fcast(PEM_ASN1_write); \ |
|
|
238 |
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 |
} |
239 |
} |
237 |
|
240 |
|
238 |
#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ |
241 |
#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 |
static void *__PEM_ASN1_write=openssl_fcast(PEM_ASN1_write); \ |
|
|
247 |
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 |
} |
248 |
} |
245 |
|
249 |
|
246 |
#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ |
250 |
#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 |
static void *__PEM_ASN1_write=openssl_fcast(PEM_ASN1_write); \ |
|
|
256 |
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 |
} |
257 |
} |
253 |
|
258 |
|
254 |
#endif |
259 |
#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 |
static void *__PEM_ASN1_read_bio=openssl_fcast(PEM_ASN1_read_bio); \ |
|
|
265 |
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 |
} |
266 |
} |
261 |
|
267 |
|
262 |
#define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ |
268 |
#define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ |
263 |
int PEM_write_bio_##name(BIO *bp, type *x) \ |
269 |
int PEM_write_bio_##name(BIO *bp, type *x) \ |
264 |
{ \ |
270 |
{ \ |
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)); \ |
271 |
static void *__PEM_ASN1_write_bio=openssl_fcast(PEM_ASN1_write_bio); \ |
|
|
272 |
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 |
} |
273 |
} |
267 |
|
274 |
|
268 |
#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ |
275 |
#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ |
269 |
int PEM_write_bio_##name(BIO *bp, const type *x) \ |
276 |
int PEM_write_bio_##name(BIO *bp, const type *x) \ |
270 |
{ \ |
277 |
{ \ |
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)); \ |
278 |
static void *__PEM_ASN1_write_bio=openssl_fcast(PEM_ASN1_write_bio); \ |
|
|
279 |
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 |
} |
280 |
} |
273 |
|
281 |
|
274 |
#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ |
282 |
#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ |
275 |
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ |
283 |
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) \ |
284 |
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ |
277 |
{ \ |
285 |
{ \ |
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)); \ |
286 |
static void *__PEM_ASN1_write_bio=openssl_fcast(PEM_ASN1_write_bio); \ |
|
|
287 |
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 |
} |
288 |
} |
280 |
|
289 |
|
281 |
#define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ |
290 |
#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, \ |
291 |
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) \ |
292 |
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ |
284 |
{ \ |
293 |
{ \ |
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)); \ |
294 |
static void *__PEM_ASN1_write_bio=openssl_fcast(PEM_ASN1_write_bio); \ |
|
|
295 |
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 |
} |
296 |
} |
287 |
|
297 |
|
288 |
#define IMPLEMENT_PEM_write(name, type, str, asn1) \ |
298 |
#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 |
static void * __attribute__((unused)) __PEM_ASN1_read_bio=openssl_fcast(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 |
static void * __attribute__((unused)) __PEM_ASN1_write_bio=openssl_fcast(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, |