Class SNPGuestWorker

java.lang.Object
com.suse.coco.module.snpguest.SNPGuestWorker
All Implemented Interfaces:
AttestationWorker

public class SNPGuestWorker extends Object implements AttestationWorker
Worker class for verifying the reports with SNPGuest
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • INDENT_SIZE

      private static final int INDENT_SIZE
      See Also:
    • directoryProvider

      private final VerificationDirectoryProvider directoryProvider
    • snpGuest

      private final AbstractSNPGuestWrapper snpGuest
    • sequenceFinder

      private final com.suse.common.io.ByteSequenceFinder sequenceFinder
    • outputBuilder

      private final StringBuilder outputBuilder
  • 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 provider
      abstractSnpGuestWrapperIn - the snpguest executor
      sequenceFinderIn - the byte sequence finder
  • Method Details

    • process

      public boolean process(org.apache.ibatis.session.SqlSession session, AttestationResult result)
      Description copied from interface: AttestationWorker
      Process the given attestation result.
      Specified by:
      process in interface AttestationWorker
      Parameters:
      session - the active mybatis database session
      result - the attestation result to process.
      Returns:
      true if the processing succeeded, false otherwise.
    • appendError

      private void appendError(String message)
    • appendError

      private void appendError(String message, ProcessOutput processOutput)
    • appendError

      private void appendError(String message, Exception ex)
    • appendSuccess

      private void appendSuccess(String message)
    • appendSuccess

      private void appendSuccess(String message, ProcessOutput output)
    • appendOutput

      private void appendOutput(String message, ProcessOutput processOutput)
    • getProcessOutputDetails

      private static String getProcessOutputDetails(ProcessOutput processOutput)