Remove some no-longer-needed x/crypto refs (#4371)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2024-02-06 16:17:32 -05:00
1 parent 483f13226e
commit c4effc078b
2 files changed
+10 -6

No files matched your search

+1 -1
View File
@@ -5,6 +5,7 @@ package ldap
import (
"context"
"crypto/ed25519"
"crypto/rand"
"crypto/x509"
"testing"
@@ -14,7 +15,6 @@ import (
"github.com/hashicorp/boundary/internal/kms"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/ed25519"
)
func Test_testAuthMethod(t *testing.T) {
@@ -5,6 +5,7 @@ package server
import (
"context"
"crypto/ecdh"
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
@@ -30,7 +31,6 @@ import (
"github.com/mr-tron/base58"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/curve25519"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/structpb"
)
@@ -177,8 +177,9 @@ func TestStoreWorkerAuth(t *testing.T) {
require.NoError(err)
keyId, err := nodeenrollment.KeyIdFromPkix(nodeCreds.CertificatePublicKeyPkix)
require.NoError(err)
nodePubKey, err := curve25519.X25519(nodeCreds.EncryptionPrivateKeyBytes, curve25519.Basepoint)
privKey, err := ecdh.X25519().NewPrivateKey(nodeCreds.EncryptionPrivateKeyBytes)
require.NoError(err)
nodePubKey := privKey.PublicKey().Bytes()
// Add in node information to storage so we have a key to use
nodeInfo := &types.NodeInformation{
@@ -336,8 +337,9 @@ func TestStoreNodeInformationTx(t *testing.T) {
nodeCreds, err := types.NewNodeCredentials(testCtx, storage)
require.NoError(t, err)
nodePubKey, err := curve25519.X25519(nodeCreds.EncryptionPrivateKeyBytes, curve25519.Basepoint)
privKey, err := ecdh.X25519().NewPrivateKey(nodeCreds.EncryptionPrivateKeyBytes)
require.NoError(t, err)
nodePubKey := privKey.PublicKey().Bytes()
// Add in node information to storage so we have a key to use
nodeInfo := &types.NodeInformation{
Id: testKeyId,
@@ -572,8 +574,9 @@ func TestStoreNodeInformationTx_Twice(t *testing.T) {
nodeCreds, err := types.NewNodeCredentials(testCtx, storage)
require.NoError(t, err)
nodePubKey, err := curve25519.X25519(nodeCreds.EncryptionPrivateKeyBytes, curve25519.Basepoint)
privKey, err := ecdh.X25519().NewPrivateKey(nodeCreds.EncryptionPrivateKeyBytes)
require.NoError(t, err)
nodePubKey := privKey.PublicKey().Bytes()
// Add in node information to storage so we have a key to use
nodeInfo := &types.NodeInformation{
Id: testKeyId,
@@ -594,8 +597,9 @@ func TestStoreNodeInformationTx_Twice(t *testing.T) {
nodeCreds, err := types.NewNodeCredentials(testCtx, storage)
require.NoError(t, err)
nodePubKey, err := curve25519.X25519(nodeCreds.EncryptionPrivateKeyBytes, curve25519.Basepoint)
privKey, err := ecdh.X25519().NewPrivateKey(nodeCreds.EncryptionPrivateKeyBytes)
require.NoError(t, err)
nodePubKey := privKey.PublicKey().Bytes()
// Add in node information to storage so we have a key to use
nodeInfo := &types.NodeInformation{
Id: "fake-secondary-key-id",