Skip to content

Commit

Permalink
Merge pull request #26 from Seagate/FMW-73837_Remove_Key_Material
Browse files Browse the repository at this point in the history
FMW-73837: Remove Key Material Captured in Logs
  • Loading branch information
BoonKhoonSim authored Dec 13, 2024
2 parents 65caa95 + eca3d3f commit 184c125
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/kmipapi/kmip14.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ func (kmips *kmip14service) GetKey(ctx context.Context, connection *tls.Conn, se
}

decoder, item, err := SendRequestMessage(ctx, connection, settings, uint32(kmip14.OperationGet), &payload, false)
logger.Debug("get key response item", "item", item)

if err != nil {
logger.Error("get key call to SendRequestMessage failed", "error", err)
Expand Down
4 changes: 1 addition & 3 deletions src/kmipapi/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func SendRequestMessage(ctx context.Context, connection *tls.Conn, settings *Con
var err error
// var msg kmip.RequestMessage

if dobatch == true {
if dobatch {
kmipreq, err = ttlv.Marshal(payload)
if err != nil {
return nil, nil, fmt.Errorf("dobatch - failed to marshal message, error: %v", err)
Expand Down Expand Up @@ -101,7 +101,6 @@ func SendRequestMessage(ctx context.Context, connection *tls.Conn, settings *Con

logger.Debug("(5) extract response from TTLV buffer")
resp := ttlv.TTLV(buf)
logger.Debug("ttlv", "response", resp)

// Create a TTLV decoder from a new reader
decoder := ttlv.NewDecoder(bytes.NewReader(resp))
Expand All @@ -117,7 +116,6 @@ func SendRequestMessage(ctx context.Context, connection *tls.Conn, settings *Con
}

logger.Debug("(6) extract batch item from response message", "BatchCount", respMsg.ResponseHeader.BatchCount)
logger.Debug("response", "message", respMsg)
if len(respMsg.BatchItem) == 0 {
return nil, nil, fmt.Errorf("response message had not batch items")
}
Expand Down

0 comments on commit 184c125

Please sign in to comment.