⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@maxtropets
Copy link
Collaborator

@maxtropets maxtropets commented Jan 15, 2026

Towards #7542.

@maxtropets maxtropets self-assigned this Jan 15, 2026
@maxtropets maxtropets marked this pull request as ready for review January 15, 2026 19:29
@maxtropets maxtropets marked this pull request as ready for review January 15, 2026 19:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors the COSE verifier implementation to use new CBOR wrapper functions instead of raw QCBOR API calls, improving code maintainability and error handling.

Changes:

  • Replaced manual QCBOR decoding with higher-level CBOR wrapper API calls in two functions
  • Simplified error handling using rethrow_with_msg helper for better context in error messages
  • Removed significant boilerplate QCBOR code in favor of cleaner API
Comments suppressed due to low confidence (1)

src/crypto/openssl/cose_verifier.cpp:26

  • The function qcbor_buf_to_string appears to be unused after the refactoring. Consider removing it to eliminate dead code.
  std::string qcbor_buf_to_string(const UsefulBufC& buf)
  {
    return {reinterpret_cast<const char*>(buf.ptr), buf.len};
  }

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/crypto/openssl/cose_verifier.cpp:26

  • The qcbor_buf_to_string function is no longer used after the refactoring to use new CBOR wrappers. This unused function should be removed to improve code maintainability.
  std::string qcbor_buf_to_string(const UsefulBufC& buf)
  {
    return {reinterpret_cast<const char*>(buf.ptr), buf.len};
  }

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.

1 participant