Bug 53855 - Xamarin.Certificates issues crops up everytime an instance of VSfM is opened
Summary: Xamarin.Certificates issues crops up everytime an instance of VSfM is opened
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.9.X
Hardware: Macintosh Mac OS
: Highest blocker
Target Milestone: 15.2
Assignee: Martin Baulig
Depends on:
Reported: 2017-03-23 13:39 UTC by Chiranjib Mukherjee
Modified: 2017-04-04 10:55 UTC (History)
7 users (show)

Tags: 2017-02
Is this bug a regression?: Yes
Last known good build:

Logs_1 (9.00 KB, text/plain)
2017-03-23 13:39 UTC, Chiranjib Mukherjee
Logs_2 (9.00 KB, text/plain)
2017-03-23 13:40 UTC, Chiranjib Mukherjee
Screenshots_1 (1.03 MB, image/png)
2017-03-23 13:41 UTC, Chiranjib Mukherjee
Screenshots_2 (1.05 MB, image/png)
2017-03-23 13:41 UTC, Chiranjib Mukherjee
Screenshots_3 (1.03 MB, image/png)
2017-03-23 13:41 UTC, Chiranjib Mukherjee

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Chiranjib Mukherjee 2017-03-23 13:39:58 UTC
Created attachment 20751 [details]

Description: Xamarin.Certificates issues crops up everytime an instance of VSfM is opened

Steps to reproduce:
- Install the VSfM application 
- Open the VSfM application

Expected Result - VSfM should start successfully

Actual Result - Xamarin.Certificate issue pops up a number of times and does not close

Reproducibility Ratio: 10/10

Environment Details:
Visual Studio for Mac Preview
Version Preview 5 (7.0 build 1754)
Installation UUID: 0dddd93d-6d83-4539-a8cd-2edf7e9e8564
	Mono (2017-02/582b140) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 409030060


Version: 1.4.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 8.2.1 (11766.1)
Build 8C1002

Version: (Visual Studio Enterprise)
Hash: 818c20b
Branch: master
Build date: 2017-03-21 12:28:31-0400

Version: (Visual Studio Enterprise)
Android SDK: /Users/globallogic/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.4 (API level 19)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 25.0.1

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:

Version: (Visual Studio Enterprise)

Xamarin Inspector
Version: 1.2.0-rc.3
Hash: 5e5e341
Branch: d15-1
Build date: Fri, 10 Mar 2017 22:41:39 GMT

Build Information
Release ID: 700001754
Git revision: 19e3a4fe7845ed95cd46bee588b977c437aab778
Build date: 2017-03-17 06:06:48-04
Xamarin addins: 9da1aac629739945502f03c5f10b9efbb0608661
Build lane: monodevelop-lion-azure-publishing-rebased

Operating System
Mac OS X 10.12.0
Darwin NAG1-LMAC-N07154 16.0.0 Darwin Kernel Version 16.0.0
    Mon Aug 29 17:56:20 PDT 2016
    root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
Comment 1 Chiranjib Mukherjee 2017-03-23 13:40:42 UTC
Created attachment 20752 [details]
Comment 2 Chiranjib Mukherjee 2017-03-23 13:41:01 UTC
Created attachment 20753 [details]
Comment 3 Chiranjib Mukherjee 2017-03-23 13:41:21 UTC
Created attachment 20754 [details]
Comment 4 Chiranjib Mukherjee 2017-03-23 13:41:55 UTC
Created attachment 20755 [details]
Comment 5 Chiranjib Mukherjee 2017-03-23 13:42:45 UTC
Screencast Link - https://www.screencast.com/t/4FxWpyqm5
Comment 6 Manish Sinha 2017-03-23 13:49:45 UTC
This is definitely about AppleTLS enabled by default on desktop mono on macOS.

Comment 7 Chris Hamons 2017-03-23 13:51:33 UTC
Well we know it's AppleTls because @manish tested with MONO_TLS_PROVIDER=legacy and said that made it work.

There are various ways we can turn off AppleTls and drop back to legacy, but I'd rather fix the issue at hand (if there is one).

What certificates are Apple rejecting?
Comment 8 Manish Sinha 2017-03-23 14:44:36 UTC
I can reproduce this issue even outside out visual studio for mac

Use this code


the screenshot is

Comment 9 Chris Hamons 2017-03-23 16:49:20 UTC
This "goes away" if you set MONO_TLS_PROVIDER=legacy.

Doing some research, I've found the following:

- The exception we hit on AppleTls - https://gist.github.com/chamons/bff6fac1966f97d43302932fed2b8aea
- You hit a nearly identical one if you force BTLS - https://gist.github.com/chamons/eec48838c742da2f3aab144526f53874
- You get the same exact behavior if you run the build before my AppleTls merge and force BTLS
Comment 10 Chris Hamons 2017-03-23 19:07:19 UTC
Martin is debugging right now. 

At first debug we're hitting the last exception in EvaluateTrust in AppleTlsContext.cs.
Comment 11 Andi McClure 2017-03-27 17:03:41 UTC
Is this resolved, can we close it?

Comment 12 Chiranjib Mukherjee 2017-03-31 10:31:40 UTC
Working fine with the latest versions of Mono, XA, XI, XM.
Comment 13 Mohak Barokar 2017-04-04 10:55:10 UTC
Working fine with following config :

Visual Studio for Mac Version Preview 5 (7.0 build 2690)
Mono (2017-02/f342dae) (64-bit)
Xamarin.Android Version:
Xamarin.Mac Version:
Xamarin.iOS Version:

Hence marking this bug as Verified.