azure-sdk-for-cpp icon indicating copy to clipboard operation
azure-sdk-for-cpp copied to clipboard

ClientCertificateCredential doesn't support more than one cert in a file

Open ahsonkhan opened this issue 5 months ago • 0 comments

There is a couple of assumptions within the ClientCertificateCredential implementation being made:

  • Assuming there is only one cert in the file (and that is the signing cert).
  • Assuming the private key in the file is for the first cert.

In practice, these assumptions won't always hold. The parsing logic should be resilient to these, and these assumptions should be documented otherwise.

https://github.com/Azure/azure-sdk-for-cpp/blob/df6f5c910d3b2b9d913711e0e4d8c0313fb2c27a/sdk/identity/azure-identity/src/client_certificate_credential.cpp#L232-L240

ahsonkhan avatar Sep 12 '24 16:09 ahsonkhan