diff options
author | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:56:39 +0000 |
---|---|---|
committer | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:56:39 +0000 |
commit | 58964a492275ca9a59a0cd9c8155cb2491b4b909 (patch) | |
tree | c7b16876a5789463bbbb468ef4829c8129b3d718 /crypto/x509/x509_v3.c | |
parent | d02b48c63a58ea4367a0e905979f140b7d090f86 (diff) | |
download | openssl-58964a492275ca9a59a0cd9c8155cb2491b4b909.tar.gz |
Import of old SSLeay release: SSLeay 0.9.0b
Diffstat (limited to 'crypto/x509/x509_v3.c')
-rw-r--r-- | crypto/x509/x509_v3.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/crypto/x509/x509_v3.c b/crypto/x509/x509_v3.c index 388130b1d7..1c03602f0b 100644 --- a/crypto/x509/x509_v3.c +++ b/crypto/x509/x509_v3.c @@ -1,5 +1,5 @@ /* crypto/x509/x509_v3.c */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -81,59 +81,59 @@ STACK *x; return(sk_num(x)); } -int X509v3_get_ext_by_NID(x,nid,oldpos) +int X509v3_get_ext_by_NID(x,nid,lastpos) STACK *x; int nid; -int oldpos; +int lastpos; { ASN1_OBJECT *obj; obj=OBJ_nid2obj(nid); if (obj == NULL) return(-2); - return(X509v3_get_ext_by_OBJ(x,obj,oldpos)); + return(X509v3_get_ext_by_OBJ(x,obj,lastpos)); } -int X509v3_get_ext_by_OBJ(sk,obj,oldpos) +int X509v3_get_ext_by_OBJ(sk,obj,lastpos) STACK *sk; ASN1_OBJECT *obj; -int oldpos; +int lastpos; { int n; X509_EXTENSION *ex; if (sk == NULL) return(-1); - oldpos++; - if (oldpos < 0) - oldpos=0; + lastpos++; + if (lastpos < 0) + lastpos=0; n=sk_num(sk); - for ( ; oldpos < n; oldpos++) + for ( ; lastpos < n; lastpos++) { - ex=(X509_EXTENSION *)sk_value(sk,oldpos); + ex=(X509_EXTENSION *)sk_value(sk,lastpos); if (OBJ_cmp(ex->object,obj) == 0) - return(oldpos); + return(lastpos); } return(-1); } -int X509v3_get_ext_by_critical(sk,crit,oldpos) +int X509v3_get_ext_by_critical(sk,crit,lastpos) STACK *sk; int crit; -int oldpos; +int lastpos; { int n; X509_EXTENSION *ex; if (sk == NULL) return(-1); - oldpos++; - if (oldpos < 0) - oldpos=0; + lastpos++; + if (lastpos < 0) + lastpos=0; n=sk_num(sk); - for ( ; oldpos < n; oldpos++) + for ( ; lastpos < n; lastpos++) { - ex=(X509_EXTENSION *)sk_value(sk,oldpos); + ex=(X509_EXTENSION *)sk_value(sk,lastpos); if ( (ex->critical && crit) || (!ex->critical && !crit)) - return(oldpos); + return(lastpos); } return(-1); } |