Commit Graph
30 Commits
Author SHA1 Message Date
Marek Habersack 34fb07d05f Include support for SSL/TLS right in System when building for the MONODROID profile
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
2014-04-25 21:39:53 +02:00
Sebastien Pouliot 96a8500795 Allow the MONOTOUCH targetr to build its SSL/TLS support right inside System.dll and remove code duplication and non-required code paths. 2013-07-01 16:21:04 -04:00
Marek Safar 0647a5d16b Remove duplicated files from system.dll (saves about 100kb) 2013-02-25 19:10:09 +01:00
Rodrigo Kumpera 5007c14d62 Kill the MOONLIGHT define in System. 2013-02-11 13:01:11 -05:00
paszczi 7ce10db9e8 Don't wait for client data when authenticating server ssl stream - fix bug 457120 (novell) 2012-06-22 10:12:35 +02:00
Miguel de Icaza f48ceb9860 [System] Removal of the NET_2_0 in the source code
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.
2012-06-02 13:16:40 -04:00
Marek Safar 2fe2101b61 Add async methods to SslStream 2011-10-07 10:11:29 +01:00
Marek Safar b7896a8f79 Fix parameter names 2011-10-07 10:11:29 +01:00
Sebastien Pouliot 9c8cb87fe3 In .:
2010-07-21  Sebastien Pouliot  <[email protected]>

	* Makefile: Ensure SECURITY_DEP gets defined in our moonlight
	raw profile

In System.Net:
2010-07-21  Sebastien Pouliot  <[email protected]>

	* ServicePointManager.cs: Add special validation for Moonlight
	* WebConnection.cs: Change a define to NET_2_1

In System.Net.Security:
2010-07-21  Sebastien Pouliot  <[email protected]>

	* LocalCertificateSelectionCallback.cs:
	* SslStream.cs:
		Don't use alias in moonlight build (not needed and breaks
		compilation otherwise)


svn path=/trunk/mcs/; revision=160675
2010-07-21 13:36:35 +00:00
Sebastien Pouliot 70064ced0b In System.Net:
2010-06-29  Sebastien Pouliot  <[email protected]>

	* ServicePointManager.cs: Remove NET_2_0 defines around 
	RemoteCertificateValidationCallback

In System.Net.Security:
2010-06-29  Sebastien Pouliot  <[email protected]>

	* RemoteCertificateValidationCallback.cs: Remove SECURITY_DEP use


svn path=/trunk/mcs/; revision=159663
2010-06-29 14:13:01 +00:00
Sebastien Pouliot a392bb4d27 2010-05-10 Sebastien Pouliot <[email protected]>
* SslStream.cs: Allow Moonlight to build the non-server part
	of SslStream
	* RemoteCertificateValidationCallback.cs: Adjust visibility for
	Moonlight build


svn path=/trunk/mcs/; revision=157065
2010-05-10 20:16:50 +00:00
Jb Evain ba61ae505e use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153655
2010-03-16 12:07:46 +00:00
Gonzalo Paniagua Javier 5c20ab97e6 2010-03-01 Gonzalo Paniagua Javier <[email protected]>
* System.Net/WebConnection.cs: attach a validation callback to the new
	event in Mono.Security.
	* System.Net/ServicePointManager.cs: added a new ValidationHelper
	class that takes care of building the certificate chain and perform
	all the check that were done in Mono.Security before. This way the 2.0
	server certificate validation callback can get all the data it needs.
	* System.Net.Security/SslStream.cs: don't do anything if a chain
	element has no error.

	Fixes bug #584050.

svn path=/trunk/mcs/; revision=152654
2010-03-01 09:01:14 +00:00
Jb Evain 288e614ea4 bring Mono Security to monotouch
svn path=/trunk/mcs/; revision=141615
2009-09-09 15:34:58 +00:00
Sebastien Pouliot 52a76350d1 2009-08-20 Sebastien Pouliot <[email protected]>
* SslStream.cs : Always use/provide a X509Chain even if this 
	duplicates some of the old/existing logic of Mono.Security.
	This makes it possible to provide a callback using 
	ServicePointManager.ServerCertificateValidationCallback


svn path=/trunk/mcs/; revision=140359
2009-08-20 18:26:28 +00:00
Gonzalo Paniagua Javier db470fe4d2 make it compile
svn path=/trunk/mcs/; revision=137257
2009-07-02 07:42:17 +00:00
Marek Safar e61dde083e Warnings cleanup
svn path=/trunk/mcs/; revision=89678
2007-11-15 14:14:49 +00:00
Atsushi Eno 96c0ccc683 2007-08-24 Atsushi Enomoto <[email protected]>
* SslStream.cs : uh, fixed the build.


svn path=/trunk/mcs/; revision=84803
2007-08-24 12:31:11 +00:00
Atsushi Eno 4134bf5d73 2007-08-24 Atsushi Enomoto <[email protected]>
System.Net.Security:
	* SslStream.cs : implemented, based on Mono.Security.
	* LocalCertificateSelectionCallback.cs : extern alias is needed.

    System(topdir):
	* Makefile : split PREBUILT_DEP from CONFIGURATION_DEP so that the
	  prebuilt System.dll could be referenced for security stuff too.

    Test/tools/mutual:
	* Makefile, ca.pem, client.p12, client.pem, mutual.cs, server.sh,
	  server_cert.pem, server_key.pem, serveropt.sh:
	  ported from Mono.Security
	* README : forwarding.

    Test/tools/server:
	* Makefile, msslserver.cs, mutual.pem : ported from Mono.Security.
	* README : forwarding.



svn path=/trunk/mcs/; revision=84783
2007-08-24 09:42:40 +00:00
Sebastien Pouliot f849158a86 another required fix related to X509Chain via RemoteCertificateValidationCallback
svn path=/trunk/mcs/; revision=59099
2006-04-05 17:47:49 +00:00
Sebastien Pouliot 4ad26d73e3 2006-04-05 Sebastien Pouliot <[email protected]>
* RemoteCertValidationCallback.cs: Fix build. X509Chain isn't 
	available when System.dll is first being build. This needs to be
	reviewed since some System.Security.dll classes migrated to System.dll


svn path=/trunk/mcs/; revision=59097
2006-04-05 17:21:29 +00:00
Atsushi Eno 381ef3da4d 2006-04-05 Atsushi Enomoto <[email protected]>
* SslPolicyErrors.cs : forgot to add.


svn path=/trunk/mcs/; revision=59055
2006-04-05 08:21:49 +00:00
Atsushi Eno cf41c798eb 2006-04-05 Atsushi Enomoto <[email protected]>
* System.dll.sources : added SslPolicyErrors.cs.

	* AuthenticationLevel.cs,
	  NegotiateStream.cs,
	  SslStream.cs,
	  LocalCertificateSelectionCallback.cs,
	  RemoteCertificateValidationCallback.cs :
	  Updated all unimplemented things to 2.0 RTM.


svn path=/trunk/mcs/; revision=59054
2006-04-05 08:20:48 +00:00
Miguel de Icaza 3276bc3d5d 2006-03-21 Miguel de Icaza <[email protected]>
* AuthenticatedStream.cs: Implement Dispose method, remove Close
	method, the Close to fix the API.

	* NegotiateStream.cs: Implement Dispose method as well, kill
	Close, rename the various methods to the new ones.


svn path=/trunk/mcs/; revision=58274
2006-03-22 01:15:34 +00:00
Miguel de Icaza a5bd130af9 2006-03-11 Miguel de Icaza <[email protected]>
* Uri.cs: Pragma disable warning 612 (Obsolete methods are being
	used by us internally).

	Ponder: should we instead move our methods to use new versions of
	the Obsoleted ones?

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeNamespaceImportCollection.cs: It turns out that a lot of the
	errors flagged with "!" were just missing explicit interface
	implementations.  

	Implement.

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeDomConfigurationHandler.cs: Comment out unused methods. 

	* TempFileCollection.cs: Implement explicitly some interface
	methods to get rid of the "!" errors on CorCompare.

2006-03-11  Miguel de Icaza  <[email protected]>

	* Queue.cs: Flag as serializable.

	* LinkedList.cs (OnDeserialization): Fix signature. 

	* SortedList.cs: Implement explicitly a few methods that were
	flagged by corcompare. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* IOrderedDictionary.cs: Flag GetEnumerator as a "new" method to
	avoid warning.

2006-03-11  Miguel de Icaza  <[email protected]>

	* ConfigurationSettings.cs (ChangeConfigurationSettings): Make
	internal to avoid warnings.  This routine is called from
	System.Web with MethodInfo.Invoke.

2006-03-11  Miguel de Icaza  <[email protected]>

	* DeflateStream.cs: Comment out DllImport that was not being
	used. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* y

	* SerialPort.cs: Remove unused variable (writeBuffer). 

	* SerialPortStream.cs (Dispose): override, not new.

2006-03-11  Miguel de Icaza  <[email protected]>

	* WebClient.cs: Only expose the right methods to avoid warnings. 

	* FtpDataStream.cs (Dispose): Fix signature.

	* FtpWebResponse.cs: Comment out keepAlive field (unused, sounds
	like we are missing features here).

	* IPAddress.cs: Move m_HashCode property to the end, and set
	pragmas to disable warnings.

2006-03-11  Miguel de Icaza  <[email protected]>

	* MailAddress.cs: Comment out unused field to remove warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkChange.cs: Use pragmas to eliminate warnings from events
	that we do not trigger yet.

	This is a candidate for using Aaron's NetworkManager code.  But
	would make us depend on d-bus.

	* NetworkInformationException.cs: Use error_code for ErrorCode,
	instead of NativeErrorCode.   Fixes warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* AuthenticatedStream.cs: Fixed normative parameter names (yes, we
	need to do this everywhere one day).

	(Close): actually obey the "leaveInnerStreamOpen" setting from the
	constructor. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkStream.cs (Dispose): Use the right signature depending on
	the profile being built.

2006-03-11  Miguel de Icaza  <[email protected]>

	* X509Chain.cs: Flagged member as internal to avoid unused warning.

	* X500DistinguishedName.cs: Comment out unused names and move
	temporary unused variables inside the comments that were removed 



svn path=/trunk/mcs/; revision=57836
2006-03-11 19:07:56 +00:00
Miguel de Icaza beba57fc36 corcompare fixes
svn path=/trunk/mcs/; revision=57759
2006-03-10 00:40:46 +00:00
Carlos Alberto Cortez 3d7bc1eeb7 2006-03-07 Carlos Alberto Cortez <[email protected]>
* SslStream.cs, NegotiateStream.cs: Override CanTimeout,
	ReadTimeout and WriteTimeout properties, to avoid warnings.


svn path=/trunk/mcs/; revision=57685
2006-03-08 07:15:05 +00:00
Atsushi Eno e46c136e6e 2005-10-26 Atsushi Enomoto <[email protected]>
* ProtectionLevel.cs : fix enumeration.


svn path=/trunk/mcs/; revision=52232
2005-10-26 07:16:04 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00
Tim Coleman 397b0326d8 2004-09-13 Tim Coleman <[email protected]>
* AuthenticatedStream.cs AuthenticationLevel.cs LocalCertSelectionCallback.cs
        * NegotiateStream.cs ProtectionLevel.cs RemoteCertValidationCallback.cs
        * SslStream.cs: New stubs for Fx 2.0

svn path=/trunk/mcs/; revision=33835
2004-09-13 23:55:48 +00:00