Commit Graph

16 Commits

Author SHA1 Message Date
Ivan Nikulin c4e8a94a69 Add RPK and PQ crypto features 2023-07-07 13:50:36 +01:00
Joshua Nelson 34929928c4 bump version number for tokio-boring
this is necessary so we can publish a version with the `fips` feature,
even though in practice the crate is exactly the same.
2022-09-16 13:13:08 -05:00
Braden Ehrat 1507689c5b
Add fips-3678 feature (#52)
* Add rerun-if-env-changed instructions for BORING_* variables

* Use X509_get0_notBefore() and X509_get0_notAfter() instead of X509_getm_notBefore() and X509_getm_notAfter().

According to
https://www.openssl.org/docs/man1.1.0/man3/X509_getm_notBefore.html,
"X509_getm_notBefore() and X509_getm_notAfter() are similar to
X509_get0_notBefore() and X509_get0_notAfter() except they return
non-constant mutable references to the associated date field of the
certificate".

* Only update boringssl submodule if BORING_BSSL_PATH not provided

* Allow BORING_BSSL_LIB_PATH to control link search

* Add fips feature

* Use X509_set_notAfter unconditionally for FIPS compatibility

This is equivalent according to
https://boringssl.googlesource.com/boringssl/+/c947efabcbc38dcf93e8ad0e6a76206cf0ec8072

The version of boringssl that's FIPS-certified doesn't have `X509_set1_notAfter`.
The only difference between that and `X509_set_notAfter` is whether they're const-correct,
which doesn't seem worth having two different code-paths.

* Check out fips commit automatically

* Verify the version of the compiler used for building boringssl

NIST specifies that it needs to be 7.0.1; I originally tried building with clang 10 and it failed.
Theoretically this should check the versions of Go and Ninja too, but they haven't given me trouble in practice.

Example error:
```
   Compiling boring-sys v1.1.1 (/home/jnelson/work/boring/boring-sys)
error: failed to run custom build command for `boring-sys v1.1.1 (/home/jnelson/work/boring/boring-sys)`

Caused by:
  process didn't exit successfully: `/home/jnelson/work/boring/target/debug/build/boring-sys-31b8ce53031cfd83/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=BORING_BSSL_PATH

  --- stderr
  warning: missing clang-7, trying other compilers: Permission denied (os error 13)
  warning: FIPS requires clang version 7.0.1, skipping incompatible version "clang version 10.0.0-4ubuntu1 "
  thread 'main' panicked at 'unsupported clang version "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0": FIPS requires clang 7.0.1', boring-sys/build.rs:216:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

* Add Github actions workflow testing FIPS

Co-authored-by: Joshua Nelson <jnelson@cloudflare.com>
2022-01-31 16:11:33 -06:00
Joshua Nelson 18650f625e Bump versions for release
- Major version for boring-sys: `PasswordCallback` was removed
- Major version for boring: the public `*Ref` types were removed and `foreign-types` appears in our public api and had a major version bump
- Patch version for tokio-boring: the only API change was removing the `S: Debug` bound
- Patch version for hyper-boring: no API changes, only removed dependencies
2021-12-16 13:52:38 -06:00
Joshua Nelson 3a0e2db753 Update documentation for tokio-boring
This also adds an `examples/` directory, to make sure the example in the readme doesn't get out of
date.
2021-07-29 11:28:43 -04:00
Anthony Ramine 72e347d041 Bump tokio-boring to 2.1.3 2021-04-16 13:06:27 +02:00
Anthony Ramine f4b8870404 Bump boring-sys to 1.1.1, tokio-boring to 2.1.2 2021-04-06 13:13:06 +02:00
Ivan Nikulin ebab82eb5b Bump boring to 1.1.2, tokio-boring 2.1.1 2021-03-09 17:47:01 +00:00
Ivan Nikulin ed3279c4f1 Bump feature version on all packages instead. 2021-02-24 11:52:24 +00:00
Ivan Nikulin 10488a85f3 Sync upstream changes to support tokio 1.x
Bump major versions of hyper-boring and tokio-boring.
2021-02-18 16:12:19 +00:00
Ivan Nikulin a6fbc0fed2 Bump version 2020-12-23 14:15:50 +00:00
Gabriela Alexandra Moldovan 31ed6443b1 Fix boring repository links. 2020-11-14 00:03:43 +00:00
Ivan Nikulin 5afd10b577 Fix boring-sys linking. Bump version. 2020-11-12 13:03:41 +00:00
Ivan Nikulin fda73f4947 Fix docs 2020-11-11 20:32:53 +00:00
Ivan Nikulin f4096d8afd Add hyper-boring 2020-11-11 20:29:54 +00:00
Ivan Nikulin 548771adb1 Add tokio-boring 2020-11-11 19:26:22 +00:00