import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.Paths;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import org.apache.commons.net.ftp.FTPReply;
import org.apache.commons.net.ftp.FTPSClient;
import org.oran.datafile.commons.FileCollectClient;
-import org.oran.datafile.commons.FileServerData;
-import org.oran.datafile.commons.SecurityUtil;
import org.oran.datafile.exceptions.DatafileTaskException;
import org.oran.datafile.exceptions.NonRetryableDatafileTaskException;
+import org.oran.datafile.model.FileServerData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.FileSystemResource;
throws KeyStoreException, NoSuchAlgorithmException, IOException, CertificateException {
synchronized (FtpesClient.class) {
if (theTrustManager == null && trustedCaPath != null) {
- String trustedCaPassword = SecurityUtil.getTruststorePasswordFromFile(trustedCaPasswordPath);
+ String trustedCaPassword = Files.readString(Paths.get((trustedCaPasswordPath)));
theTrustManager = createTrustManager(trustedCaPath, trustedCaPassword);
}
return theTrustManager;
synchronized (FtpesClient.class) {
if (theKeyManager == null) {
- String keyCertPassword = SecurityUtil.getKeystorePasswordFromFile(keyCertPasswordPath);
+ String keyCertPassword = Files.readString(Paths.get((keyCertPasswordPath)));
theKeyManager = createKeyManager(keyCertPath, keyCertPassword);
}
return theKeyManager;