harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura" <stepan.mish...@gmail.com>
Subject Re: [classlib] [Asn.1 Framework] where is the source code..
Date Thu, 23 Aug 2007 08:15:30 GMT
On 8/22/07, fatih batuk wrote:
> Hi Stephan,
> You said "let us know if the documentation should be improved." ..
> Today I realized that, in the BEROutputStream class some methods are not implemented
(encodeSequence(..), encodeSet(..), encodeExplicit(..), etc.)
> It is only writing "Is not implemented yet"  in these methods.
> I am not sure but I think this means Asn.1 Framework does not fully support BER encoding/decoding..
> Is it true? :(   I need BER processing..
> If true, it is not writing in the documentation ..
> (If I am right, maybe you should write this missing part information in the documentation)

>From section "About":
"The current ASN.1 framework is a partial implementation of the ASN.1
and encoding rules specifications. This framework covers certain ASN.1
basic types and basic encoding rules (BER), and provides most
restrictions employed by the distinguished encoding rules (DER)"

May be the phase from the document is not quite clear about missed

This is true that BER encoding/decoding was not fully implemented and
in the future we may need fill some gaps in the implementation. The
reason of partial implementation is that initially the framework was
developed for "security" modules and these modules use DER only.

> You said "... I think that there should be a number of existing parsers for ASN.1"
> Yes, there are some open source fully compilers about Asn.1 and they are very useful.
But all of them are DER supported. I could not find a complete BER compiler...

>From my POV, "BER compiler" is parser of ASN.1 rules + grenerator of
java class(es) + set of encoders/decoders. Correct?

I was talking about parsing ASN.1 rules (that are written in text)
when I mentioned "existing parsers for ASN.1". As you said there are
open source compilers so you know where to take ASN.1 parsing and you
need set of BER encoders/decoders
I assume (actually, I haven't seen) there should be implementations
too because some protocols are based on ASN.1 BER. So if you find one
you only need improve generator that takes parser's output and creates
java classes with your BER encoders/decoders. (Also if there are no
suitable BER implementation you may wish to complete functionality
gaps in Harmony implementation and reuse it).


> Thanks for your concern..
> Fatih
> fatihbatuk.blogspot.com
> ----- Original Message ----
> From: Stepan Mishura <stepan.mishura@gmail.com>
> To: dev@harmony.apache.org
> Sent: Wednesday, August 22, 2007 11:22:02 AM
> Subject: Re: [classlib] [Asn.1 Framework] where is the source code..
> On 8/22/07, fatih batuk <fatih_batuk@yahoo.com> wrote:
> > Again thanks for the answer..
> > I looked more closer to the Asn.1 framework and I realized that it does not include
the "text parser" part.
> Hi Fatih,
> There is no "parser text'" that reads ASN.1 notation in the ASN.1
> framework. I think it would be nice to have it developed - that would
> make easier to implement protocols based on ASN.1
> > I want to generate .java classes of types which are defined in my asn.1 protocol(which
is a text file).
> > Then I want to make encode and decode operations by use of instances of these .java
> Sounds good.
> >  (In the asn.1 documantation, decode and encode operations over instances is described
: I wrote a small .java class by
> > hand and I encoded istance of this class and then decoded again. And it
> > is worked.)
> >
> Please let us know if the documentation should be improved.
> > I - Does the text parser part exist ? (Maybe I coluld not find..) (Maybe such a
parser exists at some other place in the web, but I could not find..)
> >
> > II -I am planning to write my own parser which will read the asn.1 protocol and
genarate .java classes from the asn.1 input file. And the generated .java classes will use
Apache's Asn.1 Framework to make "encode and decode operations." And I am planning to do this
by use of  java.io package.
> > I know there are some parser generators like "Javacc(java compiler compiler) or
SableCC", but I am not sure to start learning and using such a compiler compiler.
> > Can you give me some idea or some help about this issue ?
> >
> I'm not guru in parser generators so I don't know how much "Javacc
> studying" will help you in developing your own ASN.1 parser. The ASN.1
> is used for quite long time and I think that there should be a number
> of existing parsers for ASN.1 (it may be worth to find and try them
> first).
> Thanks,
> Stepan.
> > Thanks..
> > Fatih
> > fatihbatuk.blogspot.com
> > >(20.8.2007)
> > >Fatih,
> >
> > >Take a look in
> > >http://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/asn1/
> > >
> > >Regards,
> > >Tim
> >
> > >>fatih batuk wrote: (19.8.2007)
> > >> Hi,
> > >>
> > >> I want to use ASN.1 Framework which already exists in Apache Harmony project.
> > >> Documentation is located at:
> > >>http://harmony.apache.org/subcomponents/classlibrary/asn1_framework.html
> > >>
> > >> But I could not find the source code..
> > >> Does the source code exist ? If ok, can you show me where it is ..?

View raw message