Use the default X509TrustManager to validate non-pinned certificates

This allows the certificate to be rotated without re-adding the PC.
This commit is contained in:
Cameron Gutman
2020-06-29 11:20:14 -07:00
parent 429c32477c
commit 536496184e
2 changed files with 36 additions and 32 deletions

View File

@@ -104,12 +104,6 @@ public class AddComputerManually extends Activity {
try {
ComputerDetails details = new ComputerDetails();
details.manualAddress = host;
try {
NvHTTP http = new NvHTTP(host, managerBinder.getUniqueId(), null, PlatformBinding.getCryptoProvider(this));
details.serverCert = http.getCertificateIfTrusted();
} catch (IOException ignored) {}
success = managerBinder.addComputerBlocking(details);
} catch (IllegalArgumentException e) {
// This can be thrown from OkHttp if the host fails to canonicalize to a valid name.