How to resolve error System.Security.Authentication.AuthenticationException Mono.Security.Interface.TlsException: CertificateUnknown

Table of Contents

Case #

When trying to connect to a TLS-enabled endpoint on a public Cloud resource (for example on an Azure VM), you receive the following error.

{System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. —> Mono.Security.Interface.TlsException: CertificateUnknown

Solution #

This error stems from the Mono.Security library which comes with the Xamarin development framework. If you are using Xamarin and the Mono.Security library in a code implementation running on a public cloud resource, you are likely to hit this error.

Due to increased security requirements, including PCI compliance, major cloud providers and web servers already have stopped or are expected to stop supporting TLS versions older than 1.2. Xamarin projects created in previous versions of Visual Studio default to use older versions of TLS (earlier than TLS 1.2).

Make use of the tools below to verify which TLS versions and security cipher suites are enabled and configured on your server and on your Windows-based or Linux-based machines. If you have a TLS version earlier than 1.2, you will then need to configure the same TLS version on the public Cloud equivalent, e.g. on an Azure VM.

Sources #

Powered by BetterDocs