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:
zzz
2016-04-24 18:10:10 +00:00
parent 799d90e1b5
commit 2a34d1c44a
6 changed files with 271 additions and 9 deletions

View File

@@ -455,11 +455,29 @@ public class PrivateKeyFile {
return c;
}
/**
* @return null on error or if not initialized
*/
public PrivateKey getPrivKey() {
try {
// call this to force initialization
getDestination();
} catch (Exception e) {
return null;
}
return this.privKey;
}
/**
* @return null on error or if not initialized
*/
public SigningPrivateKey getSigningPrivKey() {
try {
// call this to force initialization
getDestination();
} catch (Exception e) {
return null;
}
return this.signingPrivKey;
}