Package com.suse.coco.module.snpguest.io
Class VerificationDirectoryProvider
java.lang.Object
com.suse.coco.module.snpguest.io.VerificationDirectoryProvider
Creates
VerificationDirectory used to store the data needed by the SNPGuest tool
to perform validation.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.VerificationDirectoryProvider(Path baseWorkingDirIn, Path sourceCertificatesDirIn) -
Method Summary
Modifier and TypeMethodDescriptioncreateDirectoryFor(long resultId, AttestationReport report) Creates and prepares a new verification directory.private PathcreateTemporaryPath(String prefix)
-
Field Details
-
DEFAULT_CERTIFICATION_PATH
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
baseWorkingDir
-
sourceCertificatesDir
-
-
Constructor Details
-
VerificationDirectoryProvider
public VerificationDirectoryProvider()Default constructor. Creates the working directory in system temporary folder and reads certificates fromDEFAULT_CERTIFICATION_PATH. -
VerificationDirectoryProvider
-
-
Method Details
-
createDirectoryFor
public VerificationDirectory createDirectoryFor(long resultId, AttestationReport report) throws IOException Creates and prepares a new verification directory. The creation process involves:- Creating a folder
- Copying the certificates into the certs/ subdirectory
- Save the report under the file "report.bin"
- Parameters:
resultId- the id of the attestation result linked to this reportreport- the attestation report- Returns:
- the created
VerificationDirectory - Throws:
IOException- when something went wrong during the preparation of the directory.
-
createTemporaryPath
- Throws:
IOException
-