Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
pem.h File Reference
#include <openssl/e_os2.h>
#include <openssl/bio.h>
#include <openssl/safestack.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/pemerr.h>
#include <openssl/symhacks.h>
+ Include dependency graph for pem.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PEM_BUFSIZE   1024
 
#define PEM_STRING_X509_OLD   "X509 CERTIFICATE"
 
#define PEM_STRING_X509   "CERTIFICATE"
 
#define PEM_STRING_X509_TRUSTED   "TRUSTED CERTIFICATE"
 
#define PEM_STRING_X509_REQ_OLD   "NEW CERTIFICATE REQUEST"
 
#define PEM_STRING_X509_REQ   "CERTIFICATE REQUEST"
 
#define PEM_STRING_X509_CRL   "X509 CRL"
 
#define PEM_STRING_EVP_PKEY   "ANY PRIVATE KEY"
 
#define PEM_STRING_PUBLIC   "PUBLIC KEY"
 
#define PEM_STRING_RSA   "RSA PRIVATE KEY"
 
#define PEM_STRING_RSA_PUBLIC   "RSA PUBLIC KEY"
 
#define PEM_STRING_DSA   "DSA PRIVATE KEY"
 
#define PEM_STRING_DSA_PUBLIC   "DSA PUBLIC KEY"
 
#define PEM_STRING_PKCS7   "PKCS7"
 
#define PEM_STRING_PKCS7_SIGNED   "PKCS #7 SIGNED DATA"
 
#define PEM_STRING_PKCS8   "ENCRYPTED PRIVATE KEY"
 
#define PEM_STRING_PKCS8INF   "PRIVATE KEY"
 
#define PEM_STRING_DHPARAMS   "DH PARAMETERS"
 
#define PEM_STRING_DHXPARAMS   "X9.42 DH PARAMETERS"
 
#define PEM_STRING_SSL_SESSION   "SSL SESSION PARAMETERS"
 
#define PEM_STRING_DSAPARAMS   "DSA PARAMETERS"
 
#define PEM_STRING_ECDSA_PUBLIC   "ECDSA PUBLIC KEY"
 
#define PEM_STRING_ECPARAMETERS   "EC PARAMETERS"
 
#define PEM_STRING_ECPRIVATEKEY   "EC PRIVATE KEY"
 
#define PEM_STRING_PARAMETERS   "PARAMETERS"
 
#define PEM_STRING_CMS   "CMS"
 
#define PEM_TYPE_ENCRYPTED   10
 
#define PEM_TYPE_MIC_ONLY   20
 
#define PEM_TYPE_MIC_CLEAR   30
 
#define PEM_TYPE_CLEAR   40
 
#define IMPLEMENT_PEM_read_fp(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_fp(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1)
 
#define IMPLEMENT_PEM_read_bio(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_bio(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_const(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_cb(name, type, str, asn1)
 
#define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1)
 
#define IMPLEMENT_PEM_read(name, type, str, asn1)
 
#define IMPLEMENT_PEM_rw(name, type, str, asn1)
 
#define IMPLEMENT_PEM_rw_const(name, type, str, asn1)
 
#define IMPLEMENT_PEM_rw_cb(name, type, str, asn1)
 
#define DECLARE_PEM_read_fp(name, type)    type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u);
 
#define DECLARE_PEM_write_fp(name, type)    int PEM_write_##name(FILE *fp, type *x);
 
#define DECLARE_PEM_write_fp_const(name, type)    int PEM_write_##name(FILE *fp, const type *x);
 
#define DECLARE_PEM_write_cb_fp(name, type)
 
#define DECLARE_PEM_read_bio(name, type)    type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u);
 
#define DECLARE_PEM_write_bio(name, type)    int PEM_write_bio_##name(BIO *bp, type *x);
 
#define DECLARE_PEM_write_bio_const(name, type)    int PEM_write_bio_##name(BIO *bp, const type *x);
 
#define DECLARE_PEM_write_cb_bio(name, type)
 
#define DECLARE_PEM_write(name, type)
 
#define DECLARE_PEM_write_const(name, type)
 
#define DECLARE_PEM_write_cb(name, type)
 
#define DECLARE_PEM_read(name, type)
 
#define DECLARE_PEM_rw(name, type)
 
#define DECLARE_PEM_rw_const(name, type)
 
#define DECLARE_PEM_rw_cb(name, type)
 
#define PEM_FLAG_SECURE   0x1
 
#define PEM_FLAG_EAY_COMPATIBLE   0x2
 
#define PEM_FLAG_ONLY_B64   0x4
 

Typedefs

typedef int pem_password_cb(char *buf, int size, int rwflag, void *userdata)
 

Functions

int PEM_get_EVP_CIPHER_INFO (char *header, EVP_CIPHER_INFO *cipher)
 
int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data, long *len, pem_password_cb *callback, void *u)
 
int PEM_read_bio (BIO *bp, char **name, char **header, unsigned char **data, long *len)
 
int PEM_read_bio_ex (BIO *bp, char **name, char **header, unsigned char **data, long *len, unsigned int flags)
 
int PEM_bytes_read_bio_secmem (unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp, pem_password_cb *cb, void *u)
 
int PEM_write_bio (BIO *bp, const char *name, const char *hdr, const 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 (d2i_of_void *d2i, const char *name, BIO *bp, void **x, pem_password_cb *cb, void *u)
 
int PEM_ASN1_write_bio (i2d_of_void *i2d, const char *name, BIO *bp, void *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u)
 
 STACK_OF (X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp
 
int PEM_X509_INFO_write_bio (BIO *bp, X509_INFO *xi, EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cd, void *u)
 
int PEM_read (FILE *fp, char **name, char **header, unsigned char **data, long *len)
 
int PEM_write (FILE *fp, const char *name, const char *hdr, const unsigned char *data, long len)
 
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, void *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *callback, void *u)
 
int PEM_SignInit (EVP_MD_CTX *ctx, EVP_MD *type)
 
int PEM_SignUpdate (EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt)
 
int PEM_SignFinal (EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY *pkey)
 
int PEM_def_callback (char *buf, int num, int rwflag, void *userdata)
 
void PEM_proc_type (char *buf, int type)
 
void PEM_dek_info (char *buf, const char *type, int len, char *str)
 
 DECLARE_PEM_rw (X509, X509) DECLARE_PEM_rw(X509_AUX
 
X509 DECLARE_PEM_rw (X509_REQ, X509_REQ) DECLARE_PEM_write(X509_REQ_NEW
 
X509 X509_REQ DECLARE_PEM_rw (X509_CRL, X509_CRL) DECLARE_PEM_rw(PKCS7
 
X509 X509_REQ PKCS7 DECLARE_PEM_rw (NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE) DECLARE_PEM_rw(PKCS8
 
X509 X509_REQ PKCS7 X509_SIG DECLARE_PEM_rw (PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO) DECLARE_PEM_rw_cb(RSAPrivateKey
 
X509 X509_REQ PKCS7 X509_SIG RSA DECLARE_PEM_rw_const (RSAPublicKey, RSA) DECLARE_PEM_rw(RSA_PUBKEY
 
X509 X509_REQ PKCS7 X509_SIG RSA RSA DECLARE_PEM_rw_cb (DSAPrivateKey, DSA) DECLARE_PEM_rw(DSA_PUBKEY
 
X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA DECLARE_PEM_rw_const (DSAparams, DSA) DECLARE_PEM_rw_const(ECPKParameters
 
X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA EC_GROUP DECLARE_PEM_rw_cb (ECPrivateKey, EC_KEY) DECLARE_PEM_rw(EC_PUBKEY
 
X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA EC_GROUP EC_KEY DECLARE_PEM_rw_const (DHparams, DH) DECLARE_PEM_write_const(DHxparams
 
X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA EC_GROUP EC_KEY DH DECLARE_PEM_rw_cb (PrivateKey, EVP_PKEY) DECLARE_PEM_rw(PUBKEY
 
X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA EC_GROUP EC_KEY DH EVP_PKEY int PEM_write_bio_PrivateKey_traditional (BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u)
 
int PEM_write_bio_PKCS8PrivateKey_nid (BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u)
 
int PEM_write_bio_PKCS8PrivateKey (BIO *, EVP_PKEY *, const EVP_CIPHER *, char *, int, pem_password_cb *, void *)
 
int i2d_PKCS8PrivateKey_bio (BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, char *kstr, int klen, pem_password_cb *cb, void *u)
 
int i2d_PKCS8PrivateKey_nid_bio (BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u)
 
EVP_PKEYd2i_PKCS8PrivateKey_bio (BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u)
 
int i2d_PKCS8PrivateKey_fp (FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, char *kstr, int klen, pem_password_cb *cb, void *u)
 
int i2d_PKCS8PrivateKey_nid_fp (FILE *fp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u)
 
int PEM_write_PKCS8PrivateKey_nid (FILE *fp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u)
 
EVP_PKEYd2i_PKCS8PrivateKey_fp (FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u)
 
int PEM_write_PKCS8PrivateKey (FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, char *kstr, int klen, pem_password_cb *cd, void *u)
 
EVP_PKEYPEM_read_bio_Parameters (BIO *bp, EVP_PKEY **x)
 
int PEM_write_bio_Parameters (BIO *bp, EVP_PKEY *x)
 
EVP_PKEYb2i_PrivateKey (const unsigned char **in, long length)
 
EVP_PKEYb2i_PublicKey (const unsigned char **in, long length)
 
EVP_PKEYb2i_PrivateKey_bio (BIO *in)
 
EVP_PKEYb2i_PublicKey_bio (BIO *in)
 
int i2b_PrivateKey_bio (BIO *out, EVP_PKEY *pk)
 
int i2b_PublicKey_bio (BIO *out, EVP_PKEY *pk)
 
EVP_PKEYb2i_PVK_bio (BIO *in, pem_password_cb *cb, void *u)
 
int i2b_PVK_bio (BIO *out, EVP_PKEY *pk, int enclevel, pem_password_cb *cb, void *u)
 

Variables

pem_password_cbcb
 
pem_password_cb void * u
 

Macro Definition Documentation

◆ DECLARE_PEM_read

#define DECLARE_PEM_read ( name,
type )
Value:
DECLARE_PEM_read_fp(name, type)
#define DECLARE_PEM_read_bio(name, type)
Definition pem.h:197
const ASN1_OBJECT int type
Definition x509.h:923

Definition at line 219 of file pem.h.

◆ DECLARE_PEM_read_bio

#define DECLARE_PEM_read_bio ( name,
type )    type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u);

Definition at line 197 of file pem.h.

◆ DECLARE_PEM_read_fp

#define DECLARE_PEM_read_fp ( name,
type )    type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u);

Definition at line 182 of file pem.h.

◆ DECLARE_PEM_rw

#define DECLARE_PEM_rw ( name,
type )
Value:
DECLARE_PEM_write(name, type)
#define DECLARE_PEM_read(name, type)
Definition pem.h:219

Definition at line 222 of file pem.h.

◆ DECLARE_PEM_rw_cb

#define DECLARE_PEM_rw_cb ( name,
type )
Value:
DECLARE_PEM_write_cb(name, type)

Definition at line 228 of file pem.h.

◆ DECLARE_PEM_rw_const

#define DECLARE_PEM_rw_const ( name,
type )
Value:
DECLARE_PEM_write_const(name, type)

Definition at line 225 of file pem.h.

◆ DECLARE_PEM_write

#define DECLARE_PEM_write ( name,
type )
Value:
DECLARE_PEM_write_fp(name, type)
#define DECLARE_PEM_write_bio(name, type)
Definition pem.h:200

Definition at line 210 of file pem.h.

◆ DECLARE_PEM_write_bio

#define DECLARE_PEM_write_bio ( name,
type )    int PEM_write_bio_##name(BIO *bp, type *x);

Definition at line 200 of file pem.h.

◆ DECLARE_PEM_write_bio_const

#define DECLARE_PEM_write_bio_const ( name,
type )    int PEM_write_bio_##name(BIO *bp, const type *x);

Definition at line 203 of file pem.h.

◆ DECLARE_PEM_write_cb

#define DECLARE_PEM_write_cb ( name,
type )
Value:
DECLARE_PEM_write_cb_fp(name, type)
#define DECLARE_PEM_write_cb_bio(name, type)
Definition pem.h:206

Definition at line 216 of file pem.h.

◆ DECLARE_PEM_write_cb_bio

#define DECLARE_PEM_write_cb_bio ( name,
type )
Value:
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
const EC_POINT BIGNUM * x
Definition ec.h:545
struct evp_cipher_st EVP_CIPHER
Definition ossl_typ.h:89
struct bio_st BIO
Definition ossl_typ.h:79
int pem_password_cb(char *buf, int size, int rwflag, void *userdata)
Definition pem.h:231
pem_password_cb * cb
Definition pem.h:259
pem_password_cb void * u
Definition pem.h:259

Definition at line 206 of file pem.h.

◆ DECLARE_PEM_write_cb_fp

#define DECLARE_PEM_write_cb_fp ( name,
type )
Value:
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
unsigned char *kstr, int klen, pem_password_cb *cb, void *u);

Definition at line 191 of file pem.h.

◆ DECLARE_PEM_write_const

#define DECLARE_PEM_write_const ( name,
type )
Value:
DECLARE_PEM_write_fp_const(name, type)
#define DECLARE_PEM_write_bio_const(name, type)
Definition pem.h:203

Definition at line 213 of file pem.h.

◆ DECLARE_PEM_write_fp

#define DECLARE_PEM_write_fp ( name,
type )    int PEM_write_##name(FILE *fp, type *x);

Definition at line 185 of file pem.h.

◆ DECLARE_PEM_write_fp_const

#define DECLARE_PEM_write_fp_const ( name,
type )    int PEM_write_##name(FILE *fp, const type *x);

Definition at line 188 of file pem.h.

◆ IMPLEMENT_PEM_read

#define IMPLEMENT_PEM_read ( name,
type,
str,
asn1 )
Value:
IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
IMPLEMENT_PEM_read_fp(name, type, str, asn1)
#define IMPLEMENT_PEM_read_bio(name, type, str, asn1)
Definition pem.h:108

Definition at line 156 of file pem.h.

◆ IMPLEMENT_PEM_read_bio

#define IMPLEMENT_PEM_read_bio ( name,
type,
str,
asn1 )
Value:
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\
{ \
return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \
}
void * PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, pem_password_cb *cb, void *u)

Definition at line 108 of file pem.h.

◆ IMPLEMENT_PEM_read_fp

#define IMPLEMENT_PEM_read_fp ( name,
type,
str,
asn1 )
Value:
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\
{ \
return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \
}
void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, pem_password_cb *cb, void *u)

Definition at line 72 of file pem.h.

◆ IMPLEMENT_PEM_rw

#define IMPLEMENT_PEM_rw ( name,
type,
str,
asn1 )
Value:
IMPLEMENT_PEM_read(name, type, str, asn1) \
IMPLEMENT_PEM_write(name, type, str, asn1)
#define IMPLEMENT_PEM_read(name, type, str, asn1)
Definition pem.h:156

Definition at line 160 of file pem.h.

◆ IMPLEMENT_PEM_rw_cb

#define IMPLEMENT_PEM_rw_cb ( name,
type,
str,
asn1 )
Value:
IMPLEMENT_PEM_read(name, type, str, asn1) \
IMPLEMENT_PEM_write_cb(name, type, str, asn1)

Definition at line 168 of file pem.h.

◆ IMPLEMENT_PEM_rw_const

#define IMPLEMENT_PEM_rw_const ( name,
type,
str,
asn1 )
Value:
IMPLEMENT_PEM_read(name, type, str, asn1) \
IMPLEMENT_PEM_write_const(name, type, str, asn1)

Definition at line 164 of file pem.h.

◆ IMPLEMENT_PEM_write

#define IMPLEMENT_PEM_write ( name,
type,
str,
asn1 )
Value:
IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
IMPLEMENT_PEM_write_fp(name, type, str, asn1)
#define IMPLEMENT_PEM_write_bio(name, type, str, asn1)
Definition pem.h:114

Definition at line 140 of file pem.h.

◆ IMPLEMENT_PEM_write_bio

#define IMPLEMENT_PEM_write_bio ( name,
type,
str,
asn1 )
Value:
int PEM_write_bio_##name(BIO *bp, type *x) \
{ \
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL); \
}
int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u)

Definition at line 114 of file pem.h.

◆ IMPLEMENT_PEM_write_bio_const

#define IMPLEMENT_PEM_write_bio_const ( name,
type,
str,
asn1 )
Value:
int PEM_write_bio_##name(BIO *bp, const type *x) \
{ \
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,NULL,NULL,0,NULL,NULL); \
}

Definition at line 120 of file pem.h.

◆ IMPLEMENT_PEM_write_cb

#define IMPLEMENT_PEM_write_cb ( name,
type,
str,
asn1 )
Value:
IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1)
#define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1)
Definition pem.h:126

Definition at line 148 of file pem.h.

◆ IMPLEMENT_PEM_write_cb_bio

#define IMPLEMENT_PEM_write_cb_bio ( name,
type,
str,
asn1 )
Value:
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \
{ \
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u); \
}

Definition at line 126 of file pem.h.

◆ IMPLEMENT_PEM_write_cb_bio_const

#define IMPLEMENT_PEM_write_cb_bio_const ( name,
type,
str,
asn1 )
Value:
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \
{ \
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,enc,kstr,klen,cb,u); \
}

Definition at line 133 of file pem.h.

◆ IMPLEMENT_PEM_write_cb_const

#define IMPLEMENT_PEM_write_cb_const ( name,
type,
str,
asn1 )
Value:
IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1)
#define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1)
Definition pem.h:133

Definition at line 152 of file pem.h.

◆ IMPLEMENT_PEM_write_cb_fp

#define IMPLEMENT_PEM_write_cb_fp ( name,
type,
str,
asn1 )
Value:
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
unsigned char *kstr, int klen, pem_password_cb *cb, \
void *u) \
{ \
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \
}
int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, void *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *callback, void *u)

Definition at line 90 of file pem.h.

◆ IMPLEMENT_PEM_write_cb_fp_const

#define IMPLEMENT_PEM_write_cb_fp_const ( name,
type,
str,
asn1 )
Value:
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
unsigned char *kstr, int klen, pem_password_cb *cb, \
void *u) \
{ \
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \
}

Definition at line 98 of file pem.h.

◆ IMPLEMENT_PEM_write_const

#define IMPLEMENT_PEM_write_const ( name,
type,
str,
asn1 )
Value:
IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
IMPLEMENT_PEM_write_fp_const(name, type, str, asn1)
#define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1)
Definition pem.h:120

Definition at line 144 of file pem.h.

◆ IMPLEMENT_PEM_write_fp

#define IMPLEMENT_PEM_write_fp ( name,
type,
str,
asn1 )
Value:
int PEM_write_##name(FILE *fp, type *x) \
{ \
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \
}

Definition at line 78 of file pem.h.

◆ IMPLEMENT_PEM_write_fp_const

#define IMPLEMENT_PEM_write_fp_const ( name,
type,
str,
asn1 )
Value:
int PEM_write_##name(FILE *fp, const type *x) \
{ \
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \
}

Definition at line 84 of file pem.h.

◆ PEM_BUFSIZE

#define PEM_BUFSIZE   1024

Definition at line 24 of file pem.h.

◆ PEM_FLAG_EAY_COMPATIBLE

#define PEM_FLAG_EAY_COMPATIBLE   0x2

Definition at line 240 of file pem.h.

◆ PEM_FLAG_ONLY_B64

#define PEM_FLAG_ONLY_B64   0x4

Definition at line 241 of file pem.h.

◆ PEM_FLAG_SECURE

#define PEM_FLAG_SECURE   0x1

Definition at line 239 of file pem.h.

◆ PEM_STRING_CMS

#define PEM_STRING_CMS   "CMS"

Definition at line 50 of file pem.h.

◆ PEM_STRING_DHPARAMS

#define PEM_STRING_DHPARAMS   "DH PARAMETERS"

Definition at line 42 of file pem.h.

◆ PEM_STRING_DHXPARAMS

#define PEM_STRING_DHXPARAMS   "X9.42 DH PARAMETERS"

Definition at line 43 of file pem.h.

◆ PEM_STRING_DSA

#define PEM_STRING_DSA   "DSA PRIVATE KEY"

Definition at line 36 of file pem.h.

◆ PEM_STRING_DSA_PUBLIC

#define PEM_STRING_DSA_PUBLIC   "DSA PUBLIC KEY"

Definition at line 37 of file pem.h.

◆ PEM_STRING_DSAPARAMS

#define PEM_STRING_DSAPARAMS   "DSA PARAMETERS"

Definition at line 45 of file pem.h.

◆ PEM_STRING_ECDSA_PUBLIC

#define PEM_STRING_ECDSA_PUBLIC   "ECDSA PUBLIC KEY"

Definition at line 46 of file pem.h.

◆ PEM_STRING_ECPARAMETERS

#define PEM_STRING_ECPARAMETERS   "EC PARAMETERS"

Definition at line 47 of file pem.h.

◆ PEM_STRING_ECPRIVATEKEY

#define PEM_STRING_ECPRIVATEKEY   "EC PRIVATE KEY"

Definition at line 48 of file pem.h.

◆ PEM_STRING_EVP_PKEY

#define PEM_STRING_EVP_PKEY   "ANY PRIVATE KEY"

Definition at line 32 of file pem.h.

◆ PEM_STRING_PARAMETERS

#define PEM_STRING_PARAMETERS   "PARAMETERS"

Definition at line 49 of file pem.h.

◆ PEM_STRING_PKCS7

#define PEM_STRING_PKCS7   "PKCS7"

Definition at line 38 of file pem.h.

◆ PEM_STRING_PKCS7_SIGNED

#define PEM_STRING_PKCS7_SIGNED   "PKCS #7 SIGNED DATA"

Definition at line 39 of file pem.h.

◆ PEM_STRING_PKCS8

#define PEM_STRING_PKCS8   "ENCRYPTED PRIVATE KEY"

Definition at line 40 of file pem.h.

◆ PEM_STRING_PKCS8INF

#define PEM_STRING_PKCS8INF   "PRIVATE KEY"

Definition at line 41 of file pem.h.

◆ PEM_STRING_PUBLIC

#define PEM_STRING_PUBLIC   "PUBLIC KEY"

Definition at line 33 of file pem.h.

◆ PEM_STRING_RSA

#define PEM_STRING_RSA   "RSA PRIVATE KEY"

Definition at line 34 of file pem.h.

◆ PEM_STRING_RSA_PUBLIC

#define PEM_STRING_RSA_PUBLIC   "RSA PUBLIC KEY"

Definition at line 35 of file pem.h.

◆ PEM_STRING_SSL_SESSION

#define PEM_STRING_SSL_SESSION   "SSL SESSION PARAMETERS"

Definition at line 44 of file pem.h.

◆ PEM_STRING_X509

#define PEM_STRING_X509   "CERTIFICATE"

Definition at line 27 of file pem.h.

◆ PEM_STRING_X509_CRL

#define PEM_STRING_X509_CRL   "X509 CRL"

Definition at line 31 of file pem.h.

◆ PEM_STRING_X509_OLD

#define PEM_STRING_X509_OLD   "X509 CERTIFICATE"

Definition at line 26 of file pem.h.

◆ PEM_STRING_X509_REQ

#define PEM_STRING_X509_REQ   "CERTIFICATE REQUEST"

Definition at line 30 of file pem.h.

◆ PEM_STRING_X509_REQ_OLD

#define PEM_STRING_X509_REQ_OLD   "NEW CERTIFICATE REQUEST"

Definition at line 29 of file pem.h.

◆ PEM_STRING_X509_TRUSTED

#define PEM_STRING_X509_TRUSTED   "TRUSTED CERTIFICATE"

Definition at line 28 of file pem.h.

◆ PEM_TYPE_CLEAR

#define PEM_TYPE_CLEAR   40

Definition at line 55 of file pem.h.

◆ PEM_TYPE_ENCRYPTED

#define PEM_TYPE_ENCRYPTED   10

Definition at line 52 of file pem.h.

◆ PEM_TYPE_MIC_CLEAR

#define PEM_TYPE_MIC_CLEAR   30

Definition at line 54 of file pem.h.

◆ PEM_TYPE_MIC_ONLY

#define PEM_TYPE_MIC_ONLY   20

Definition at line 53 of file pem.h.

Typedef Documentation

◆ pem_password_cb

typedef int pem_password_cb(char *buf, int size, int rwflag, void *userdata)

Definition at line 231 of file pem.h.

Function Documentation

◆ b2i_PrivateKey()

EVP_PKEY * b2i_PrivateKey ( const unsigned char ** in,
long length )

◆ b2i_PrivateKey_bio()

EVP_PKEY * b2i_PrivateKey_bio ( BIO * in)

◆ b2i_PublicKey()

EVP_PKEY * b2i_PublicKey ( const unsigned char ** in,
long length )

◆ b2i_PublicKey_bio()

EVP_PKEY * b2i_PublicKey_bio ( BIO * in)

◆ b2i_PVK_bio()

EVP_PKEY * b2i_PVK_bio ( BIO * in,
pem_password_cb * cb,
void * u )

◆ d2i_PKCS8PrivateKey_bio()

EVP_PKEY * d2i_PKCS8PrivateKey_bio ( BIO * bp,
EVP_PKEY ** x,
pem_password_cb * cb,
void * u )

◆ d2i_PKCS8PrivateKey_fp()

EVP_PKEY * d2i_PKCS8PrivateKey_fp ( FILE * fp,
EVP_PKEY ** x,
pem_password_cb * cb,
void * u )

◆ DECLARE_PEM_rw() [1/5]

◆ DECLARE_PEM_rw() [2/5]

◆ DECLARE_PEM_rw() [3/5]

DECLARE_PEM_rw ( X509 ,
X509  )

◆ DECLARE_PEM_rw() [4/5]

X509 X509_REQ DECLARE_PEM_rw ( X509_CRL ,
X509_CRL  )

◆ DECLARE_PEM_rw() [5/5]

X509 DECLARE_PEM_rw ( X509_REQ ,
X509_REQ  )

◆ DECLARE_PEM_rw_cb() [1/3]

X509 X509_REQ PKCS7 X509_SIG RSA RSA DECLARE_PEM_rw_cb ( DSAPrivateKey ,
DSA  )

◆ DECLARE_PEM_rw_cb() [2/3]

X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA EC_GROUP DECLARE_PEM_rw_cb ( ECPrivateKey ,
EC_KEY  )

◆ DECLARE_PEM_rw_cb() [3/3]

X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA EC_GROUP EC_KEY DH DECLARE_PEM_rw_cb ( PrivateKey ,
EVP_PKEY  )

◆ DECLARE_PEM_rw_const() [1/3]

X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA EC_GROUP EC_KEY DECLARE_PEM_rw_const ( DHparams ,
DH  )

◆ DECLARE_PEM_rw_const() [2/3]

X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA DECLARE_PEM_rw_const ( DSAparams ,
DSA  )

◆ DECLARE_PEM_rw_const() [3/3]

X509 X509_REQ PKCS7 X509_SIG RSA DECLARE_PEM_rw_const ( RSAPublicKey ,
RSA  )

◆ i2b_PrivateKey_bio()

int i2b_PrivateKey_bio ( BIO * out,
EVP_PKEY * pk )

◆ i2b_PublicKey_bio()

int i2b_PublicKey_bio ( BIO * out,
EVP_PKEY * pk )

◆ i2b_PVK_bio()

int i2b_PVK_bio ( BIO * out,
EVP_PKEY * pk,
int enclevel,
pem_password_cb * cb,
void * u )

◆ i2d_PKCS8PrivateKey_bio()

int i2d_PKCS8PrivateKey_bio ( BIO * bp,
EVP_PKEY * x,
const EVP_CIPHER * enc,
char * kstr,
int klen,
pem_password_cb * cb,
void * u )

◆ i2d_PKCS8PrivateKey_fp()

int i2d_PKCS8PrivateKey_fp ( FILE * fp,
EVP_PKEY * x,
const EVP_CIPHER * enc,
char * kstr,
int klen,
pem_password_cb * cb,
void * u )

◆ i2d_PKCS8PrivateKey_nid_bio()

int i2d_PKCS8PrivateKey_nid_bio ( BIO * bp,
EVP_PKEY * x,
int nid,
char * kstr,
int klen,
pem_password_cb * cb,
void * u )

◆ i2d_PKCS8PrivateKey_nid_fp()

int i2d_PKCS8PrivateKey_nid_fp ( FILE * fp,
EVP_PKEY * x,
int nid,
char * kstr,
int klen,
pem_password_cb * cb,
void * u )

◆ PEM_ASN1_read()

void * PEM_ASN1_read ( d2i_of_void * d2i,
const char * name,
FILE * fp,
void ** x,
pem_password_cb * cb,
void * u )

◆ PEM_ASN1_read_bio()

void * PEM_ASN1_read_bio ( d2i_of_void * d2i,
const char * name,
BIO * bp,
void ** x,
pem_password_cb * cb,
void * u )

◆ PEM_ASN1_write()

int PEM_ASN1_write ( i2d_of_void * i2d,
const char * name,
FILE * fp,
void * x,
const EVP_CIPHER * enc,
unsigned char * kstr,
int klen,
pem_password_cb * callback,
void * u )

◆ PEM_ASN1_write_bio()

int PEM_ASN1_write_bio ( i2d_of_void * i2d,
const char * name,
BIO * bp,
void * x,
const EVP_CIPHER * enc,
unsigned char * kstr,
int klen,
pem_password_cb * cb,
void * u )

◆ PEM_bytes_read_bio()

int PEM_bytes_read_bio ( unsigned char ** pdata,
long * plen,
char ** pnm,
const char * name,
BIO * bp,
pem_password_cb * cb,
void * u )

◆ PEM_bytes_read_bio_secmem()

int PEM_bytes_read_bio_secmem ( unsigned char ** pdata,
long * plen,
char ** pnm,
const char * name,
BIO * bp,
pem_password_cb * cb,
void * u )

◆ PEM_def_callback()

int PEM_def_callback ( char * buf,
int num,
int rwflag,
void * userdata )

◆ PEM_dek_info()

void PEM_dek_info ( char * buf,
const char * type,
int len,
char * str )

◆ PEM_do_header()

int PEM_do_header ( EVP_CIPHER_INFO * cipher,
unsigned char * data,
long * len,
pem_password_cb * callback,
void * u )

◆ PEM_get_EVP_CIPHER_INFO()

int PEM_get_EVP_CIPHER_INFO ( char * header,
EVP_CIPHER_INFO * cipher )

◆ PEM_proc_type()

void PEM_proc_type ( char * buf,
int type )

◆ PEM_read()

int PEM_read ( FILE * fp,
char ** name,
char ** header,
unsigned char ** data,
long * len )

◆ PEM_read_bio()

int PEM_read_bio ( BIO * bp,
char ** name,
char ** header,
unsigned char ** data,
long * len )

◆ PEM_read_bio_ex()

int PEM_read_bio_ex ( BIO * bp,
char ** name,
char ** header,
unsigned char ** data,
long * len,
unsigned int flags )

◆ PEM_read_bio_Parameters()

EVP_PKEY * PEM_read_bio_Parameters ( BIO * bp,
EVP_PKEY ** x )

◆ PEM_SignFinal()

int PEM_SignFinal ( EVP_MD_CTX * ctx,
unsigned char * sigret,
unsigned int * siglen,
EVP_PKEY * pkey )

◆ PEM_SignInit()

int PEM_SignInit ( EVP_MD_CTX * ctx,
EVP_MD * type )

◆ PEM_SignUpdate()

int PEM_SignUpdate ( EVP_MD_CTX * ctx,
unsigned char * d,
unsigned int cnt )

◆ PEM_write()

int PEM_write ( FILE * fp,
const char * name,
const char * hdr,
const unsigned char * data,
long len )

◆ PEM_write_bio()

int PEM_write_bio ( BIO * bp,
const char * name,
const char * hdr,
const unsigned char * data,
long len )

◆ PEM_write_bio_Parameters()

int PEM_write_bio_Parameters ( BIO * bp,
EVP_PKEY * x )

◆ PEM_write_bio_PKCS8PrivateKey()

int PEM_write_bio_PKCS8PrivateKey ( BIO * ,
EVP_PKEY * ,
const EVP_CIPHER * ,
char * ,
int ,
pem_password_cb * ,
void *  )

◆ PEM_write_bio_PKCS8PrivateKey_nid()

int PEM_write_bio_PKCS8PrivateKey_nid ( BIO * bp,
EVP_PKEY * x,
int nid,
char * kstr,
int klen,
pem_password_cb * cb,
void * u )

◆ PEM_write_bio_PrivateKey_traditional()

X509 X509_REQ PKCS7 X509_SIG RSA RSA DSA EC_GROUP EC_KEY DH EVP_PKEY int PEM_write_bio_PrivateKey_traditional ( BIO * bp,
EVP_PKEY * x,
const EVP_CIPHER * enc,
unsigned char * kstr,
int klen,
pem_password_cb * cb,
void * u )

◆ PEM_write_PKCS8PrivateKey()

int PEM_write_PKCS8PrivateKey ( FILE * fp,
EVP_PKEY * x,
const EVP_CIPHER * enc,
char * kstr,
int klen,
pem_password_cb * cd,
void * u )

◆ PEM_write_PKCS8PrivateKey_nid()

int PEM_write_PKCS8PrivateKey_nid ( FILE * fp,
EVP_PKEY * x,
int nid,
char * kstr,
int klen,
pem_password_cb * cb,
void * u )

◆ PEM_X509_INFO_write_bio()

int PEM_X509_INFO_write_bio ( BIO * bp,
X509_INFO * xi,
EVP_CIPHER * enc,
unsigned char * kstr,
int klen,
pem_password_cb * cd,
void * u )

◆ STACK_OF()

STACK_OF ( X509_INFO )

Variable Documentation

◆ cb

Definition at line 259 of file pem.h.

◆ u

pem_password_cb void * u

Definition at line 259 of file pem.h.