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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user