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.
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.
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.
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.
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|.
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.
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.
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.