[6.4.0] add func of auth cert show
This commit is contained in:
@@ -30,6 +30,9 @@ class CertFileManager : IMoGoCertProvider {
|
||||
@Volatile
|
||||
private var rootCrtFile: String? = null
|
||||
|
||||
@Volatile
|
||||
private var crtFileErrorMsg: String? = null
|
||||
|
||||
companion object {
|
||||
private const val TAG = "CertFileManager"
|
||||
}
|
||||
@@ -72,6 +75,7 @@ class CertFileManager : IMoGoCertProvider {
|
||||
"onSuccess securityKey:$securityKey , thread:${Thread.currentThread().name}"
|
||||
)
|
||||
certStatus.set(false)
|
||||
crtFileErrorMsg = null
|
||||
deviceCrtFile = securityKey
|
||||
rootCrtFile = rootKey
|
||||
SharedPrefsMgr.getInstance().putString(securityKeyTAG, securityKey)
|
||||
@@ -92,6 +96,8 @@ class CertFileManager : IMoGoCertProvider {
|
||||
override fun onFailed(errorCode: Int, errorMsg: String) {
|
||||
CallerLogger.d("${SceneConstant.M_D_C}$TAG", "onFailed code:$errorCode, msg:$errorMsg")
|
||||
certStatus.set(false)
|
||||
crtFileErrorMsg = "$errorCode - $errorMsg"
|
||||
CallerCloudListenerManager.invokeCloudCrtError(errorMsg)
|
||||
onError?.invoke("证书下载失败, code:$errorCode, msg:$errorMsg")
|
||||
}
|
||||
})
|
||||
@@ -112,4 +118,8 @@ class CertFileManager : IMoGoCertProvider {
|
||||
override fun getRootCrtF(): String? {
|
||||
return rootCrtFile?:SharedPrefsMgr.getInstance().getString(securityRootTAG, null)
|
||||
}
|
||||
|
||||
override fun getCrtFileErrorMsg(): String? {
|
||||
return crtFileErrorMsg
|
||||
}
|
||||
}
|
||||
@@ -32,10 +32,9 @@ public class PassPortSecret {
|
||||
private IPassportSecret secretCB;
|
||||
|
||||
public void init(String deviceId, String path, IPassportSecret secretCB) {
|
||||
if (this.secretCB != null) {
|
||||
return;
|
||||
if (this.secretCB == null) {
|
||||
this.secretCB = secretCB;
|
||||
}
|
||||
this.secretCB = secretCB;
|
||||
PassportService passportService = new PassportService();
|
||||
passportService.setEnableLog(DebugConfig.isDebug());
|
||||
domain.R<Passport> r = initLow(passportService, deviceId, path);
|
||||
|
||||
Reference in New Issue
Block a user