// Path: src/main/java/com/mps/deepviolet/api/IDVSession.java
// enum CIPHER_NAME_CONVENTION {
// 	GnuTLS, NSS, IANA, OpenSSL
// }
// 
// Path: src/main/java/com/mps/deepviolet/util/FileUtils.java
// public class FileUtils {
// 
// 	/**
// 	 * Get the users DeepViolet working directory. For storing completed
// 	 * reports.
// 	 * 
// 	 * @return Fully qualified name of working directory.
// 	 */
// 	public static final String getWorkingDirectory() {
// 
// 		String OS = System.getProperty("os.name");
// 		String home = System.getProperty("user.home");
// 
// 		StringBuffer buff = new StringBuffer();
// 
// 		if (OS.contains("Linux")) {
// 
// 			buff.append(home);
// 			buff.append(File.separator);
// 			buff.append("DeepViolet");
// 			buff.append(File.separator);
// 
// 		} else if (OS.contains("Windows")) {
// 
// 			buff.append(home);
// 			buff.append(File.separator);
// 			buff.append("My Documents");
// 			buff.append(File.separator);
// 			buff.append("DeepViolet");
// 			buff.append(File.separator);
// 
// 		} else if (OS.contains("Mac")) {
// 
// 			buff.append(home);
// 			buff.append(File.separator);
// 			buff.append("DeepViolet");
// 			buff.append(File.separator);
// 
// 		} else {
// 
// 			// Unknown OS then create in the tmp folder.
// 			buff.append(System.getProperty("java.io.tmpdir"));
// 			buff.append(File.separator);
// 			buff.append("DeepViolet");
// 			buff.append(File.separator);
// 
// 		}
// 
// 		return buff.toString();
// 	}
// 
// 	/**
// 	 * Create a directory, depending upon the operating system, to store the
// 	 * results for each scanning run.
// 	 */
// 	public static final void createWorkingDirectory() {
// 
// 		String violetdir = getWorkingDirectory();
// 
// 		File workdir = new File(violetdir);
// 
// 		if (workdir.exists()) {
// 			return;
// 		}
// 
// 		if (workdir.exists()) {
// 			if (!(workdir.canRead() && workdir.canWrite())) {
// 				System.err.println("Failed creating user report directory, reason=READ&WRITE required");
// 				System.exit(10);
// 			}
// 
// 		}
// 
// 		if (!workdir.mkdirs()) {
// 			System.err.println("Can't create a working directory.  reason=File.mkdirs failed");
// 			System.exit(15);
// 		}
// 
// 	}
// 
// 	public static final String getJsonResourceAsString(String name) {
// 
// 		//
// 		// URL ciphermap_url =
// 		// CipherSuiteUtil.class.getClassLoader().getResource("ciphermap.json");
// 
// 		BufferedReader br = null;
// 		StringBuffer buff = new StringBuffer(4000);
// 		try {
// 			String sCurrentLine;
// 			InputStream in = FileUtils.class.getClassLoader().getResourceAsStream(name);
// 			br = new BufferedReader(new InputStreamReader(in));
// 			while ((sCurrentLine = br.readLine()) != null) {
// 				buff.append(sCurrentLine);
// 			}
// 		} catch (IOException e) {
// 			e.printStackTrace();
// 		} finally {
// 			try {
// 				if (br != null)
// 					br.close();
// 			} catch (IOException ex) {
// 				ex.printStackTrace();
// 			}
// 		}
// 		return buff.toString();
// 	}
// 
// 	public static JsonLdrCipherMap readCiphermapFromJSON(String file)
// 			throws JsonParseException, JsonMappingException, IOException {
// 		ObjectMapper mapper = new ObjectMapper();
// 		JsonLdrCipherMap obj = mapper.readValue(new File(file), JsonLdrCipherMap.class);
// 		return obj;
// 	}
// 
// 	public static JsonLdrMozillaCerts readMozillaCertsFromJSON(String file)
// 			throws JsonParseException, JsonMappingException, IOException {
// 		ObjectMapper mapper = new ObjectMapper();
// 		JsonLdrMozillaCerts obj = mapper.readValue(new File(file), JsonLdrMozillaCerts.class);
// 		return obj;
// 	}
// 
// }


import java.io.IOException;
import java.net.URL;
import java.net.InetAddress;
import java.util.ArrayList;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import com.mps.deepviolet.api.IDVSession.CIPHER_NAME_CONVENTION;
import com.mps.deepviolet.util.FileUtils;
	}
	
	/**
	 * Retrieve an instance of IDVOnEng. Use this method for online functions
	 * against an initialize host.
	 * 
	 * @param session
	 *            Initialized session from previous call to initializeSession(URL)
	 *  @param cipher_name_convention Cipher suite name convention.
	 * @return Engine instance for offline functions
	 * @throws DVException
	 *           Thrown on problems initializing host.
	 * @see #initializeSession(URL)
	 */
	public static final synchronized IDVEng getDVEng(IDVSession session, IDVSession.CIPHER_NAME_CONVENTION cipher_name_convention ) throws DVException {
		return new DVEng(session, cipher_name_convention);
	}
	
	/**
	 * Retrieve an instance of IDVOnEng. Use this method to post regular status to your DVBackgroundTask.
	 * 
	 * @param session
	 *            Initialized session from previous call to initializeSession(URL)
	 * @param cipher_name_convention Cipher suite name convention.
	 * @param dvtask DVBackgroundTask to update with user displayable status information.
	 * @return Engine instance for offline functions
	 * @throws DVException
	 *           Thrown on problems initializing host.
	 * @see #initializeSession(URL)
	 */
// Path: src/main/java/com/mps/deepviolet/api/IDVSession.java
// enum CIPHER_NAME_CONVENTION {
// 	GnuTLS, NSS, IANA, OpenSSL
// }
// 
// Path: src/main/java/com/mps/deepviolet/util/FileUtils.java
// public class FileUtils {
// 
// 	/**
// 	 * Get the users DeepViolet working directory. For storing completed
// 	 * reports.
// 	 * 
// 	 * @return Fully qualified name of working directory.
// 	 */
// 	public static final String getWorkingDirectory() {
// 
// 		String OS = System.getProperty("os.name");
// 		String home = System.getProperty("user.home");
// 
// 		StringBuffer buff = new StringBuffer();
// 
// 		if (OS.contains("Linux")) {
// 
// 			buff.append(home);
// 			buff.append(File.separator);
// 			buff.append("DeepViolet");
// 			buff.append(File.separator);
// 
// 		} else if (OS.contains("Windows")) {
// 
// 			buff.append(home);
// 			buff.append(File.separator);
// 			buff.append("My Documents");
// 			buff.append(File.separator);
// 			buff.append("DeepViolet");
// 			buff.append(File.separator);
// 
// 		} else if (OS.contains("Mac")) {
// 
// 			buff.append(home);
// 			buff.append(File.separator);
// 			buff.append("DeepViolet");
// 			buff.append(File.separator);
// 
// 		} else {
// 
// 			// Unknown OS then create in the tmp folder.
// 			buff.append(System.getProperty("java.io.tmpdir"));
// 			buff.append(File.separator);
// 			buff.append("DeepViolet");
// 			buff.append(File.separator);
// 
// 		}
// 
// 		return buff.toString();
// 	}
// 
// 	/**
// 	 * Create a directory, depending upon the operating system, to store the
// 	 * results for each scanning run.
// 	 */
// 	public static final void createWorkingDirectory() {
// 
// 		String violetdir = getWorkingDirectory();
// 
// 		File workdir = new File(violetdir);
// 
// 		if (workdir.exists()) {
// 			return;
// 		}
// 
// 		if (workdir.exists()) {
// 			if (!(workdir.canRead() && workdir.canWrite())) {
// 				System.err.println("Failed creating user report directory, reason=READ&WRITE required");
// 				System.exit(10);
// 			}
// 
// 		}
// 
// 		if (!workdir.mkdirs()) {
// 			System.err.println("Can't create a working directory.  reason=File.mkdirs failed");
// 			System.exit(15);
// 		}
// 
// 	}
// 
// 	public static final String getJsonResourceAsString(String name) {
// 
// 		//
// 		// URL ciphermap_url =
// 		// CipherSuiteUtil.class.getClassLoader().getResource("ciphermap.json");
// 
// 		BufferedReader br = null;
// 		StringBuffer buff = new StringBuffer(4000);
// 		try {
// 			String sCurrentLine;
// 			InputStream in = FileUtils.class.getClassLoader().getResourceAsStream(name);
// 			br = new BufferedReader(new InputStreamReader(in));
// 			while ((sCurrentLine = br.readLine()) != null) {
// 				buff.append(sCurrentLine);
// 			}
// 		} catch (IOException e) {
// 			e.printStackTrace();
// 		} finally {
// 			try {
// 				if (br != null)
// 					br.close();
// 			} catch (IOException ex) {
// 				ex.printStackTrace();
// 			}
// 		}
// 		return buff.toString();
// 	}
// 
// 	public static JsonLdrCipherMap readCiphermapFromJSON(String file)
// 			throws JsonParseException, JsonMappingException, IOException {
// 		ObjectMapper mapper = new ObjectMapper();
// 		JsonLdrCipherMap obj = mapper.readValue(new File(file), JsonLdrCipherMap.class);
// 		return obj;
// 	}
// 
// 	public static JsonLdrMozillaCerts readMozillaCertsFromJSON(String file)
// 			throws JsonParseException, JsonMappingException, IOException {
// 		ObjectMapper mapper = new ObjectMapper();
// 		JsonLdrMozillaCerts obj = mapper.readValue(new File(file), JsonLdrMozillaCerts.class);
// 		return obj;
// 	}
// 
// }


// Path: src/main/java/com/mps/deepviolet/api/DVFactory.java
import java.io.IOException;
import java.net.URL;
import java.net.InetAddress;
import java.util.ArrayList;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import com.mps.deepviolet.api.IDVSession.CIPHER_NAME_CONVENTION;
import com.mps.deepviolet.util.FileUtils;

	}
	
	/**
	 * Retrieve an instance of IDVOnEng. Use this method for online functions
	 * against an initialize host.
	 * 
	 * @param session
	 *            Initialized session from previous call to initializeSession(URL)
	 *  @param cipher_name_convention Cipher suite name convention.
	 * @return Engine instance for offline functions
	 * @throws DVException
	 *           Thrown on problems initializing host.
	 * @see #initializeSession(URL)
	 */
	public static final synchronized IDVEng getDVEng(IDVSession session, IDVSession.CIPHER_NAME_CONVENTION cipher_name_convention ) throws DVException {
		return new DVEng(session, cipher_name_convention);
	}
	
	/**
	 * Retrieve an instance of IDVOnEng. Use this method to post regular status to your DVBackgroundTask.
	 * 
	 * @param session
	 *            Initialized session from previous call to initializeSession(URL)
	 * @param cipher_name_convention Cipher suite name convention.
	 * @param dvtask DVBackgroundTask to update with user displayable status information.
	 * @return Engine instance for offline functions
	 * @throws DVException
	 *           Thrown on problems initializing host.
	 * @see #initializeSession(URL)
	 */
	public static final synchronized IDVEng getDVEng(IDVSession session, IDVSession.CIPHER_NAME_CONVENTION cipher_name_convention, DVBackgroundTask dvtask ) throws DVException {