aboutsummaryrefslogtreecommitdiff
path: root/src/bn
Commit message (Collapse)AuthorAgeFilesLines
* BN_is_zero as a Rust functionValerii Hiora2014-10-091-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although wrapping was relatively easy it basically meant that we depend on C compilation which becomes nightmare as soon as multiple platforms are used. I’ve got a huge pain once iOS was involved with 3 device archs and 2 simulator arches to support, not mentioning different set of include and lib flags. So there are 2 different approaches: - continue this way, maintaining all compilation issues like like managing correct flags, providing correct paths and so on. This way our Makefile will grow extremely fast and will actually take more efforts to maintain. - doing it pure Rust way. In this case we provide all the macros expansions inside our wrappers and there should be no other way to access raw data other than through those wrappers. It might be fragile if OpenSSL internal data structures will ever change, but I think (or hope) it is pretty stable and wouldn’t change anytime soon. This PR eliminates `BN_is_zero` at all from public API. It’s functionality is implemented in `BigNum.is_zero` and should be enough. Additional notes: 1. I’ve moved BIGNUM into `bn` so it could access fields directly and keep it as an opaque structure for everyone else 2. I’ve kept empty Makefile as I hope to land `feature-matrix` branch soon and I don’t like merging deleted/added file conflicts.
* Fixed mut_null deprecation warningsValerii Hiora2014-09-301-4/+4
|
* single `ffi` moduleValerii Hiora2014-09-301-135/+56
|
* Removed BN_sub_word signature for the time being.Chris Cole2014-09-281-1/+0
|
* Removing unused signatures for the time being.Chris Cole2014-09-271-3/+0
|
* Use CRYPTO_free to free the result of BN_bn2bin.Chris Cole2014-09-271-6/+2
|
* Added signatures forBN_sub_word, BN_is_zero, BN_is_one, BN_is_word,Chris Cole2014-09-271-4/+53
| | | | | | | | and BN_is_odd. Fixed incorrect BN_mod_inverse signature. Added signature for BN_bn2dec. Added trait implementations for Zero, One, and fmt::Show. Added to_dec_str function to BigNum impl.
* Add repr(C) to C structsMichael Gehring2014-08-221-0/+1
|
* Use BN_div instead of BN_modIsraël Hallé2014-08-201-2/+1
| | | | | BN_mod is not available on all plateform and can be replaced by BN_div with dv set as NULL.
* Shift directory structureSteven Fackler2014-08-031-0/+569