Remove context from a few extraneous places

This commit is contained in:
Jeff Mitchell
2018-01-19 03:44:06 -05:00
parent 048a35d903
commit cfc788f60e
13 changed files with 55 additions and 55 deletions

View File

@@ -922,19 +922,19 @@ func (c *ServerCommand) enableDev(core *vault.Core, coreConfig *vault.CoreConfig
SecretThreshold: 1,
}
ctx := context.Background()
if core.SealAccess().RecoveryKeySupported(ctx) {
if core.SealAccess().RecoveryKeySupported() {
recoveryConfig = &vault.SealConfig{
SecretShares: 1,
SecretThreshold: 1,
}
}
if core.SealAccess().StoredKeysSupported(ctx) {
if core.SealAccess().StoredKeysSupported() {
barrierConfig.StoredShares = 1
}
ctx := context.Background()
// Initialize it with a basic single key
init, err := core.Initialize(ctx, &vault.InitParams{
BarrierConfig: barrierConfig,
@@ -945,7 +945,7 @@ func (c *ServerCommand) enableDev(core *vault.Core, coreConfig *vault.CoreConfig
}
// Handle unseal with stored keys
if core.SealAccess().StoredKeysSupported(ctx) {
if core.SealAccess().StoredKeysSupported() {
err := core.UnsealWithStoredKeys(ctx)
if err != nil {
return nil, err