Skip to content

fix(sender): wrap smime cert errors#1326

Closed
resolvicomai wants to merge 1 commit into
floatpane:masterfrom
resolvicomai:fix/smime-key-error-wrap
Closed

fix(sender): wrap smime cert errors#1326
resolvicomai wants to merge 1 commit into
floatpane:masterfrom
resolvicomai:fix/smime-key-error-wrap

Conversation

@resolvicomai
Copy link
Copy Markdown
Contributor

What?

Preserve the underlying S/MIME certificate read/parse error when encryption cannot find or load one or more recipient certificates.

Why?

The previous aggregate error listed the missing recipients but dropped the original error, so callers could not use errors.Is(err, os.ErrNotExist) for missing certificate files.

Closes #693.

Verification

  • go test ./sender -run TestSendEmailSMIMEEncryptionWrapsMissingCertError -count=1
  • go test ./sender
  • go test ./...
  • make lint
  • git diff --check

@resolvicomai resolvicomai requested a review from a team as a code owner May 21, 2026 12:58
@floatpanebot floatpanebot added bug Something isn't working area/sender SMTP send path size/M Diff: 51–200 lines and removed bug Something isn't working labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/sender SMTP send path size/M Diff: 51–200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Missing error wrapping for missing PGP key

2 participants