Fix upgrading from a build prior to cert pinning support

This commit is contained in:
Cameron Gutman 2019-07-16 20:08:41 -07:00
parent a1c659b7b8
commit dc97adc7a1
2 changed files with 12 additions and 9 deletions

View File

@ -7,8 +7,8 @@ android {
minSdkVersion 16
targetSdkVersion 29
versionName "7.4"
versionCode = 195
versionName "8.0"
versionCode = 196
}
flavorDimensions "root"

View File

@ -28,6 +28,8 @@ public class LegacyDatabaseReader2 {
details.manualAddress = c.getString(4);
details.macAddress = c.getString(5);
// This column wasn't always present in the old schema
if (c.getColumnCount() >= 7) {
try {
byte[] derCertData = c.getBlob(6);
@ -38,6 +40,7 @@ public class LegacyDatabaseReader2 {
} catch (CertificateException e) {
e.printStackTrace();
}
}
// This signifies we don't have dynamic state (like pair state)
details.state = ComputerDetails.State.UNKNOWN;