VaultSharp icon indicating copy to clipboard operation
VaultSharp copied to clipboard

prehashed]' expected type 'string', got unconvertible type 'bool', value: 'false'

Open arete opened this issue 10 months ago • 0 comments

Describe the bug

VaultSharp Version 1.17.5.1

Vault Version hashicorp/vault:1.21.2

Does this work with Vault CLI? Yes/No

Sample Code Snippet `var signOptions = new SignRequestOptions { BatchInput = new List { new SignSingleInput {

            Base64EncodedInput = base64Input,
            MarshalingAlgorithm = MarshalingAlgorithm.jws
        }
    }
    };

    // 3. Chiamata a Vault
    var result = await _vaultClient.V1.Secrets.Transit
        .SignDataAsync(_keyName, signOptions);`

Exception Details/Stack Trace/Error Message `aultSharp.Core.VaultApiException: {"errors":["1 error occurred:\n\t* failed to parse batch input: 1 error(s) decod ing:\n\n* '[0][prehashed]' expected type 'string', got unconvertible type 'bool', value: 'false'\n\n"]}

at VaultSharp.Core.Polymath.MakeRequestAsync[TResponse](String resourcePath, HttpMethod httpMethod, Object reque stData, IDictionary2 headers, Boolean rawResponse, Action1 postResponseAction) at VaultSharp.Core.Polymath.MakeVaultApiRequest[TResponse](String resourcePath, HttpMethod httpMethod, Object re questData, Boolean rawResponse, Action1 postResponseAction, String wrapTimeToLive, Boolean unauthenticated) at VaultSharp.Core.Polymath.MakeVaultApiRequest[TResponse](String mountPoint, String path, HttpMethod httpMethod , Object requestData, Boolean rawResponse, Action1 postResponseAction, String wrapTimeToLive, Boolean unauthentica ted) at VaultSharp.V1.SecretsEngines.Transit.TransitSecretsEngineProvider.SignDataAsync(String keyName, SignRequestOp tions signOptions, String mountPoint, String wrapTimeToLive) `

Any additional info Helpful info

arete avatar Jan 09 '26 09:01 arete