Package com.suse.coco.module.snpguest
Class SNPGuestWorker
java.lang.Object
com.suse.coco.module.snpguest.SNPGuestWorker
- All Implemented Interfaces:
AttestationWorker
Worker class for verifying the reports with SNPGuest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final VerificationDirectoryProviderprivate static final intprivate static final org.apache.logging.log4j.Loggerstatic final Stringprivate final StringBuilderprivate final SecureRandomprivate final com.suse.common.io.ByteSequenceFinderprivate final AbstractSNPGuestWrapper -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SNPGuestWorker(VerificationDirectoryProvider directoryProviderIn, AbstractSNPGuestWrapper abstractSnpGuestWrapperIn, com.suse.common.io.ByteSequenceFinder sequenceFinderIn) Constructor with explicit dependencies, for unit test only. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidappendError(String message) private voidappendError(String message, ProcessOutput processOutput) private voidappendError(String message, Exception ex) private voidappendOutput(String message, ProcessOutput processOutput) private voidappendSuccess(String message) private voidappendSuccess(String message, ProcessOutput output) private static StringgetProcessOutputDetails(ProcessOutput processOutput) booleanprocessRequest(org.apache.ibatis.session.SqlSession session, AttestationResult result) Process the attestation request of a given attestation result.booleanprocessVerification(org.apache.ibatis.session.SqlSession session, AttestationResult result) Process the attestation verification of a given attestation result.
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
INDENT_SIZE
private static final int INDENT_SIZE- See Also:
-
directoryProvider
-
snpGuest
-
sequenceFinder
private final com.suse.common.io.ByteSequenceFinder sequenceFinder -
outputBuilder
-
secureRandom
-
NONCE_TAG
- See Also:
-
-
Constructor Details
-
SNPGuestWorker
public SNPGuestWorker()Default constructor. -
SNPGuestWorker
SNPGuestWorker(VerificationDirectoryProvider directoryProviderIn, AbstractSNPGuestWrapper abstractSnpGuestWrapperIn, com.suse.common.io.ByteSequenceFinder sequenceFinderIn) Constructor with explicit dependencies, for unit test only.- Parameters:
directoryProviderIn- the verification directory providerabstractSnpGuestWrapperIn- the snpguest executorsequenceFinderIn- the byte sequence finder
-
-
Method Details
-
processRequest
public boolean processRequest(org.apache.ibatis.session.SqlSession session, AttestationResult result) Description copied from interface:AttestationWorkerProcess the attestation request of a given attestation result.- Specified by:
processRequestin interfaceAttestationWorker- Parameters:
session- the active mybatis database sessionresult- the attestation result to process.- Returns:
trueif the processing succeeded,falseotherwise.
-
processVerification
public boolean processVerification(org.apache.ibatis.session.SqlSession session, AttestationResult result) Description copied from interface:AttestationWorkerProcess the attestation verification of a given attestation result.- Specified by:
processVerificationin interfaceAttestationWorker- Parameters:
session- the active mybatis database sessionresult- the attestation result to process.- Returns:
trueif the processing succeeded,falseotherwise.
-
appendError
-
appendError
-
appendError
-
appendSuccess
-
appendSuccess
-
appendOutput
-
getProcessOutputDetails
-