Skip to content

sn: support N3 signatures for objects - #4259

Open
carpawell wants to merge 1 commit into
masterfrom
fix/support-n3-signatures-for-objects
Open

carpawell wants to merge 1 commit into
masterfrom
fix/support-n3-signatures-for-objects

Conversation

@carpawell

@carpawell carpawell commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

If an object is signed using N3 scheme with session token, check its verification script as a source of user ID and send this user as a signer to Neo VM.

@carpawell
carpawell force-pushed the fix/support-n3-signatures-for-objects branch 2 times, most recently from c62dcb6 to 1d8cf33 Compare October 28, 2026 16:51
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 10.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.24%. Comparing base (92a252c) to head (42f9ca4).

Files with missing lines Patch % Lines
internal/crypto/object.go 10.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4259      +/-   ##
==========================================
+ Coverage   32.23%   32.24%   +0.01%     
==========================================
  Files         673      673              
  Lines       41636    41638       +2     
==========================================
+ Hits        13423    13428       +5     
+ Misses      28213    28210       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread internal/crypto/object.go Outdated
var ecdsaPub *ecdsa.PublicKey
var (
ecdsaPub *ecdsa.PublicKey
signer = obj.Owner()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i'd declare it right before updated condition below

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dont mind, moved, but both vars are about the same (it is either key, or verif hash, so i wanted them to be together)

Comment thread internal/crypto/object.go
@@ -76,18 +80,20 @@ func AuthenticateObject(obj object.Object, fsChain HistoricN3ScriptRunner, sToke
if sessionTokenV2 != nil {
// NOTE: update this place for non-ECDSA schemes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@cthulhu-rider do you understand this comment? can it be dropped now? is it about this PR? something else?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, can be dropped

If an object is signed using N3 scheme with session token, check its
verification script as a source of user ID and send this user as a signer to
Neo VM.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
@carpawell
carpawell force-pushed the fix/support-n3-signatures-for-objects branch from 1d8cf33 to 42f9ca4 Compare October 29, 2026 12:53

This branch has not been deployed

No deployments
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.

2 participants