RE: [EXTERNAL] ASN.1 macros for composite structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


You need to provide an implementation for those.  This is just the data structure.

In the C file, add something like this:
ASN1_SEQUENCE(example) = {
   ASN1_SIMPLE(example, a, ASN1_OBJECT),
   ASN1_SIMPLE(example, b, ASN1_OBJECT)
} ASN1_SEQUENCE_END(example);

This defines the instructions necessary for the ASN1 code to serialize your data.

Now you can implement the functions:


In your header file you also want to declare those functions:


> -----Original Message-----
> From: openssl-users <openssl-users-bounces@xxxxxxxxxxx> On Behalf Of Ladd,
> Watson via openssl-users
> Sent: Thursday, January 26, 2023 10:57 AM
> To: openssl-users@xxxxxxxxxxx
> Subject: [EXTERNAL] ASN.1 macros for composite structures
> Dear OpenSSL Users,
> I have a structure of the form
> typdef struct {
>       ASN1_OBJECT *a;
>        ASN1_OBJECT *b;
> } example;
> and I cannot figure out how to make the ASN.1 macros serialize it correctly.
> When I tried to use an ASN1_SEQUENCE with two ASN1_SIMPLEs the code
> failed to serialize the structure.
> I've been trying to use various ASN1_TYPE, but it seems those only work when
> ASN1_OPTS are used or some variant.
> Any suggestions/pointers to documentation on how to do this? It seems like the
> resources that used to exist for the very old macros don't exist anymore, and the
> newer more explicit stuff is only used inside of providers and not exposed
> elsewhere.
> Sincerely,
> Watson Ladd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux