Class ZipValidator
java.lang.Object
org.codice.ddf.catalog.transformer.zip.ZipValidator
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()voidsetSignaturePropertiesPath(String signaturePropertiesPath) booleanvalidateZipFile(String filePath) Validates a Zip file with the specified path.
-
Constructor Details
-
ZipValidator
public ZipValidator()
-
-
Method Details
-
init
public void init() -
validateZipFile
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
-
setSignaturePropertiesPath
-