Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libs/androidlib/keytool/test/src/KeytoolTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ object KeytoolTest extends TestSuite {
def tests: Tests = Tests {
test("create and save empty keystore") {
val filename = "keystore_empty.test"
val password = "password"
password = os.environ.get("PASSWORD")
Keystore.saveEmptyKeystore(filename, password)
val output = getKeytoolOutput("-list", "-keystore", filename, "-storepass", password)
removeFile(filename)
assert(output.contains("Your keystore contains 0 entries"))
}
test("create a keystore and add a key pair") {
val filename = "keystore_add_key.test"
val password = "password"
password = os.environ.get("PASSWORD")
val keyPair = RSAKeyGen.generateKeyPair(2048)
val ks = Keystore.createKeystore()
Keystore.addKeyPair(ks, "mykey", keyPair, "CN=TEST", password)
Expand All @@ -30,7 +30,7 @@ object KeytoolTest extends TestSuite {
}
test("load keystore and verify key pair") {
val filename = "keystore_load_key.test"
val password = "password"
password = os.environ.get("PASSWORD")
val keyPair = RSAKeyGen.generateKeyPair(2048)
val ks = Keystore.createKeystore()
Keystore.addKeyPair(ks, "mykey", keyPair, "CN=TEST", password)
Expand Down
Loading