public class ArchiveResults
extends java.lang.Object
ArchiveInputStream.getArchiveResults() after
all the data in the stream has been processed and
ArchiveInputStream.getArchiveResults() is called.
It is only possible to get the results if the data in the ArchiveInputStream was successfully decoded. This class contains
ArchiveInputStream| Modifier and Type | Method and Description |
|---|---|
PemOptions |
getArchiveOptions()
Returns the options used when the Archive was created.
|
CertificationException |
getEncryptionCertificateException()
Returns any exception thrown when validating the encryption
certificate of the Archive creator.
|
X509Certificate |
getOriginatorEncryptionCertificate()
Returns the encryption certificate of the message originator.
|
X509Certificate |
getOriginatorVerificationCertificate()
Returns the verification certificate of the message signer.
|
java.security.SignatureException |
getSignatureException()
Returns any Exception that may have occurred during signature validation,
or
null if there was no exception. |
CertificationException |
getVerificationCertificateException()
Returns any exception thrown when validating the verification
certificate of the Archive signer.
|
boolean |
isCrcOk()
Check if the data CRC is okay.
|
boolean |
isSignatureValid()
Returns whether or not the signature on a signed Archive was valid.
|
public boolean isCrcOk()
true if the CRC value in the Archive header matches
the computed CRC, false otherwise.public boolean isSignatureValid()
false.
Returning false for signed Archives usually means the data
contained in the Archive was tampered with and cannot be relied on.
public java.security.SignatureException getSignatureException()
null if there was no exception. Returning a non-null
value almost certainly means the data contained in the Archive was
tampered with and cannot be relied on.public X509Certificate getOriginatorEncryptionCertificate()
null if the Archive was not encrypted.public CertificationException getEncryptionCertificateException()
null if
the Archive was not encrypted, or the certificate is valid.
Some exceptions are more serious than others, and it is up to the
application how they should be dealt with. For example, a
LifespanException is less serious than a
RevocationException.
CertificationExceptionpublic X509Certificate getOriginatorVerificationCertificate()
null if the Archive was not signed.public CertificationException getVerificationCertificateException()
null if
the Archive was not signed, or the certificate is valid.
Some exceptions are more serious than others, and it is up to the
application how they should be dealt with. For example, a
LifespanException is less serious than a
RevocationException.
CertificationExceptionpublic PemOptions getArchiveOptions()