Loading src/main/java/at/bitfire/cert4android/CustomCertManager.kt +6 −6 Original line number Diff line number Diff line Loading @@ -72,6 +72,12 @@ class CustomCertManager( } } } fun resetCertificates(context: Context): Boolean { val intent = Intent(context, CustomCertService::class.java) intent.action = CustomCertService.CMD_RESET_CERTIFICATES return context.startService(intent) != null } } /** for sending requests to {@link CustomCertService} */ Loading Loading @@ -265,12 +271,6 @@ class CustomCertManager( fun hostnameVerifier(defaultVerifier: HostnameVerifier?) = CustomHostnameVerifier(defaultVerifier) fun resetCertificates() { val intent = Intent(context, CustomCertService::class.java) intent.action = CustomCertService.CMD_RESET_CERTIFICATES context.startService(intent) } // hostname verifier Loading src/main/java/at/bitfire/cert4android/CustomCertService.kt +6 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ class CustomCertService: Service() { private val pendingDecisions = HashMap<X509Certificate, MutableList<ReplyInfo>>() override fun onCreate() { Constants.log.info("Creating CustomCertService") Constants.log.info("CustomCertService created") // initialize trustedKeyStore keyStoreFile = File(getDir(KEYSTORE_DIR, Context.MODE_PRIVATE), KEYSTORE_NAME) Loading @@ -87,6 +87,10 @@ class CustomCertService: Service() { customTrustManager = CertUtils.getTrustManager(trustedKeyStore) } override fun onDestroy() { Constants.log.info("CustomCertService destroyed") } private fun inTrustStore(cert: X509Certificate) = try { trustedKeyStore.getCertificateAlias(cert) != null Loading Loading @@ -117,6 +121,7 @@ class CustomCertService: Service() { } } } stopSelf() return START_NOT_STICKY } Loading Loading
src/main/java/at/bitfire/cert4android/CustomCertManager.kt +6 −6 Original line number Diff line number Diff line Loading @@ -72,6 +72,12 @@ class CustomCertManager( } } } fun resetCertificates(context: Context): Boolean { val intent = Intent(context, CustomCertService::class.java) intent.action = CustomCertService.CMD_RESET_CERTIFICATES return context.startService(intent) != null } } /** for sending requests to {@link CustomCertService} */ Loading Loading @@ -265,12 +271,6 @@ class CustomCertManager( fun hostnameVerifier(defaultVerifier: HostnameVerifier?) = CustomHostnameVerifier(defaultVerifier) fun resetCertificates() { val intent = Intent(context, CustomCertService::class.java) intent.action = CustomCertService.CMD_RESET_CERTIFICATES context.startService(intent) } // hostname verifier Loading
src/main/java/at/bitfire/cert4android/CustomCertService.kt +6 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ class CustomCertService: Service() { private val pendingDecisions = HashMap<X509Certificate, MutableList<ReplyInfo>>() override fun onCreate() { Constants.log.info("Creating CustomCertService") Constants.log.info("CustomCertService created") // initialize trustedKeyStore keyStoreFile = File(getDir(KEYSTORE_DIR, Context.MODE_PRIVATE), KEYSTORE_NAME) Loading @@ -87,6 +87,10 @@ class CustomCertService: Service() { customTrustManager = CertUtils.getTrustManager(trustedKeyStore) } override fun onDestroy() { Constants.log.info("CustomCertService destroyed") } private fun inTrustStore(cert: X509Certificate) = try { trustedKeyStore.getCertificateAlias(cert) != null Loading Loading @@ -117,6 +121,7 @@ class CustomCertService: Service() { } } } stopSelf() return START_NOT_STICKY } Loading