PEM structures -- SSLeay 0.9.0b -- January 1999

NAME

PEM types and structures

SYNOPSIS

#include "pem.h"

DESCRIPTION

The following structures are used by the PEM library.

This is a subfield of the PEM_CTX structure:

typedef struct pem_recip_st
        {
        char *name;
        X509_NAME *dn;

        int cipher;
        int key_enc;
        char iv[8];
        } PEM_USER;

typedef struct pem_ctx_st
        {
        int type;               /* what type of object */

        struct  {
                int version;
                int mode;
                } proc_type;

        char *domain;

        struct  {
                int cipher;
                unsigned char iv[8];
                } DEK_info;

        PEM_USER *originator;

        int num_recipient;
        PEM_USER **recipient;

#ifdef HEADER_STACK_H
        STACK *x509_chain;      /* certificate chain */
#else
        char *x509_chain;       /* certificate chain */
#endif
        EVP_MD *md;             /* signature type */

        int md_enc;             /* is the md encrypted or not? */
        int md_len;             /* length of md_data */
        char *md_data;          /* message digest, could be pkey encrypted */

        EVP_CIPHER *dec;        /* date encryption cipher */
        int key_len;            /* key length */
        unsigned char *key;     /* key */
        unsigned char iv[8];    /* the iv */


        int  data_enc;          /* is the data encrypted */
        int data_len;
        unsigned char *data;
        } PEM_CTX;

typedef struct PEM_Encode_Seal_st
        {
        EVP_ENCODE_CTX encode;
        EVP_MD_CTX md;
        EVP_CIPHER_CTX cipher;
        } PEM_ENCODE_SEAL_CTX;