Am Monday 03 September 2012 schrieb Nikos Mavrogiannopoulos:
> On 08/31/2012 04:23 PM, Tim Ruehsen wrote:
> > Hi,
> >
> > a patch to simplify/cleanup _asn1_copy_structure3().
>
> I noticed that you moved the check
> + if (p_s == source_node)
> + break;
>
> within the if (move != UP). Couldn't this occur otherwise?
To be shure, copy
if (p_s == source_node)
break;
right before the 'continue' statement.
Right now, after having taken a deeper look into the sources, I personally
dislike the source code. It is unnecessary complex, i would say hard to
maintain. I really can't find any of the stated "high quality" code.
Tree structure handling and content handling should be seperated.
Aren't there any well-tested tree library routines (e.g. GNU t* functions)
that could be used for adding, deleting, searching and walking ?.
> By seeing the _asn1_copy_structure2() and its usage from
> asn1_create_element(), it seems there can be quite some optimizations by
> adding a new asn1_create_element2() and a new asn1_array2tree2().
> The newc array2tree should create a special tree that is easy to copy.
> It doesn't look like much work, but I cannot afford it now at least.
I think, GnuTLS should have a tool to be able to convert .PEM files into
simple text files which could be read into a simple C structure by a trivial
routine. That would massively reduce complexity and resource usage (CPU,
Memory) and speed up GnuTLS startup.
>
> regards,
> Nikos
Regards,
Tim