Skip to content

Comments

Command line utility#187

Open
stepancheg wants to merge 1 commit intobriansmith:mainfrom
stepancheg:cli
Open

Command line utility#187
stepancheg wants to merge 1 commit intobriansmith:mainfrom
stepancheg:cli

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

@stepancheg stepancheg force-pushed the cli branch 2 times, most recently from bb29bf0 to 3ed5630 Compare February 17, 2021 01:47
@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.

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.

2 participants