net.named_data.jndn.security.certificate
public class Certificate extends Data
Constructor and Description |
---|
Certificate()
The default constructor.
|
Certificate(Data data)
Create a Certificate from the content in the data packet.
|
Modifier and Type | Method and Description |
---|---|
void |
addExtension(CertificateExtension extension)
Add a certificate extension.
|
void |
addSubjectDescription(CertificateSubjectDescription description)
Add a subject description.
|
void |
encode()
Encode the contents of the certificate in DER format and set the Content
and MetaInfo fields.
|
List |
getExtensionList() |
double |
getNotAfter() |
double |
getNotBefore() |
PublicKey |
getPublicKeyInfo() |
List |
getSubjectDescriptionList() |
boolean |
isTooEarly()
Check if the certificate is valid.
|
boolean |
isTooLate()
Check if the certificate is valid.
|
void |
setNotAfter(double notAfter) |
void |
setNotBefore(double notBefore) |
void |
setPublicKeyInfo(PublicKey key) |
String |
toString() |
void |
wireDecode(Blob input,
WireFormat wireFormat)
Override to call the base class wireDecode then populate the certificate
fields.
|
getChangeCount, getContent, getDefaultWireEncoding, getIncomingFaceId, getMetaInfo, getName, getSignature, setContent, setMetaInfo, setName, setSignature, wireDecode, wireDecode, wireDecode, wireEncode, wireEncode
public Certificate()
public Certificate(Data data) throws DerDecodingException
data
- The data packet with the content to decode.DerDecodingException
public final void encode() throws DerEncodingException, DerDecodingException
public void wireDecode(Blob input, WireFormat wireFormat) throws EncodingException
wireDecode
in class Data
input
- The input byte array to be decoded as an immutable Blob.wireFormat
- A WireFormat object used to decode the input.EncodingException
- For invalid encoding.public final void addSubjectDescription(CertificateSubjectDescription description)
description
- The description to be added.public final List getSubjectDescriptionList()
public final void addExtension(CertificateExtension extension)
extension
- the extension to be addedpublic final List getExtensionList()
public final void setNotBefore(double notBefore)
public final double getNotBefore()
public final void setNotAfter(double notAfter)
public final double getNotAfter()
public final void setPublicKeyInfo(PublicKey key)
public final PublicKey getPublicKeyInfo()
public final boolean isTooEarly()
public final boolean isTooLate()
Copyright © 2016. All rights reserved.