public interface Certificate
Modifier and Type | Field and Description |
---|---|
static long |
DAY |
static long |
HOUR |
static long |
SECOND |
static long |
YEAR |
Modifier and Type | Method and Description |
---|---|
void |
addDurationInDays(String days)
set duration of cert in days.
|
void |
addDurationInHours(String hours)
set the duration of the certificate in hours
Useful for short durations ( for public kiosks for example )
If days is set then this will be added to the days.
|
void |
addSubjectAlternativeName(String san)
Set the WebID for the certificate.
|
X509Certificate |
getCertificate() |
Date |
getEndDate() |
CertSerialisation |
getSerialisation()
get the encoded version of this certificate in a binary form
|
Date |
getStartDate() |
PubKey |
getSubjectPublicKey() |
void |
setDefaultSerialisation(CertSerialisation ser)
When we create a certificate we already know the serialisation it is going to require.
|
void |
setEndDate(Date endDate)
set the end date of validity of the certificate.
|
void |
setStartDate(Date startDate) |
void |
setSubjectCommonName(String name) |
void |
startEarlier(String hours)
in order to avoid synchronization problems it is good to set the
start date to be somewhat earlier than the current time.
|
static final long SECOND
static final long HOUR
static final long DAY
static final long YEAR
X509Certificate getCertificate()
void addSubjectAlternativeName(String san)
san,
- a Subject Alternative Name to add. Must be a full URL, usually the WebIDvoid setSubjectCommonName(String name)
name
- he user should set a himself a name that will be easily recognised in the browser.
Eg: "Henry-public"void setStartDate(Date startDate)
startDate
- Set the start date for the validity of the certificate. If unset it will be now.Date getStartDate()
void setEndDate(Date endDate)
endDate
- end dateDate getEndDate()
void addDurationInDays(String days)
days
- the duration of the certificate in days, as a floating point numbervoid startEarlier(String hours)
hours
- a floating point numbervoid addDurationInHours(String hours)
hours
- as floats, encoded as strings (it is easier to get a string from velocity). Partial hours are possiblePubKey getSubjectPublicKey()
void setDefaultSerialisation(CertSerialisation ser)
ser
- the serialisation implementationCertSerialisation getSerialisation() throws Exception
Exception
- why? //todo: is this really neededCopyright © 2014 The Apache Software Foundation. All Rights Reserved.