Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions pool/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/google/uuid"
"github.com/nspcc-dev/neofs-sdk-go/client"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
neofsecdsa "github.com/nspcc-dev/neofs-sdk-go/crypto/ecdsa"
"github.com/nspcc-dev/neofs-sdk-go/session"
"github.com/nspcc-dev/neofs-sdk-go/user"
)
Expand Down Expand Up @@ -49,13 +48,8 @@ func initSession(ctx context.Context, c *sdkClientWrapper, dur uint64, signer us
return dst, fmt.Errorf("invalid session token ID: %w", err)
}

var key neofsecdsa.PublicKey
if err = key.Decode(res.PublicKey()); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Actually this suggests another inconsistency (SDK-level), sometimes keys are proper keys and sometimes they are bytes. Depends on type.

return dst, fmt.Errorf("invalid public session key: %w", err)
}

dst.SetID(id)
dst.SetAuthKey(&key)
dst.SetAuthKeyBytes(res.PublicKey())
dst.SetExp(exp)

c.nodeSession.SetNodeSession(&dst, signer.Public())
Expand Down