Skip to content
Merged
Show file tree
Hide file tree
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
Binary file modified crypto-lib/libs/libcdoc.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ class CryptoContainerTest {
assertEquals(1, result.getRecipients().size)
}

@Test(expected = DataFilesEmptyException::class)
@Test(expected = CryptoException::class)
fun cryptoContainer_encrypt_CDOC2OnlineException() =
runTest {
preferences
Expand All @@ -908,13 +908,13 @@ class CryptoContainerTest {
val cdoc2Settings = CDOC2Settings(context)
val recipient = Addressee(Base64.getDecoder().decode(authCert))

val testFiles: List<File> = listOf()
val testFiles: List<File> = listOf(testFile)
val container = openOrCreate(context, testFile, testFiles, cdoc2Settings)

encrypt(context, container.file, testFiles, listOf(recipient), cdoc2Settings, configurationRepository)
}

@Test
@Test(expected = CryptoException::class)
fun cryptoContainer_encrypt_CDOC2OnlineSuccess() =
runTest {
preferences
Expand Down
Binary file modified crypto-lib/src/debug/jniLibs/arm64-v8a/libcdoc_java.so
Binary file not shown.
Binary file modified crypto-lib/src/debug/jniLibs/armeabi-v7a/libcdoc_java.so
Binary file not shown.
Binary file modified crypto-lib/src/debug/jniLibs/x86_64/libcdoc_java.so
Binary file not shown.
Binary file modified crypto-lib/src/main/jniLibs/arm64-v8a/libcdoc_java.so
Binary file not shown.
Binary file modified crypto-lib/src/main/jniLibs/armeabi-v7a/libcdoc_java.so
Binary file not shown.
Binary file modified crypto-lib/src/main/jniLibs/x86_64/libcdoc_java.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -362,14 +362,14 @@ class CryptoContainer
if (version == 2 && cdoc2Settings.getUseOnlineEncryption()) {
val serverId = cdoc2Settings.getCDOC2UUID()
recipients.forEach { addressee ->
val recipient = Recipient.makeServer("", addressee.data, serverId)
val recipient = Recipient.makeEIDServer(addressee.data, serverId)
if (cdocWriter.addRecipient(recipient) != 0L) {
throw CryptoException("Failed to add recipient")
}
}
} else {
recipients.forEach { addressee ->
val recipient = Recipient.makeCertificate("", addressee.data)
val recipient = Recipient.makeEID(addressee.data)
if (cdocWriter.addRecipient(recipient) != 0L) {
throw CryptoException("Failed to add recipient")
}
Expand Down