forked from TrueCloudLab/frostfs-sdk-go
*: specify RFC6979 signer as mandatory where appropriate
Refs. #209. Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
parent
7002b3b0df
commit
4e1390763a
3 changed files with 9 additions and 2 deletions
|
@ -159,7 +159,10 @@ type PrmInit struct {
|
|||
// SetDefaultSigner sets Client private signer to be used for the protocol
|
||||
// communication by default.
|
||||
//
|
||||
// Required for operations without custom signer parametrization (see corresponding Prm* docs).
|
||||
// Optional if you intend to sign every request separately (see Prm* docs), but
|
||||
// required if you'd like to use this signer for all operations implicitly.
|
||||
// If specified, MUST be of [neofscrypto.ECDSA_DETERMINISTIC_SHA256] scheme,
|
||||
// for example, [neofsecdsa.SignerRFC6979] can be used.
|
||||
func (x *PrmInit) SetDefaultSigner(signer neofscrypto.Signer) {
|
||||
x.signer = signer
|
||||
}
|
||||
|
|
|
@ -476,7 +476,9 @@ func ReadDomain(cnr Container) (res Domain) {
|
|||
// and writes it into dst. Signature instance MUST NOT be nil. CalculateSignature
|
||||
// is expected to be called after all the Container data is filled and before
|
||||
// saving the Container in the NeoFS network. Note that мany subsequent change
|
||||
// will most likely break the signature.
|
||||
// will most likely break the signature. signer MUST be of
|
||||
// [neofscrypto.ECDSA_DETERMINISTIC_SHA256] scheme, for example, [neofsecdsa.SignerRFC6979]
|
||||
// can be used.
|
||||
//
|
||||
// See also VerifySignature.
|
||||
func CalculateSignature(dst *neofscrypto.Signature, cnr Container, signer neofscrypto.Signer) error {
|
||||
|
|
|
@ -998,6 +998,8 @@ type InitParameters struct {
|
|||
}
|
||||
|
||||
// SetSigner specifies default signer to be used for the protocol communication by default.
|
||||
// MUST be of [neofscrypto.ECDSA_DETERMINISTIC_SHA256] scheme, for example,
|
||||
// [neofsecdsa.SignerRFC6979] can be used.
|
||||
func (x *InitParameters) SetSigner(signer neofscrypto.Signer) {
|
||||
x.signer = signer
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue