sdf fix
This commit is contained in:
@@ -151,6 +151,7 @@ public class TmkService {
|
||||
}
|
||||
res.setStatus(DeviceTmkStatus.finished);
|
||||
} else {
|
||||
log.debug("tmk not init, start encrypt and import test ...");
|
||||
byte[] random = sdfApi.generateRandom(hs, 16);
|
||||
EccCipher eccCipher = sdfApi.externalEncryptECC(hs, pubKey, random);
|
||||
String hk = sdfApi.importKeyWithISKECC(hs, check.getEncKeyIdx(), eccCipher);
|
||||
@@ -177,7 +178,9 @@ public class TmkService {
|
||||
device.setServiceIp("127.0.0.1");
|
||||
device.setServicePort(8889);
|
||||
device.setAccessCredentials("543");
|
||||
device.setEncTmk(CodecUtils.encodeHex(getSoftDeviceEncTmk()));
|
||||
if (isTmkInit()) {
|
||||
device.setEncTmk(CodecUtils.encodeHex(getSoftDeviceEncTmk()));
|
||||
}
|
||||
return device;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user