1 package org.columba.core.gui.externaltools; 17 18 import java.io.File ; 19 import java.net.MalformedURLException ; 20 import java.net.URL ; 21 22 import org.columba.core.base.OSInfo; 23 24 25 30 public class GPGPlugin extends AbstractExternalToolsPlugin { 31 protected static File defaultLinux = new File ("/usr/bin/gpg"); 32 protected static File defaultLocalLinux = new File ("/usr/local/bin/gpg"); 33 34 39 protected static File defaultWin = new File ("C:\\GnuPG\\gpg.exe"); 40 protected static URL websiteURL; 41 42 static { 43 try { 44 websiteURL = new URL ("http://www.gnupg.org/"); 45 } catch (MalformedURLException mue) { 46 } 47 48 } 50 51 54 public GPGPlugin() { 55 super(); 56 } 57 58 public String getDescription() { 59 return "<html><body><p>GnuPG is a complete and free replacement for PGP.</p><p>Because it does not use the patented IDEA algorithm, it can be used without any restrictions. GnuPG is a RFC2440 (OpenPGP) compliant application.</p><p>GnuPG itself is a commandline tool without any graphical stuff. It is the real crypto engine which can be used directly from a command prompt, from shell scripts or by other programs. Therefore it can be considered as a backend for other applications.</p></body></html>"; 60 } 61 62 public URL getWebsite() { 63 return websiteURL; 64 } 65 66 public File locate() { 67 70 if (OSInfo.isLinux() || OSInfo.isSolaris()) { 71 if (defaultLinux.exists()) { 72 return defaultLinux; 73 } else if (defaultLocalLinux.exists()) { 74 return defaultLocalLinux; 75 } 76 } 77 78 84 87 if (OSInfo.isWin32Platform() && defaultWin.exists()) { 88 return defaultWin; 89 } 90 91 94 return null; 95 } 96 } 97 | Popular Tags |