public abstract class ValidationState extends Object
| Constructor and Description |
|---|
ValidationState() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCertificate(CertificateV2 certificate)
Add the certificate to the top of the certificate chain.
|
abstract void |
bypassValidation_()
Call the success callback of the original packet without signature
validation.
|
abstract void |
fail(ValidationError error)
Call the failure callback.
|
ArrayList<CertificateV2> |
getCertificateChain_()
Get the internal certificateChain_.
|
int |
getDepth()
Get the depth of the certificate chain.
|
boolean |
hasOutcome()
Check if validation failed or success has been called.
|
boolean |
hasSeenCertificateName(Name certificateName)
Check if certificateName has been previously seen, and record the supplied
name.
|
boolean |
isOutcomeFailed()
Check if validation failed has been called.
|
boolean |
isOutcomeSuccess()
Check if validation success has been called.
|
protected void |
setOutcome(boolean outcome)
Set the outcome to the given value, and set hasOutcome_ true.
|
CertificateV2 |
verifyCertificateChain_(CertificateV2 trustedCertificate)
Verify signatures of certificates in the certificate chain.
|
abstract void |
verifyOriginalPacket_(CertificateV2 trustedCertificate)
Verify the signature of the original packet.
|
public final boolean hasOutcome()
public final boolean isOutcomeFailed()
public final boolean isOutcomeSuccess()
public abstract void fail(ValidationError error)
public final int getDepth()
public final boolean hasSeenCertificateName(Name certificateName)
certificateName - The certificate name, which is copied.public final void addCertificate(CertificateV2 certificate) throws CertificateV2.Error
certificate - The certificate to add, which is copied.CertificateV2.Errorprotected final void setOutcome(boolean outcome)
outcome - The outcome.IllegalArgumentException - If this ValidationState already has an
outcome.public abstract void verifyOriginalPacket_(CertificateV2 trustedCertificate)
trustedCertificate - The certificate that signs the original packet.public abstract void bypassValidation_()
public final CertificateV2 verifyCertificateChain_(CertificateV2 trustedCertificate)
public final ArrayList<CertificateV2> getCertificateChain_()
Copyright © 2019. All rights reserved.