Certificate¶
-
public class
Certificate
extends TokenObject¶ This class describes a certificate object. Inherits from
TokenObject
.Note that the constructor is not intended to be called by user code. Such objects are constructed internally by the API.
Methods¶
getIssuer¶
-
public String
getIssuer
()¶ Gets the issuer name of the certificate.
The string is obtained by using the same rules as for the
Certificate.getSubject()
string.Returns: the issuer name of the certificate.
getJCACertificate¶
-
public X509Certificate
getJCACertificate
()¶ Returns a new
X509Certificate
object created from theCertificate
object.Returns: the X509Certificate
object.
getNotAfter¶
-
public String
getNotAfter
()¶ Gets the certificate end of validity date.
Returned value can be parsed using
java.time.ZonedDateTime.parse(CharSequence)
.Returns: end of validity date, given as a ISO-8601 string.
getNotBefore¶
-
public String
getNotBefore
()¶ Gets the certificate start of validity date.
Returned value can be parsed using
java.time.ZonedDateTime.parse(CharSequence)
.Returns: start of validity date, given as a ISO-8601 string.
getRoot¶
-
public boolean
getRoot
()¶ Returns
true
if the certificate is a root certificate.Returns: true
if the certificate is a root certificate;false
otherwise
getSerial¶
getSubject¶
-
public String
getSubject
()¶ Gets the subject name of the certificate.
The string is extracted from the last (most specific) occurrence of common name field.
If no such field is defined, the implementation falls back on the first organizational unit name field, or the first organization name field, or the first email address field (in this order).
Returns: the subject name of the certificate.