forked from I2P_Developers/i2p.i2p
i2ptunnel: Fix double-b64 of default client name
Add new default client if all are revoked
This commit is contained in:
@ -942,7 +942,7 @@ public class TunnelConfig {
|
|||||||
if (!_addClientAuth) {
|
if (!_addClientAuth) {
|
||||||
_addClientAuth = true;
|
_addClientAuth = true;
|
||||||
if (_newClientName == null || _newClientName.length() == 0)
|
if (_newClientName == null || _newClientName.length() == 0)
|
||||||
_newClientName = Base64.encode(DataHelper.getUTF8(GeneralHelper._t("Client", _context) + " 1"));
|
_newClientName = GeneralHelper._t("Client", _context) + " 1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -962,6 +962,11 @@ public class TunnelConfig {
|
|||||||
name = Base64.encode(DataHelper.getUTF8(GeneralHelper._t("Client", _context) + ' ' + (i + 1)));
|
name = Base64.encode(DataHelper.getUTF8(GeneralHelper._t("Client", _context) + ' ' + (i + 1)));
|
||||||
clientAuth.add(name + ':' + key);
|
clientAuth.add(name + ':' + key);
|
||||||
}
|
}
|
||||||
|
if (clientAuth.isEmpty() && !_addClientAuth) {
|
||||||
|
// if we revoked all of them, add a new one
|
||||||
|
_addClientAuth = true;
|
||||||
|
_newClientName = GeneralHelper._t("Client", _context) + " 1";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_addClientAuth && _newClientName != null) {
|
if (_addClientAuth && _newClientName != null) {
|
||||||
String name = _newClientName;
|
String name = _newClientName;
|
||||||
|
Reference in New Issue
Block a user