Richard Levitte - VMS Whacker wrote:
> 
> From: Dr S N Henson <[EMAIL PROTECTED]>
> 
> drh> Now if you change things so one ASN1_ITEM member can be modified at
> drh> runtime I suspect the whole thing will end up in the data segment. That
> drh> by itself isn't a problem because of the copy on write stuff under Unix
> drh> (and no doubt other OSes) which still means the data can be shared.
> drh> However when the structure is initialized at runtime on the first use
> drh> (as it would need to be) it will be modified and this will result in
> drh> multiple copies of the same data.
> 
> I think I need to reread som mail.  I find it hard to believe that it
> would be impossible to make things in such a way that ASN1_ITEMs
> remain constant...
> 

It certainly isn't impossible. There's quite a few ways but all have a
runtime overhead because they have to translate whatever gets stuck in
as an ASN1_ITEM reference into the real pointer. The stuff stops being
constant when you try to remove the overhead by storing the converted
form in the structure after the first call.

I think using function pointers in ASN1_ITEM (or wherever) for functions
that return pointers to ASN1_ITEM is probably the easiest to implement
and it could be restricted to platforms that really need it.

The windows issues also go away if you use functions because they are
imported and exported with the same declaration: well at least the way
we do things they are.

I can't see the overhead of a function call to retrieve the real
ASN1_ITEM pointer being too significant in this case.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to