Class SNPGuestWorker

  • All Implemented Interfaces:
    AttestationWorker

    public class SNPGuestWorker
    extends java.lang.Object
    implements AttestationWorker
    Worker class for verifying the reports with SNPGuest
    • Field Detail

      • LOGGER

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

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

        private final java.lang.StringBuilder outputBuilder
    • Constructor Detail

      • SNPGuestWorker

        public SNPGuestWorker()
        Default constructor.
      • SNPGuestWorker

        SNPGuestWorker​(VerificationDirectoryProvider directoryProviderIn,
                       SNPGuestWrapper snpGuestWrapperIn,
                       com.suse.common.io.ByteSequenceFinder sequenceFinderIn)
        Constructor with explicit dependencies, for unit test only.
        Parameters:
        directoryProviderIn - the verification directory provider
        snpGuestWrapperIn - the snpguest executor
        sequenceFinderIn - the byte sequence finder
    • Method Detail

      • 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​(java.lang.String message)
      • appendError

        private void appendError​(java.lang.String message,
                                 ProcessOutput processOutput)
      • appendError

        private void appendError​(java.lang.String message,
                                 java.lang.Exception ex)
      • appendSuccess

        private void appendSuccess​(java.lang.String message)
      • appendSuccess

        private void appendSuccess​(java.lang.String message,
                                   ProcessOutput output)
      • appendOutput

        private void appendOutput​(java.lang.String message,
                                  ProcessOutput processOutput)
      • getProcessOutputDetails

        private static java.lang.String getProcessOutputDetails​(ProcessOutput processOutput)