public class X509Cert extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
X509Cert.Issuer
Issuer parts.
|
static class |
X509Cert.KeyUsage
Key usage.
|
static class |
X509Cert.SubjectName
Subject Name parts.
|
Constructor and Description |
---|
X509Cert(X509Certificate cert)
Creates a copy of the X509Certificate.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getCertificatePolicies()
Returns current certificate policies or null if no policies was found.
|
List<X509Cert.KeyUsage> |
getKeyUsages()
Returns the current certificate key usage.
|
String |
getSerial()
Reads serial number from X.509 certificate.
|
String |
getSubjectName()
Returns the whole subject name.
|
String |
getSubjectName(X509Cert.SubjectName part)
Returns part of the subject name (for example if set to CN it returns the Common Name part).
|
X509Certificate |
getX509Certificate()
Returns the internal X509 Certificate of the certificate.
|
String |
issuerName()
Reads the the whole issuer name from the X.509 certificate.
|
String |
issuerName(X509Cert.Issuer part)
Retrieves part of the issuer name (for example if set to CN it returns the Common Name part).
|
boolean |
isValid()
Validates if the current time is between the certificate's validity start date and expiration date.
|
boolean |
isValid(Date date)
Validates if the certificate is in a valid time slot.
|
public X509Cert(X509Certificate cert)
cert
- X509 certificate to be wrappedpublic List<String> getCertificatePolicies() throws IOException
IOException
- when policy parsing failspublic X509Certificate getX509Certificate()
public String issuerName(X509Cert.Issuer part)
part
- sets part of issuer name to returnpublic String issuerName()
public boolean isValid(Date date)
date
- sets date to comparepublic boolean isValid()
public List<X509Cert.KeyUsage> getKeyUsages()
public String getSerial()
public String getSubjectName(X509Cert.SubjectName part)
part
- sets part of subject name to returnpublic String getSubjectName()
Copyright © 2023. All rights reserved.