diff options
author | Geoff Thorpe <geoff@openssl.org> | 2008-11-12 03:58:08 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2008-11-12 03:58:08 +0000 |
commit | 6343829a391df59e46e513c84b6264ee71ad9518 (patch) | |
tree | 9823103bf5828e47081ac906203516bdc332f577 /crypto/asn1/asn1_par.c | |
parent | 2401debe83e8df930907a39065ebf9a54354f123 (diff) |
Revert the size_t modifications from HEAD that had led to more
knock-on work than expected - they've been extracted into a patch
series that can be completed elsewhere, or in a different branch,
before merging back to HEAD.
Diffstat (limited to 'crypto/asn1/asn1_par.c')
-rw-r--r-- | crypto/asn1/asn1_par.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/crypto/asn1/asn1_par.c b/crypto/asn1/asn1_par.c index def7bcf2f1..c322dec2b2 100644 --- a/crypto/asn1/asn1_par.c +++ b/crypto/asn1/asn1_par.c @@ -63,11 +63,11 @@ #include <openssl/asn1.h> static int asn1_print_info(BIO *bp, int tag, int xclass,int constructed, - int indent); -static int asn1_parse2(BIO *bp, const unsigned char **pp, size_t length, - int offset, int depth, int indent, int dump); + int indent); +static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, + int offset, int depth, int indent, int dump); static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed, - int indent) + int indent) { static const char fmt[]="%-18s"; char str[128]; @@ -99,22 +99,21 @@ err: return(0); } -int ASN1_parse(BIO *bp, const unsigned char *pp, size_t len, int indent) +int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent) { return(asn1_parse2(bp,&pp,len,0,0,indent,0)); } -int ASN1_parse_dump(BIO *bp, const unsigned char *pp, size_t len, int indent, - int dump) +int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent, int dump) { return(asn1_parse2(bp,&pp,len,0,0,indent,dump)); } -static int asn1_parse2(BIO *bp, const unsigned char **pp, size_t length, - int offset, int depth, int indent, int dump) +static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offset, + int depth, int indent, int dump) { const unsigned char *p,*ep,*tot,*op,*opp; - size_t len; + long len; int tag,xclass,ret=0; int nl,hl,j,r; ASN1_OBJECT *o=NULL; @@ -153,13 +152,13 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, size_t length, if (j != (V_ASN1_CONSTRUCTED | 1)) { if (BIO_printf(bp,"d=%-2d hl=%ld l=%4ld ", - depth,(long)hl,(long)len) <= 0) + depth,(long)hl,len) <= 0) goto end; } else { if (BIO_printf(bp,"d=%-2d hl=%ld l=inf ", - depth,(long)hl) <= 0) + depth,(long)hl) <= 0) goto end; } if (!asn1_print_info(bp,tag,xclass,j,(indent)?depth:0)) @@ -171,8 +170,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, size_t length, if (len > length) { BIO_printf(bp, - "length is greater than %ld\n", - (long)length); + "length is greater than %ld\n",length); ret=0; goto end; } |