Add support for shared libraries with OS/2.
[oweals/openssl.git] / crypto / pem / pem.h
index 5c0a2013f25d4ac053853f2a70742a2224888926..3e8c37b25c8edbb78e2e67af5e25ef25c29a4e5a 100644 (file)
@@ -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
@@ -126,8 +129,12 @@ 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       "ECDSA PRIVATE KEY"
+#define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY"
+#define PEM_STRING_ECPARAMETERS "EC PARAMETERS"
 
-
+  /* Note that this structure is initialised by PEM_SealInit and cleaned up
+     by PEM_SealFinal (at least for now) */
 typedef struct PEM_Encode_Seal_st
        {
        EVP_ENCODE_CTX encode;
@@ -489,6 +496,8 @@ int PEM_read_bio(BIO *bp, char **name, char **header,
                unsigned char **data,long *len);
 int    PEM_write_bio(BIO *bp,const char *name,char *hdr,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);
 char * PEM_ASN1_read_bio(char *(*d2i)(),const char *name,BIO *bp,char **x,
                pem_password_cb *cb, void *u);
 int    PEM_ASN1_write_bio(int (*i2d)(),const char *name,BIO *bp,char *x,
@@ -525,8 +534,7 @@ 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);
 
@@ -570,6 +578,15 @@ DECLARE_PEM_rw(DSAparams, DSA)
 
 #endif
 
+#ifndef OPENSSL_NO_ECDSA
+DECLARE_PEM_rw_cb(ECDSAPrivateKey, ECDSA)
+DECLARE_PEM_rw(ECDSA_PUBKEY, ECDSA)
+#endif
+
+#ifndef OPENSSL_NO_EC
+DECLARE_PEM_rw(ECPKParameters, EC_GROUP)
+#endif
+
 #ifndef OPENSSL_NO_DH
 
 DECLARE_PEM_rw(DHparams, DH)
@@ -615,6 +632,7 @@ int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc,
 /* The following lines are auto generated by the script mkerr.pl. Any changes
  * made after this point may be overwritten when the script is next run.
  */
+void ERR_load_PEM_strings(void);
 
 /* Error codes for the PEM functions. */
 
@@ -665,4 +683,3 @@ int PEM_write_PKCS8PrivateKey(FILE *fp,EVP_PKEY *x,const EVP_CIPHER *enc,
 }
 #endif
 #endif
-