Skip to content
Snippets Groups Projects
Commit 4a05f1e9 authored by Jonah Husson's avatar Jonah Husson
Browse files

close stream when done

parent 4ab762a2
Branches
Tags
1 merge request!23Release
...@@ -95,9 +95,11 @@ func (c *Client) getIidAndSig() ([]byte, []byte, error) { ...@@ -95,9 +95,11 @@ func (c *Client) getIidAndSig() ([]byte, []byte, error) {
return nil, nil, errors.WithMessage(err, "RegisterForNotifications: Failed to write intermediary ID to hash") return nil, nil, errors.WithMessage(err, "RegisterForNotifications: Failed to write intermediary ID to hash")
} }
sig, err := rsa.Sign(c.rng.GetStream(), c.GetUser().TransmissionRSA, hash.CMixHash, h.Sum(nil), nil) stream := c.rng.GetStream()
sig, err := rsa.Sign(stream, c.GetUser().TransmissionRSA, hash.CMixHash, h.Sum(nil), nil)
if err != nil { if err != nil {
return nil, nil, errors.WithMessage(err, "RegisterForNotifications: Failed to sign intermediary ID") return nil, nil, errors.WithMessage(err, "RegisterForNotifications: Failed to sign intermediary ID")
} }
stream.Close()
return intermediaryReceptionID, sig, nil return intermediaryReceptionID, sig, nil
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment