log decrypted response

This commit is contained in:
Andrea Franz 2019-03-21 22:59:43 +01:00
parent 72d8e3de8b
commit 3abea2751b
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D

View File

@ -6,6 +6,7 @@ import (
"errors" "errors"
ethcrypto "github.com/ethereum/go-ethereum/crypto" ethcrypto "github.com/ethereum/go-ethereum/crypto"
"github.com/status-im/keycard-cli/vendor_/github.com/status-im/keycard-go/hexutils"
"github.com/status-im/keycard-go/apdu" "github.com/status-im/keycard-go/apdu"
"github.com/status-im/keycard-go/crypto" "github.com/status-im/keycard-go/crypto"
"github.com/status-im/keycard-go/globalplatform" "github.com/status-im/keycard-go/globalplatform"
@ -107,6 +108,8 @@ func (sc *SecureChannel) Send(cmd *apdu.Command) (*apdu.Response, error) {
return nil, ErrInvalidResponseMAC return nil, ErrInvalidResponseMAC
} }
logger.Debug("apdu response decrypted", "hex", hexutils.BytesToHexWithSpaces(plainData))
return apdu.ParseResponse(plainData) return apdu.ParseResponse(plainData)
} }