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 the trust anchors of the verified paths #1

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

kikuomax
Copy link
Member

I need the trust anchors of the verified paths in my use case. This PR lets the verification methods return the trust anchors of the verified paths if they succeed.

- `verify_cert::build_chain` returns the trust anchor of the verified
  path if it succeeds. `ChainOptions` needs to have another lifetime for
  the contents of `TrustAnchor` to return `TrustAnchor` without
  restricting lifetimes of other parameters.

  `TrustAnchor` carries the reference to the underlying DER
  representation so that users of this package can derive additional
  information from the results. `TrustAnchor` implements `Clone` to
  simplify lifetime management. The clone operation should not be
  expensive; four copies of references.

  The following public methods of `EndEntityCert` return the trust
  anchor of the verified path:
    - `verify_for_usage`
    - `verify_for_usage_with_policy_check`
    - `verify_is_valid_tls_server_cert`
    - `verify_is_valid_tls_client_cert`
@kikuomax kikuomax self-assigned this Nov 23, 2023
src/end_entity.rs Outdated Show resolved Hide resolved
Copy link
Member Author

@kikuomax kikuomax left a comment

Choose a reason for hiding this comment

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

I have self-reviewed the changes. The semver error should not matter.

@kikuomax kikuomax merged commit 335d26c into v0.101-ext Nov 23, 2023
38 of 40 checks passed
@kikuomax kikuomax deleted the return-trust-anchor branch November 23, 2023 07:29
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.

1 participant