public class InterestValidationState extends ValidationState
| Constructor and Description |
|---|
InterestValidationState(Interest interest,
InterestValidationSuccessCallback successCallback,
InterestValidationFailureCallback failureCallback)
Create an InterestValidationState for the Data packet.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSuccessCallback(InterestValidationSuccessCallback successCallback) |
void |
bypassValidation_()
Call the success callback of the original packet without signature
validation.
|
void |
fail(ValidationError error)
Call the failure callback.
|
Interest |
getOriginalInterest()
Get the original Interest packet being validated which was given to the
constructor.
|
void |
verifyOriginalPacket_(CertificateV2 trustedCertificate)
Verify the signature of the original packet.
|
addCertificate, getCertificateChain_, getDepth, hasOutcome, hasSeenCertificateName, isOutcomeFailed, isOutcomeSuccess, setOutcome, verifyCertificateChain_public InterestValidationState(Interest interest, InterestValidationSuccessCallback successCallback, InterestValidationFailureCallback failureCallback)
interest - The Interest packet being validated, which is copied.successCallback - This calls successCallback.successCallback(interest)
to report a successful Interest validation.failureCallback - This calls
failureCallback.failureCallback(interest, error) to report a failed
Interest validation, where error is a ValidationError.public void fail(ValidationError error)
ValidationStatefail in class ValidationStatepublic final Interest getOriginalInterest()
public final void addSuccessCallback(InterestValidationSuccessCallback successCallback)
public void verifyOriginalPacket_(CertificateV2 trustedCertificate)
ValidationStateverifyOriginalPacket_ in class ValidationStatetrustedCertificate - The certificate that signs the original packet.public void bypassValidation_()
ValidationStatebypassValidation_ in class ValidationStateCopyright © 2019. All rights reserved.