Skip to content

rust-query-crlite: log more relevant information by default #353

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

Merged
merged 4 commits into from
Jun 7, 2025

Conversation

jschanck
Copy link
Collaborator

@jschanck jschanck commented Jun 6, 2025

Some usability improvements to the rust-query-crlite utility. You no longer have to pass -vvvv to get useful information. Here are some samples of output at different verbosity levels:

Default:

$ rust-query-crlite --update stage --db crlite_db_stage crtsh 13302141633
INFO - Loaded 1 CRLite filter(s), most recent was downloaded: 0 hours ago
INFO - 13302141633 Revoked

With -v it provides some diagnostic info:

 $ rust-query-crlite -v --db crlite_db_stage crtsh 13302141633
INFO - Loaded 1 CRLite filter(s), most recent was downloaded: 0 hours ago
DEBUG - Issuer DN: C=IN, OU=emSign PKI, O=eMudhra Technologies Limited, CN=emSign SSL CA - G1
DEBUG - Subject DN: CN=*.posttraining.go.ke
DEBUG - Serial number: 1a8e8c301b5a3a19
DEBUG - Issuer SPKI hash: qvzNg6-PS7JbCFR-FL-eAfFZOiN6pXXsH1tc9auHlF8=
INFO - 13302141633 Revoked

With -vv it logs the result of each clubcard it queried:

$ rust-query-crlite -vv --db crlite_db_stage crtsh 13302141633
INFO - Loaded 1 CRLite filter(s), most recent was downloaded: 0 hours ago
DEBUG - Issuer DN: C=IN, OU=emSign PKI, O=eMudhra Technologies Limited, CN=emSign SSL CA - G1
DEBUG - Subject DN: CN=*.posttraining.go.ke
DEBUG - Serial number: 1a8e8c301b5a3a19
DEBUG - Issuer SPKI hash: qvzNg6-PS7JbCFR-FL-eAfFZOiN6pXXsH1tc9auHlF8=
TRACE - 20250606-4-default.filter: Revoked
INFO - 13302141633 Revoked

And with -q you can silence all output (the return code still encodes the revocation status result).

$ rust-query-crlite -q --db crlite_db_stage crtsh 13302141633
$ echo $?
1

@jschanck jschanck requested a review from dennisjackson June 6, 2025 22:42
@dennisjackson
Copy link
Collaborator

Looks good!

@jschanck jschanck merged commit 0b23eb1 into mozilla:main Jun 7, 2025
@jschanck jschanck deleted the rust-query-crlite-usability branch June 7, 2025 14:16
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