Make sure we get the definition of OPENSSL_NO_BIO.
[openssl.git] / crypto / pem / pem.h
index 188331f24829dfa565172b1bc0a7fc2da7d2a015..57a2cfe92cd1c7df540bbe8e16e05b23a715ebcf 100644 (file)
@@ -59,6 +59,7 @@
 #ifndef HEADER_PEM_H
 #define HEADER_PEM_H
 
+#include <openssl/e_os2.h>
 #ifndef OPENSSL_NO_BIO
 #include <openssl/bio.h>
 #endif
@@ -68,7 +69,6 @@
 #include <openssl/evp.h>
 #include <openssl/x509.h>
 #include <openssl/pem2.h>
-#include <openssl/e_os2.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -91,6 +91,9 @@ extern "C" {
 #define PEM_OBJ_DHPARAMS       17
 #define PEM_OBJ_DSAPARAMS      18
 #define PEM_OBJ_PRIV_RSA_PUBLIC        19
+#define PEM_OBJ_PRIV_ECDSA     20
+#define PEM_OBJ_PUB_ECDSA      21
+#define PEM_OBJ_ECPARAMETERS   22
 
 #define PEM_ERROR              30
 #define PEM_DEK_DES_CBC         40
@@ -110,6 +113,7 @@ extern "C" {
 
 #define PEM_STRING_X509_OLD    "X509 CERTIFICATE"
 #define PEM_STRING_X509                "CERTIFICATE"
+#define PEM_STRING_X509_PAIR   "CERTIFICATE PAIR"
 #define PEM_STRING_X509_TRUSTED        "TRUSTED CERTIFICATE"
 #define PEM_STRING_X509_REQ_OLD        "NEW CERTIFICATE REQUEST"
 #define PEM_STRING_X509_REQ    "CERTIFICATE REQUEST"
@@ -126,6 +130,9 @@ extern "C" {
 #define PEM_STRING_DHPARAMS    "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"
 
   /* Note that this structure is initialised by PEM_SealInit and cleaned up
      by PEM_SealFinal (at least for now) */
@@ -149,7 +156,7 @@ typedef struct pem_recip_st
 
        int cipher;
        int key_enc;
-       char iv[8];
+       /*      char iv[8]; unused and wrong size */
        } PEM_USER;
 
 typedef struct pem_ctx_st
@@ -165,7 +172,8 @@ typedef struct pem_ctx_st
 
        struct  {
                int cipher;
-               unsigned char iv[8];
+       /* unused, and wrong size
+          unsigned char iv[8]; */
                } DEK_info;
                
        PEM_USER *originator;
@@ -187,7 +195,8 @@ typedef struct pem_ctx_st
        EVP_CIPHER *dec;        /* date encryption cipher */
        int key_len;            /* key length */
        unsigned char *key;     /* key */
-       unsigned char iv[8];    /* the iv */
+       /* unused, and wrong size
+          unsigned char iv[8]; */
 
        
        int  data_enc;          /* is the data encrypted */
@@ -528,8 +537,6 @@ void    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);
 
-void   ERR_load_PEM_strings(void);
-
 int    PEM_def_callback(char *buf, int num, int w, void *key);
 void   PEM_proc_type(char *buf, int type);
 void   PEM_dek_info(char *buf, const char *type, int len, char *str);
@@ -542,6 +549,8 @@ DECLARE_PEM_rw(X509, X509)
 
 DECLARE_PEM_rw(X509_AUX, X509)
 
+DECLARE_PEM_rw(X509_CERT_PAIR, X509_CERT_PAIR)
+
 DECLARE_PEM_rw(X509_REQ, X509_REQ)
 DECLARE_PEM_write(X509_REQ_NEW, X509_REQ)
 
@@ -574,6 +583,12 @@ DECLARE_PEM_rw(DSAparams, DSA)
 
 #endif
 
+#ifndef OPENSSL_NO_EC
+DECLARE_PEM_rw(ECPKParameters, EC_GROUP)
+DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY)
+DECLARE_PEM_rw(EC_PUBKEY, EC_KEY)
+#endif
+
 #ifndef OPENSSL_NO_DH
 
 DECLARE_PEM_rw(DHparams, DH)