Skip to content

Commit

Permalink
Remove spurious fmt.Printf calls including one of a key (#15344) (#15516
Browse files Browse the repository at this point in the history
)

Co-authored-by: Christopher Swenson <swenson@swenson.io>
  • Loading branch information
hc-github-team-secure-vault-core and swenson committed May 19, 2022
1 parent b6c5af7 commit a79a69d
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion builtin/credential/aws/pkcs7/decrypt.go
Expand Up @@ -60,7 +60,6 @@ func (eci encryptedContentInfo) decrypt(key []byte) ([]byte, error) {
!alg.Equal(OIDEncryptionAlgorithmAES128CBC) &&
!alg.Equal(OIDEncryptionAlgorithmAES128GCM) &&
!alg.Equal(OIDEncryptionAlgorithmAES256GCM) {
fmt.Printf("Unsupported Content Encryption Algorithm: %s\n", alg)
return nil, ErrUnsupportedAlgorithm
}

Expand Down
3 changes: 1 addition & 2 deletions builtin/credential/aws/pkcs7/verify_test_dsa.go
Expand Up @@ -5,7 +5,6 @@ package pkcs7
import (
"crypto/x509"
"encoding/pem"
"fmt"
"io/ioutil"
"os"
"os/exec"
Expand Down Expand Up @@ -108,7 +107,7 @@ but that's not what ships are built for.
if err != nil {
t.Fatal(err)
}
fmt.Printf("%s\n", pemSignature)
t.Logf("%s\n", pemSignature)
derBlock, _ := pem.Decode(pemSignature)
if derBlock == nil {
t.Fatalf("failed to read DER block from signature PEM %s", tmpSignedFile.Name())
Expand Down
1 change: 0 additions & 1 deletion builtin/logical/rabbitmq/path_role_create.go
Expand Up @@ -74,7 +74,6 @@ func (b *backend) pathCredsRead(ctx context.Context, req *logical.Request, d *fr
if err != nil {
return nil, fmt.Errorf("failed to generate username: %w", err)
}
fmt.Printf("username: %s\n", username)

password, err := b.generatePassword(ctx, config.PasswordPolicy)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion command/server/config_test_helpers.go
Expand Up @@ -320,7 +320,6 @@ func testParseEntropy(t *testing.T, oss bool) {
case err != test.outErr:
t.Fatalf("error mismatch: expected %#v got %#v", err, test.outErr)
case err == nil && config.Entropy != nil && *config.Entropy != test.outEntropy:
fmt.Printf("\n config.Entropy: %#v", config.Entropy)
t.Fatalf("entropy config mismatch: expected %#v got %#v", test.outEntropy, *config.Entropy)
}
}
Expand Down
2 changes: 0 additions & 2 deletions helper/dhutil/dhutil.go
Expand Up @@ -6,7 +6,6 @@ import (
"crypto/cipher"
"crypto/rand"
"crypto/sha256"
"encoding/hex"
"errors"
"fmt"
"io"
Expand Down Expand Up @@ -90,7 +89,6 @@ func DeriveSharedKey(secret, ourPublic, theirPublic []byte) ([]byte, error) {
if n != 32 {
return nil, errors.New("short read from hkdf")
}
fmt.Printf("Key: %s\n", hex.EncodeToString(key[:]))

return key[:], nil
}
Expand Down

0 comments on commit a79a69d

Please sign in to comment.