Package com.suse.coco.module.snpguest.io
Class VerificationDirectory
- java.lang.Object
-
- com.suse.coco.module.snpguest.io.VerificationDirectory
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class VerificationDirectory extends java.lang.Object implements java.lang.AutoCloseableA class representing a verification directory, used to verify an attestation report. All files and the directory itself will be removed on resource clean up.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.file.Pathpathstatic java.lang.StringREPORT_FILEThe report binary filestatic java.lang.StringVCEK_FILEThe VCEK file name
-
Constructor Summary
Constructors Constructor Description VerificationDirectory(java.nio.file.Path pathIn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Removes this verification directory and all the files contained within itjava.nio.file.PathgetBasePath()java.nio.file.PathgetCertsPath()java.nio.file.PathgetReportPath()java.nio.file.PathgetVCEKPath()booleanisVCEKAvailable()Check if the VCEK file exists
-
-
-
Field Detail
-
REPORT_FILE
public static final java.lang.String REPORT_FILE
The report binary file- See Also:
- Constant Field Values
-
VCEK_FILE
public static final java.lang.String VCEK_FILE
The VCEK file name- See Also:
- Constant Field Values
-
path
private final java.nio.file.Path path
-
-
Method Detail
-
getBasePath
public java.nio.file.Path getBasePath()
-
getCertsPath
public java.nio.file.Path getCertsPath()
-
getReportPath
public java.nio.file.Path getReportPath()
-
getVCEKPath
public java.nio.file.Path getVCEKPath()
-
isVCEKAvailable
public boolean isVCEKAvailable()
Check if the VCEK file exists- Returns:
- true if the file
VCEK_FILEexists.
-
close
public void close() throws java.io.IOExceptionRemoves this verification directory and all the files contained within it- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException- when the deletion fails.
-
-