mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-23 15:41:07 +02:00
* PKI refactoring to start breaking apart monolith into sub-packages - This was broken down by commit within enterprise for ease of review but would be too difficult to bring back individual commits back to the CE repository. (they would be squashed anyways) - This change was created by exporting a patch of the enterprise PR and applying it to CE repository * Fix TestBackend_OID_SANs to not be rely on map ordering
44 lines
721 B
Go
44 lines
721 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package managed_key
|
|
|
|
import (
|
|
"crypto"
|
|
"io"
|
|
|
|
"github.com/hashicorp/vault/sdk/helper/certutil"
|
|
"github.com/hashicorp/vault/sdk/logical"
|
|
)
|
|
|
|
type ManagedKeyInfo struct {
|
|
publicKey crypto.PublicKey
|
|
KeyType certutil.PrivateKeyType
|
|
Name NameKey
|
|
Uuid UUIDKey
|
|
}
|
|
|
|
type managedKeyId interface {
|
|
String() string
|
|
}
|
|
|
|
type PkiManagedKeyView interface {
|
|
BackendUUID() string
|
|
IsSecondaryNode() bool
|
|
GetManagedKeyView() (logical.ManagedKeySystemView, error)
|
|
GetRandomReader() io.Reader
|
|
}
|
|
|
|
type (
|
|
UUIDKey string
|
|
NameKey string
|
|
)
|
|
|
|
func (u UUIDKey) String() string {
|
|
return string(u)
|
|
}
|
|
|
|
func (n NameKey) String() string {
|
|
return string(n)
|
|
}
|