267 Commits

Author SHA1 Message Date
Brian Smith
caa4df6e68 Prepare for publishing on crates.io. 2016-08-15 12:38:08 -10:00
Brian Smith
f8bb8677e9 Windows: Split assembly language components into seperate static lib. 2016-08-14 20:24:43 -10:00
Brian Smith
cf6dfad269 Remove the dependency on the num crate.
Now we don't have to trust that `num` is doing the math correctly. The
code generator is going away anyway. It's a good idea in theory but in
practice it wasn't worth its complexity.
2016-07-03 10:38:08 -10:00
Brian Smith
887f9f028a Move ec_build submodule to be under ring::ec::suite_b.
It is Suite-B-curve-specific, so it belongs there.
2016-06-02 11:18:09 -10:00
Brian Smith
528777b088 Fold src/ec/curves.rs into src/ec/ec_build.rs.
Originally it was thought that curves.rs might be reused by *ring*
proper, as well as by the build system. Also, we thought that curves.rs
might be generated by some too. However, now we know that niether will
happen any time soon, so there's no reason for curves.rs to be
separate.
2016-06-02 11:16:08 -10:00
Brian Smith
180ef8a7d9 Move ECC code generation to src/ec/ with the other Rust ECC code. 2016-05-23 17:11:25 -10:00
Brian Smith
4165289b36 Use one process for all tests.
Instead of building the test suites inherited from BoringSSL as
seperate executables, link them all together into one executable,
giving all their `main` functions unique names.

This allows all the tests to be run, even on platforms that don't have
traditional process spawning, and avoids the need to keep track of
directory names even on platforms that do support process spawning.

This also makes it easier to integrate new BoringSSL test suites on
Windows, because we don't need to create a new `vcxproj` file for each
one.

Having one test executable may also make code coverage easier.
2016-04-16 18:55:05 -10:00
Brian Smith
57ebe5d225 Put #[path] attributes on same line. 2016-02-25 18:26:03 -10:00
Brian Smith
338d2d0796 Build C code in debug mode when not using --release.
In particular, enable C assertions in debug builds.
2016-02-25 12:00:32 -10:00
Brian Smith
17393444ef Enable more lints and make them fatal.
Basically, all the lints output by `rustc -W help` were added to
`#![deny(...)]` lists in build.rs and lib.rs. Lints that currently
fail because we do not want to follow the pattern they advise were
added to `#![allow(...)]` lists. Lints that currently fail due to
(minor) problems with the code were also added to the `#![allow(...)]`
lists with `// TODO` comments. Each of those TODOs will be addressed in
the following commits.
2016-02-04 21:54:20 -10:00
Brian Smith
14e0bc8a80 Construct |EC_GROUP|s at build time instead of at runtime.
Avoid the overhead of constructing |EC_GROUP| instances at runtime,
including in particular the |BN_MONT_CTX| and Montgomery-encoded
parts. This allows us to identify curves with |EC_GROUP*| again
instead of identifying them by pointers to functions that allocate
an |EC_GROUP|.
2015-11-28 12:11:00 -10:00
Brian Smith
67dacc7197 Use |$OPT_LEVEL|, not |$DEBUG|, to determine build config. 2015-10-26 18:32:29 -10:00
Brian Smith
8faeacc81e Run BoringSSL tests as part of the *ring* test suite.
Running the BoringSSL tests as part of the *ring* test suite
facilitates the removal of the non-Rust build options, and the
NO_ASM build option. This makes the CI loop faster by greatly
shrinking the size of hthe build matrics. It also removes the
development-time dependency on Go.
2015-10-26 18:11:04 -10:00
Brian Smith
0b23f8cf9e Rename the C library to "ring-core", rename Rust crate to "ring".
The Rust crate can't be named "ring" if it links to a C library called
"ring".
2015-08-26 21:18:41 -07:00
Brian Smith
8be8a14c10 Make build.rs easier to reuse in other projects.
Avoid hard-coding the name of the library throughout the project. build.rs can
be reused in other projects by simply changing the value of the LIB_NAME
variable at the top of the file.
2015-08-26 21:18:40 -07:00
Brian Smith
fa12ea79bc When using Cargo, build only the library.
We don't need to compile and link the tests when building the Rust
crate; we just need to build the library. This makes the Rust build
significantly faster.
2015-08-26 21:18:37 -07:00
Brian Smith
20b97a69a9 Rust: Add API for calculating digests (SHA-256, etc.). 2015-08-26 21:18:37 -07:00