mirror of https://gogs.blitter.com/RLabs/xs
Fixed rekey selection of HMAC algs (was always using alg 0, SHA256)
This commit is contained in:
parent
a929fdc211
commit
7731466c8c
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
VERSION := 0.9.13
|
||||
VERSION := 0.9.14
|
||||
.PHONY: lint vis clean common client server passwd\
|
||||
subpkgs install uninstall reinstall scc
|
||||
|
||||
|
|
|
@ -24,9 +24,10 @@ import (
|
|||
"blitter.com/go/hopscotch"
|
||||
"blitter.com/go/xs/logger"
|
||||
"github.com/aead/chacha20/chacha"
|
||||
whirlpool "github.com/jzelinskie/whirlpool"
|
||||
"golang.org/x/crypto/blowfish"
|
||||
"golang.org/x/crypto/twofish"
|
||||
whirlpool "github.com/jzelinskie/whirlpool"
|
||||
|
||||
// hash algos must be manually imported thusly:
|
||||
// (Would be nice if the golang pkg docs were more clear
|
||||
// on this...)
|
||||
|
@ -64,8 +65,8 @@ func getNewStreamAlgs(cb uint8, hb uint8) (config uint32) {
|
|||
// the input rekeying data
|
||||
c := (cb % CAlgNoneDisallowed)
|
||||
h := (hb % HmacNoneDisallowed)
|
||||
config = uint32(h<<8) | uint32(c)
|
||||
logger.LogDebug(fmt.Sprintf("[Chose new algs [%d:%d]", h, c))
|
||||
config = uint32(h)<<8 | uint32(c)
|
||||
//logger.LogDebug(fmt.Sprintf("[Chose new algs [%d:%d config:%d]", h, c, config))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue