diff options
author | Ben Laurie <ben@openssl.org> | 1999-04-17 21:25:43 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-04-17 21:25:43 +0000 |
commit | e778802f53c8d47e96a6e4cbc776eb6e1d4c461a (patch) | |
tree | 719d4dd0fc69b355c6d8329af1f90b2c4f603548 /apps | |
parent | d77b3054cd87c2b13fa0169931f74b8e0dac5252 (diff) | |
download | openssl-e778802f53c8d47e96a6e4cbc776eb6e1d4c461a.tar.gz |
Massive constification.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/ca.c | 27 | ||||
-rw-r--r-- | apps/ciphers.c | 3 | ||||
-rw-r--r-- | apps/dgst.c | 4 | ||||
-rw-r--r-- | apps/dsa.c | 2 | ||||
-rw-r--r-- | apps/enc.c | 2 | ||||
-rw-r--r-- | apps/req.c | 2 | ||||
-rw-r--r-- | apps/rsa.c | 2 | ||||
-rw-r--r-- | apps/s_apps.h | 2 | ||||
-rw-r--r-- | apps/s_cb.c | 2 | ||||
-rw-r--r-- | apps/s_server.c | 2 | ||||
-rw-r--r-- | apps/x509.c | 13 |
11 files changed, 33 insertions, 28 deletions
@@ -168,17 +168,20 @@ static int index_name_cmp(char **a,char **b); static BIGNUM *load_serial(char *serialfile); static int save_serial(char *serialfile, BIGNUM *serial); static int certify(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509, - EVP_MD *dgst,STACK *policy,TXT_DB *db,BIGNUM *serial,char *startdate, - int days, int batch, char *ext_sect, LHASH *conf,int verbose); + const EVP_MD *dgst,STACK *policy,TXT_DB *db,BIGNUM *serial, + char *startdate,int days,int batch,char *ext_sect, + LHASH *conf,int verbose); static int certify_cert(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509, - EVP_MD *dgst,STACK *policy,TXT_DB *db,BIGNUM *serial,char *startdate, - int days,int batch,char *ext_sect, LHASH *conf,int verbose); + const EVP_MD *dgst,STACK *policy,TXT_DB *db, + BIGNUM *serial,char *startdate,int days,int batch, + char *ext_sect, LHASH *conf,int verbose); static int certify_spkac(X509 **xret, char *infile,EVP_PKEY *pkey,X509 *x509, - EVP_MD *dgst,STACK *policy,TXT_DB *db,BIGNUM *serial,char *startdate, - int days,char *ext_sect,LHASH *conf,int verbose); + const EVP_MD *dgst,STACK *policy,TXT_DB *db, + BIGNUM *serial,char *startdate,int days, + char *ext_sect,LHASH *conf,int verbose); static int fix_data(int nid, int *type); static void write_new_certificate(BIO *bp, X509 *x, int output_der); -static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, EVP_MD *dgst, +static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst, STACK *policy, TXT_DB *db, BIGNUM *serial, char *startdate, int days, int batch, int verbose, X509_REQ *req, char *ext_sect, LHASH *conf); @@ -257,7 +260,7 @@ char **argv; char **pp,*p,*f; int i,j; long l; - EVP_MD *dgst=NULL; + const EVP_MD *dgst=NULL; STACK *attribs=NULL; STACK *cert_sk=NULL; BIO *hex=NULL; @@ -1303,7 +1306,7 @@ X509 **xret; char *infile; EVP_PKEY *pkey; X509 *x509; -EVP_MD *dgst; +const EVP_MD *dgst; STACK *policy; TXT_DB *db; BIGNUM *serial; @@ -1374,7 +1377,7 @@ X509 **xret; char *infile; EVP_PKEY *pkey; X509 *x509; -EVP_MD *dgst; +const EVP_MD *dgst; STACK *policy; TXT_DB *db; BIGNUM *serial; @@ -1448,7 +1451,7 @@ static int do_body(xret,pkey,x509,dgst,policy,db,serial,startdate,days, X509 **xret; EVP_PKEY *pkey; X509 *x509; -EVP_MD *dgst; +const EVP_MD *dgst; STACK *policy; TXT_DB *db; BIGNUM *serial; @@ -1921,7 +1924,7 @@ X509 **xret; char *infile; EVP_PKEY *pkey; X509 *x509; -EVP_MD *dgst; +const EVP_MD *dgst; STACK *policy; TXT_DB *db; BIGNUM *serial; diff --git a/apps/ciphers.c b/apps/ciphers.c index a62c5b0e8a..146527790e 100644 --- a/apps/ciphers.c +++ b/apps/ciphers.c @@ -83,7 +83,8 @@ char **argv; { int ret=1,i; int verbose=0; - char **pp,*p; + char **pp; + const char *p; int badops=0; SSL_CTX *ctx=NULL; SSL *ssl=NULL; diff --git a/apps/dgst.c b/apps/dgst.c index 86d60c53da..eb7462d0b1 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -85,10 +85,10 @@ char **argv; { unsigned char *buf=NULL; int i,err=0; - EVP_MD *md=NULL,*m; + const EVP_MD *md=NULL,*m; BIO *in=NULL,*inp; BIO *bmd=NULL; - char *name; + const char *name; #define PROG_NAME_SIZE 16 char pname[PROG_NAME_SIZE]; int separator=0; diff --git a/apps/dsa.c b/apps/dsa.c index f58ff35c7f..1f57c46005 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -89,7 +89,7 @@ char **argv; int ret=1; DSA *dsa=NULL; int i,badops=0; - EVP_CIPHER *enc=NULL; + const EVP_CIPHER *enc=NULL; BIO *in=NULL,*out=NULL; int informat,outformat,text=0,noout=0; char *infile,*outfile,*prog; diff --git a/apps/enc.c b/apps/enc.c index c00d520b44..00cc336177 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -97,7 +97,7 @@ char **argv; char *hkey=NULL,*hiv=NULL; int enc=1,printkey=0,i,base64=0; int debug=0,olb64=0; - EVP_CIPHER *cipher=NULL,*c; + const EVP_CIPHER *cipher=NULL,*c; char *inf=NULL,*outf=NULL; BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL; #define PROG_NAME_SIZE 16 diff --git a/apps/req.c b/apps/req.c index 136cdc7d01..0cfed93878 100644 --- a/apps/req.c +++ b/apps/req.c @@ -157,7 +157,7 @@ char **argv; EVP_CIPHER *cipher=NULL; int modulus=0; char *p; - EVP_MD *md_alg=NULL,*digest=EVP_md5(); + const EVP_MD *md_alg=NULL,*digest=EVP_md5(); #ifndef MONOLITH MS_STATIC char config_name[256]; #endif diff --git a/apps/rsa.c b/apps/rsa.c index 056936da73..c8473d9558 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -89,7 +89,7 @@ char **argv; int ret=1; RSA *rsa=NULL; int i,badops=0; - EVP_CIPHER *enc=NULL; + const EVP_CIPHER *enc=NULL; BIO *in=NULL,*out=NULL; int informat,outformat,text=0,noout=0; char *infile,*outfile,*prog; diff --git a/apps/s_apps.h b/apps/s_apps.h index 145207f5fe..4ce6725d2b 100644 --- a/apps/s_apps.h +++ b/apps/s_apps.h @@ -86,7 +86,7 @@ int extract_port(char *str, short *port_ptr); int extract_host_port(char *str,char **host_ptr,unsigned char *ip,short *p); int host_ip(char *str, unsigned char ip[4]); -long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, char *argp, +long MS_CALLBACK bio_dump_cb(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret); #ifdef HEADER_SSL_H diff --git a/apps/s_cb.c b/apps/s_cb.c index ba0b548ea1..c18ecc3a18 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -184,7 +184,7 @@ char *key_file; long MS_CALLBACK bio_dump_cb(bio,cmd,argp,argi,argl,ret) BIO *bio; int cmd; -char *argp; +const char *argp; int argi; long argl; long ret; diff --git a/apps/s_server.c b/apps/s_server.c index de0c712109..8edd8e79bf 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -792,7 +792,7 @@ static int init_ssl_connection(con) SSL *con; { int i; - char *str; + const char *str; X509 *peer; long verify_error; MS_STATIC char buf[BUFSIZ]; diff --git a/apps/x509.c b/apps/x509.c index c20d213b3d..2a7188f121 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -121,9 +121,10 @@ NULL static int MS_CALLBACK callb(int ok, X509_STORE_CTX *ctx); static EVP_PKEY *load_key(char *file, int format); static X509 *load_cert(char *file, int format); -static int sign (X509 *x, EVP_PKEY *pkey,int days,EVP_MD *digest); -static int x509_certify (X509_STORE *ctx,char *CAfile, EVP_MD *digest,X509 *x, - X509 *xca, EVP_PKEY *pkey,char *serial, int create, int days); +static int sign (X509 *x, EVP_PKEY *pkey,int days,const EVP_MD *digest); +static int x509_certify (X509_STORE *ctx,char *CAfile,const EVP_MD *digest, + X509 *x,X509 *xca,EVP_PKEY *pkey,char *serial, + int create,int days); #else static int MS_CALLBACK callb(); static EVP_PKEY *load_key(); @@ -157,7 +158,7 @@ char **argv; X509_REQ *rq=NULL; int fingerprint=0; char buf[256]; - EVP_MD *md_alg,*digest=EVP_md5(); + const EVP_MD *md_alg,*digest=EVP_md5(); reqfile=0; @@ -706,7 +707,7 @@ end: static int x509_certify(ctx,CAfile,digest,x,xca,pkey,serialfile,create,days) X509_STORE *ctx; char *CAfile; -EVP_MD *digest; +const EVP_MD *digest; X509 *x; X509 *xca; EVP_PKEY *pkey; @@ -1041,7 +1042,7 @@ static int sign(x, pkey, days, digest) X509 *x; EVP_PKEY *pkey; int days; -EVP_MD *digest; +const EVP_MD *digest; { EVP_PKEY *pktmp; |