* I2CP: Move SSL client socket code to util,

move cert location to certificates/i2cp.
 * I2PTunnel: Support SSL for connection to local server
   for Standard, HTTP, and IRC server tunnels.
   Put server cert in certificates/i2ptunnel if necessary.
This commit is contained in:
zzz
2013-10-17 13:22:17 +00:00
parent 09548358fa
commit 5f7a761e42
12 changed files with 210 additions and 137 deletions

View File

@ -118,8 +118,8 @@ class SSLClientListenerRunner extends ClientListenerRunner {
* so the clients can get to it.
*/
private void exportCert(File ks) {
File sdir = new SecureDirectory(_context.getConfigDir(), "certificates");
if (sdir.exists() || sdir.mkdir()) {
File sdir = new SecureDirectory(_context.getConfigDir(), "certificates/i2cp");
if (sdir.exists() || sdir.mkdirs()) {
String ksPass = _context.getProperty(PROP_KEYSTORE_PASSWORD, DEFAULT_KEYSTORE_PASSWORD);
File out = new File(sdir, ASCII_KEYFILE);
boolean success = KeyStoreUtil.exportCert(ks, ksPass, KEY_ALIAS, out);