Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <openssl/bn.h>
- int
- main(void)
- {
- BIGNUM *z, *mz;
- z = BN_new();
- if (BN_zero(z) == 0)
- return (1);
- mz = BN_new();
- if (BN_dec2bn(&mz, "-0") == 0)
- return (1);
- printf("BN_is_zero(BN_zero()): %s\n", BN_is_zero(z) ? "yes" : "no");
- printf("BN_is_zero(BN_dec2bn(\"-0\")): %s\n", BN_is_zero(mz) ? "yes" : "no");
- printf("BN_cmp(BN_zero(), BN_dec2bn(\"-0\")): %d\n", BN_cmp(z, mz));
- return (0);
- }
Add Comment
Please, Sign In to add comment