You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
For (2), consider flags or overloaded variants that optionally produce output containing spaces; for example:
System.out.println(selfSignedCert.getSubjectX500Principal().toString());
CN=middleware-test, OU=Middleware, O=Virginia Polytechnic Institute and State University, L=Blacksburg, ST=Virginia, DC=vt, DC=edu, C=US
System.out.println(selfSignedCert.getSubjectX500Principal().getName());
CN=middleware-test,OU=Middleware,O=Virginia Polytechnic Institute and State University,L=Blacksburg,ST=Virginia,DC=vt,DC=edu,C=US
Comparing DNs by string representation is fraught with peril, but providing both outputs could be helpful for simple cases.
For(3) the method should support both RSA and EC keys.
The text was updated successfully, but these errors were encountered:
Add the following useful methods to
CertUtil
:encodeCert
- produce the PEM-encoding given anX509Certificate
objectsubjectDN
- produce a string version of the subject of the givenX509Certificate
objectgenerateCert
- Produce a self-signedX509Certificate
object given a key pair and validity period as aDuration
For (2), consider flags or overloaded variants that optionally produce output containing spaces; for example:
Comparing DNs by string representation is fraught with peril, but providing both outputs could be helpful for simple cases.
For(3) the method should support both RSA and EC keys.
The text was updated successfully, but these errors were encountered: