vault/sdk/helper/keysutil/policy_ce.go
Rachel Culpepper a0ceaf6772
Add ml-dsa key type and stubs (#28961)
* add ml-dsa key type and stubs

* add in sdk changes

* ent breakout

* fix private key func and run go mod tidy

* change function name

* tidy go.mod

---------

Co-authored-by: Scott G. Miller <smiller@hashicorp.com>
2024-11-20 15:57:00 -06:00

32 lines
797 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 []byte, ver int, options *SigningOptions) ([]byte, error) {
return nil, fmt.Errorf("unsupported key type %v", p.Type)
}
func entVerifySignatureWithOptions(p *Policy, input []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)
}