Skip to content

issue #1060 pgp decrypt method that mimics error behavior - #1216

Merged
DenBond7 merged 5 commits into
masterfrom
ip-1060-take2
May 10, 2021
Merged

issue #1060 pgp decrypt method that mimics error behavior#1216
DenBond7 merged 5 commits into
masterfrom
ip-1060-take2

Conversation

@IvanPizhenko

@IvanPizhenkoIvanPizhenko commented May 6, 2021

Copy link
Copy Markdown
Contributor

This PR introduces 100% jvm based method for the decryption.

close#1060

Tests(delete all except exactly one):

  • Tests added or updated

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities

@DenBond7DenBond7 added this to the 1.1.8 milestone May 7, 2021
@DenBond7DenBond7 added the PR submitted PR is submitted for this issue label May 7, 2021

@tomholubtomholub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you - this is what I needed, but needs some improvements. I didn't look at the tests yet (will later).

It seems FORMAT error are not handled? For example, what will happen if I enter "abcd".toByteArray() as the data? It seems like it would throw "OTHER / wrong key" which is not correct.

Comment threadFlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt Outdated
Comment threadFlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt Outdated

@DenBond7DenBond7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaved a few comments. Please look at them.

Comment threadFlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt Outdated
Comment threadFlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt Outdated
Comment threadFlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/PgpMsgTest.kt Outdated
Comment threadFlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/PgpMsgTest.kt Outdated
@IvanPizhenko

Copy link
Copy Markdown
ContributorAuthor

@tomholub@DenBond7 made some fixes here, please review

@IvanPizhenkoIvanPizhenko changed the title issue #1060 gp decrypt method that mimics error behaviorissue #1060 pgp decrypt method that mimics error behaviorMay 9, 2021
@DenBond7
DenBond7 self-requested a review May 10, 2021 06:19
DenBond7
DenBond7 previously approved these changes May 10, 2021

@DenBond7DenBond7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Looks good. Approved

@DenBond7

Copy link
Copy Markdown
Collaborator

@tomholub Please review it. I will merge it after your approving

@tomholubtomholub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, with tiny changes, from my end it's good to merge it. I'll let Den do the final review and merging. Thank you!

Comment threadFlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt Outdated
Comment threadFlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpMsg.kt Outdated
Comment threadFlowCrypt/src/test/java/com/flowcrypt/email/security/pgp/PgpMsgTest.kt Outdated
@DenBond7
DenBond7 dismissed their stale reviewMay 10, 2021 06:49

Changed the approving status. I'll approve it after Tom. Due to difficulty of the current issue(decryption process).

@tomholub

Copy link
Copy Markdown
Collaborator

Ok Den, after the above changes, I'll do my approving review, then you can do yours.

@IvanPizhenko

Copy link
Copy Markdown
ContributorAuthor

@tomholub@DenBond7 I've made some more fixes according to Tom's comments, so please check them

@tomholubtomholub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks good to me. Will let Den take another look and merge it.

@DenBond7
DenBond7 merged commit 84a9bc1 into masterMay 10, 2021
@DenBond7
DenBond7 deleted the ip-1060-take2 branch May 10, 2021 18:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR submittedPR is submitted for this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implement pgp decrypt method that mimics error behavior

3 participants

@IvanPizhenko@DenBond7@tomholub