cryptacular
cryptacular copied to clipboard
67 - Additional certificate utility methods
Adds the following useful methods to CertUtil:
- encodeCert - produce the PEM-encoding given an X509Certificate object
- subjectDN - produce a string version of the subject of the given X509Certificate object
- 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.
I created a PR to generify the encoding implementation: https://github.com/vt-middleware/cryptacular/pull/74 Admittedly, I don't know how this will affect your downstream API usage, but it felt like a cleaner implementation.
I believe this is good to go now.