[openssl-users] openssl 1.1.1 opaque structures

Richard Levitte levitte at openssl.org
Sun Dec 2 03:45:19 UTC 2018


Did you ever get an answer to that?  There is a call BN_num_bytes(),
so the fix should be this:

    *var = rc_vmalloc(BN_num_bytes(bn));
    (*var)->l = BN_bn2bin(bn, (unsigned char *)(*var)->v);

Cheers,
Richard ( you should probably study include/openssl/bn.h in depth )

In message <CAAiJU8MsdkTu4V2oJRFN9gdy_0Ob3fc5u78-1z9WbaEYS1xNLQ at mail.gmail.com> on Mon, 26 Nov 2018 11:15:27 +0530, priya p <priyahere223 at gmail.com> said:

> I am trying to fix this part of code:
> 
> int Func1 (var, bn) {
> *var = rc_vmalloc(bn->top * BN_BYTES); ------------------> Trying to fix this. Error it throws is " error:
> dereferencing pointer to incomplete type".
> 
> (*var)->l = BN_bn2bin(bn, (unsigned char *)(*var)->v);
> .
> .
> }
> 
> Thanks,
> Priya
> 
> On Mon, 26 Nov 2018 at 11:06, Viktor Dukhovni <openssl-users at dukhovni.org> wrote:
> 
>  > On Nov 26, 2018, at 12:14 AM, priya p <priyahere223 at gmail.com> wrote:
>  >
>  > I am unable to get the API to access bn->top value or any bn members in openssl 1.1.1 .
>  > Can you help me with the pointers to those APIs ?
> 
>  What actual problem are you trying to solve? Accessing bn->top is
>  a goal in itself.
> 
>  --
>  Viktor.
> 
>  --
>  openssl-users mailing list
>  To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
> 


More information about the openssl-users mailing list