1

I am trying to add a SSL cert so I can use SmtpClient in a mono application with SSL enabled.

I have already run successfully:

mozroots --import --ask-remove --machine

Now I understand I need to add my specfic cert as using SmtpClient still fails, so I tried:

certmgr -ssl -m smtps://mail.amnet.net.au:25

And that fails with the below (NOTE: port 25 is correct in this case). (Incidentally trying https://encrypted.google.com works).

Mono Certificate Manager - version 3.2.8.0 Manage X.509 certificates and CRL from stores. Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.

Unhandled Exception: 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.ReadRecordBuffer (Int32 contentType, System.IO.Stream record) [0x00000] in :0 at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in :0 --- End of inner exception stack trace --- at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: 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.ReadRecordBuffer (Int32 contentType, System.IO.Stream record) [0x00000] in :0 at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in :0 --- End of inner exception stack trace --- at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in :0

markmnl
  • 11,116
  • 8
  • 73
  • 109
  • some SSL changes have been included recently in mono, I recommend you to try v3.4.0 or master branch – knocte May 04 '14 at 09:32
  • Have you ever managed to fix this ? I'm still getting this error fone ONE SITE specifically, using https requests – Marcello Grechi Lins May 04 '16 at 14:07
  • Was two years ago but I remember something but overriding a method does the checking and just returning true - was a well known fix for this issue - though have to take care what the security implications of doing that are! I would be surprised if this is not fixed though - are you not using the latest mono? – markmnl May 06 '16 at 05:43
  • This may help: http://stackoverflow.com/questions/4926676/mono-webrequest-fails-with-https, if it is just one site - that could be the problem - cert for that site has been compromised! what does it look like in Chrome? – markmnl May 06 '16 at 05:44

0 Answers0