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
Status: VERIFIED FIXED
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
URL:
Depends on:
Blocks:
 
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: 4.9.3.59


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


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:
Status:
VERIFIED FIXED

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

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
Runtime:
	Mono 4.9.3.60 (2017-02/582b140) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 409030060

NuGet
Version: 4.0.0.2323

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

Apple Developer Tools
Xcode 8.2.1 (11766.1)
Build 8C1002

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

Xamarin.Android
Version: 7.2.99.67 (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:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin.Mac
Version: 3.3.0.73 (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]
Logs_2
Comment 2 Chiranjib Mukherjee 2017-03-23 13:41:01 UTC
Created attachment 20753 [details]
Screenshots_1
Comment 3 Chiranjib Mukherjee 2017-03-23 13:41:21 UTC
Created attachment 20754 [details]
Screenshots_2
Comment 4 Chiranjib Mukherjee 2017-03-23 13:41:55 UTC
Created attachment 20755 [details]
Screenshots_3
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.

https://github.com/mono/mono/commit/582b140f7dfad1a51d5fcc75cf8c54838c3c80f6
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

https://gist.github.com/manish-sinha/c57664358715e36c589095852d9b3cf4

the screenshot is

https://www.screencast.com/t/yGyaNI6qt
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?

https://bugzilla.xamarin.com/show_bug.cgi?id=53855
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 5.0.0.36 (2017-02/f342dae) (64-bit)
Xamarin.Android Version: 7.3.0.0
Xamarin.Mac Version: 3.3.0.466
Xamarin.iOS Version: 10.9.0.466

Hence marking this bug as Verified.