diff options
author | Richard Levitte <levitte@openssl.org> | 2004-03-15 23:15:26 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2004-03-15 23:15:26 +0000 |
commit | 875a644a9047e96dfcce27af876d30460759805e (patch) | |
tree | 901dfcdc9d6e9a7fb676e5e80689bddfd05c4338 /apps | |
parent | ec37635c948e2cda2dc55e8b3630f516a4b06fd7 (diff) | |
download | openssl-875a644a9047e96dfcce27af876d30460759805e.tar.gz |
Constify d2i, s2i, c2i and r2i functions and other associated
functions and macros.
This change has associated tags: LEVITTE_before_const and
LEVITTE_after_const. Those will be removed when this change has been
properly reviewed.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/apps.c | 2 | ||||
-rw-r--r-- | apps/asn1pars.c | 4 | ||||
-rw-r--r-- | apps/pkcs12.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/apps/apps.c b/apps/apps.c index 47b59b4545..eae1fedcd3 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -758,7 +758,7 @@ X509 *load_cert(BIO *err, const char *file, int format, x=d2i_X509_bio(cert,NULL); else if (format == FORMAT_NETSCAPE) { - unsigned char *p,*op; + const unsigned char *p,*op; int size=0,i; /* We sort of have to do it this way because it is sort of nice diff --git a/apps/asn1pars.c b/apps/asn1pars.c index c28b5ec194..305db15903 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -94,6 +94,7 @@ int MAIN(int argc, char **argv) char *infile=NULL,*str=NULL,*prog,*oidfile=NULL, *derfile=NULL; char *genstr=NULL, *genconf=NULL; unsigned char *tmpbuf; + const unsigned char *ctmpbuf; BUF_MEM *buf=NULL; STACK *osk=NULL; ASN1_TYPE *at=NULL; @@ -317,7 +318,8 @@ bad: tmpbuf+=j; tmplen-=j; atmp = at; - at = d2i_ASN1_TYPE(NULL,&tmpbuf,tmplen); + ctmpbuf = tmpbuf; + at = d2i_ASN1_TYPE(NULL,&ctmpbuf,tmplen); ASN1_TYPE_free(atmp); if(!at) { diff --git a/apps/pkcs12.c b/apps/pkcs12.c index cbd933667b..dd0d29bfaa 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -811,7 +811,7 @@ err: int alg_print (BIO *x, X509_ALGOR *alg) { PBEPARAM *pbe; - unsigned char *p; + const unsigned char *p; p = alg->parameter->value.sequence->data; pbe = d2i_PBEPARAM (NULL, &p, alg->parameter->value.sequence->length); BIO_printf (bio_err, "%s, Iteration %ld\n", |