forked from I2P_Developers/i2p.i2p
HostTxtEntry: Fixups for use by i2ptunnel
i2ptunnel: Add new registration authentication page - Remove old, unused hostname signature generation PrivateKeyFile: Ensure initialization before returning private keys
This commit is contained in:
@ -71,6 +71,7 @@ public class EditBean extends IndexBean {
|
||||
return _helper.getPrivateKeyFile(tunnel);
|
||||
}
|
||||
|
||||
/****
|
||||
public String getNameSignature(int tunnel) {
|
||||
String spoof = getSpoofedHost(tunnel);
|
||||
if (spoof.length() <= 0)
|
||||
@ -100,6 +101,26 @@ public class EditBean extends IndexBean {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
****/
|
||||
|
||||
/**
|
||||
* @since 0.9.26
|
||||
* @return key or null
|
||||
*/
|
||||
public SigningPrivateKey getSigningPrivateKey(int tunnel) {
|
||||
TunnelController tun = getController(tunnel);
|
||||
if (tun == null)
|
||||
return null;
|
||||
String keyFile = tun.getPrivKeyFile();
|
||||
if (keyFile != null && keyFile.trim().length() > 0) {
|
||||
File f = new File(keyFile);
|
||||
if (!f.isAbsolute())
|
||||
f = new File(_context.getConfigDir(), keyFile);
|
||||
PrivateKeyFile pkf = new PrivateKeyFile(f);
|
||||
return pkf.getSigningPrivKey();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean startAutomatically(int tunnel) {
|
||||
return _helper.shouldStartAutomatically(tunnel);
|
||||
|
Reference in New Issue
Block a user