Commit Graph

15 Commits

Author SHA1 Message Date
Valerii Hiora 59b843517d BN_is_zero as a Rust function
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.
2014-10-09 19:25:07 +03:00
Valerii Hiora 9dd8ce9270 Potential fix for #68 2014-10-07 15:21:17 +03:00
Jonathan Reem c22b3c5063 Add a dummy bn_is_zero C dependency to wrap BN_is_zero
This is necessary because on some architectures BN_is_zero
is a CPP macro, so trying to link against it in an `extern "C"`
block causes a linker error.

This also introduces a build command to Cargo to compile
the bn_is_zero wrapper.
2014-10-04 18:18:02 -07:00
Steven Fackler e2554ea6af Add a configure script and an install target 2014-01-20 20:20:10 -08:00
Steven Fackler 7bae19741e Enable automatic doc upload 2014-01-18 14:47:41 -08:00
Steven Fackler a84bf2976b Add a way to print the target binary 2014-01-18 13:24:23 -08:00
Steven Fackler bf2f31ef96 Update build system 2014-01-18 13:01:04 -08:00
Steven Fackler 42022fa539 Delete crypto/hex
This is provided by libextra
2013-12-28 20:15:15 -07:00
Steven Fackler 9b3746260c Integrate everything 2013-12-28 18:39:07 -07:00
Erick Tryzelaar 85e6d1db12 update to rust 0.9-pre (a5fa1d9) 2013-12-27 22:02:38 -05:00
Erick Tryzelaar a9ce2a36d5 Switch over to rustpkg 2013-12-18 08:51:10 -08:00
Erick Tryzelaar 08374ec054 Merge remote-tracking branch 'remotes/kballard/master'
Conflicts:
	crypto.rs
	hash.rs
	pkcs5.rs
	pkey.rs
	rand.rs
	symm.rs
2013-08-15 08:20:47 -07:00
Kevin Ballard 47693a5dc3 Don't error on `make clean` if there is no dylib 2013-06-08 17:55:35 -07:00
Kevin Ballard 2eba04e579 Update for latest incoming (3a3bf8b) 2013-05-29 23:42:07 -07:00
lloyd 07773d8fee Add support for HMAC, RC4, AES-128, hex encoding, etc 2013-03-11 20:44:16 +01:00