Various Win32 fixes. Change args in do_ms.bat to put platform last. Fix
[openssl.git] / crypto / pem / pem_lib.c
index 9e646023e67f3043b24ea5a0a84d091928cd010e..24464308cd22cfe444023f810cb073c30b96b317 100644 (file)
@@ -72,18 +72,8 @@ const char *PEM_version="PEM" OPENSSL_VERSION_PTEXT;
 
 #define MIN_LENGTH     4
 
-/* PEMerr(PEM_F_PEM_WRITE_BIO,ERR_R_MALLOC_FAILURE);
- * PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);
- */
-
-#ifndef NOPROTO
 static int def_callback(char *buf, int num, int w);
 static int load_iv(unsigned char **fromp,unsigned char *to, int num);
-#else
-static int def_callback();
-static int load_iv();
-#endif
-
 static int def_callback(char *buf, int num, int w)
        {
 #ifdef NO_FP_API
@@ -159,7 +149,7 @@ void PEM_dek_info(char *buf, const char *type, int len, char *str)
 
 #ifndef NO_FP_API
 char *PEM_ASN1_read(char *(*d2i)(), const char *name, FILE *fp, char **x,
-            int (*cb)())
+            pem_password_cb *cb)
        {
         BIO *b;
         char *ret;
@@ -177,7 +167,7 @@ char *PEM_ASN1_read(char *(*d2i)(), const char *name, FILE *fp, char **x,
 #endif
 
 char *PEM_ASN1_read_bio(char *(*d2i)(), const char *name, BIO *bp, char **x,
-            int (*cb)())
+            pem_password_cb *cb)
        {
        EVP_CIPHER_INFO cipher;
        char *nm=NULL,*header=NULL;
@@ -227,7 +217,7 @@ err:
 #ifndef NO_FP_API
 int PEM_ASN1_write(int (*i2d)(), const char *name, FILE *fp, char *x,
             const EVP_CIPHER *enc, unsigned char *kstr, int klen,
-            int (*callback)())
+            pem_password_cb *callback)
         {
         BIO *b;
         int ret;
@@ -246,7 +236,7 @@ int PEM_ASN1_write(int (*i2d)(), const char *name, FILE *fp, char *x,
 
 int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x,
             const EVP_CIPHER *enc, unsigned char *kstr, int klen,
-            int (*callback)())
+            pem_password_cb *callback)
        {
        EVP_CIPHER_CTX ctx;
        int dsize=0,i,j,ret=0;
@@ -335,7 +325,7 @@ err:
        }
 
 int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,
-            int (*callback)())
+            pem_password_cb *callback)
        {
        int i,j,o,klen;
        long len;