Add HMAC capability to salt. Pass a salt into audit backends. Require it for audit.Hash.

This commit is contained in:
Jeff Mitchell
2015-09-18 12:18:37 -04:00
parent d62f533a6f
commit a4ca14cfbc
11 changed files with 137 additions and 72 deletions

View File

@@ -22,7 +22,9 @@ func Factory(conf *logical.BackendConfig) (logical.Backend, error) {
}
func Backend(conf *logical.BackendConfig) (*framework.Backend, error) {
salt, err := salt.NewSalt(conf.StorageView, nil)
salt, err := salt.NewSalt(conf.StorageView, &salt.Config{
HashFunc: salt.SHA1Hash,
})
if err != nil {
return nil, err
}