[openssl-users] openssl 1.1.1 opaque structures
Matt Caswell
matt at openssl.org
Fri Nov 23 10:55:50 UTC 2018
On 23/11/2018 10:33, priya p wrote:
> 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 ?
Use the DH_set0_pqg() function:
https://www.openssl.org/docs/man1.1.1/man3/DH_set0_pqg.html
You must also set p at the same time.
Matt
>
> Thanks,
> Priya
>
>
> On Tue, 20 Nov 2018 at 23:08, priya p <priyahere223 at gmail.com
> <mailto:priyahere223 at gmail.com>> wrote:
>
> Thanks Matt and Michael.
>
> On Tue, 20 Nov 2018 at 20:59, Matt Caswell <matt at openssl.org
> <mailto:matt at openssl.org>> wrote:
>
>
>
> On 20/11/2018 15:27, Michael Richardson wrote:
> > priya p <priyahere223 at gmail.com <mailto: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
>
>
More information about the openssl-users
mailing list