From 44e94618b0973fcf0bf20e3c8bec16d2ded531f8 Mon Sep 17 00:00:00 2001 From: Dave Mihalcik Date: Mon, 31 Aug 2026 22:35:34 -0400 Subject: [PATCH] chore(sdk): drop dead TDFConfig fields and deprecate the TDFFormat enum TDFConfig.enableEncryption was set to true at construction and never read again; nothing could turn it off and nothing branched on it. tdfFormat was likewise fixed at JSONFormat forever. readActionName was a leftover constant with no references. All three are gone. TDFFormat, JSONFormat, and XMLFormat are exported, so they are deprecated rather than deleted. XML manifests were never implemented and the enum has no remaining consumer inside the SDK. Signed-off-by: Dave Mihalcik --- sdk/tdf.go | 1 - sdk/tdf_config.go | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sdk/tdf.go b/sdk/tdf.go index f2efc3f0ae..187d29b69c 100644 --- a/sdk/tdf.go +++ b/sdk/tdf.go @@ -51,7 +51,6 @@ const ( kAssertionSignature = "assertionSig" kAssertionHash = "assertionHash" hexSemverThreshold = "4.3.0" - readActionName = "read" ) // Loads and reads ZTDF files diff --git a/sdk/tdf_config.go b/sdk/tdf_config.go index ff9d4c05c9..22e13933a0 100644 --- a/sdk/tdf_config.go +++ b/sdk/tdf_config.go @@ -27,10 +27,16 @@ const ( inputSizeUnknown = -1 ) +// TDFFormat once selected a manifest serialization. Only JSON was ever +// implemented, and nothing reads this. +// +// Deprecated: unused; the manifest is always JSON. type TDFFormat = int const ( + // Deprecated: unused; the manifest is always JSON. JSONFormat = iota + // Deprecated: never implemented. XMLFormat ) @@ -68,8 +74,6 @@ type TDFConfig struct { autoconfigure bool defaultSegmentSize int64 inputSize int64 - enableEncryption bool - tdfFormat TDFFormat metaData string mimeType string integrityAlgorithm IntegrityAlgorithm @@ -91,8 +95,6 @@ func newTDFConfig(opt ...TDFOption) (*TDFConfig, error) { autoconfigure: true, defaultSegmentSize: defaultSegmentSize, inputSize: inputSizeUnknown, - enableEncryption: true, - tdfFormat: JSONFormat, integrityAlgorithm: HS256, segmentIntegrityAlgorithm: GMAC, addDefaultAssertion: false,