I'd submitted a pull request to openssl, changing the use of BN_bin2bin() to static const bignums in bn_const.c . I defined macro bn_pack2 :
#if BN_BITS2 == 64 # define bn_pack2(a1,a2) ((0x##a1##ULL<<32)|0x##a2##ULL) #elif BN_BITS2 == 32 # define bn_pack2(a1,a2) 0x##a2##UL, 0x##a1##UL #else # error "unsupported BN_BITS2" #endif Use bn_pack2 to define BN_ULONG arrays: static const BN_ULONG num[] = { bn_pack2(FFFFFFFF, FFFFFFFF), bn_pack2(F44C42E9, A63A3620) }; bn_const.c , bn_dh.c , bn_nist.c , bn_srp.c make const bignums respectively. <https://github.com/openssl/openssl/pull/982#issuecomment-212528822> * richsalz <https://github.com/richsalz>* wants to make them consistent. So if the marco bn_pack2 works well on all platforms, or the best way to do that?
-- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev