Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return VerifyError in a better way #25

Merged
merged 5 commits into from
Dec 20, 2023
Merged

Return VerifyError in a better way #25

merged 5 commits into from
Dec 20, 2023

Conversation

Taowyoo
Copy link
Collaborator

@Taowyoo Taowyoo commented Dec 19, 2023

No description provided.

@Taowyoo Taowyoo requested a review from s-arash December 19, 2023 01:35
@Taowyoo Taowyoo self-assigned this Dec 19, 2023
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (98a438e) 93.31% compared to head (5c50a6e) 94.14%.

Files Patch % Lines
rustls-mbedpki-provider/src/lib.rs 92.45% 4 Missing ⚠️
...ustls-mbedpki-provider/src/client_cert_verifier.rs 95.71% 3 Missing ⚠️
...ustls-mbedpki-provider/src/server_cert_verifier.rs 95.58% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
+ Coverage   93.31%   94.14%   +0.83%     
==========================================
  Files          16       16              
  Lines        1975     2102     +127     
==========================================
+ Hits         1843     1979     +136     
+ Misses        132      123       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@s-arash s-arash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Taowyoo Taowyoo added this pull request to the merge queue Dec 20, 2023
Merged via the queue into master with commit 03cf570 Dec 20, 2023
14 checks passed
@Taowyoo Taowyoo deleted the yx/pki-provider-fix branch December 20, 2023 18:39
Taowyoo added a commit that referenced this pull request Dec 20, 2023
* special fix: return cert validity check result first

* return verify_error in a better way

* add set function

* add some unit tests

* add some more unit tests
Taowyoo added a commit that referenced this pull request Mar 13, 2024
* Some implements

- Expose more type to public to enable user to create custom cipher suite
- Bump version of rustls-mbedtls-provider-utils
- Add some utility functions for MbedTlsPkSigningKey
- Expose some utility functions

* better pk_type_to_signature_algo

* Move get_signature_schema_from_offered to utils crate with better rustdoc

Return `VerifyError` in a better way (#25)

* special fix: return cert validity check result first

* return verify_error in a better way

* add set function

* add some unit tests

* add some more unit tests

Fix rustls dependency with `tag = "ffdhe-r1"` (#29)

use unmerged updated rustls

update to use new rustls with tag

export hash types

Export types enable user to create customized cipher suites.

better comments

Fix leading zeros bug in FFDHE kx

+ Update rustls dep to `ffdhe-r3`

Add self_tests module, and include KDF tests (helps with FIPS compliance)

    - Apply suggestions from code review
    - Co-authored-by: YX Cao <[email protected]>
    - Signed-off-by: Arash Sahebolamri <[email protected]>

Update KDF self test to better reflect extended master secret extraction (#38)

Co-authored-by: Arash Sahebolamri <[email protected]>

upgrade rustls to tag `ffdhe-r4`

Upgrade rustls to add support of new config option
for requiring peer support of extended master secret
extension.

Chore(deps): bump the crates-io group with 1 update (#33)

Bumps the crates-io group with 1 update: [rustls](https://github.com/rustls/rustls).

Updates `rustls` from 0.22.1 to 0.22.2
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](rustls/rustls@v/0.22.1...v/0.22.2)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: crates-io
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Add self_tests module, and include KDF tests (helps with FIPS compliance) (#35)

- Apply suggestions from code review
- Co-authored-by: YX Cao <[email protected]>
- Signed-off-by: Arash Sahebolamri <[email protected]>

Co-authored-by: Arash Sahebolamri <[email protected]>

Update KDF self test to better reflect extended master secret extraction (#37)

Co-authored-by: Arash Sahebolamri <[email protected]>

Chore(deps): bump the crates-io group with 3 updates (#41)

Bumps the crates-io group with 3 updates: [env_logger](https://github.com/rust-cli/env_logger), [mbedtls](https://github.com/fortanix/rust-mbedtls) and [chrono](https://github.com/chronotope/chrono).

Updates `env_logger` from 0.10.1 to 0.10.2
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](rust-cli/env_logger@v0.10.1...v0.10.2)

Updates `mbedtls` from 0.12.1 to 0.12.2
- [Release notes](https://github.com/fortanix/rust-mbedtls/releases)
- [Commits](fortanix/rust-mbedtls@mbedtls_v0.12.1...mbedtls_v0.12.2)

Updates `chrono` from 0.4.31 to 0.4.33
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](chronotope/chrono@v0.4.31...v0.4.33)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: crates-io
- dependency-name: mbedtls
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: crates-io
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: crates-io
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

add Cryptographic Algorithm Self Test

- Add a Known answer Cryptographic Algorithm Self Test for FFDHE cipher suites.

Add FFDHE FIPS checks (#48)

This PR adds necessary FIPS checks in FFDHE key exchange:

- Add a Known answer Cryptographic Algorithm Self Test for FFDHE cipher suites.
- Add FFC Pairwise Consistency Test described in [FIPS 140-3 IG] section 10.3.A.
- Add FFC Full Public-Key Validation Routine defined in section 5.6.2.3.3 of [NIST SP 800-56A Rev. 3].

[FIPS 140-3 IG]: https://csrc.nist.gov/projects/cryptographic-module-validation-program/fips-140-3-ig-announcements
[NIST SP 800-56A Rev. 3]: https://csrc.nist.gov/pubs/sp/800/56/a/r3/final

Back port ecdh fips checks (#50)

* Add ECDHE FIPS checks (#46)

* build: add feature `fips`

Add feature `fips` for "rustls-mbedcrypto-provider".

* feat: add fips EC public key check

- Add ECC Full Public-Key Validation during EC key exchange.
- Add tests for check functions and new `FipsCheckError`.
- Add tests to CI.

* Add ECC Pairwise Consistency Test for FIPS

* refactor: better naming & code style & code order

* refactor: improve EC fips checks

* test: add tests for fips pct check

* update tests

* fix ci

* cargo fmt

refactor fips code

change fips test logging level to debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants