## NAME
`tlsproxy certinfo <uri>` - Display info about X.509 certificate.

## URI SYNTAX
`<path> [; param1=<value1>] [; param2=<value2>] [...]`
&nbsp;
__Locating certificates on disk:__
`<cert_path> [; Key=<key_path>] [; Password=<password>]`
&nbsp;
* `cert_path`: path to a certificate (PFX/P12/P7B/DER/PEM). Full or relative to current working directory.
* `key`: path to a private key file associated with the certificate. If not specified, the certificate file is assumed to contain the private key.
* `password` (or `pwd`): password to decrypt the certificate (or key) file. If not specified, the certificate (or key) file is assumed to be unencrypted.
&nbsp;
__Locating certificates in Certificate Store:__
`cert:/<location>/<store>/<cert_identifier> [; Thumbprint=<hex_thumbprint>] [; CA=<CN_of_CA>] [; Root=<CN_of_Root_CA>]`
&nbsp;
* `location` can be `CurrentUser` (or `User`), `LocalMachine` (or `Machine`), `CurrentService` (or `Service`)
* `store` can be e.g. `My`, `Root`, `CA`, `WebHosting`, etc.
* `cert_identifier` can be either of:
  * __Common Name__ (CN), e.g. www.example.com
  * __Subject Alternative Name__ (SAN), e.g. www.example.org
  * __Thumbprint__ in hexadecimal format, e.g. 0123456789ABCDEF0123456789ABCDEF01234567
  * Use `*` to match any certificate (and use `Thumbprint` or `CA` and/or `Root` URI parameters to select desired certificate)
&nbsp;
* __Note:__ URI path and parameters can be enclosed in double quotes (`"`) or single quotes (`'`). Double them (`""`) or (`''`) to escape quotes inside corresponding quoted text.
* example: `pwd="Here ' is one single quote and "" is one double quote."`
* example: `pwd='Here '' is one single quote and " is one double quote.'`
* example: `pwd=Here ' is one single quote and " is one double quote.`

## EXAMPLES
* `tlsproxy certinfo cert:/LocalMachine/My/localhost`
  * Displays info about certificate located at Certificate Store: `Location=LocalMachine`, `Store=My`, `CN=localhost`
* `tlsproxy certinfo cert:/LocalMachine/My/0123456789ABCDEF0123456789ABCDEF01234567`
  * Displays info about certificate located at Certificate Store with `Location=LocalMachine`, `Store=My`, `Thumbprint=0123456789ABCDEF0123456789ABCDEF01234567`
* `tlsproxy certinfo "c:\data\localhost.pfx; Password=top-secret"`
  * Displays info about a .pfx certificate located at `c:\data\localhost.pfx` and encrypted with password `top-secret`.
* `tlsproxy certinfo "c:\data\localhost.cer; key=c:\data\localhost.ppk; pwd=top-secret"`
  * Displays info about a certificate located at `c:\data\localhost.cer` and also tries to load the associated private key.
&nbsp;
* Passing `uri` argument with quotes (needed if path or parameter contains semicolon):
  * `CMD.exe`:    `tlsproxy certinfo "localhost.pfx; pwd=""Top """"secret"""" ;0"""`
  * `CMD.exe`:    `tlsproxy certinfo "localhost.pfx; pwd='Top ""secret"" ;0'"`
  * `PowerShell`: `.\tlsproxy certinfo 'localhost.pfx; pwd=""Top """"secret"""" ;0""'`
  * `PowerShell`: `.\tlsproxy certinfo 'localhost.pfx; pwd=''Top ""secret"" ;0'''`
