summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pem/pem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/pem/pem.h')
-rw-r--r--src/lib/libcrypto/pem/pem.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/lib/libcrypto/pem/pem.h b/src/lib/libcrypto/pem/pem.h
index 6d3c446577..3785fca77d 100644
--- a/src/lib/libcrypto/pem/pem.h
+++ b/src/lib/libcrypto/pem/pem.h
@@ -59,15 +59,16 @@
59#ifndef HEADER_PEM_H 59#ifndef HEADER_PEM_H
60#define HEADER_PEM_H 60#define HEADER_PEM_H
61 61
62#ifndef NO_BIO 62#ifndef OPENSSL_NO_BIO
63#include <openssl/bio.h> 63#include <openssl/bio.h>
64#endif 64#endif
65#ifndef NO_STACK 65#ifndef OPENSSL_NO_STACK
66#include <openssl/stack.h> 66#include <openssl/stack.h>
67#endif 67#endif
68#include <openssl/evp.h> 68#include <openssl/evp.h>
69#include <openssl/x509.h> 69#include <openssl/x509.h>
70#include <openssl/pem2.h> 70#include <openssl/pem2.h>
71#include <openssl/e_os2.h>
71 72
72#ifdef __cplusplus 73#ifdef __cplusplus
73extern "C" { 74extern "C" {
@@ -126,7 +127,8 @@ extern "C" {
126#define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS" 127#define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS"
127#define PEM_STRING_DSAPARAMS "DSA PARAMETERS" 128#define PEM_STRING_DSAPARAMS "DSA PARAMETERS"
128 129
129 130 /* Note that this structure is initialised by PEM_SealInit and cleaned up
131 by PEM_SealFinal (at least for now) */
130typedef struct PEM_Encode_Seal_st 132typedef struct PEM_Encode_Seal_st
131 { 133 {
132 EVP_ENCODE_CTX encode; 134 EVP_ENCODE_CTX encode;
@@ -171,7 +173,7 @@ typedef struct pem_ctx_st
171 int num_recipient; 173 int num_recipient;
172 PEM_USER **recipient; 174 PEM_USER **recipient;
173 175
174#ifndef NO_STACK 176#ifndef OPENSSL_NO_STACK
175 STACK *x509_chain; /* certificate chain */ 177 STACK *x509_chain; /* certificate chain */
176#else 178#else
177 char *x509_chain; /* certificate chain */ 179 char *x509_chain; /* certificate chain */
@@ -198,7 +200,7 @@ typedef struct pem_ctx_st
198 * IMPLEMENT_PEM_rw(...) or IMPLEMENT_PEM_rw_cb(...) 200 * IMPLEMENT_PEM_rw(...) or IMPLEMENT_PEM_rw_cb(...)
199 */ 201 */
200 202
201#ifdef NO_FP_API 203#ifdef OPENSSL_NO_FP_API
202 204
203#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/ 205#define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/
204#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/ 206#define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/
@@ -275,7 +277,7 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
275 277
276/* These are the same except they are for the declarations */ 278/* These are the same except they are for the declarations */
277 279
278#if defined(WIN16) || defined(NO_FP_API) 280#if defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_NO_FP_API)
279 281
280#define DECLARE_PEM_read_fp(name, type) /**/ 282#define DECLARE_PEM_read_fp(name, type) /**/
281#define DECLARE_PEM_write_fp(name, type) /**/ 283#define DECLARE_PEM_write_fp(name, type) /**/
@@ -295,7 +297,7 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
295 297
296#endif 298#endif
297 299
298#ifndef NO_BIO 300#ifndef OPENSSL_NO_BIO
299#define DECLARE_PEM_read_bio(name, type) \ 301#define DECLARE_PEM_read_bio(name, type) \
300 type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); 302 type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u);
301 303
@@ -483,11 +485,13 @@ int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);
483int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len, 485int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len,
484 pem_password_cb *callback,void *u); 486 pem_password_cb *callback,void *u);
485 487
486#ifndef NO_BIO 488#ifndef OPENSSL_NO_BIO
487int PEM_read_bio(BIO *bp, char **name, char **header, 489int PEM_read_bio(BIO *bp, char **name, char **header,
488 unsigned char **data,long *len); 490 unsigned char **data,long *len);
489int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data, 491int PEM_write_bio(BIO *bp,const char *name,char *hdr,unsigned char *data,
490 long len); 492 long len);
493int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp,
494 pem_password_cb *cb, void *u);
491char * PEM_ASN1_read_bio(char *(*d2i)(),const char *name,BIO *bp,char **x, 495char * PEM_ASN1_read_bio(char *(*d2i)(),const char *name,BIO *bp,char **x,
492 pem_password_cb *cb, void *u); 496 pem_password_cb *cb, void *u);
493int PEM_ASN1_write_bio(int (*i2d)(),const char *name,BIO *bp,char *x, 497int PEM_ASN1_write_bio(int (*i2d)(),const char *name,BIO *bp,char *x,
@@ -498,7 +502,7 @@ int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc,
498 unsigned char *kstr, int klen, pem_password_cb *cd, void *u); 502 unsigned char *kstr, int klen, pem_password_cb *cd, void *u);
499#endif 503#endif
500 504
501#ifndef WIN16 505#ifndef OPENSSL_SYS_WIN16
502int PEM_read(FILE *fp, char **name, char **header, 506int PEM_read(FILE *fp, char **name, char **header,
503 unsigned char **data,long *len); 507 unsigned char **data,long *len);
504int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); 508int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len);
@@ -524,8 +528,7 @@ void PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt);
524int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, 528int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
525 unsigned int *siglen, EVP_PKEY *pkey); 529 unsigned int *siglen, EVP_PKEY *pkey);
526 530
527void ERR_load_PEM_strings(void); 531int PEM_def_callback(char *buf, int num, int w, void *key);
528
529void PEM_proc_type(char *buf, int type); 532void PEM_proc_type(char *buf, int type);
530void PEM_dek_info(char *buf, const char *type, int len, char *str); 533void PEM_dek_info(char *buf, const char *type, int len, char *str);
531 534
@@ -550,7 +553,7 @@ DECLARE_PEM_rw(PKCS8, X509_SIG)
550 553
551DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO) 554DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO)
552 555
553#ifndef NO_RSA 556#ifndef OPENSSL_NO_RSA
554 557
555DECLARE_PEM_rw_cb(RSAPrivateKey, RSA) 558DECLARE_PEM_rw_cb(RSAPrivateKey, RSA)
556 559
@@ -559,7 +562,7 @@ DECLARE_PEM_rw(RSA_PUBKEY, RSA)
559 562
560#endif 563#endif
561 564
562#ifndef NO_DSA 565#ifndef OPENSSL_NO_DSA
563 566
564DECLARE_PEM_rw_cb(DSAPrivateKey, DSA) 567DECLARE_PEM_rw_cb(DSAPrivateKey, DSA)
565 568
@@ -569,7 +572,7 @@ DECLARE_PEM_rw(DSAparams, DSA)
569 572
570#endif 573#endif
571 574
572#ifndef NO_DH 575#ifndef OPENSSL_NO_DH
573 576
574DECLARE_PEM_rw(DHparams, DH) 577DECLARE_PEM_rw(DHparams, DH)
575 578
@@ -614,6 +617,7 @@ int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc,
614/* The following lines are auto generated by the script mkerr.pl. Any changes 617/* The following lines are auto generated by the script mkerr.pl. Any changes
615 * made after this point may be overwritten when the script is next run. 618 * made after this point may be overwritten when the script is next run.
616 */ 619 */
620void ERR_load_PEM_strings(void);
617 621
618/* Error codes for the PEM functions. */ 622/* Error codes for the PEM functions. */
619 623
@@ -664,4 +668,3 @@ int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc,
664} 668}
665#endif 669#endif
666#endif 670#endif
667