The Cryptix ASN.1 Kit aims at facilitating the task programmers face in coding, accessing and generating java-bound, both types and values, defined as ASN.1 constructs, or encoded as such.
Be the first to post a text review of Cryptix ASN.1 Kit. Rate and review a project by clicking thumbs up or thumbs down in the right column.
hello all, some users have mailed me about the above. an incident report has been filed with the sourceforge maintainers. while waiting for this to be fixed, i'm including here the unified diff of the Sequence class part of the latest (invisible) checkin: cvs -z3 diff -r 1.13 -u -wb -B Sequence.java (in directory /data/workspace/cvs/sourceforge/cryptix-asn1-kit/src/cryptix/asn1/lang/) Index: Sequence.java =================================================================== RCS file: /cvsroot/cryptix-asn1/cryptix-asn1-kit/src/cryptix/asn1/lang/Sequence.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -r1.13 -r1.14 --- Sequence.java26 Sep 2001 10:30:07 -00001.13 +++ Sequence.java28 Jun 2003 12:18:15 -00001.14 @@ -1,4 +1,4 @@ -/* $Id: Sequence.java,v 1.13 2001/09/26 10:30:07 raif Exp $ +/* $Id: Sequence.java,v 1.14 2003/06/28 12:18:15 raif Exp $ * * Copyright (C) 1997-2001 The Cryptix Foundation Limited. All rights reserved. * @@ -36,7 +36,7 @@ * <tt>cryptix.asn1.lang.IIterativeType</tt> interface --which should return a * <tt>java.util.Iterator</tt> instance.<p> * - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * @author Raif S. Naffah * @author Raul Igrisan */ @@ -197,13 +197,16 @@ Iterator src = al.iterator(); Iterator dst = this.iterator(); - IType ts, td; - Tag srcTag, desTag; - String tscn, tdcn; + IType ts = null, td; + Tag srcTag = null, desTag; + String tscn = null, tdcn; + boolean needNextSrc = true; while (src.hasNext() && dst.hasNext()) { + if (needNextSrc) { ts = (IType) src.next(); srcTag = ts.tag(); tscn = ts.getClass().getName(); + } td = (IType) dst.next(); desTag = td.tag(); tdcn = td.getClass().getName(); @@ -213,15 +216,20 @@ // values will already be initialised to those default values. cat.debug(" Source tag: "+String.valueOf(srcTag)); cat.debug("Destination tag: "+String.valueOf(desTag)); - if (desTag == null) // must be an IType inside an ANY + if (desTag == null) { // must be an IType inside an ANY cat.warn("Blindly assigning value from "+tscn+" to "+tdcn); - else { + td.value(ts.value()); + needNextSrc = true; + } else { + if (!desTag.equals(srcTag)) { + cat.warn("Source and destination have different tags. Skip..."); + needNextSrc = false; + } else { cat.info("Assigning value from "+tscn+" to "+tdcn); - if (!desTag.equals(srcTag)) - cat.warn("Source and destination have different tags..."); - } - td.value(ts.value()); + needNextSrc = true; + } + } } } cheers; rsn
hello all, i just checked in an update to Sequence that fixes a bug in value assignments. also added a new asn.1 specifications file for CMS. cheers; rsn
Be the first person to add a text review.
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use
Thanks for your rating!
Would you also like to write a review?
Thanks for your review!
Get credit for your review by logging in via OpenID. Click your account provider: