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-1z9wbaeys1x...@mail.gmail.com>
on Mon, 26 Nov 2018 11:15:27 +0530, priya p <[email protected]> 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 <[email protected]>
> wrote:
>
> > On Nov 26, 2018, at 12:14 AM, priya p <[email protected]> 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
>
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users