System.Private.CoreLib: An error occurred while sending the request. System.Net.Http: Peer certificate cannot be authenticated with given CA certificates.
Using the cosmosDB binding in Linux, I am unable to connect to a Cosmos DB emulator running on a networked Windows machine. This issue appears to be related to .NET Core and OpenSSL/*nix as Windows to Windows works fine for me after importing the public key into the Windows Certificate Store of the client computer running Azure Functions.
I am able to confirm the cert was properly imported into the Linux machine/OpenSSL as it is used by the emulator's browser based data explorer (the data explorer does not work without the cert installed).
Because the emulator only runs on Windows, this issue makes local development with Azure Functions and the emulator not possible outside of Windows.
Investigative information
Please provide the following:
Azure Functions Core Tools: 220.0.0-beta.0
Function Runtime: 2.0.11651.0
Extensions.CosmosDB: 3.0.0-beta7
Emulator: 1.22.0.0
openssl: 1.1.0.h-1
.NET Core runtime: 2.0.7-1
Repro steps
Provide the steps required to reproduce the problem:
Install the emulator on Windows with networking enabled.
Install Azure Functions Core Tools, the CosmosDB extension and dependencies on Linux
Export/Import cert.
Start function that requires connection to emulator.
See error.
Expected behavior
Authentication should succeed using the imported certificate and a connection should be established.
Using the cosmosDB binding in Linux, I am unable to connect to a Cosmos DB emulator running on a networked Windows machine. This issue appears to be related to .NET Core and OpenSSL/*nix as Windows to Windows works fine for me after importing the public key into the Windows Certificate Store of the client computer running Azure Functions.
I am able to confirm the cert was properly imported into the Linux machine/OpenSSL as it is used by the emulator's browser based data explorer (the data explorer does not work without the cert installed).
Because the emulator only runs on Windows, this issue makes local development with Azure Functions and the emulator not possible outside of Windows.
Investigative information
Please provide the following:
Repro steps
Provide the steps required to reproduce the problem:
Expected behavior
Authentication should succeed using the imported certificate and a connection should be established.
Actual behavior
The above error is thrown.
Known workarounds
None.
Related information