Class ZipValidator

java.lang.Object
org.codice.ddf.catalog.transformer.zip.ZipValidator

public class ZipValidator extends Object
This class verifies the signature of a Zip file using techniques found in the Java 8 documentation provided by Oracle.

http://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/HowToImplAProvider.html#VerifySigs

  • Constructor Details

    • ZipValidator

      public ZipValidator()
  • Method Details

    • init

      public void init()
    • validateZipFile

      public boolean validateZipFile(String filePath) throws ZipValidationException
      Validates a Zip file with the specified path. If the Zip file does not have a manifest, is not signed, or does not match a certificate in the DDF KeyStore, the validation fails.
      Parameters:
      filePath - - the path to the zip file to validate
      Returns:
      true when the zip file is valid (signed by a trusted entity).
      Throws:
      ZipValidationException
    • getSignaturePropertiesPath

      public String getSignaturePropertiesPath()
    • setSignaturePropertiesPath

      public void setSignaturePropertiesPath(String signaturePropertiesPath)