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

Command line utility #187

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Command line utility #187

wants to merge 1 commit into from

Conversation

stepancheg
Copy link
Contributor

@stepancheg stepancheg commented Feb 17, 2021

For now it has two subcommands:

  • just parse end entity certificate
  • verify server certificate

Is not meant to be public, does not provide a stable interface.

Useful mostly for debugging of WebPKI itself.

% cargo run -p webpki-bin -- print-cert ./tests/netflix/ca.der
...
target/debug/webpki: failed to parse a cert ./tests/netflix/ca.der: BadDER
% cargo run -p webpki-bin -- verify-server-cert \
    --server-cert tests/netflix/ee.der \
    --trusted-root tests/netflix/ca.der \
    --intermediates tests/netflix/inter.der \
    --time 1492441716
...
server certificate tests/netflix/ee.der is valid

@codecov
Copy link

codecov bot commented Feb 17, 2021

Codecov Report

Merging #187 (036071f) into main (ba54ede) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #187   +/-   ##
=======================================
  Coverage   71.70%   71.70%           
=======================================
  Files          17       17           
  Lines        1403     1403           
=======================================
  Hits         1006     1006           
  Misses        397      397           
Impacted Files Coverage Δ
tests/integration.rs 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba54ede...036071f. Read the comment docs.

@stepancheg
Copy link
Contributor Author

Updated the PR with a subcommand to verify server certificate.

webpki-bin/Cargo.toml Outdated Show resolved Hide resolved
stepancheg added a commit to stepancheg/webpki that referenced this pull request Feb 17, 2021
Follow-up to briansmith#187.

I agree to license my contributions to each file under the terms
given at the top of each file I changed.
@stepancheg
Copy link
Contributor Author

Done. This is rebased on top #192.

/// All signature algorithms supported by the webpki crate.
///
/// Note the list depends on whether `alloc` feature is on or off.
pub static ALL_SIGNATURE_ALGORITHMS: &[&SignatureAlgorithm] = &[
Copy link
Owner

Choose a reason for hiding this comment

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

Sorry, I know I asked you to move this into the library but that was a mistake on my part. Please move it back to where you had it before and add a comment to this:

// Keep in sync with ALL_SIGALGS in tests/integration.rs.

For now it has two subcommands:
* just parse end entity certificate
* verify server certificate

Is not meant to be public, does not provide a stable interface.

Useful mostly for debugging of WebPKI itself.

```
% cargo run -p webpki-bin -- print-cert ./tests/netflix/ca.der
...
target/debug/webpki: failed to parse a cert ./tests/netflix/ca.der: BadDER
```

```
% cargo run -p webpki-bin -- verify-server-cert \
    --server-cert tests/netflix/ee.der \
    --trusted-root tests/netflix/ca.der \
    --intermediates tests/netflix/inter.der \
    --time 1492441716
...
server certificate tests/netflix/ee.der is valid
```

I agree to license my contributions to each file under the terms
given at the top of each file I changed.
@stepancheg
Copy link
Contributor Author

Reverted to the previous version.

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.

None yet

2 participants