On Tue, Jun 9, 2009 at 6:57 PM, Chris Bare<ch...@bareflix.com> wrote:
> I just wanted to make sure I'm not missing something. Converting an ASN1 spec
> to code is a manual process, right? There is no parser/code generator as part
> of openssl?

Correct. It's a manual operation.
OpenSSL does not come with an ASN.1 compiler/parser -- OpenSSL does
come with perl scripts to convert certain OID definition lists into
code (C data statements), but these are a custom solution for a
particular/_specific_ use of ASN.1 inside the OpenSSL realm and should
/not/ be confused with a general purpose ASN.1 interpreter or ditto
compiler.

> I'm looking at asn1c (http://lionet.info/asn1c/) but the code it generates
> seems stand-alone, not based on the existing openssl code.

the asn1c compiler is not part, nor used in OpenSSL; the code it
produces and the OpenSSL ASN.1 implementation/API are just two
independent implementations for processing ASN.1 data in C.



PS: note that the OpenSSL ASN.1 implementation does not process ASN.1
REAL (floating point) data; check the spec though to see that's not a
big loss when you wish to re-use the OpenSSL code for general purpose
ASN.1 processing, as floats are stored somewhat like sprintf("%f",
float_value) string output, just with the ASN.1 REAL type id before
it. (I haven't run into BER floats out there in the wild up to now,
btw.)


-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web:    http://www.hobbelt.com/
        http://www.hebbut.net/
mail:   g...@hobbelt.com
mobile: +31-6-11 120 978
--------------------------------------------------
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to