|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.crypto.CertPath
public class CertPath
Stores a certification path with all included certificates. Keep in mind, that this CertPath adds a new Certificate to the BEGINNING of the Vector. That means the first Certificate is at the end of the Vector.
gui.CertDetailsDialog, anon.crypto.XMLSignature
Field Summary | |
---|---|
private int |
m_certCount
the number of certificates included in this CertPath |
private java.util.Vector |
m_certificates
the included certificates |
private int |
m_rootCertificateClass
the certificate class of the rootCerts that may verify this CertPath |
static java.lang.String |
XML_ATTR_CLASS
|
static java.lang.String |
XML_ELEMENT_NAME
|
Fields inherited from interface anon.util.IXMLEncodable |
---|
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_VERSION |
Constructor Summary | |
---|---|
protected |
CertPath(org.w3c.dom.Element a_elemCertPath)
|
protected |
CertPath(JAPCertificate firstCert)
Creates a new CertPath Object from a given Certificate |
Method Summary | |
---|---|
protected void |
add(JAPCertificate a_certificate)
Adds a certificate to next higher level of this CertPath, if the cert is not already included |
boolean |
checkValidity(java.util.Date a_date)
Checks the validity of all certificates in the path. |
int |
getCertCount()
Returns the number of certificates in this CertPath |
java.util.Enumeration |
getCertificates()
Creates an Enumeration of CertificateInfoStructures of the included certs. |
JAPCertificate |
getFirstCertificate()
Returns the certificate from the lowest Level of this CertPath (the one that was added at first). |
protected JAPCertificate |
getLatestAddedCertificate()
Returns the top level certificate (it is the one that was last added) |
JAPCertificate |
getSecondCertificate()
Returns the certificate from the second lowest Level of this CertPath (the one that was added at Second). |
private CertificateInfoStructure |
getVerifier(boolean checkValidity)
Tries to find a verifying root certificate for the top level cert. |
protected void |
remove(JAPCertificate a_certificate)
Removes the specified certificate from this CertPath |
protected void |
removeAllButLast()
Removes all certificates except the one on the lowest level of this certPath |
protected void |
setDocType(int a_documentClass)
Sets the certificate class for the root certificates that can verify this Cert Path. |
java.lang.String |
toString()
Creates a human readable List in String-Format using the CommonNames of the included certs. |
org.w3c.dom.Element |
toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document. |
boolean |
verify()
Tries to verify the top level certificate in this CertPath against the root certificates. |
boolean |
verify(JAPCertificate a_certificate)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XML_ELEMENT_NAME
public static final java.lang.String XML_ATTR_CLASS
private int m_certCount
private int m_rootCertificateClass
private java.util.Vector m_certificates
Constructor Detail |
---|
protected CertPath(JAPCertificate firstCert)
firstCert
- The first certifiacte of the path
(it will be on the lowest Level of the cert hierarchy)protected CertPath(org.w3c.dom.Element a_elemCertPath) throws XMLParseException
XMLParseException
Method Detail |
---|
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
IXMLEncodable
toXmlElement
in interface IXMLEncodable
a_doc
- a document
protected void add(JAPCertificate a_certificate)
a_certificate
- the certificate to addprotected void remove(JAPCertificate a_certificate)
a_certificate
- the certificate to removeprotected void removeAllButLast()
protected JAPCertificate getLatestAddedCertificate()
public JAPCertificate getFirstCertificate()
public JAPCertificate getSecondCertificate()
protected void setDocType(int a_documentClass)
a_documentClass
- a document class from the SignatureVerifieranon.crypto.SignatureVerifier.getVerifiedXml()
private CertificateInfoStructure getVerifier(boolean checkValidity)
checkValidity
- shall the validity be checked?
anon.crypto.SignatureVerifier.getCertificateInfoStructure()
public boolean checkValidity(java.util.Date a_date)
a_date
- the date for which the validity of the path is tested
public boolean verify(JAPCertificate a_certificate)
public boolean verify()
public int getCertCount()
public java.util.Enumeration getCertificates()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |