Bug 46382 - Fails to verify some Let's Encrypt Certificates but not others; OpenSSL works for both
Summary: Fails to verify some Let's Encrypt Certificates but not others; OpenSSL works...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Security ()
Version: 4.6.0 (C8)
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2016-11-03 15:46 UTC by infinity0
Modified: 2016-11-03 15:57 UTC (History)
2 users (show)

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

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 for Bug 46382 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description infinity0 2016-11-03 15:46:27 UTC
With

$ mono --version
Mono JIT compiler version 4.6.1 (Debian 4.6.1.3+dfsg-4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen

and after running 

$ cert-sync /etc/ssl/certs/ca-certificates.crt

as described on

http://www.mono-project.com/docs/about-mono/releases/3.12.0/

then using the tlstest from here:

https://raw.githubusercontent.com/mono/mono/8b8d688fefcd5ad26cacacf23809f8b230244298/mcs/class/Mono.Security/Test/tools/tlstest/tlstest.cs

We get:

$ ./tlstest.exe https://www.abc-raid.co.uk

https://www.abc-raid.co.uk
# no errors

$ ./tlstest.exe https://www.darkfasel.net

https://www.darkfasel.net
FAILED: #-2146232800
System.IO.IOException: The authentication or decryption has failed. ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (System.IAsyncResult asyncResult) [0x00040] in <e220be0b0a364427860ee43376ab6f2b>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) [0x00000] in <e220be0b0a364427860ee43376ab6f2b>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) [0x00071] in <e220be0b0a364427860ee43376ab6f2b>:0 
   --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (System.IAsyncResult result) [0x0003b] in <e220be0b0a364427860ee43376ab6f2b>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <e220be0b0a364427860ee43376ab6f2b>:0 
   --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslStreamBase.EndNegotiateHandshake (Mono.Security.Protocol.Tls.SslStreamBase+InternalAsyncResult asyncResult) [0x00028] in <e220be0b0a364427860ee43376ab6f2b>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.NegotiateHandshake () [0x00035] in <e220be0b0a364427860ee43376ab6f2b>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00076] in <e220be0b0a364427860ee43376ab6f2b>:0 
  at System.IO.StreamWriter.Flush (System.Boolean flushStream, System.Boolean flushEncoder) [0x00094] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 
  at System.IO.StreamWriter.Flush () [0x00006] in <dca3b561b8ad4f9fb10141d81b39ff45>:0 
  at TlsTest.GetStreamPage (System.String url) [0x000c2] in <7ad9caa5280c42fa9e47b5cc3d9b1e0e>:0 
  at TlsTest.Main (System.String[] args) [0x002aa] in <7ad9caa5280c42fa9e47b5cc3d9b1e0e>:0 

You can see more details of the certs here:

https://www.ssllabs.com/ssltest/analyze.html?d=www.abc-raid.co.uk&hideResults=on
https://www.ssllabs.com/ssltest/analyze.html?d=www.darkfasel.net&hideResults=on

Also running `openssl s_client` correctly verifies both of them.