-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add support for CSR in the dump function #203
base: master
Are you sure you want to change the base?
Conversation
Added another flag --depth to connect and dump to limit the number of certificates to be printed in --json or --pem flags to make is easier to ignore if only the leaft certificate is required. Old vs New Commands: * dump just the leaf cert old : certigo dump cert_chain.pem --json | jq '.certificates[0]' new : certigo dump cert_chain.pem --json --depth 1 | jq Similar with other flags eg --verbose or short description * connect to get just the leaf cert old : certigo connect hostname --json | jq '.certificates[0]' new : certigo connect hostname --json --depth 1 | jq old : certigo connect hostname --json --start-tls ldap | jq '.certificates[0]' new : certigo connect hostname --json --start-tls ldap --depth 1 | jq This option is not implemented in verify and can be added if there is a good response to this commit.
452f31d
to
f465144
Compare
8f12bb6
to
0c0846e
Compare
Add support for parsing a CSR in the --dump flag using a --csr flag. This flag would only read the Certificate Signing Requests in the file.
0c0846e
to
5de2475
Compare
Do we need a |
@alokmenghrajani that's a good point. The direction from where I am coming is, this tools only scans for x509 certificates right now. If we let the PEM parser decide what is the type of the block, then it might have to be designed in such a way. The code is written in such a way that it will only accept If this seems to be a good feature, to let the parser understand the type of the block, then I can work on getting the CSR within the above frame and not have a I was looking at the code and I can think of using the output of |
Add support for CSR when using the
dump
command by implementing a flag--csr
that would look for CSR(s) in the file and then parse it. Usage could be like:It supports the
--depth
,--json
and--verbose
flags.Add tests for the same.