Constification.
authorBen Laurie <ben@links.org>
Tue, 10 Sep 2013 16:58:44 +0000 (17:58 +0100)
committerBen Laurie <ben@links.org>
Tue, 10 Sep 2013 17:04:08 +0000 (18:04 +0100)
crypto/pem/pem.h
crypto/pem/pem_lib.c

index 01dcde71d262886852057691fdad9c5d7ef136e1..5fb903e60f68b4b4c272f10f1ac50a9abae32ef1 100644 (file)
@@ -411,8 +411,8 @@ int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len,
 #ifndef OPENSSL_NO_BIO
 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_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,
@@ -428,7 +428,8 @@ int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc,
 
 int    PEM_read(FILE *fp, char **name, char **header,
                unsigned char **data,long *len);
-int    PEM_write(FILE *fp,char *name,char *hdr,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,
index 9e551d1795f913e1afe65bcce4b50af809d27c9f..5e41d85a6ab539729879cbde9b2174a2e92c47f2 100644 (file)
@@ -576,8 +576,8 @@ static int load_iv(char **fromp, unsigned char *to, int num)
        }
 
 #ifndef OPENSSL_NO_FP_API
-int PEM_write(FILE *fp, char *name, char *header, unsigned char *data,
-            long len)
+int PEM_write(FILE *fp, const char *name, const char *header,
+             const unsigned char *data, long len)
         {
         BIO *b;
         int ret;
@@ -594,8 +594,8 @@ int PEM_write(FILE *fp, char *name, char *header, unsigned char *data,
         }
 #endif
 
-int PEM_write_bio(BIO *bp, const char *name, char *header, unsigned char *data,
-            long len)
+int PEM_write_bio(BIO *bp, const char *name, const char *header,
+                 const unsigned char *data, long len)
        {
        int nlen,n,i,j,outl;
        unsigned char *buf = NULL;