diff options
Diffstat (limited to 'src/lib/libcrypto/pem/pem.h')
| -rw-r--r-- | src/lib/libcrypto/pem/pem.h | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/src/lib/libcrypto/pem/pem.h b/src/lib/libcrypto/pem/pem.h index e27440330c..4af2db4b3c 100644 --- a/src/lib/libcrypto/pem/pem.h +++ b/src/lib/libcrypto/pem/pem.h | |||
| @@ -5,21 +5,21 @@ | |||
| 5 | * This package is an SSL implementation written | 5 | * This package is an SSL implementation written |
| 6 | * by Eric Young (eay@cryptsoft.com). | 6 | * by Eric Young (eay@cryptsoft.com). |
| 7 | * The implementation was written so as to conform with Netscapes SSL. | 7 | * The implementation was written so as to conform with Netscapes SSL. |
| 8 | * | 8 | * |
| 9 | * This library is free for commercial and non-commercial use as long as | 9 | * This library is free for commercial and non-commercial use as long as |
| 10 | * the following conditions are aheared to. The following conditions | 10 | * the following conditions are aheared to. The following conditions |
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | 11 | * apply to all code found in this distribution, be it the RC4, RSA, |
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation |
| 13 | * included with this distribution is covered by the same copyright terms | 13 | * included with this distribution is covered by the same copyright terms |
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). |
| 15 | * | 15 | * |
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | 16 | * Copyright remains Eric Young's, and as such any Copyright notices in |
| 17 | * the code are not to be removed. | 17 | * the code are not to be removed. |
| 18 | * If this package is used in a product, Eric Young should be given attribution | 18 | * If this package is used in a product, Eric Young should be given attribution |
| 19 | * as the author of the parts of the library used. | 19 | * as the author of the parts of the library used. |
| 20 | * This can be in the form of a textual message at program startup or | 20 | * This can be in the form of a textual message at program startup or |
| 21 | * in documentation (online or textual) provided with the package. | 21 | * in documentation (online or textual) provided with the package. |
| 22 | * | 22 | * |
| 23 | * Redistribution and use in source and binary forms, with or without | 23 | * Redistribution and use in source and binary forms, with or without |
| 24 | * modification, are permitted provided that the following conditions | 24 | * modification, are permitted provided that the following conditions |
| 25 | * are met: | 25 | * are met: |
| @@ -34,10 +34,10 @@ | |||
| 34 | * Eric Young (eay@cryptsoft.com)" | 34 | * Eric Young (eay@cryptsoft.com)" |
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | 35 | * The word 'cryptographic' can be left out if the rouines from the library |
| 36 | * being used are not cryptographic related :-). | 36 | * being used are not cryptographic related :-). |
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | 37 | * 4. If you include any Windows specific code (or a derivative thereof) from |
| 38 | * the apps directory (application code) you must include an acknowledgement: | 38 | * the apps directory (application code) you must include an acknowledgement: |
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" |
| 40 | * | 40 | * |
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND |
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| @@ -49,7 +49,7 @@ | |||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 51 | * SUCH DAMAGE. | 51 | * SUCH DAMAGE. |
| 52 | * | 52 | * |
| 53 | * The licence and distribution terms for any publically available version or | 53 | * The licence and distribution terms for any publically available version or |
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be |
| 55 | * copied and put under another distribution licence | 55 | * copied and put under another distribution licence |
| @@ -139,12 +139,11 @@ extern "C" { | |||
| 139 | 139 | ||
| 140 | /* Note that this structure is initialised by PEM_SealInit and cleaned up | 140 | /* Note that this structure is initialised by PEM_SealInit and cleaned up |
| 141 | by PEM_SealFinal (at least for now) */ | 141 | by PEM_SealFinal (at least for now) */ |
| 142 | typedef struct PEM_Encode_Seal_st | 142 | typedef struct PEM_Encode_Seal_st { |
| 143 | { | ||
| 144 | EVP_ENCODE_CTX encode; | 143 | EVP_ENCODE_CTX encode; |
| 145 | EVP_MD_CTX md; | 144 | EVP_MD_CTX md; |
| 146 | EVP_CIPHER_CTX cipher; | 145 | EVP_CIPHER_CTX cipher; |
| 147 | } PEM_ENCODE_SEAL_CTX; | 146 | } PEM_ENCODE_SEAL_CTX; |
| 148 | 147 | ||
| 149 | /* enc_type is one off */ | 148 | /* enc_type is one off */ |
| 150 | #define PEM_TYPE_ENCRYPTED 10 | 149 | #define PEM_TYPE_ENCRYPTED 10 |
| @@ -152,24 +151,22 @@ typedef struct PEM_Encode_Seal_st | |||
| 152 | #define PEM_TYPE_MIC_CLEAR 30 | 151 | #define PEM_TYPE_MIC_CLEAR 30 |
| 153 | #define PEM_TYPE_CLEAR 40 | 152 | #define PEM_TYPE_CLEAR 40 |
| 154 | 153 | ||
| 155 | typedef struct pem_recip_st | 154 | typedef struct pem_recip_st { |
| 156 | { | ||
| 157 | char *name; | 155 | char *name; |
| 158 | X509_NAME *dn; | 156 | X509_NAME *dn; |
| 159 | 157 | ||
| 160 | int cipher; | 158 | int cipher; |
| 161 | int key_enc; | 159 | int key_enc; |
| 162 | /* char iv[8]; unused and wrong size */ | 160 | /* char iv[8]; unused and wrong size */ |
| 163 | } PEM_USER; | 161 | } PEM_USER; |
| 164 | 162 | ||
| 165 | typedef struct pem_ctx_st | 163 | typedef struct pem_ctx_st { |
| 166 | { | ||
| 167 | int type; /* what type of object */ | 164 | int type; /* what type of object */ |
| 168 | 165 | ||
| 169 | struct { | 166 | struct { |
| 170 | int version; | 167 | int version; |
| 171 | int mode; | 168 | int mode; |
| 172 | } proc_type; | 169 | } proc_type; |
| 173 | 170 | ||
| 174 | char *domain; | 171 | char *domain; |
| 175 | 172 | ||
| @@ -177,14 +174,14 @@ typedef struct pem_ctx_st | |||
| 177 | int cipher; | 174 | int cipher; |
| 178 | /* unused, and wrong size | 175 | /* unused, and wrong size |
| 179 | unsigned char iv[8]; */ | 176 | unsigned char iv[8]; */ |
| 180 | } DEK_info; | 177 | } DEK_info; |
| 181 | 178 | ||
| 182 | PEM_USER *originator; | 179 | PEM_USER *originator; |
| 183 | 180 | ||
| 184 | int num_recipient; | 181 | int num_recipient; |
| 185 | PEM_USER **recipient; | 182 | PEM_USER **recipient; |
| 186 | 183 | ||
| 187 | /* XXX(ben): don#t think this is used! | 184 | /* XXX(ben): don#t think this is used! |
| 188 | STACK *x509_chain; / * certificate chain */ | 185 | STACK *x509_chain; / * certificate chain */ |
| 189 | EVP_MD *md; /* signature type */ | 186 | EVP_MD *md; /* signature type */ |
| 190 | 187 | ||
| @@ -198,11 +195,10 @@ typedef struct pem_ctx_st | |||
| 198 | /* unused, and wrong size | 195 | /* unused, and wrong size |
| 199 | unsigned char iv[8]; */ | 196 | unsigned char iv[8]; */ |
| 200 | 197 | ||
| 201 | |||
| 202 | int data_enc; /* is the data encrypted */ | 198 | int data_enc; /* is the data encrypted */ |
| 203 | int data_len; | 199 | int data_len; |
| 204 | unsigned char *data; | 200 | unsigned char *data; |
| 205 | } PEM_CTX; | 201 | } PEM_CTX; |
| 206 | 202 | ||
| 207 | /* These macros make the PEM_read/PEM_write functions easier to maintain and | 203 | /* These macros make the PEM_read/PEM_write functions easier to maintain and |
| 208 | * write. Now they are all implemented with either: | 204 | * write. Now they are all implemented with either: |
| @@ -223,7 +219,7 @@ typedef struct pem_ctx_st | |||
| 223 | type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ | 219 | type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ |
| 224 | { \ | 220 | { \ |
| 225 | return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \ | 221 | return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \ |
| 226 | } | 222 | } |
| 227 | 223 | ||
| 228 | #define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ | 224 | #define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ |
| 229 | int PEM_write_##name(FILE *fp, type *x) \ | 225 | int PEM_write_##name(FILE *fp, type *x) \ |
| @@ -289,23 +285,23 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ | |||
| 289 | 285 | ||
| 290 | #define IMPLEMENT_PEM_write(name, type, str, asn1) \ | 286 | #define IMPLEMENT_PEM_write(name, type, str, asn1) \ |
| 291 | IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ | 287 | IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ |
| 292 | IMPLEMENT_PEM_write_fp(name, type, str, asn1) | 288 | IMPLEMENT_PEM_write_fp(name, type, str, asn1) |
| 293 | 289 | ||
| 294 | #define IMPLEMENT_PEM_write_const(name, type, str, asn1) \ | 290 | #define IMPLEMENT_PEM_write_const(name, type, str, asn1) \ |
| 295 | IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ | 291 | IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ |
| 296 | IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) | 292 | IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) |
| 297 | 293 | ||
| 298 | #define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \ | 294 | #define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \ |
| 299 | IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ | 295 | IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ |
| 300 | IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) | 296 | IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) |
| 301 | 297 | ||
| 302 | #define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \ | 298 | #define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \ |
| 303 | IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ | 299 | IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ |
| 304 | IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) | 300 | IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) |
| 305 | 301 | ||
| 306 | #define IMPLEMENT_PEM_read(name, type, str, asn1) \ | 302 | #define IMPLEMENT_PEM_read(name, type, str, asn1) \ |
| 307 | IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ | 303 | IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ |
| 308 | IMPLEMENT_PEM_read_fp(name, type, str, asn1) | 304 | IMPLEMENT_PEM_read_fp(name, type, str, asn1) |
| 309 | 305 | ||
| 310 | #define IMPLEMENT_PEM_rw(name, type, str, asn1) \ | 306 | #define IMPLEMENT_PEM_rw(name, type, str, asn1) \ |
| 311 | IMPLEMENT_PEM_read(name, type, str, asn1) \ | 307 | IMPLEMENT_PEM_read(name, type, str, asn1) \ |
| @@ -369,7 +365,7 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ | |||
| 369 | 365 | ||
| 370 | #define DECLARE_PEM_write(name, type) \ | 366 | #define DECLARE_PEM_write(name, type) \ |
| 371 | DECLARE_PEM_write_bio(name, type) \ | 367 | DECLARE_PEM_write_bio(name, type) \ |
| 372 | DECLARE_PEM_write_fp(name, type) | 368 | DECLARE_PEM_write_fp(name, type) |
| 373 | 369 | ||
| 374 | #define DECLARE_PEM_write_const(name, type) \ | 370 | #define DECLARE_PEM_write_const(name, type) \ |
| 375 | DECLARE_PEM_write_bio_const(name, type) \ | 371 | DECLARE_PEM_write_bio_const(name, type) \ |
| @@ -377,7 +373,7 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ | |||
| 377 | 373 | ||
| 378 | #define DECLARE_PEM_write_cb(name, type) \ | 374 | #define DECLARE_PEM_write_cb(name, type) \ |
| 379 | DECLARE_PEM_write_cb_bio(name, type) \ | 375 | DECLARE_PEM_write_cb_bio(name, type) \ |
| 380 | DECLARE_PEM_write_cb_fp(name, type) | 376 | DECLARE_PEM_write_cb_fp(name, type) |
| 381 | 377 | ||
| 382 | #define DECLARE_PEM_read(name, type) \ | 378 | #define DECLARE_PEM_read(name, type) \ |
| 383 | DECLARE_PEM_read_bio(name, type) \ | 379 | DECLARE_PEM_read_bio(name, type) \ |
| @@ -404,50 +400,52 @@ typedef int pem_password_cb(char *buf, int size, int rwflag); | |||
| 404 | #endif | 400 | #endif |
| 405 | 401 | ||
| 406 | int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); | 402 | int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); |
| 407 | int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len, | 403 | int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data, long *len, |
| 408 | pem_password_cb *callback,void *u); | 404 | pem_password_cb *callback, void *u); |
| 409 | 405 | ||
| 410 | #ifndef OPENSSL_NO_BIO | 406 | #ifndef OPENSSL_NO_BIO |
| 411 | int PEM_read_bio(BIO *bp, char **name, char **header, | 407 | int PEM_read_bio(BIO *bp, char **name, char **header, |
| 412 | unsigned char **data,long *len); | 408 | unsigned char **data, long *len); |
| 413 | int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data, | 409 | int PEM_write_bio(BIO *bp, const char *name, char *hdr, unsigned char *data, |
| 414 | long len); | 410 | long len); |
| 415 | int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp, | 411 | int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, |
| 416 | pem_password_cb *cb, void *u); | 412 | const char *name, BIO *bp, pem_password_cb *cb, void *u); |
| 417 | void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, | 413 | void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, |
| 418 | void **x, pem_password_cb *cb, void *u); | 414 | void **x, pem_password_cb *cb, void *u); |
| 419 | int PEM_ASN1_write_bio(i2d_of_void *i2d,const char *name,BIO *bp, void *x, | 415 | int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x, |
| 420 | const EVP_CIPHER *enc,unsigned char *kstr,int klen, | 416 | const EVP_CIPHER *enc, unsigned char *kstr, int klen, |
| 421 | pem_password_cb *cb, void *u); | 417 | pem_password_cb *cb, void *u); |
| 422 | 418 | ||
| 423 | STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); | 419 | STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, |
| 424 | int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, | 420 | STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u); |
| 425 | unsigned char *kstr, int klen, pem_password_cb *cd, void *u); | 421 | int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc, |
| 422 | unsigned char *kstr, int klen, pem_password_cb *cd, void *u); | ||
| 426 | #endif | 423 | #endif |
| 427 | 424 | ||
| 428 | int PEM_read(FILE *fp, char **name, char **header, | 425 | int PEM_read(FILE *fp, char **name, char **header, |
| 429 | unsigned char **data,long *len); | 426 | unsigned char **data, long *len); |
| 430 | int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); | 427 | int PEM_write(FILE *fp, char *name, char *hdr, unsigned char *data, |
| 428 | long len); | ||
| 431 | void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, | 429 | void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, |
| 432 | pem_password_cb *cb, void *u); | 430 | pem_password_cb *cb, void *u); |
| 433 | int PEM_ASN1_write(i2d_of_void *i2d,const char *name,FILE *fp, | 431 | int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, |
| 434 | void *x,const EVP_CIPHER *enc,unsigned char *kstr, | 432 | void *x, const EVP_CIPHER *enc, unsigned char *kstr, |
| 435 | int klen,pem_password_cb *callback, void *u); | 433 | int klen, pem_password_cb *callback, void *u); |
| 436 | STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, | 434 | STACK_OF(X509_INFO) * PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, |
| 437 | pem_password_cb *cb, void *u); | 435 | pem_password_cb *cb, void *u); |
| 438 | 436 | ||
| 439 | int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, | 437 | int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, |
| 440 | EVP_MD *md_type, unsigned char **ek, int *ekl, | 438 | EVP_MD *md_type, unsigned char **ek, int *ekl, |
| 441 | unsigned char *iv, EVP_PKEY **pubk, int npubk); | 439 | unsigned char *iv, EVP_PKEY **pubk, int npubk); |
| 442 | void PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl, | 440 | void PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl, |
| 443 | unsigned char *in, int inl); | 441 | unsigned char *in, int inl); |
| 444 | int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig,int *sigl, | 442 | int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl, |
| 445 | unsigned char *out, int *outl, EVP_PKEY *priv); | 443 | unsigned char *out, int *outl, EVP_PKEY *priv); |
| 446 | 444 | ||
| 447 | void PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); | 445 | void PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); |
| 448 | void PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt); | 446 | void PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt); |
| 449 | int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, | 447 | int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, |
| 450 | unsigned int *siglen, EVP_PKEY *pkey); | 448 | unsigned int *siglen, EVP_PKEY *pkey); |
| 451 | 449 | ||
| 452 | int PEM_def_callback(char *buf, int num, int w, void *key); | 450 | int PEM_def_callback(char *buf, int num, int w, void *key); |
| 453 | void PEM_proc_type(char *buf, int type); | 451 | void PEM_proc_type(char *buf, int type); |
| @@ -509,32 +507,34 @@ DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) | |||
| 509 | DECLARE_PEM_rw(PUBKEY, EVP_PKEY) | 507 | DECLARE_PEM_rw(PUBKEY, EVP_PKEY) |
| 510 | 508 | ||
| 511 | int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, | 509 | int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, |
| 512 | char *kstr, int klen, | 510 | char *kstr, int klen, |
| 513 | pem_password_cb *cb, void *u); | 511 | pem_password_cb *cb, void *u); |
| 514 | int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *, | 512 | int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *, |
| 515 | char *, int, pem_password_cb *, void *); | 513 | char *, int, pem_password_cb *, void *); |
| 516 | int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, | 514 | int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, |
| 517 | char *kstr, int klen, | 515 | char *kstr, int klen, |
| 518 | pem_password_cb *cb, void *u); | 516 | pem_password_cb *cb, void *u); |
| 519 | int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, | 517 | int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, |
| 520 | char *kstr, int klen, | 518 | char *kstr, int klen, |
| 521 | pem_password_cb *cb, void *u); | 519 | pem_password_cb *cb, void *u); |
| 522 | EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u); | 520 | EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, |
| 521 | void *u); | ||
| 523 | 522 | ||
| 524 | int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, | 523 | int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, |
| 525 | char *kstr, int klen, | 524 | char *kstr, int klen, |
| 526 | pem_password_cb *cb, void *u); | 525 | pem_password_cb *cb, void *u); |
| 527 | int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, | 526 | int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, |
| 528 | char *kstr, int klen, | 527 | char *kstr, int klen, |
| 529 | pem_password_cb *cb, void *u); | 528 | pem_password_cb *cb, void *u); |
| 530 | int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, | 529 | int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, |
| 531 | char *kstr, int klen, | 530 | char *kstr, int klen, |
| 532 | pem_password_cb *cb, void *u); | 531 | pem_password_cb *cb, void *u); |
| 533 | 532 | ||
| 534 | EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u); | 533 | EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, |
| 534 | void *u); | ||
| 535 | 535 | ||
| 536 | int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc, | 536 | int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, |
| 537 | char *kstr,int klen, pem_password_cb *cd, void *u); | 537 | char *kstr, int klen, pem_password_cb *cd, void *u); |
| 538 | 538 | ||
| 539 | EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x); | 539 | EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x); |
| 540 | int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x); | 540 | int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x); |
| @@ -548,8 +548,8 @@ int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk); | |||
| 548 | int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk); | 548 | int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk); |
| 549 | #ifndef OPENSSL_NO_RC4 | 549 | #ifndef OPENSSL_NO_RC4 |
| 550 | EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u); | 550 | EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u); |
| 551 | int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, | 551 | int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, pem_password_cb *cb, |
| 552 | pem_password_cb *cb, void *u); | 552 | void *u); |
| 553 | #endif | 553 | #endif |
| 554 | 554 | ||
| 555 | 555 | ||
