Class VerificationDirectory

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class VerificationDirectory
    extends java.lang.Object
    implements java.lang.AutoCloseable
    A 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.Path path  
      static java.lang.String REPORT_FILE
      The report binary file
      static java.lang.String VCEK_FILE
      The 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
      void close()
      Removes this verification directory and all the files contained within it
      java.nio.file.Path getBasePath()  
      java.nio.file.Path getCertsPath()  
      java.nio.file.Path getReportPath()  
      java.nio.file.Path getVCEKPath()  
      boolean isVCEKAvailable()
      Check if the VCEK file exists
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • VerificationDirectory

        VerificationDirectory​(java.nio.file.Path pathIn)
    • 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_FILE exists.
      • close

        public void close()
                   throws java.io.IOException
        Removes this verification directory and all the files contained within it
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException - when the deletion fails.