Added SSL Validation Override and CA Selection
- Added fields to login page to a) disable ssl validation or b) select a custom Certificate Authority certificate to use with the server. - Changed visibility of widgets on login page from INVISIBLE to GONE so they don't take up space while hidden (since this was causing weird spacing issues with the new fields). - Added state to settings to store ssl validation choice or certificate data. - Added fields to various HTTP methods to disable ssl validation or set valid certificate authority if either setting is enabled.
This commit is contained in:
@@ -107,7 +107,7 @@ public class MessagesActivity extends AppCompatActivity
|
||||
Log.i("Entering " + getClass().getSimpleName());
|
||||
settings = new Settings(this);
|
||||
|
||||
client = ClientFactory.clientToken(settings.url(), settings.token());
|
||||
client = ClientFactory.clientToken(settings.url(), settings.validateSSL(), settings.cert(), settings.token());
|
||||
appsHolder = new ApplicationHolder(this, client);
|
||||
appsHolder.onUpdate(() -> onUpdateApps(appsHolder.get()));
|
||||
appsHolder.request();
|
||||
@@ -401,7 +401,7 @@ public class MessagesActivity extends AppCompatActivity
|
||||
@Override
|
||||
protected Void doInBackground(Void... ignore) {
|
||||
TokenApi api =
|
||||
new TokenApi(ClientFactory.clientToken(settings.url(), settings.token()));
|
||||
new TokenApi(ClientFactory.clientToken(settings.url(), settings.validateSSL(), settings.cert(), settings.token()));
|
||||
stopService(new Intent(MessagesActivity.this, WebSocketService.class));
|
||||
try {
|
||||
List<Client> clients = api.getClients();
|
||||
|
||||
Reference in New Issue
Block a user