Skip to content

Commit 77b6f70

Browse files
committed
MOPPAND-1720 Fix workflow order with CDoc1 and CDoc2: open-eid/libcdoc#82.
1 parent 44f2737 commit 77b6f70

File tree

8 files changed

+3
-5
lines changed

8 files changed

+3
-5
lines changed

crypto-lib/libs/libcdoc.jar

-748 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
300 Bytes
Binary file not shown.
288 Bytes
Binary file not shown.
216 Bytes
Binary file not shown.
300 Bytes
Binary file not shown.
288 Bytes
Binary file not shown.

crypto-lib/src/main/kotlin/ee/ria/DigiDoc/cryptolib/CryptoContainer.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,6 @@ class CryptoContainer
373373

374374
val cdocWriter = CDocWriter.createWriter(version, file.path, conf, null, network)
375375
try {
376-
if (cdocWriter.beginEncryption() != 0L) {
377-
throw CryptoException("Failed to begin encryption")
378-
}
379-
380376
withContext(IO) {
381377
if (version == 2 && cdoc2Settings.getUseOnlineEncryption()) {
382378
val serverId = cdoc2Settings.getCDOC2UUID()
@@ -395,7 +391,9 @@ class CryptoContainer
395391
}
396392
}
397393
}
398-
394+
if (cdocWriter.beginEncryption() != 0L) {
395+
throw CryptoException("Failed to begin encryption")
396+
}
399397
withContext(IO) {
400398
dataFiles.forEach { dataFile ->
401399
val ifs: InputStream = FileInputStream(dataFile)

0 commit comments

Comments
 (0)