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

67 - Additional certificate utility methods #68

Merged
merged 7 commits into from
Apr 29, 2024
Merged

67 - Additional certificate utility methods #68

merged 7 commits into from
Apr 29, 2024

Conversation

haripri-vt
Copy link
Contributor

Adds the following useful methods to CertUtil:

  1. encodeCert - produce the PEM-encoding given an X509Certificate object
  2. subjectDN - produce a string version of the subject of the given X509Certificate object
  3. generateCert - Produce a self-signed X509Certificate object given a key pair and validity period as a Duration and an overloaded method with notBefore and notAfter.

Adds the following useful methods to CertUtil:

1. encodeCert - produce the PEM-encoding given an X509Certificate object
2. subjectDN - produce a string version of the subject of the given X509Certificate object
3. generateCert - Produce a self-signed X509Certificate object given a key pair and validity period as a Duration and an overloaded method with notBefore and notAfter.
@haripri-vt haripri-vt force-pushed the 67-cert-util branch 2 times, most recently from 9753a9b to fb0805f Compare March 27, 2024 14:32
MR fixes to include DER encoding type, removing hardcoded Signature algorithm during X509 certificate generation and other minor fixes.
Fix to include UTF_8 charset.
@dfish3r
Copy link
Member

dfish3r commented Apr 4, 2024

I created a PR to generify the encoding implementation:
#74
Admittedly, I don't know how this will affect your downstream API usage, but it felt like a cleaner implementation.

@serac
Copy link
Member

serac commented Apr 5, 2024

I believe this is good to go now.

dfish3r and others added 2 commits April 5, 2024 07:56
Rename canonX500PrincipalFormat.CANONICAL to X500PrincipalFormat.READABLE
@serac serac merged commit 9b1550b into main Apr 29, 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

Successfully merging this pull request may close these issues.

3 participants