Skip to content

Commit 6f14b68

Browse files
committed
intel/metadata/cbnt: do not marshal large data blobs to JSON
Signed-off-by: Daniel Maslowski <info@orangecms.org>
1 parent 02de48c commit 6f14b68

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/intel/metadata/cbnt/hash.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package cbnt
99
// HashStructure describes a digest.
1010
type HashStructure struct {
1111
HashAlg Algorithm `default:"0x10" json:"hsAlg"`
12-
HashBuffer []byte `json:"hsBuffer"`
12+
HashBuffer []byte `json:"-"`
1313
}
1414

1515
// HashList describes multiple digests

pkg/intel/metadata/cbnt/key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Key struct {
2424
KeyAlg Algorithm `json:"keyAlg"`
2525
Version uint8 `require:"0x10" json:"keyVersion"`
2626
KeySize BitSize `json:"keyBitsize"`
27-
Data []byte `countValue:"keyDataSize()" json:"keyData"`
27+
Data []byte `countValue:"keyDataSize()" json:"-"`
2828
}
2929

3030
// BitSize is a size in bits.

pkg/intel/metadata/cbnt/signature.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Signature struct {
2424
Version uint8 `require:"0x10" json:"sigVersion,omitempty"`
2525
KeySize BitSize `json:"sigKeysize,omitempty"`
2626
HashAlg Algorithm `json:"sigHashAlg"`
27-
Data []byte `countValue:"KeySize.InBytes()" prettyValue:"dataPrettyValue()" json:"sigData"`
27+
Data []byte `countValue:"KeySize.InBytes()" prettyValue:"dataPrettyValue()" json:"-"`
2828
}
2929

3030
func (m Signature) dataPrettyValue() interface{} {

0 commit comments

Comments
 (0)