mirror of
https://github.com/revanced/revanced-cli.git
synced 2025-04-29 22:24:36 +02:00
fix: keystore file not found exception (#57)
* fix: keystore file not found exception * the fix * fix oopsies
This commit is contained in:
parent
7d8a61c3ba
commit
5b8537e6b7
@ -18,10 +18,9 @@ object Signing {
|
|||||||
// the reason is, in case the signer fails
|
// the reason is, in case the signer fails
|
||||||
// it does not damage the output file
|
// it does not damage the output file
|
||||||
println("[signing]")
|
println("[signing]")
|
||||||
val keyStore = Signer(signingOptions).signApk(alignedOutput, signedOutput)
|
Signer(signingOptions).signApk(alignedOutput, signedOutput)
|
||||||
|
|
||||||
// afterwards copy over the file and the keystore to the output
|
// afterwards copy over the file to the output
|
||||||
signedOutput.copyTo(outputFile, true)
|
signedOutput.copyTo(outputFile, true)
|
||||||
keyStore.copyTo(outputFile.resolveSibling(keyStore.name), true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ internal class Signer(
|
|||||||
return JcaX509CertificateConverter().getCertificate(builder.build(signer)) to pair.private
|
return JcaX509CertificateConverter().getCertificate(builder.build(signer)) to pair.private
|
||||||
}
|
}
|
||||||
|
|
||||||
fun signApk(input: File, output: File): File {
|
fun signApk(input: File, output: File) {
|
||||||
Security.addProvider(BouncyCastleProvider())
|
Security.addProvider(BouncyCastleProvider())
|
||||||
|
|
||||||
// TODO: keystore should be saved securely
|
// TODO: keystore should be saved securely
|
||||||
@ -74,7 +74,5 @@ internal class Signer(
|
|||||||
signer.setOutputApk(output)
|
signer.setOutputApk(output)
|
||||||
|
|
||||||
signer.build().sign()
|
signer.build().sign()
|
||||||
|
|
||||||
return ks
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user