Jump to content

Recommended Posts

We are doing a Favro issue tracking extension for Plastic. The extension is working on Windows properly and almost working on Linux. I have 2 questions:

1. We need to recompile the extension for every version of Plastic because we're suffering .NET DLL Hell problem. I've tried using the bindingRedirect mecanism with the issuetrackerinterface.dll to reduce the problem at least enabling backward compatibility but without any success. Do you know any way to avoid the need to recompile the dll plugin for every Plastic version?

2. I'm having one issue in linux when accessing the Favro API with HttpWebRequest.GetResponse() method if the URL is https. It seems the mono included in the Plastic installation do not have complete TLS support. If I do the same request using a typical linux mono instalation, all is working properly. This is the exception thrown:

2020-08-14 01:18:12,596 goldenbox ERROR favroextension - Unexpected error while retrieving assigned cards
System.Net.WebException: Error: SecureChannelFailure (The authentication or decryption has failed.) ---> 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 <9c4d6f9060314ca4a265631d657910a8>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) [0x00000] in <9c4d6f9060314ca4a265631d657910a8>:0 
  at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) [0x00071] in <9c4d6f9060314ca4a265631d657910a8>:0 
   --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (System.IAsyncResult result) [0x0003b] in <9c4d6f9060314ca4a265631d657910a8>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <9c4d6f9060314ca4a265631d657910a8>:0 
   --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) [0x00057] in <9c4d6f9060314ca4a265631d657910a8>:0 
  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) [0x00011] in <9c4d6f9060314ca4a265631d657910a8>:0 
  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x0000e] in <9c4d6f9060314ca4a265631d657910a8>:0 
  at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x00044] in <bd46d4d4f7964dfa9beea098499ab597>:0 
   --- End of inner exception stack trace ---
  at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00064] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at FavroPlasticExtension.Favro.API.Connection.ParseWebResponse (System.Net.HttpWebRequest request) [0x00008] in <7a01fcc46c0e49f295ff341e41727ae6>:0 

 

I've found a way to select the TLS provider setting the environment variable MONO_TLS_PROVIDER to "newtls" and then launching Plastic. In that case the exception changes to:

2020-08-14 01:22:24,505 goldenbox ERROR favroextension - Unexpected error while retrieving assigned cards
System.Net.WebException: Error: SecureChannelFailure (Value cannot be null.
Parameter name: type) ---> System.ArgumentNullException: Value cannot be null.
Parameter name: type
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00006] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Mono.Security.Providers.NewTls.TlsProviderFactory.CreateInstance (System.String typeName, System.Object[] args) [0x00011] in <1182f9105a984f0db543bfbe19a1d7f8>:0 
  at Mono.Security.Providers.NewTls.TlsProviderFactory.CreateTlsConfiguration (System.String hostname, System.Boolean serverMode, Mono.Security.Interface.TlsProtocols protocolFlags, System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Boolean remoteCertRequired, Mono.Security.Interface.MonoTlsSettings settings) [0x00059] in <1182f9105a984f0db543bfbe19a1d7f8>:0 
  at Mono.Security.Providers.NewTls.NewTlsProvider.CreateTlsContext (System.String hostname, System.Boolean serverMode, Mono.Security.Interface.TlsProtocols protocolFlags, System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Boolean remoteCertRequired, Mono.Security.Interface.MonoEncryptionPolicy encryptionPolicy, Mono.Security.Interface.MonoTlsSettings settings) [0x00000] in <1182f9105a984f0db543bfbe19a1d7f8>:0 
  at Mono.Net.Security.Private.MonoTlsProviderWrapper.CreateTlsContext (System.String hostname, System.Boolean serverMode, Mono.Security.Interface.TlsProtocols protocolFlags, System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Boolean remoteCertRequired, System.Boolean checkCertName, System.Boolean checkCertRevocationStatus, Mono.Security.Interface.MonoEncryptionPolicy encryptionPolicy, Mono.Security.Interface.MonoTlsSettings settings) [0x00000] in <bb4ddfbbc63f4e71b9e4ed97797eb69e>:0 
  at System.Net.Security.GlobalSSPI.Create (System.String hostname, System.Boolean serverMode, System.Net.Security.SchProtocols protocolFlags, System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Boolean remoteCertRequired, System.Boolean checkCertName, System.Boolean checkCertRevocationStatus, System.Net.Security.EncryptionPolicy encryptionPolicy, System.Net.Security.LocalCertSelectionCallback certSelectionDelegate, System.Net.Security.RemoteCertValidationCallback remoteValidationCallback, System.Net.Security.SSPIConfiguration userConfig) [0x00035] in <bb4ddfbbc63f4e71b9e4ed97797eb69e>:0 
  at System.Net.Security.SecureChannel..ctor (System.String hostname, System.Boolean serverMode, System.Net.Security.SchProtocols protocolFlags, System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Boolean remoteCertRequired, System.Boolean checkCertName, System.Boolean checkCertRevocationStatus, System.Net.Security.EncryptionPolicy encryptionPolicy, System.Net.Security.LocalCertSelectionCallback certSelectionDelegate, System.Net.Security.RemoteCertValidationCallback remoteValidationCallback, System.Net.Security.SSPIConfiguration config) [0x00093] in <bb4ddfbbc63f4e71b9e4ed97797eb69e>:0 
  at System.Net.Security.SslState.ValidateCreateContext (System.Boolean isServer, System.String targetHost, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Boolean remoteCertRequired, System.Boolean checkCertRevocationStatus, System.Boolean checkCertName) [0x0011b] in <bb4ddfbbc63f4e71b9e4ed97797eb69e>:0 
  at System.Net.Security.SslState.ValidateCreateContext (System.Boolean isServer, System.String targetHost, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Boolean remoteCertRequired, System.Boolean checkCertRevocationStatus) [0x00000] in <bb4ddfbbc63f4e71b9e4ed97797eb69e>:0 
  at System.Net.Security.SslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00000] in <bb4ddfbbc63f4e71b9e4ed97797eb69e>:0 
  at Mono.Net.Security.Private.MonoSslStreamWrapper.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) [0x00006] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) [0x00044] in <bd46d4d4f7964dfa9beea098499ab597>:0 
   --- End of inner exception stack trace ---
  at System.Net.HttpWebRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x00064] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at System.Net.HttpWebRequest.GetResponse () [0x0000e] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at FavroPlasticExtension.Favro.API.Connection.ParseWebResponse (System.Net.HttpWebRequest request) [0x00008] in <2acce4eed62044479c0cbbe82dc4ff28>:0 

Another way to reproduce this exception directly from bash is launching this command: 

/opt/plasticscm5/certtools/certmgr -ssl https://favro.com

And if you use the default mono certmgr works ok: 

certmgr -ssl https://favro.com

 

Any help with these questios will be appreciated. Thank you so much.

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...