Package org.compiere.install
Class KeyStoreMgt
java.lang.Object
org.compiere.install.KeyStoreMgt
Class to manage SSL KeyStore
- Version:
- $Id: KeyStoreMgt.java,v 1.3 2006/07/30 00:57:42 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
escapeCommas
(String in) Escape CommasgetCertificate
(String alias) Get Certificatestatic String
getDname
(KeyStoreMgt mgt, JFrame parent) Get Distinguished NameGet KeyStorestatic String
getKeystoreFileName
(String baseDir) Get Keystore File Namestatic void
Teststatic void
Generate Key and Certvoid
setCommonName
(String cn) void
setCountry
(String c) void
void
void
void
Verify/Create Key Store
-
Field Details
-
KEYSTORE_DIRECTORY
Directory below IDEMPIERE_HOME -
KEYSTORE_NAME
Name of KeyStore
-
-
Constructor Details
-
KeyStoreMgt
Constructor.- Parameters:
fileName
- key store file namepassword
- - same password for key store and certificate
-
-
Method Details
-
verify
Verify/Create Key Store- Parameters:
parent
- frame- Returns:
- null or error message
-
getKeyStore
Get KeyStore- Returns:
- KeyStore or null
- Throws:
Exception
-
getCertificate
Get Certificate- Parameters:
alias
- alias- Returns:
- certificate or null
- Throws:
Exception
-
setCommonName
-
setOrganization
-
setOrganizationUnit
-
setLocation
-
setState
-
setCountry
-
getDname
Get Distinguished Name- Parameters:
parent
- interactive dialog- Returns:
- dname or null
-
escapeCommas
Escape Commas- Parameters:
in
- input string- Returns:
- escaped string
-
selfcert
Generate Key and Cert- Parameters:
alias
- keystore aliaspassword
- passwordfileName
- key store file name (may have spaces)dname
- distinguished name
-
getKeystoreFileName
Get Keystore File Name- Parameters:
baseDir
- IDEMPIERE_HOME- Returns:
- file name
-
main
Test- Parameters:
args
- ignored
-