aboutsummaryrefslogtreecommitdiff
path: root/src/bn/mod.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move docs to this repo and auto buildSteven Fackler2015-02-071-604/+0
|
* Fix for upstream changesSteven Fackler2015-01-231-1/+1
|
* Update to rust masterAlex Crichton2015-01-091-1/+1
|
* Handle recent breaking changesValerii Hiora2015-01-071-7/+5
| | | | | | | - macro reform - split of Show and String in formatter - CString reform - feature changes
* Merge remote-tracking branch 'upstream/master'Chris Cole2015-01-051-8/+24
|\
| * Fix for upstream changesSteven Fackler2015-01-041-8/+24
| |
* | Added use of ToCStr trait.Chris Cole2015-01-031-1/+1
| |
* | Merge remote-tracking branch 'upstream/master'Chris Cole2015-01-031-8/+10
|\|
| * Updated to master:Valerii Hiora2015-01-031-8/+10
| | | | | | | | | | | | - library stab issues - deriving -> derive - {mod} -> {self}
* | Added BN_add_word, BN_sub_word, BN_mul_word, BN_div_word.Chris Cole2015-01-021-6/+55
| | | | | | | | Removed BIGNUM_PTR struct.
* | Merge remote-tracking branch 'upstream/master'Chris Cole2014-12-231-20/+21
|\| | | | | | | | | Conflicts: openssl-sys/src/lib.rs
| * Replaced now removed NativeMutex with StaticMutex, and fixed NegAaron Weiss2014-12-211-1/+1
| | | | | | | | implementation for BigNum.
| * Updated for language changes to macros.Aaron Weiss2014-12-191-3/+3
| |
| * Update to rust masterAlex Crichton2014-12-161-16/+16
| |
| * Update to nightly: explicit Copy traitValerii Hiora2014-12-111-0/+1
| |
* | Added BigNum::{from_dec_str,from_hex_str}, BN_dec2bn, and BN_hex2bn.Chris Cole2014-12-141-2/+27
| |
* | Added BigNum::one().Chris Cole2014-12-111-0/+4
| |
* | Use "ffi" namespace.Chris Cole2014-12-101-1/+1
| |
* | Added mod_word.Chris Cole2014-12-101-2/+0
| |
* | Merge remote-tracking branch 'upstream/master'Chris Cole2014-11-291-174/+68
|\| | | | | | | | | Conflicts: src/bn/mod.rs
| * sys (and bn): make CRYPTO_free() take a *mut c_void insead of a *const c_charCody P Schafer2014-11-241-2/+2
| | | | | | | | | | | | | | | | | | CRYPTO_free() ends up being used for a variety of types of data, not just c_char. And it essentially takes full ownership of the type, making *mut appropriate. With this change it also more closely (exactly) matches the C defintion: void CRYPTO_free(void *ptr);
| * Remove Zero and One implsSteven Fackler2014-11-171-20/+0
| |
| * Merge pull request #90 from ebfe/fix-buildSteven Fackler2014-10-301-1/+1
| |\ | | | | | | fail! -> panic!
| | * fail! -> panic!Michael Gehring2014-10-301-1/+1
| | |
| * | Clean up some BN stuffSteven Fackler2014-10-261-11/+1
| |/
| * Cleaned up BigNum constructorsValerii Hiora2014-10-141-25/+11
| |
| * Correct init mutexes and locking functionValerii Hiora2014-10-141-0/+4
| | | | | | | | | | | | | | | | | | `libcrypto` uses locks quite intensively even without SSL. So they should be initialized before everything else to function properly in multi-threaded apps in which SSL operations are absent or delayed. Finishes #79
| * 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
| |
* | Added mod_mul.Chris Cole2014-11-291-0/+7
|/
* 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