Skip to content

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

@arete

Description

@arete

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions