Skip to content

Commit 223431a

Browse files
committed
Fix Fatal Exception: java.io.IOException: Invalid salt detected
1 parent 8e2ef20 commit 223431a

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ android {
4141
else -> 0
4242
}
4343

44-
val vCode = 418
44+
val vCode = 421
4545
versionCode = vCode - singleAbiNum
46-
versionName = "2.1.12"
46+
versionName = "2.1.13"
4747

4848
ndk {
4949
//noinspection ChromeOsAbiSupport

app/src/main/java/com/ismartcoding/plain/Constants.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ object Constants {
1010
const val LATEST_RELEASE_URL = "https://api.github.com/repos/ismartcoding/plain-app/releases/latest"
1111
const val ONE_DAY = 24 * 60 * 60L
1212
const val ONE_DAY_MS = ONE_DAY * 1000L
13-
const val BROADCAST_ACTION_SERVICE = "${BuildConfig.APPLICATION_ID}.action.service"
14-
const val BROADCAST_ACTION_ACTIVITY = "${BuildConfig.APPLICATION_ID}.action.activity"
15-
const val KEY_STORE_FILE_NAME = "keystore2.jks"
13+
const val KEY_STORE_FILE_NAME = "keystore.bks"
1614
const val MAX_MESSAGE_LENGTH = 2048 // Maximum length of a message in the chat
1715
const val TEXT_FILE_SUMMARY_LENGTH = 250
1816
}

app/src/main/java/com/ismartcoding/plain/web/HttpServerManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ object HttpServerManager {
158158
generateSSLKeyStore(file, password)
159159
}
160160

161-
return KeyStore.getInstance(KeyStore.getDefaultType()).apply {
161+
return KeyStore.getInstance("BKS", "BC").apply {
162162
try {
163163
file.inputStream().use {
164164
load(it, password.toCharArray())

lib/src/main/java/com/ismartcoding/lib/helpers/JksHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ object JksHelper {
2828

2929
val keyPair = keyPairGenerator.genKeyPair()
3030

31-
val keyStore = KeyStore.getInstance(KeyStore.getDefaultType())
31+
val keyStore = KeyStore.getInstance("BKS", "BC")
3232
keyStore.load(null, null)
3333

3434
val x509CertificateHolder = createTrustHolder(keyPair, "SHA256withECDSA", commonName)

0 commit comments

Comments
 (0)