mirror of
https://github.com/revanced/revanced-api.git
synced 2025-04-29 22:24:31 +02:00
fix: Don't encode public keys & instead send them raw
This commit is contained in:
parent
03fb28cd10
commit
435beae383
@ -7,7 +7,6 @@ import app.revanced.api.configuration.schema.*
|
||||
import app.revanced.library.PatchUtils
|
||||
import app.revanced.patcher.PatchBundleLoader
|
||||
import com.github.benmanes.caffeine.cache.Caffeine
|
||||
import io.ktor.util.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.ByteArrayOutputStream
|
||||
@ -113,12 +112,13 @@ internal class PatchesService(
|
||||
}
|
||||
|
||||
fun publicKeys(): APIAssetPublicKeys {
|
||||
fun publicKeyBase64(getSignedAssetConfiguration: ConfigurationRepository.() -> ConfigurationRepository.SignedAssetConfiguration) =
|
||||
configurationRepository.getSignedAssetConfiguration().publicKeyFile.readBytes().encodeBase64()
|
||||
fun readPublicKey(
|
||||
getSignedAssetConfiguration: ConfigurationRepository.() -> ConfigurationRepository.SignedAssetConfiguration,
|
||||
) = configurationRepository.getSignedAssetConfiguration().publicKeyFile.readText()
|
||||
|
||||
return APIAssetPublicKeys(
|
||||
publicKeyBase64 { patches },
|
||||
publicKeyBase64 { integrations },
|
||||
readPublicKey { patches },
|
||||
readPublicKey { integrations },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user