|
@@ -25,15 +25,11 @@ public class FactoryPresetsHandler implements OCFactoryPresetsHandler {
|
|
public void handler(long deviceIndex) {
|
|
public void handler(long deviceIndex) {
|
|
Log.d(TAG, "inside the FactoryPresetsHandler, deviceIndex = " + deviceIndex);
|
|
Log.d(TAG, "inside the FactoryPresetsHandler, deviceIndex = " + deviceIndex);
|
|
|
|
|
|
- // Shutdown and re-init instance
|
|
|
|
- if (activity.getObt() != null) {
|
|
|
|
- activity.getObt().shutdown();
|
|
|
|
- }
|
|
|
|
activity.ownedDeviceList.clear();
|
|
activity.ownedDeviceList.clear();
|
|
activity.unownedDeviceList.clear();
|
|
activity.unownedDeviceList.clear();
|
|
activity.setObt(new OcObt());
|
|
activity.setObt(new OcObt());
|
|
|
|
|
|
- setPKISecurityMfgCert(deviceIndex);
|
|
|
|
|
|
+ //TODO : setPKISecurityMfgCert(deviceIndex);
|
|
}
|
|
}
|
|
|
|
|
|
private void setPKISecurityMfgCert(long deviceIndex) {
|
|
private void setPKISecurityMfgCert(long deviceIndex) {
|
|
@@ -89,7 +85,7 @@ public class FactoryPresetsHandler implements OCFactoryPresetsHandler {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- /*// load Root CA 2
|
|
|
|
|
|
+ // load Root CA 2
|
|
byte[] rootCa2 = getFileBytes("pki_certs/rootca2.pem");
|
|
byte[] rootCa2 = getFileBytes("pki_certs/rootca2.pem");
|
|
if (rootCa2 == null) {
|
|
if (rootCa2 == null) {
|
|
Log.e(TAG, "Failed to read root ca2 certificate");
|
|
Log.e(TAG, "Failed to read root ca2 certificate");
|
|
@@ -103,7 +99,7 @@ public class FactoryPresetsHandler implements OCFactoryPresetsHandler {
|
|
Log.e(TAG, "Error installing root ca2 certificate");
|
|
Log.e(TAG, "Error installing root ca2 certificate");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- */
|
|
|
|
|
|
+
|
|
// load Root CA 3
|
|
// load Root CA 3
|
|
byte[] rootCa3 = getFileBytes("pki_certs/rootca3.pem");
|
|
byte[] rootCa3 = getFileBytes("pki_certs/rootca3.pem");
|
|
if (rootCa3 == null) {
|
|
if (rootCa3 == null) {
|