This patch builds upon commit 96a8500795 which placed parts of Mono.Security
responsible for dealing with SSL/TLS certificates for the purpose of certificate verification. The code enables
validation of the certifcates even if the user does not provide their own validation callback. The changes as related to
the original commit are few, basically consisting of enabling the same code used by MonoTouch in the MonoDroid context with
the only actual code change being the certificate validation bit mentioned above.
Since the change involves adding a subset of Mono.Security files to the monodroid version of System.dll, it is
also necessary to remove Mono.Android's dependence on Mono.Security.dll. The reason is that the code in AndroidPlatform
which looks up TLS support methods in Mono.Android.dll would use a type (X509CertificateCollection) that is now part of
System.dll but is *also* in Mono.Security.dll referenced by Mono.Android.dll and therefore the lookup would fail since
we'd have two distinct types from the reflection point of view.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=18962
When specifying a Content-Id header on Attachments and AlternateViews (but not LinkedResources) the header was not rendered.
This fixes bug #2279.
Also refactored header generation methods.
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
* SmtpClient.cs: generate correct MIME when there are text and html
linked resources. Fixes bug #579984. Patch by Ásgeir Halldórsson.
svn path=/trunk/mcs/; revision=151758
* SmtpClient.cs: rethrow inner exception so that
AsyncCompletedEventArgs.Error gets the right value on error. Patch
by Dimitar Dobrev.
svn path=/trunk/mcs/; revision=149983
MS. Removed upper limit check for Port. Modified Send to no longer
allow a whitespace-only Host. Moved checks for SpecifiedPickupDirectory
delivery method to SendFile, and use Path.IsPathRooted to check for
absolute paths instead of using a unix-only check. In Send, wrap all
non-SMTP errors in an SmtpException.
* SmtpException.cs: Correctly chain up all .ctors. Removed extra
null check in deserialization .ctor.
* SmtpClientTest.cs: Added property tests. Added Send argument check
tests.
* SmtpExceptionTest.cs: Added .ctor and GetObjectData tests.
* System_test.dll.sources: Added SmtpExceptionTest.cs.
svn path=/trunk/mcs/; revision=110647
* SmtpClient.cs : fixed bug #382670, based on the patch by Ted
Unangst. DeriveryMethod.SpecifiedPickupDirectory was not supported.
svn path=/trunk/mcs/; revision=110555
* SmtpClient.cs : fixed bug #392682, in the same spirit in the
patch by Ted Unangst, to assure safety on socket closing.
svn path=/trunk/mcs/; revision=110263
* SmtpClient.cs : Fixed bug #392809, patch by Ted Unangst. Text body
was not copied to byte array which is being sent.
svn path=/trunk/mcs/; revision=109861
* SmtpClient.cs: Remove ':' from the time zone offset in the
mail's date field. Fixes bug #351443.
(ToQuotedPrintable): Make sure text encoded as quoted-printable does
not contain more then 76 chars per line (required by rfc1521). Fixes
bug #351448.
svn path=/trunk/mcs/; revision=94232
* WebClient.cs: We catch exceptions that happen on the helper
async threads toa void terminating the application on errors, and
also raise a variant of the OnXXXXCompleted methods that take an
Exception argument.
Note that this differs from the .NET implementation in that
we actually raise a signal on error, and set the exception, and in
their case no error is ever raised.
We now call CompleteAsync in the OnXXXCompleted handlers to ensure
that the WebClient can be reused immediately by the callback.
This fixes#350621.
This also should fix the bug report on IRC where someone
complained that they could not "chain" invocations to XXXAsync
methods from the OnXXXXCompleted handlers due to the WebClient
refusing to work if there was an ongoing operation
svn path=/trunk/mcs/; revision=91959
* AlternateView.cs : supply charset info for ContentType.
* SmtpClient.cs : for ToQuotedPrintable() input, don't use utf8
StreamReader to get input string. Just use Encoding.GetBytes().
Fixed bug #346162.
svn path=/trunk/mcs/; revision=90809
fixed bug #339037.
* AlternateView.cs : CreateAlternateViewFromString() allows null
Encoding.
* SmtpClient.cs : looks like when Body is null and AlternativeViews
contains only 1 item, then the alternate view becomes as if it
were just a body. To make this possible, added couple of more
transfer-encoding conversion methods.
For more AlternateViews cases, Body is treated
as empty. With attachments it is even complicated: those alternate
views are just in one boundary, so do not send empty string.
Removed debug output (Console.WriteLine).
What a mess.
* AlternateViewTest.cs : added test for CreateAlternateViewFromString
with null Encoding arg.
svn path=/trunk/mcs/; revision=88850