Skip to content

Issue 1602 verify signed messages(detached)#1695

Merged
DenBond7 merged 11 commits intomasterfrom
issue_1602_verify_signed_messages(detached)
Feb 18, 2022
Merged

Issue 1602 verify signed messages(detached)#1695
DenBond7 merged 11 commits intomasterfrom
issue_1602_verify_signed_messages(detached)

Conversation

@DenBond7
Copy link
Collaborator

@DenBond7 DenBond7 commented Feb 16, 2022

This PR added verification for OpenPGP/MIME signed messages. unfortunately, I had to change the logic that relates to parsing data blocks.

close #1602


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

val a = ByteArray(100)
val r = stream.read(a)
if (r < 1) return false
val s = String(if (r == a.size) a else a.copyOf(r), StandardCharsets.US_ASCII)
Copy link
Contributor

Choose a reason for hiding this comment

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

a.size <= r

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are you sure? It's cut-paste from PgpMsg. I didn't change this code, just copied it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I understand, but the above is a bit more optimal than what it is now.

@DenBond7 DenBond7 marked this pull request as ready for review February 17, 2022 19:07
@DenBond7
Copy link
Collaborator Author

@IvanPizhenko I've marked it as "ready to review". Don't worry about tests. it seems Semaphore changes CRLF -> CR when loading sources for tests. That's why new tests fail. While you doing a review I will think about fixing it.

@IvanPizhenko
Copy link
Contributor

IvanPizhenko commented Feb 17, 2022

@DenBond7 Looks good to me

@DenBond7 DenBond7 merged commit a08da60 into master Feb 18, 2022
@DenBond7 DenBond7 deleted the issue_1602_verify_signed_messages(detached) branch February 18, 2022 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

verify signed messages(detached)

2 participants