The class BEREncoder's method encodeSequence() appears
to rely on the order of Fields returned from the method
Class.getDeclaredFields() being the same as they are
declared in the source code generated by BNCompiler
for the sequence to be encoded. But, according to the
Javadoc for java.lang.Class, there is no guarantee that
these Fields will be returned in any particular order.
This has at least two implications:
(0) The sequence might be encoded in the wrong order.
(1) The sequence might be encoded in different orders
in different JREs, since Class might be implemented
differently in JRE's runtime libraries. Consider
GNU Classpath vs. SUN JDK, for example.
In either case, binary compatibility could not be ensured
between data encoded by BN and other ASN.1/BER
implementaions, or even between BN programs running under
different JREs.
Perhaps I'm mistaken, but this seems like a serious
problem.
Logged In: YES
user_id=1513714
Ohh... I know about this issue. But don't has the
good-looking resolution for now.
Probably it is necessary to enter (optional) order attribute
in @ASN1Element in the next releases (maybe in the following
1.1.0b2).
Logged In: YES
user_id=1312539
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).