i2ptunnel: Enhance registration authentication page

- Enable form
- Switch to multipart form for getting old private key file
- Add advanced authentications
PrivateKeyFile: Add InputStream constructor for i2ptunnel
This commit is contained in:
zzz
2016-04-24 21:03:10 +00:00
parent 2a34d1c44a
commit 0ac83bd7c1
4 changed files with 206 additions and 24 deletions

View File

@ -273,6 +273,18 @@ public class PrivateKeyFile {
this.signingPrivKey = spk;
}
/**
* Can't be used for writing
* @since 0.9.26
*/
public PrivateKeyFile(InputStream in) throws I2PSessionException {
this("/dev/null");
I2PSession s = this.client.createSession(in, new Properties());
this.dest = s.getMyDestination();
this.privKey = s.getDecryptionKey();
this.signingPrivKey = s.getPrivateKey();
}
/**
* Create with the default signature type if nonexistent.
*