mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Convert seal.Access struct into a interface (OSS) (#20510)
* Move seal barrier type field from Access to autoSeal struct. Remove method Access.SetType(), which was only being used by a single test, and which can use the name option of NewTestSeal() to specify the type. * Change method signatures of Access to match those of Wrapper. * Turn seal.Access struct into an interface. * Tweak Access implementation. Change `access` struct to have a field of type wrapping.Wrapper, rather than extending it. * Add method Seal.GetShamirWrapper(). Add method Seal.GetShamirWrapper() for use by code that need to perform Shamir-specific operations.
This commit is contained in:
@@ -96,7 +96,7 @@ func testVaultServerAllBackends(tb testing.TB) (*api.Client, func()) {
|
||||
// testVaultServerAutoUnseal creates a test vault cluster and sets it up with auto unseal
|
||||
// the function returns a client, the recovery keys, and a closer function
|
||||
func testVaultServerAutoUnseal(tb testing.TB) (*api.Client, []string, func()) {
|
||||
testSeal := seal.NewTestSeal(nil)
|
||||
testSeal, _ := seal.NewTestSeal(nil)
|
||||
autoSeal, err := vault.NewAutoSeal(testSeal)
|
||||
if err != nil {
|
||||
tb.Fatal("unable to create autoseal", err)
|
||||
|
||||
Reference in New Issue
Block a user