vault/sdk/helper/keysutil/policy_ce.go
Scott Miller 7c1d6e5e84
CE side changes to key policy engine for ML-DSA/Hybrid support (#29274)
* CE side changes to key policy engine for ML-DSA/Hybrid support

* fix ce mismatch for verify

* restore omitempty

* unnecessary

* Perform code reuse of ed25519 validation differently

* make parts of export testing ent only

* license
2025-01-03 09:46:00 -05:00

32 lines
839 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
//go:build !enterprise
package keysutil
import (
"fmt"
"io"
"github.com/hashicorp/vault/sdk/helper/errutil"
)
type entKeyEntry struct{}
func (e entKeyEntry) IsEntPrivateKeyMissing() bool {
return true
}
func entSignWithOptions(p *Policy, input, context []byte, ver int, hashAlgorithm HashType, options *SigningOptions) ([]byte, error) {
return nil, fmt.Errorf("unsupported key type %v", p.Type)
}
func entVerifySignatureWithOptions(p *Policy, input, context []byte, sigBytes []byte, ver int, options *SigningOptions) (bool, error) {
return false, errutil.InternalError{Err: fmt.Sprintf("unsupported key type %v", p.Type)}
}
func entRotateInMemory(p *Policy, entry *KeyEntry, rand io.Reader) error {
return fmt.Errorf("unsupported key type %v", p.Type)
}