summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2022-05-30 14:51:11 -0400
committersiddharth ravikumar <s@ricketyspace.net>2022-05-30 14:51:11 -0400
commit2ca1e4a3fb16c67d41fc88d694eda53963eacf42 (patch)
treefd241db906124c7b9e76b7a7bb90e3a8eff156dc /lib
parent7b95608d42cf6688e7b01bd1b87b9178f26d5a14 (diff)
lib: srp: add SRPClientSession.SetSessionKey
Diffstat (limited to 'lib')
-rw-r--r--lib/srp.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/srp.go b/lib/srp.go
index e593715..6fd8111 100644
--- a/lib/srp.go
+++ b/lib/srp.go
@@ -403,6 +403,10 @@ func (s *SRPClientSession) ComputeSessionKey(salt []byte,
return nil
}
+func (s *SRPClientSession) SetSessionKey(key []byte) {
+ s.sk = key
+}
+
func (s *SRPClientSession) SessionKeyMac(salt []byte) ([]byte, error) {
if len(s.sk) < 1 {
return nil, CPError{"sk is invalid"}