hashicorp / hashicorp/vault-client-dotnet

VaultConfiguration has bug if you pass null httpClientHandler param

Open
#194 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
48
Forks
6
PR merge metrics
No merged PRs in 30d

Description

When i pass null http client handler then i got following exception .

Exception :
at Vault.Client.VaultConfiguration..ctor(String basePath, HttpClientHandler httpClientHandler, Nullable`1 timeout, RetryConfiguration retryConfiguration, RateLimitConfiguration rateLimitConfiguration, TLSConfiguration tlsConfiguration)

In the Vault Configuration class, If httpClientHandler is null then you create a HttpClientHandler and set it to this.HttpClientHandler object. And After , you are using httpClientHandler object on following lines.

this.HttpClientHandler = httpClientHandler ?? new HttpClientHandler();
//
httpClientHandler.ClientCertificates.Add((X509Certificate) this.TLSConfiguration.ClientCertificate);

Contributor guide

Open the contributing guide

Research direction

Start in the VaultConfiguration constructor shown in the issue and reproduce the failure with a null HttpClientHandler. Trace the assignment and subsequent certificate handling; done means a null handler is created and used consistently without the reported exception, while a supplied handler continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.