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

Request for Improvement in read-certificate-data command #75

Open
tinsep19 opened this issue Jun 27, 2024 · 0 comments
Open

Request for Improvement in read-certificate-data command #75

tinsep19 opened this issue Jun 27, 2024 · 0 comments

Comments

@tinsep19
Copy link

tinsep19 commented Jun 27, 2024

Description:

We propose the following improvements for the read-certificate-data or --cert-selector option.

Request Details

Background

OS: Windows 10
Certificate Store: OS-specific secure stores.

Consider the following certificate in the certificate store:

PS C:\> Get-Item Cert:\CurrentUser\My\2C8972C2DDEB93E22633CDC46E52396D1B41EF0C | fl Subject, Issuer, SerialNumber, Thumbprint
Subject      : E=who@example.com, CN=xxxxxxxx, OU=Employees, DC=example, DC=com
Issuer       : CN=EXAMPLE-CA, DC=example, DC=com
SerialNumber : 2B0004984811E47C4DFCD2C63E000000049848
Thumbprint   : 2C8972C2DDEB93E22633CDC46E52396D1B41EF0C

The selector obtained by executing read-certificate-data is as follows:

2c8972c2ddeb93e22633cdc46e52396d1b41ef0c "CN=xxxxxxxx,OU=Employees,1.2.840.113549.1.9.1=#<HEX([email protected])>,0.9.2342.19200300.100.1.25=#<HEX(example)>,0.9.2342.19200300.100.1.25=#<HEX(com)>"

1.2.840.113549.1.9.1 represents E (emailAddress), and 0.9.2342.19200300.100.1.25 represents DC (domainComponent).
#<HEX(some string)> represents the hexadecimal representation of the UTF-8 string.

I believe this output follows RFC2253, but it may be difficult to understand without familiarity with ASN.1 or RFC2253. Moreover, the Issuer's selector cannot be confirmed using read-certificate-data.

Proposed Improvements

We would like to request either or both of the following improvements:

  1. Modify the read-certificate-data command to also output the Issuer's value, making it easier to specify selectors.
  2. Improve the current matching process for selectors, which currently selects based on matching Subject, Issuer, and SerialNumber, to allow users to specify selectors more intuitively.

We believe these improvements will make it easier for users to select the correct certificate. Thank you for your consideration.

@tinsep19 tinsep19 changed the title Request for Improvement in --cert-selector Option Request for Improvement in read-certificate-date command Jul 1, 2024
@tinsep19 tinsep19 changed the title Request for Improvement in read-certificate-date command Request for Improvement in read-certificate-data command Jul 1, 2024
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

No branches or pull requests

1 participant