Skip to content

Commit

Permalink
only add c2pa cert if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
n8fr8 committed Dec 19, 2023
1 parent f45f702 commit 20b645e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/src/main/java/org/witness/proofmode/ShareProofActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1556,10 +1556,13 @@ class ShareProofActivity : AppCompatActivity() {
out.putNextEntry(entry)
out.write(pubKey.toByteArray())

Timber.d("Adding C2PA certificate")
entry = ZipEntry(C2PA_CERT_PATH)
out.putNextEntry(entry)
out.write(File(filesDir,C2PA_CERT_PATH).readBytes())
var fileCert = File(filesDir,C2PA_CERT_PATH)
if (fileCert.exists()) {
Timber.d("Adding C2PA certificate")
entry = ZipEntry(C2PA_CERT_PATH)
out.putNextEntry(entry)
out.write(fileCert.readBytes())
}

Timber.d("Adding HowToVerifyProofData.txt")
val howToFile = "HowToVerifyProofData.txt"
Expand Down

0 comments on commit 20b645e

Please sign in to comment.