[openssl-users] openssl 1.1.1 opaque structures

priya p priyahere223 at gmail.com
Fri Nov 23 10:33:27 UTC 2018


Hi,

In this snippet,

       DH *dh;
              if ((dh->g = BN_new()) == NULL)-------------> 1
                     goto end;
             if (!BN_set_word(dh->g, g)) -----------------------> 2
                      goto end;

Here as we can't reference dh structure members directly,  how can we
initialize and set it in case of 1 and 2 ?

Thanks,
Priya


On Tue, 20 Nov 2018 at 23:08, priya p <priyahere223 at gmail.com> wrote:

> Thanks Matt and Michael.
>
> On Tue, 20 Nov 2018 at 20:59, Matt Caswell <matt at openssl.org> wrote:
>
>>
>>
>> On 20/11/2018 15:27, Michael Richardson wrote:
>> > priya p <priyahere223 at gmail.com> wrote:
>> >     > In openssl-1.1.1, few structures have been made opaque like
>> HMAC_CTX,
>> >     > EVP_CIPHER_CTX etc.,
>> >
>> >     > There are new API to get and set those structure members. But to
>> >     > zeroize those structure members in place, I dont see any API.
>> >
>> > "in place", do you mean because you've allocated them as auto variables
>> > on the stack?
>>
>> It is not possible to allocate opaque structures on the stack. The
>> compiler will
>> complain.
>>
>> Matt
>>
>> --
>> openssl-users mailing list
>> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20181123/ce467ddb/attachment-0001.html>


More information about the openssl-users mailing list