Skip to content

fix(ffi): return the error when online encryptor creation fails - #429

Merged
Mathieu Morrissette (mmorrissette-devolutions) merged 1 commit into
masterfrom
fix/ffi-online-encryptor-error
Nov 20, 2026
Merged

Mathieu Morrissette (mmorrissette-devolutions) merged 1 commit into
masterfrom
fix/ffi-online-encryptor-error

Conversation

@mmorrissette-devolutions

Copy link
Copy Markdown
Contributor

NewOnlineEncryptor now returns the error code when the encryptor cannot be created, as NewOnlineDecryptor does, instead of returning 0. Adds a test.

Copilot AI balanced review requested due to automatic review settings November 20, 2026 13:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T13:22:00.860573Z ccffeba PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the FFI encryptor error-handling change.

No open issues 🎉

What changed in this PR

Fixes error handling in the FFI’s NewOnlineEncryptor so creation failures return an error code, matching NewOnlineDecryptor.

Changes:

  • Returns constructor errors before allocating or assigning an encryptor handle.
  • Adds a regression test checking that an unsupported public key produces a negative error code and leaves the handle null.
File Description
ffi/​src/​lib.rs Propagates encryptor creation errors and adds regression coverage.

Review effort: Balanced

@mmorrissette-devolutions
Mathieu Morrissette (mmorrissette-devolutions) merged commit 36e7d14 into master Nov 20, 2026
34 of 35 checks passed
@mmorrissette-devolutions
Mathieu Morrissette (mmorrissette-devolutions) deleted the fix/ffi-online-encryptor-error branch November 20, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants