Compare commits

...
101 Commits
Author SHA1 Message Date
Alexander Kyte ef07b04bbb [debug] add debug info for wrench 2017-05-25 13:01:40 -04:00
Ankit Jain 04441a178c Empty commit to trigger CI build and pick updated Xamarin.IoT sdk in msbuild 2017-05-08 18:54:12 -04:00
Ankit Jain 5e62a6fde0 Empty commit to trigger wrench build and pick up msbuild fixes 2017-05-05 16:30:24 -04:00
Martin Baulig 630d79e78d [System]: Fix default TLS provider. (#4797) (#4800)
(cherry picked from commit 9667aa6485)
2017-05-05 15:16:32 -04:00
Martin Baulig abfb9a00a7 [System]: Fix bug #52508 in HttpListener when doing multiple Https request.
Move the call to SslStream.AuthenticateAsServer() into the constructor because
we don't want to call it again when Init() is called from Close().

(cherry picked from commit 5e08742b5c)
2017-05-05 13:38:21 -04:00
Alexander Köplinger f9826a7d74 [configure.ac] Fix inadvertently invoking X server (#4792)
I noticed this when I cleaned my Mono repo and reran autogen.sh.
I suddenly got a popup from XQuartz about "Unrecognized option: =".

Turns out this was introduced in 9e967f00b3,
the second half of the if is missing `test`, so it actually runs
`x = xyes` which starts XQuartz :D

Also cleaned up the USE_NLS checking since that ran immediately
before this and just printed "no" before which confused me.
(cherry picked from commit 12d5afd75f)
2017-05-05 00:05:06 +02:00
Ankit Jain 93a9152295 Empty commit to trigger wrench build and pick up msbuild fixes 2017-05-04 10:42:33 -04:00
Alexander Köplinger 301ac0c621 [bcl] Add .NET 4.7 reference assemblies (#4791)
(cherry picked from commit 9667b4ef59)
2017-05-04 12:57:03 +02:00
Alexander Köplinger 197c238279 [System.Net.Http] Fix XI build
(cherry picked from commit 49bb738eb2)
2017-05-04 06:12:12 +02:00
Vlad Brezae 5e50a6f00a [sgen] Fix accidental triggering of degraded mode
We trigger degraded mode when we are unable to properly build the nursery fragments due to excessive nursery pinning. This is done by initializing degraded_mode at the end of a minor. alloc_degraded is used to do allocation to major heap either as part of mature allocation or as part of degraded mode (when we bump the degraded_mode so we can detect when the next minor should be triggered).

When failing to allocate from the nursery after doing a minor (because the other threads might have already consumed the nursery) we need to do a mature allocation (as a fallback) instead of a degraded mode allocation so we don't uselessly enable the mode.
2017-05-03 22:47:50 +03:00
Andi McClure bed9e6bce5 Document --assembly-loader, change default to 'legacy' and fix comment
Also set testing_gac tests to use --assembly-loader=strict, since it is no longer the default
2017-05-03 14:09:38 -04:00
Ankit Jain 12f5d07d75 Empty commit to trigger Wrench build 2017-05-03 06:47:49 -04:00
Aleksey Kliger (λgeek) 0156263a4f [loader] Add a few Framework Facades assemblies (#4785)
that were previously missing, or mislabeled as ordinary framework assemblies.
2017-05-03 01:01:42 +02:00
Alexander Köplinger ddde268d58 Empty commit to trigger Wrench build 2017-05-02 22:43:48 +02:00
Aleksey Kliger (λgeek) 0746de5595 Merge pull request #4770 from lambdageek/bug-55681-2017-04
[sre-save] Handle ConstructorBuilder custom attribute constructors
2017-04-28 17:45:21 -04:00
Aleksey Kliger (λgeek) 6df3d2a479 Merge pull request #4760 from lambdageek/flags-strict-strong-names-2017-04
Put strict strong name checking behind a configure flag and runtime option (2017-04)
2017-04-28 17:43:54 -04:00
Aleksey Kliger e2cef46ad2 [sre-save] Handle ConstructorBuilder custom attribute constructors.
The code expected that a custom attribute was specified as a MonoCMethod and
was calling mono_image_create_token().  However that function expects to be
called from the managed S.R.E.ModuleBuilder:GetToken (MemberInfo) which handles
all the builders in managed code.  Consequently mono_image_create_token () was
asserting.

So now we encode the token for a ConstructorBuilder in place.
2017-04-28 11:00:40 -04:00
Aleksey Kliger e5ff539fa1 [sre] Make mono_image_get_methodref_token non-static in sre-internals.h 2017-04-28 11:00:39 -04:00
Aleksey Kliger 09ba02857b [test] Regression tests for ConstructorBuilder custom attributes
Regression tests for https://bugzilla.xamarin.com/show_bug.cgi?id=55681
2017-04-28 11:00:39 -04:00
Marek Safar c38e4d9220 [System.Reflection.DispatchProxy] Move to facades to support _._ nugets 2017-04-28 13:44:16 +02:00
Marek Safar afd852649d [Facades] Update version numbers 2017-04-28 13:44:16 +02:00
Dean Ellis d435b3b6fd [mkbundle] Add support for generating monodroid compatible mkbundle code at runtime (#4728)
monodroid used to build its own version of mkbundle since it
requires slightly different code than the desktop. This
logic was protected in a #if block. Now that monodroid is
trying to make use of the shipped mkbundle rather than use
its own we need to turn this logic on at runtime.

A new parameter has been added

	--bundled-header

When this option is passed, the code which skips including

	mono/metadata/mono-config.h

will be skipped in favour of defining the required structures
and entry points directly.
(cherry picked from commit 59737b2a47)
2017-04-28 13:20:04 +02:00
Zoltan Varga a2ea96b90f [runtime] Avoid freeing a string passed to mono_mb_emit_exception_full (), it doesn't assume ownership of it. Fixes random wrench failures after 91ae166406. 2017-04-27 15:17:03 -04:00
Zoltan Varga fe49708dbc [arm] Fix a gsharedvt assertion which happens with gsharedvt methods with a lot of arguments. Fixes #54976. 2017-04-27 15:12:11 -04:00
Marek Safar 6ca5ec442b [Facades] Move more asseblies to Facades to support implicit reference for _._ like nugets and ignore version mismatch 2017-04-27 19:01:47 +02:00
Aleksey Kliger 3481c647cb [loader] Rename enable-minimal=assembly_remapping to desktop_loader
Use a single DISABLE_DESKTOP_LOADER define instead of
DISABLE_ASSEMBLY_REMAPPING and DISABLE_STRICT_STRONG_NAMES
2017-04-27 09:57:36 -04:00
Aleksey Kliger 00da0e072b Revert "[assembly] Add Facades dir to default_path on all runtimes"
This reverts commit cc66d0f11c.
2017-04-27 09:57:35 -04:00
Zoltan Varga 5556446dd0 [simd] Add support for Vector.IsHardwareAccelerated in the System.Numerics.Vectors assembly as well. Fixes #55577. (#4762)
(cherry picked from commit 0b9bbcc7b2)
2017-04-27 14:20:32 +02:00
Aleksey Kliger ae72efc07a [runtime] Add --assembly-loader=[strict,legacy] runtime argument
If mono is compiled without DISABLE_STRICT_STRONG_NAMES, but someone passes
--assembly-loader=legacy at runtime, give them the lax strong name
checking behavior (a candidate assembly is good as long as the name is right, but ignoring
the public key token and version).
2017-04-26 19:18:37 -04:00
Aleksey Kliger d109b3dcf0 [loader] --enable-minimal=assembly_remapping implies no strict strong name checking
When strict strong name checking is enabled, Mono will check public key tokens
and versions match between a requested assembly reference and a candidate found
via its usual loading directories.

amend
2017-04-26 19:18:36 -04:00
Manuel de la Pena ceb4a8eb9b Ensure that when an async read is performed on a response content the
errors are correctly dealt with.

Some network errors in iOS are exposed as Stream errors, specially those
related with the lost of the connection. This patch ensures that if such
an issue happens an exception is raised in the async read task.

Fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=53792
2017-04-26 14:58:03 +02:00
Rodrigo Kumpera bbcf02a725 Merge pull request #4743 from kumpera/2017-04-backport-4682
Backport of #4682  to 2017-04
2017-04-26 00:00:37 -04:00
Aleksey Kliger (λgeek) 59ffe0a316 Merge pull request #4744 from lambdageek/facades-and-bug-580-2017-04
* Check strong names on a couple more codepaths during assembly loading.  Fixes [bugzilla #580](https://bugzilla.xamarin.com/show_bug.cgi?id=580) and [bugzilla #55436](https://bugzilla.xamarin.com/show_bug.cgi?id=55436)
* Add `--apply-bindings=FILE` option.  Allows us to specify a configuration file for assembly binding redirections when AOTing.
* Use the above flag when AOTing `System.ReflectionMetadata.dll` to pick up `csc.exe.config`
* Add all the Facades to the `framework_assemblies` list in the runtime.  Facade and non-Facade framework assemblies behave differently:
  * for Facades, don't do any version remapping, and any version is okay.
  * for non-Facades, consult the version map to remap depdending on the --runtime used.
2017-04-25 20:07:44 -04:00
Aleksey Kliger 59efb5d2c5 [man] Document --apply-bindings=FILE option 2017-04-25 15:46:59 -04:00
Aleksey Kliger cc66d0f11c [assembly] Add Facades dir to default_path on all runtimes
Previous it was just the desktop runtime, but now that we have special handling
for framework facade assemblies in the loader, we should do it on other
runtimes, too.
2017-04-25 15:46:57 -04:00
Aleksey Kliger 9ca0921130 [roslyn] Pass --apply-bindings=$(csc_exe).config when AOT-ing System.Reflection.Metadata
To pick up assembly binding redirections from csc.exe.config
2017-04-25 15:46:56 -04:00
Aleksey Kliger 178b26cc71 [assembly] Add Facades to framework_assemblies list 2017-04-25 15:46:55 -04:00
Aleksey Kliger aad39b512c [assembly] When loading framework facade assemblies, any version is ok in mono_assembly_candidate_predicate_sn_same_name
As long as the name and public key token matches.

This is different from the non-facade framework assemblies for which the
name and version must match but the public key token is ignored.
2017-04-25 15:46:54 -04:00
Aleksey Kliger 04c3d099d7 [assembly] add ANAME_EQ_IGNORE_VERSION flag to assembly_names_equal_flags() 2017-04-25 15:46:53 -04:00
Aleksey Kliger f434ae1dd1 [aot] Add --apply-bindings=FILE option
Apply bindings from configuration file FILE when running the AOT compiler.

This is useful if you need to AOT a module bar.dll that is loaded when the main
assembly foo.exe has a configuration file foo.exe.config that specifies
assembly bindings that bar.dll should respect.
2017-04-25 15:46:52 -04:00
Aleksey Kliger be3df9aa5b [domain] Factor out mono_domain_parse_assembly_bindings
Move to a separate function the code that parses assembly bindings from a configuration file.
2017-04-25 15:46:51 -04:00
Zoltan Varga 9d047076c7 [jit] Remove some debug spew. 2017-04-25 05:10:58 -04:00
Zoltan Varga 0774427ed5 [runtime] Add explicit (float) casts to test_0_float_precision () to make the test work when compiled with csc /O. 2017-04-24 19:15:01 -04:00
Rodrigo Kumpera 76d5819f07 [bcl] Check the compact switch for whether cancelation token throws when disposed. 2017-04-24 14:13:02 -07:00
Aleksey Kliger 8803ac76d1 [loader] Pass sn_same_name predicate when loading from basedir and from default_path, too.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=580
2017-04-24 17:11:35 -04:00
Rodrigo Kumpera 0a252017a3 [corlib] Change SwitchThrowExceptionIfDisposedCancellationTokenSource to false as this is the default 4.6.0 behavior. 2017-04-24 14:11:30 -07:00
Rodrigo Kumpera 5133546a0b [bcl] Make our AppContextDefaultValues more compatible with RS and make them non toggle-able on mobile.
We change AppContextSwitches to hardcode values on mobile and use the full stack on desktop.

We still have all strings in AppContextDefaultValues as this reduces the ifdef mess in AppContextSwitches.
It's only used on desktop, where an extra kb is not the end of the world.
2017-04-24 14:11:12 -07:00
Rodrigo Kumpera 91ce1e413e [corlib] Use AppContextSwitches implementation from RS. Fixes #54448
This change makes AppContextSwitches usable which allow backwards incompatible settings to be actually toggled.
2017-04-24 14:10:25 -07:00
Zoltan Varga 3063e52cdf [cil-stripper] Mark stripped methods as noinline to prevent the JIT from trying to inline them. Fixes #55041. (#4732) 2017-04-24 13:43:11 -04:00
Ankit Jain 10bc1a6454 Update NuGet.BuildTasks submodule to use dev15.1 branch (#4734) 2017-04-24 18:33:04 +02:00
Vlad Brezae 3610724c29 [metadata] Lock around special static fields hash access
If a type is loaded in another thread, the fields hash can get resized, leading to failure.
2017-04-24 18:41:37 +03:00
Alexander Köplinger 4c032b40fb [Facades] Use Open.snk for netstandard.dll
We were using the wrong key since dotnet/standard switched to using the new Open key.

(cherry picked from commit 27fd8e5ad8)
2017-04-24 16:25:27 +02:00
Ankit Jain 645d38b4e2 Empty commit to trigger Wrench build 2017-04-20 12:53:43 -04:00
Alexander Köplinger fd5062ab86 [corlib/System.Data] Test fixes for xammac 4.5 and watchos
The TrimSpecial() method and Windows-specific code was removed from
xammac 4.5 so reflection can't find it anymore, handle this case.

Also add a workaround for SqlParameterCollectionTest.CopyToTest()
which fails on watchos since the SqlCommand would throw a PNSE.
It's a workaround because it just makes the test ignored since we don't
set the env var that ConnectionManager.Instance.Sql reads in XI tests,
but it makes the test consistent with the other tests in the suite.
We should fix this properly later on.

(cherry picked from commit ceabda8a54)
2017-04-19 21:09:23 +02:00
Alexander Köplinger 4c1543ea09 [System.Data] Call SqlConnection.ClearAllPools() only when we had a connection
When ConnectionManager.Instance.Sql.ConnectionString throws in
SetUp() we'd still call SqlConnection.ClearAllPools() in the TearDown()
which happens for example when the connection string environment
variable is not set.

This is a problem on WatchOS since SqlConnection.ClearAllPools()
throws PlatformNotSupportedException there, making the tests fail.
Instead we now check whether the connectionString is set and only
call the method in that case.

(cherry picked from commit f11c25c426)
2017-04-19 14:41:09 +02:00
Marek Safar a59f4bae76 Bump cecil 2017-04-19 11:59:37 +02:00
Mikayla Hutchinson 7cd48b5034 Fix RemoteEndpoint with async+DualMode (#4717) 2017-04-19 11:51:14 +02:00
Zoltan Varga e6cf06729d [runtime] Shadow copy the .pdb files as well. Fixes #55095. (#4715) 2017-04-18 22:31:35 -04:00
Alexander Köplinger 79ad720d5d [System] Don't include AlsaDevice on xammac_net_4_5 2017-04-18 23:10:00 +02:00
Zoltan Varga f6c772d6be [jit] Disable handler block trampolines+aot support on ios, it does an async stack walk, and the eh info for llvm compiled methods cannot be loaded in async context currently. Works around #54658. (#4713) 2017-04-18 14:05:09 -04:00
Ludovic Henry 2f49f45a3d [WebConnection] Fix race condition between Close and BeginWrite (#4699) 2017-04-18 09:59:03 -04:00
Marek Safar ea914af27b [runtime] Blacklist System.Threading.Overlapped nugets 2017-04-18 13:49:41 +02:00
Mikayla Hutchinson 6a519aa4f1 Add System.Net.Http 4.3.1 to blacklist 2017-04-18 10:54:37 +02:00
Marek Safar 5a7decf99f [corlib] Fixes static builds (#4687) 2017-04-18 10:30:20 +02:00
David Karlaš 76f1d95372 Bug 55148 - Debugger checks type which is possibly never used (#4691) 2017-04-18 01:35:41 -04:00
Martin Baulig c496d42bc0 [appletls]: Disable the new keychain code on XI. (#4695)
(cherry picked from commit b6255d35cd)
2017-04-14 14:51:13 -04:00
Martin Baulig 9051fff9d8 [appletls]: Use SecIdentityCreate() to avoid using the Mac keychain. (#4671) (#4677) (#4689)
* [appletls]: Use SecIdentityCreate() to avoid using the Mac keychain. (#4671)

Reading Certificates from the Mac Keychain
==========================================

Reading the private key from the keychain is a new feature introduced with
AppleTls on XamMac and iOS. On Desktop Mono, this new feature has several
known issues and it also did not received any testing yet. We go back to the old
way of doing things, which is to explicitly provide an X509Certificate2 with a
private key.

Keychain Dialog Popups
======================

When using Xamarin.Mac or Xamarin.iOS, we try to search the keychain
for the certificate and private key.

On Xamarin.iOS, this is easy because each app has its own keychain.

On Xamarin.Mac, the .app package needs to be trusted via code-sign
to get permission to access the user's keychain. [FIXME: I still have to
research how to actually do that.] Without this, you will get a popup
message each time, asking you whether you want to allow the app to access
the keychain, but you can make these go away by selecting "Trust always".

On Desktop Mono, this is problematic because selecting "Trust always"
give the 'mono' binary (and thus everything you'll ever run with Mono)
permission to retrieve the private key from the keychain.

This code would also trigger constant keychain popup messages,
which could only be suppressed by granting full trust. It also makes it
impossible to run Mono in headless mode.

SecIdentityCreate
=================

To avoid these problems, we are currently using an undocumented API
called SecIdentityRef() to avoid using the Mac keychain whenever a
X509Certificate2 with a private key is used.

On iOS and XamMac, you can still provide the X509Certificate without
a private key - in this case, a keychain search will be performed (and you
may get a popup message on XamMac).

(cherry picked from commit b9b2d23f1a)
2017-04-13 19:36:12 -04:00
Zoltan Varga c46588990e [jit] Make newarr [void] unverified. Fixes #55083.
(cherry picked from commit e9f54cb051)
2017-04-13 22:49:23 +02:00
Aleksey Kliger (λgeek) 42fa7589d3 Merge pull request #4679 from lambdageek/bug-49721-take2-2017-04
[loader] Ignore public key token in strong name match, if requested framework assembly was remapped
2017-04-12 16:56:23 -04:00
Zoltan Varga 73c2e8fcec [ppdb] Fix a crash if mono_ppdb_get_seq_points () is only passed a 'source_file' argument. 2017-04-12 16:33:51 -04:00
Aleksey Kliger 4394d71fc9 [loader] Ignore public key token in strong name match, if requested framework assembly was remapped
When framework assemblies are compiled for the mobile runtime, they are
generally signed with a different key than the normal desktop one.
Unfortunately each assembly has different logic for which key is
used (typically silverlight.pub or corefx.pub in place of ecma.pub), and short
of hardcoding a table in the runtime, there's no good way to know.
2017-04-12 12:37:19 -04:00
Aleksey Kliger 365a3bad46 [assembly] Add option to ignore public key tokens when comparing MonoAssemblyNames 2017-04-12 12:37:19 -04:00
Aleksey Kliger d9d31aee3f Revert "[loader] Remap public key tokens of framework assemblies when running with --runtime=mobile"
This reverts commit af7195e349.
2017-04-12 12:37:19 -04:00
Alexander Köplinger 48f71dfd49 [netstandard] Remove System.ArgIterator from facade
It was removed today: https://github.com/dotnet/standard/commit/52651e78ac329c56fb59cebf5b24174f25acb070

(cherry picked from commit 1c987f5bd0)
2017-04-11 20:24:14 +02:00
Alexander Köplinger 94061fc30c [Facades] Build netstandard.dll by default (#4501)
Added a new EXTERNAL_FACADE_DRAWING_REFERENCE variable which
specifies the path to an assembly that contains drawing types,
e.g. in the monotouch/monodroid case System.Drawing is built
inside the XI/XA repos.

Also update netstandard typeforwards to the latest version
from the dotnet/standard repo.
(cherry picked from commit a0d6c26a04)
2017-04-11 20:21:58 +02:00
Alexander Köplinger 854d8d276a [resgen] Remove dependency on WinForms and use it in mobile profiles (#4667)
resgen.exe used to load WinForms via reflection which is a pretty
large dependency. Instead we can just embed the few types that
are used for reading/writing resx files directly into the app.

Add System.Drawing.dll to the "build" profile so we can put
resgen there as well and allow us to no longer rely on system
resgen for mobile profiles like monotouch/monodroid.
(cherry picked from commit 9635b9cea0)
2017-04-10 20:16:01 +02:00
Andi McClure c0f278189a LLVM: Orbis support, fix typo in configure.ac 2017-04-10 13:41:50 -04:00
Alexander Köplinger 7d2a204717 [Facades] Add facades to winaot/orbis profiles (#4656)
Also remove Mono.Simd as we don't it on new platforms.

Cleanup monotouch_dirs to not depend on testing_aot_full_dirs since
it should be separate (even though it contains the same right now).
(cherry picked from commit 13f5db4888)
2017-04-07 22:09:15 +02:00
Andi McClure 6bd84694a5 Bump linker external to its master 2017-04-07 11:43:48 -04:00
Alexander Köplinger c60fcdd1a0 Make sure .sources files end with newline
It confuses the build on Linux otherwise.

(cherry picked from commit 47ca0c0ae8)
2017-04-07 14:51:23 +02:00
Rodrigo Kumpera 92503db795 Merge pull request #4649 from kumpera/android-fixed-backport
Backport of #4612
2017-04-05 16:59:26 -07:00
Rodrigo Kumpera 5bc34228b0 [runtime] Don't return the modules for the current process when pid != getpid (). 2017-04-05 14:59:01 -07:00
Rodrigo Kumpera 47bc1f1981 [System] Disable test that is too unreliable. 2017-04-05 14:59:01 -07:00
Rodrigo Kumpera f1edd5e81c Improve test assert. 2017-04-05 14:59:00 -07:00
Rodrigo Kumpera 21db0bcc44 [System] Disable a few tests that don't work on Android. 2017-04-05 14:59:00 -07:00
Rodrigo Kumpera 21d8535cbd [System] Disable test that doesn't work on Android. 2017-04-05 14:58:59 -07:00
Rodrigo Kumpera a0a303a5b5 [io-layer] Don't RC std handles or the current process on every lookup.
Caller don't expect those lookups to be RC'd so they don't compensate. This leads to unbound growth of their ref count, which eventually overflows.
2017-04-05 14:58:59 -07:00
Rodrigo Kumpera d1be73459b [runtime] When looking up the process name, don't bail out if you can't load its modules.
Loading modules for other processes can fail under some linux sandboxing rules but that doesn't mean
we should not be able to compute the process name. So when module == NULL, we make module loading non-fatal.
2017-04-05 14:58:58 -07:00
Rodrigo Kumpera dabf0915be [runtime] Improve tracing of process name lookup functions. 2017-04-05 14:58:57 -07:00
Rodrigo Kumpera e3515792d2 [runtime] Fix compilation under Android 2017-04-05 14:58:57 -07:00
Marek Safar b642be08d7 [Facades] Add forwarder for DbDataReaderExtensions 2017-04-05 10:04:20 +02:00
Marek Safar 024b98b040 [Facades] Fixes System.Threading.Overlapped 2017-04-05 09:34:40 +02:00
Alexander Köplinger 063d3b7e3c [tests] Fix the mcs-compileall target in runtime/ (#4637)
It is used as the "verify" step on Jenkins/Wrench and I noticed
it didn't run recently.

Looks like it was broken a while ago by 695e8f53ae.
Moving the verifiable_files variable at the top is wrong since
the $$profile variable is only defined inside the for loop and
so we'd get an empty list.

When that was fixed it still didn't work as piping to `echo`
doesn't work. Replaced it with a Makefile solution instead.
(cherry picked from commit 3bfff911dd)
2017-04-05 03:35:31 +02:00
Martin Baulig bb9c9153b3 [appletls]: Make CFObject.dlsym() private and fix CFBoolean. (#4640)
This fixes a native crash when attempting to use appletls.
(cherry picked from commit 989aefce37)
2017-04-04 14:28:59 -04:00
Marek Safar f15abf5e54 [System.Core] Linker friendly test update 2017-04-04 11:03:00 +02:00
Marek Safar 2da5d2a040 Bump cecil 2017-04-04 09:11:41 +02:00
Marek Safar 0885ea8b98 [corlib] Port more of corert array 2017-04-04 08:52:54 +02:00
Zoltan Varga eb4e976bb8 [llvm] Add sign extensions for the index register used during bounds checks and array address calculations. (#4636) 2017-04-03 17:23:43 -04:00
Zoltan Varga 4687c0c61c [jit] Fix a regression caused by 399f6e2425. Avoid a crash if MONO_VERBOS_METHOD is used. 2017-04-03 15:22:43 -04:00
Andi McClure 4e16d36939 Merge pull request #4634 from xmcclure/5.2-bump
Bump to 5.2 for 2017-04 branch
2017-04-03 15:21:35 -04:00
Andi McClure e2d7e09e09 Bump to 5.2 for 2017-04 branch 2017-04-03 13:16:55 -04:00
174 changed files with 2378 additions and 927 deletions

No files matched your search

+22 -19
View File
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
AC_INIT(mono, [5.1.0],
AC_INIT(mono, [5.2.0],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
@@ -63,6 +63,8 @@ esac
#
libgc_configure_args=
CFLAGS=$CFLAGS -O0 -g
# These variables are the CPPFLAGS/CFLAGS passed to libgc's configure
# libgc should inherit the original CFLAGS/CPPFLAGS passed to configure, i.e. -O0
CPPFLAGS_FOR_LIBGC=$CPPFLAGS
@@ -1031,25 +1033,25 @@ AC_SUBST(DEFAULT_PROFILE)
if test x$USE_NLS = xprofile_default; then
if test x$host_darwin = xyes; then
# We make the default value for USE_NLS
# "no" on OSX because it isn't available on most
# default OSX installs. The most common configurations will
# all disable it, so this saves us typing.
USE_NLS=no
AC_SUBST([USE_NLS])
AC_MSG_RESULT([$USE_NLS])
else
USE_NLS=yes
AC_SUBST([USE_NLS])
AC_MSG_RESULT([$USE_NLS])
fi
AC_MSG_CHECKING([NLS used])
# We make the default value for USE_NLS
# "no" on OSX because it isn't available on most
# default OSX installs. The most common configurations will
# all disable it, so this saves us typing.
if test x$host_darwin = xyes; then
USE_NLS=no;
else
USE_NLS=yes;
fi
AC_SUBST([USE_NLS])
AC_MSG_RESULT([$USE_NLS])
fi
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters, remoting,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
security, lldb, mdb, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
@@ -1170,9 +1172,10 @@ if test "x$mono_feature_disable_normalization" = "xyes"; then
AC_MSG_NOTICE([Disabled String normalization support.])
fi
if test "x$mono_feature_disable_assembly_remapping" = "xyes"; then
AC_DEFINE(DISABLE_ASSEMBLY_REMAPPING, 1, [Disable assembly remapping.])
AC_MSG_NOTICE([Disabled Assembly remapping.])
#TODO: remove assembly_remapping feature name once everyone is using desktop_loader
if test "x$mono_feature_disable_assembly_remapping" = "xyes" || test "x$mono_feature_disable_desktop_loader" = "xyes"; then
AC_DEFINE(DISABLE_DESKTOP_LOADER, 1, [Disable desktop assembly loader semantics.])
AC_MSG_NOTICE([Disabled desktop assembly loader semantics.])
fi
if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then
@@ -3023,7 +3026,7 @@ if test "x$enable_llvm" = "xyes"; then
LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=$llvm_api_version"
fi
AC_DEFINE_UNQUOTED(LLVM_VERSION, "$llvm_version", [Full version of LLVM libraties])
AC_DEFINE_UNQUOTED(LLVM_VERSION, "$llvm_version", [Full version of LLVM libraries])
AC_SUBST(LLVM_CFLAGS)
AC_SUBST(LLVM_CXXFLAGS)
+1 -1
+1 -1
+1 -1
+20 -3
View File
@@ -311,6 +311,26 @@ Instructs the AOT compiler to emit (or not emit) debug symbol information.
For more information about AOT, see: http://www.mono-project.com/docs/advanced/aot/
.RE
.TP
\fB--aot-path=PATH\fR
List of additional directories to search for AOT images.
.TP
\fB--apply-bindings=FILE\fR
Apply the assembly bindings from the specified configuration file when running
the AOT compiler. This is useful when compiling an auxiliary assembly that is
referenced by a main assembly that provides a configuration file. For example,
if app.exe uses lib.dll then in order to make the assembly bindings from
app.exe.config available when compiling lib.dll ahead of time, use:
.nf
mono --apply-bindings=app.exe.config --aot lib.dll
.fi
.TP
\fB--assembly-loader=MODE\fR
If mode is \fBstrict\fR, Mono will check that the public key token, culture and version
of a candidate assembly matches the requested strong name. If mode is \fBlegacy\fR, as
long as the name matches, the candidate will be allowed. \fBstrict\fR is the behavior
consistent with .NET Framework but may break some existing mono-based applications.
The default is \fBlegacy\fR.
.TP
\fB--attach=[options]\fR
Currently the only option supported by this command line argument is
\fBdisable\fR which disables the attach functionality.
@@ -321,9 +341,6 @@ The default files are /etc/mono/config and ~/.mono/config or the file
specified in the MONO_CONFIG environment variable, if set. See the
mono-config(5) man page for details on the format of this file.
.TP
\fB--aot-path=PATH\fR
List of additional directories to search for AOT images.
.TP
\fB--debugger-agent=[options]\fR
This instructs the Mono runtime to
start a debugging agent inside the Mono runtime and connect it to a
-3
View File
@@ -5,9 +5,6 @@ BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
# Use system resgen as we don't want local System.Windows.Forms dependency
RESGEN = resgen2
profile-check:
@:
@@ -5,11 +5,6 @@ BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
# Use system resgen as we don't want local System.Windows.Forms dependency
RESGEN := $(dir $(shell which $(EXTERNAL_MCS)))resgen2
# nuttzing!
profile-check:
@:
+1 -1
View File
@@ -11,7 +11,7 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -d:MULTIPLEX_OS -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 4.5
XBUILD_VERSION = 4.0
-3
View File
@@ -5,9 +5,6 @@ BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
# Use system resgen as we don't want local System.Windows.Forms dependency
RESGEN = resgen2
profile-check:
@:
-3
View File
@@ -5,9 +5,6 @@ BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
# Use system resgen as we don't want local System.Windows.Forms dependency
RESGEN = resgen2
profile-check:
@:
@@ -5,9 +5,6 @@ BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
# Use system resgen as we don't want local System.Windows.Forms dependency
RESGEN = resgen2
profile-check:
@:
-3
View File
@@ -5,9 +5,6 @@ BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
# Use system resgen as we don't want local System.Windows.Forms dependency
RESGEN = resgen2
profile-check:
@:
-3
View File
@@ -3,9 +3,6 @@ BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
# Use system resgen as we don't want local System.Windows.Forms dependency
RESGEN := $(dir $(shell which $(EXTERNAL_MCS)))resgen2
profile-check:
@:
+1 -1
View File
@@ -1,6 +1,6 @@
include $(topdir)/build/profiles/net_4_x.make
PROFILE_MCS_FLAGS += \
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS) \
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
-d:NO_SYSTEM_DRAWING_DEPENDENCY \
-d:NO_WINFORMS_DEPENDENCY \
+1 -3
View File
@@ -49,9 +49,7 @@ INTERNAL_CSC_LOCATION = $(CSC_LOCATION)
# Using CSC_SDK_PATH_DISABLED for sanity check that all references have path specified
INTERNAL_CSC = CSC_SDK_PATH_DISABLED= $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_RUNTIME_FLAGS) $(INTERNAL_CSC_LOCATION)
RESGEN_EXE = $(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)resgen.exe
INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(RESGEN_EXE)
RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN)
RESGEN = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(RESGEN_EXE) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resgen.exe
STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/cil-stringreplacer.exe
depsdir = $(topdir)/build/deps
+2 -2
View File
@@ -37,8 +37,8 @@ doc-update-local:
doc-update-recursive:
@echo "do not recurse the Facades folder"
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Runtime.Serialization System.XML \
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.IO.Compression.FileSystem \
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Numerics.Vectors System.Runtime.Serialization System.Transactions System.XML \
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http System.ServiceProcess System.IO.Compression \
System.Web.Services:
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System System.Data System.Xml
LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -1,4 +1,2 @@
TypeForwarders.cs
AssemblyInfo.cs
../../../../external/corefx/src/System.Data.Common/src/System/Data/Common/DbDataReaderExtensions.Facade.cs
@@ -28,6 +28,7 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnectionStringBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataReader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataReaderExtensions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataRecord))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbEnumerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbException))]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -14,10 +14,27 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
ifneq (2.1, $(FRAMEWORK_VERSION))
ifndef XAMMAC_4_5
# xammac_net_4_5 and the testing_* profiles are special, they don't build
# System.Drawing.dll or equivalent neither in Mono nor in the XM repo.
# For now we embed the types directly here.
# TODO: find a better solution.
EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hybrid, $(PROFILE))
ifndef EMBEDDED_DRAWING_DEP
# profiles which build a System.Drawing.dll in the repo
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
ifdef REPO_DRAWING_DEP
LIB_REFS += System.Drawing
else
# When System.Drawing.dll is not built in the Mono repo but in
# the product repo like in the XI/XA case we need to pass in a reference
# to the assembly containing drawing types like Rectangle etc. from there.
# This needs to be passed in via EXTERNAL_FACADE_DRAWING_REFERENCE.
LIB_MCS_FLAGS += /r:$(EXTERNAL_FACADE_DRAWING_REFERENCE)
endif
endif
PLATFORM_DEBUG_FLAGS =
@@ -6,3 +6,7 @@ AssemblyInfo.cs
../../System.Drawing/System.Drawing/RectangleF.cs
../../System.Drawing/System.Drawing/Size.cs
../../System.Drawing/System.Drawing/SizeF.cs
../../System.Drawing/System.Drawing/Color.cs
../../System.Drawing/System.Drawing/KnownColor.cs
../../System.Drawing/System.Drawing/KnownColors.cs
@@ -0,0 +1 @@
#include embedded_System.Drawing.Primitives.dll.sources
@@ -0,0 +1 @@
#include embedded_System.Drawing.Primitives.dll.sources
@@ -0,0 +1,35 @@
//
// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Reflection.DispatchProxy.dll")]
[assembly: AssemblyDescription ("System.Reflection.DispatchProxy.dll")]
[assembly: AssemblyDefaultAlias ("System.Reflection.DispatchProxy.dll")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -0,0 +1,19 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Reflection.DispatchProxy
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Reflection.DispatchProxy.dll
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
LIB_MCS_FLAGS = $(SIGN_FLAGS) /unsafe
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -0,0 +1,3 @@
../../../build/common/MonoTODOAttribute.cs
Assembly/AssemblyInfo.cs
System.Reflection/DispatchProxy.cs
@@ -30,33 +30,17 @@
using System;
using System.Reflection;
using System.Resources;
using System.Security;
using System.Security.Permissions;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about the assembly
[assembly: AssemblyTitle ("System.Runtime.InteropServices.RuntimeInformation.dll")]
[assembly: AssemblyDescription ("System.Runtime.InteropServices.RuntimeInformation.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.InteropServices.RuntimeInformation.dll")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile("../msfinal.pub")]
[assembly: SecurityCritical]
[assembly: ComVisible (false)]
@@ -0,0 +1,24 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Runtime.InteropServices.RuntimeInformation
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.InteropServices.RuntimeInformation.dll
RESX_RESOURCE_STRING = ../../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/Resources/Strings.resx
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
LIB_MCS_FLAGS = $(SIGN_FLAGS) /unsafe
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -0,0 +1,7 @@
Assembly/AssemblyInfo.cs
System.Runtime.InteropServices/RuntimeInformation.cs
corefx/SR.cs
../../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/OSPlatform.cs
../../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/Architecture.cs
@@ -0,0 +1,8 @@
//
// This file was generated by resx2sr tool
//
partial class SR
{
public const string Argument_EmptyValue = "Value cannot be empty.";
}
@@ -0,0 +1,39 @@
//
// AssemblyExtensions.cs
//
// Authors:
// Marek Safar <[email protected]>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Reflection.Metadata
{
public static class AssemblyExtensions
{
public static unsafe bool TryGetRawMetadata (this System.Reflection.Assembly assembly, out byte* blob, out int length)
{
throw new NotImplementedException ();
}
}
}
@@ -0,0 +1,35 @@
//
// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Runtime.Loader.dll")]
[assembly: AssemblyDescription ("System.Runtime.Loader.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.Loader.dll")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -0,0 +1,21 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Runtime.Loader
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.Loader.dll
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
LIB_MCS_FLAGS = $(SIGN_FLAGS) /unsafe
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -0,0 +1,3 @@
AssemblyInfo.cs
AssemblyExtensions.cs
AssemblyLoadContext.cs
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -1,4 +1,4 @@
TypeForwarders.cs
AssemblyInfo.cs
SR.cs
../../../../external/corefx/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/IncrementalHash.net46.cs
../../../../external/corefx/src/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/IncrementalHash.net46.cs
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -12,10 +12,9 @@ LIBRARY = System.Threading.Overlapped.dll
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System
LIB_MCS_FLAGS = $(SIGN_FLAGS) -unsafe -nowarn:3021
LIB_MCS_FLAGS = $(SIGN_FLAGS)
RESX_RESOURCE_STRING = \
../../../../external/corefx/src/System.Threading.Overlapped/src/Resources/Strings.resx
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
@@ -1,10 +1,2 @@
TypeForwarders.cs
AssemblyInfo.cs
corefx/SR.cs
../../../../external/corefx/src/Common/src/System/HResults.cs
../../../../external/corefx/src/System.Threading.Overlapped/src/System/Threading/ClrThreadPoolBoundHandle.cs
../../../../external/corefx/src/System.Threading.Overlapped/src/System/Threading/ClrThreadPoolBoundHandleOverlapped.cs
../../../../external/corefx/src/System.Threading.Overlapped/src/System/Threading/ClrThreadPoolPreAllocatedOverlapped.cs
../../../../external/corefx/src/System.Threading.Overlapped/src/System/Threading/DeferredDisposableLifetime.cs
@@ -22,3 +22,5 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.IOCompletionCallback))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.NativeOverlapped))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.PreAllocatedOverlapped))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ThreadPoolBoundHandle))]
@@ -1,13 +0,0 @@
//
// This file was generated by resx2sr tool
//
partial class SR
{
public const string Argument_AlreadyBoundOrSyncHandle = "'handle' has already been bound to the thread pool, or was not opened for asynchronous I/O.";
public const string Argument_InvalidHandle = "'handle' has been disposed or is an invalid handle.";
public const string Argument_NativeOverlappedAlreadyFree = "'overlapped' has already been freed.";
public const string Argument_NativeOverlappedWrongBoundHandle = "'overlapped' was not allocated by this ThreadPoolBoundHandle instance.";
public const string Argument_PreAllocatedAlreadyAllocated = "'preAllocated' is already in use.";
public const string InvalidOperation_NativeOverlappedReused = "NativeOverlapped cannot be reused for multiple operations.";
}
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.10.0")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -28,35 +28,17 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Resources;
using System.Security;
using System.Security.Permissions;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about the assembly
[assembly: AssemblyTitle ("System.Xml.XPath.XmlDocument.dll")]
[assembly: AssemblyDescription ("System.Xml.XPath.XmlDocument.dll")]
[assembly: AssemblyDefaultAlias ("System.Xml.XPath.XmlDocument.dll")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile("../msfinal.pub")]
[assembly: SecurityCritical]
[assembly: ComVisible (false)]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -0,0 +1,19 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Xml.XPath.XmlDocument
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Xml.XPath.XmlDocument.dll
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
LIB_REFS = System System.Xml
LIB_MCS_FLAGS = $(SIGN_FLAGS)
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -0,0 +1,3 @@
../../../build/common/MonoTODOAttribute.cs
Assembly/AssemblyInfo.cs
System.Xml/XmlDocumentXPathExtensions.cs
+34 -5
View File
@@ -9,21 +9,50 @@ LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = netstandard.dll
KEY_FILE = ../../msfinal.pub
KEY_FILE = ../../Open.snk
LIBRARY_SNK = $(KEY_FILE)
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699 /nowarn:618
LIB_REFS = System System.Xml System.Xml.Linq System.Runtime.Serialization System.Core System.Numerics System.Numerics.Vectors System.Net.Http System.Transactions \
System.IO.Compression System.Data System.ComponentModel.Composition System.IO.Compression.FileSystem \
System.IO.Compression System.Data System.ComponentModel.Composition System.IO.Compression.FileSystem Facades/System.Runtime.InteropServices.RuntimeInformation \
Facades/System.Security.Cryptography.Algorithms Facades/System.Globalization.Extensions Facades/System.Data.Common \
Facades/System.Diagnostics.StackTrace Facades/System.Runtime.Serialization.Xml Facades/System.Runtime.Serialization.Primitives \
Facades/System.Security.SecureString Facades/System.Threading.Overlapped Facades/System.Xml.XPath.XDocument
ifeq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
ifeq ($(PROFILE),xammac_net_4_5)
LIB_REFS += System.Web.Services
else ifeq (2.1, $(FRAMEWORK_VERSION))
LIB_REFS += System.Web.Services
else
LIB_REFS += System.Web System.Drawing
LIB_REFS += System.Web
endif
LIB_MCS_FLAGS = $(SIGN_FLAGS)
# profiles which build a System.Drawing.dll in the repo
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
ifdef REPO_DRAWING_DEP
LIB_REFS += System.Drawing
else
# xammac_net_4_5 and the testing_* profiles are special, they don't build
# System.Drawing.dll or equivalent neither in Mono nor in the XM repo.
# For now we typeforward the drawing types to the System.Drawing.Primitives.dll
# facade where they are embedded.
# TODO: find a better solution.
EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hybrid, $(PROFILE))
ifdef EMBEDDED_DRAWING_DEP
LIB_REFS += Facades/System.Drawing.Primitives
else
# When System.Drawing.dll is not built in the Mono repo but in
# the product repo like in the XI/XA case we need to pass in a reference
# to the assembly containing drawing types like Rectangle etc. from there.
# This needs to be passed in via EXTERNAL_FACADE_DRAWING_REFERENCE.
LIB_MCS_FLAGS += /r:$(EXTERNAL_FACADE_DRAWING_REFERENCE)
endif
endif
PLATFORM_DEBUG_FLAGS =
+19 -62
View File
@@ -1,12 +1,9 @@
// This file is generated from https://github.com/dotnet/standard
//
// After successful compilation run following from root folder of the repo
//
// dotnetcli\dotnet.exe Tools\GenAPI.exe -assembly:bin\ref\netstandard\2.0.0.0\netstandard.dll -writer:TypeForwards
// After successful compilation copy the contents of the following file:
// obj/AnyOS.AnyCPU.Debug/netstandard/xamarin.android/netstandard.forwards.cs
//
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.SqlServer.Server.SqlDataRecord))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.SqlServer.Server.SqlMetaData))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.CriticalHandleMinusOneIsInvalid))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeFileHandle))]
@@ -14,10 +11,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeMemoryMappedFileHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeMemoryMappedViewHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeNCryptHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeNCryptProviderHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafePipeHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeProcessHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Win32.SafeHandles.SafeWaitHandle))]
@@ -47,7 +40,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomainUnloadedException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ApplicationException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ApplicationId))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ArgIterator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ArgumentException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ArgumentNullException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ArgumentOutOfRangeException))]
@@ -228,6 +220,7 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.TimeZoneInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.TimeZoneNotFoundException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Tuple))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.TupleExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Tuple<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Tuple<,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Tuple<,,>))]
@@ -260,6 +253,15 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UriParser))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UriPartial))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UriTypeConverter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,,,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Version))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(void))]
@@ -736,27 +738,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.SchemaTableColumn))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.SchemaTableOptionalColumn))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Common.SupportedJoinOperators))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.ApplicationIntent))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SortOrder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlBulkCopy))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlBulkCopyColumnMapping))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlBulkCopyColumnMappingCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlBulkCopyOptions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlClientFactory))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlCommand))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlConnection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlConnectionStringBuilder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlDataReader))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlError))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlErrorCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlInfoMessageEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlInfoMessageEventHandler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlParameter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlParameterCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlRowsCopiedEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlRowsCopiedEventHandler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlClient.SqlTransaction))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.INullable))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlAlreadyFilledException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlBinary))]
@@ -892,7 +873,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Tracing.NonEventAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Color))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.KnownColor))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Point))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.PointF))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Rectangle))]
@@ -1246,7 +1226,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.MailMessage))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.MailPriority))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.SendCompletedEventHandler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.SmtpAccess))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.SmtpClient))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.SmtpDeliveryFormat))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Mail.SmtpDeliveryMethod))]
@@ -1357,15 +1336,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebSockets.WebSocketState))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.BigInteger))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Complex))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix3x2))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix4x4))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Plane))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Quaternion))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector2))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector3))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector4))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Vector<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.AmbiguousMatchException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.Assembly))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.AssemblyAlgorithmIdAttribute))]
@@ -1555,6 +1525,7 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.SuppressIldasmAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.TaskAwaiter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.TaskAwaiter<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.TupleElementNamesAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.TypeForwardedFromAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.TypeForwardedToAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.UnsafeValueTypeAttribute))]
@@ -1568,6 +1539,7 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.AllowReversePInvokeCallsAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.Architecture))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ArrayWithOffset))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.BestFitMappingAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.BStrWrapper))]
@@ -1624,11 +1596,13 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.MarshalAsAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.MarshalDirectiveException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.OptionalAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.OSPlatform))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.OutAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.PreserveSigAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ProgIdAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.RuntimeEnvironment))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.RuntimeInformation))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeArrayRankMismatchException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeArrayTypeMismatchException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SafeBuffer))]
@@ -1802,7 +1776,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Claims.ClaimTypes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Claims.ClaimValueTypes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.Aes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesCng))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesCryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AesManaged))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsnEncodedData))]
@@ -1814,22 +1787,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsymmetricSignatureDeformatter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsymmetricSignatureFormatter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CipherMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngAlgorithm))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngAlgorithmGroup))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngExportPolicies))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKey))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKeyBlobFormat))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKeyCreationOptions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKeyCreationParameters))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKeyHandleOpenOptions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKeyOpenOptions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngKeyUsages))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngProperty))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngPropertyCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngPropertyOptions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngUIPolicy))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CngUIProtectionLevels))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CryptoConfig))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CryptographicException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.CryptographicUnexpectedOperationException))]
@@ -1849,7 +1806,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECCurve))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDiffieHellmanPublicKey))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDsa))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECDsaCng))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECParameters))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ECPoint))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.FromBase64Transform))]
@@ -1886,7 +1842,6 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RijndaelManaged))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RNGCryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSA))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSACng))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSACryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAEncryptionPadding))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.RSAEncryptionPaddingMode))]
@@ -1903,16 +1858,18 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA1CryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA1Managed))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA256))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA256CryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA256Managed))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA384))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA384CryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA384Managed))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA512))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA512CryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SHA512Managed))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SignatureDescription))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.SymmetricAlgorithm))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ToBase64Transform))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.TripleDES))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.TripleDESCng))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.TripleDESCryptoServiceProvider))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.ECDsaCertificateExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.X509Certificates.OpenFlags))]
+19 -9
View File
@@ -13,7 +13,7 @@ System.ServiceModel.Security System.Text.Encoding.Extensions System.Text.Encodin
System.Threading.Tasks System.Threading.Timer System.Threading System.Xml.ReaderWriter System.Xml.XDocument System.Xml.XmlSerializer \
System.Runtime.Handles System.ServiceModel.Duplex System.ServiceModel.NetTcp \
Microsoft.Win32.Primitives Microsoft.Win32.Registry System.AppContext System.Collections.NonGeneric System.Collections.Specialized System.ComponentModel.Primitives \
System.ComponentModel.TypeConverter System.Console System.Data.Common System.Data.SqlClient System.Diagnostics.FileVersionInfo \
System.ComponentModel.TypeConverter System.Console System.Data.SqlClient System.Diagnostics.FileVersionInfo \
System.Diagnostics.Process System.Diagnostics.TextWriterTraceListener System.Diagnostics.TraceEvent System.Diagnostics.TraceSource System.Globalization.Calendars \
System.IO.Compression.ZipFile System.IO.FileSystem System.IO.FileSystem.DriveInfo System.IO.FileSystem.Primitives \
System.IO.IsolatedStorage System.IO.MemoryMappedFiles System.IO.UnmanagedMemoryStream System.Net.AuthenticationManager System.Net.Cache \
@@ -23,25 +23,33 @@ System.Security.AccessControl System.Security.Claims System.Security.Cryptograph
System.Security.Cryptography.Encryption.Aes System.Security.Cryptography.Encryption.ECDiffieHellman System.Security.Cryptography.Encryption.ECDsa System.Security.Cryptography.Hashing \
System.Security.Cryptography.Hashing.Algorithms System.Security.Cryptography.RSA System.Security.Cryptography.RandomNumberGenerator \
System.Security.Principal.Windows System.Threading.Thread System.Threading.ThreadPool \
System.Xml.XPath System.Xml.XmlDocument System.Xml.Xsl.Primitives Microsoft.Win32.Registry.AccessControl System.Diagnostics.StackTrace System.Globalization.Extensions \
System.Xml.XPath System.Xml.XmlDocument System.Xml.Xsl.Primitives Microsoft.Win32.Registry.AccessControl \
System.IO.FileSystem.AccessControl System.Reflection.TypeExtensions System.Reflection.Emit.Lightweight System.Reflection.Emit.ILGeneration System.Reflection.Emit \
System.Security.SecureString System.Threading.AccessControl System.Threading.Overlapped System.ValueTuple System.Xml.XPath.XDocument \
System.Threading.AccessControl System.ValueTuple \
System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes
# common_SUBDIRS dependencies
common_DEPS_SUBDIRS = System.Security.Cryptography.X509Certificates System.ServiceModel.Primitives System.Runtime.Serialization.Primitives \
System.Runtime.Serialization.Xml System.Security.Cryptography.Algorithms
System.Runtime.Serialization.Xml System.Security.Cryptography.Algorithms System.Globalization.Extensions System.Data.Common \
System.Diagnostics.StackTrace System.Security.SecureString System.Threading.Overlapped System.Xml.XPath.XDocument System.Runtime.InteropServices.RuntimeInformation
drawing_DEPS_SUBDIRS = System.Drawing.Primitives
netstandard_drawing_SUBDIRS = System.Drawing.Primitives netstandard
monotouch_SUBDIRS = $(common_DEPS_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
monotouch_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
# We don't build netstandard/System.Drawing.Primitives on monotouch etc. profiles by default,
# except when EXTERNAL_FACADE_DRAWING_REFERENCE is defined which allows us to build it in Mono CI
# (since the dependent drawing types are normally built in the product repos).
ifdef EXTERNAL_FACADE_DRAWING_REFERENCE
monotouch_SUBDIRS += $(netstandard_drawing_SUBDIRS)
endif
testing_aot_full_SUBDIRS = $(monotouch_SUBDIRS)
testing_aot_full_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
net_4_x_SUBDIRS = $(common_DEPS_SUBDIRS) $(drawing_DEPS_SUBDIRS)
net_4_x_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS)
net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS)
basic_PARALLEL_SUBDIRS = System.Runtime System.Reflection System.Collections System.Resources.ResourceManager System.Globalization \
@@ -69,12 +77,14 @@ monotouch_watch_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
monotouch_tv_SUBDIRS = $(monotouch_SUBDIRS)
monotouch_tv_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
winaot_PARALLEL_SUBDIRS :=
winaot_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
winaot_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
orbis_PARALLEL_SUBDIRS :=
orbis_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
orbis_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
System.Security.Cryptography.Cng
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
mobile_only_DEPS_SUBDIRS = System.Security.Cryptography.OpenSsl
+16 -22
View File
@@ -18,15 +18,10 @@ basic_SUBDIRS := \
System.ComponentModel.Composition.4.5 \
System.Numerics \
System.Xml.Linq \
System.Runtime.InteropServices.RuntimeInformation \
Mono.Cecil \
$(MCS_MODE_dirs) \
../tools/cil-stringreplacer
# resgen is corlib specific so we need to wait until corlib is build
# and build it just a step before first dll needs it
resgen_dir = ../tools/resgen
build_SUBDIRS := \
corlib \
Mono.Security \
@@ -37,8 +32,8 @@ build_SUBDIRS := \
System.ComponentModel.Composition.4.5 \
System.Numerics \
System.Xml.Linq \
System.Runtime.InteropServices.RuntimeInformation \
System.IO.Compression \
System.Drawing \
Mono.Cecil \
$(MCS_MODE_dirs) \
Mono.CompilerServices.SymbolWriter \
@@ -86,9 +81,6 @@ mobile_common_dirs := \
System.Xml.Serialization \
Mono.CSharp \
Microsoft.CSharp \
System.Runtime.InteropServices.RuntimeInformation \
System.Reflection.DispatchProxy \
System.Xml.XPath.XmlDocument \
System.Reflection.Context \
System.Net.Http.WinHttpHandler
@@ -115,7 +107,9 @@ monodroid_dirs := \
$(pcl_facade_dirs)
monotouch_dirs := \
$(testing_aot_full_dirs)
$(mobile_common_dirs) \
Mono.Simd \
$(pcl_facade_dirs)
monotouch_watch_dirs := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_dirs))
monotouch_tv_dirs := $(monotouch_dirs)
@@ -131,7 +125,10 @@ monotouch_runtime_dirs := \
monotouch_watch_runtime_dirs := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_runtime_dirs))
monotouch_tv_runtime_dirs := $(monotouch_runtime_dirs)
winaot_dirs := $(monotouch_dirs) System.Drawing
winaot_dirs := \
$(mobile_common_dirs) \
System.Drawing \
$(pcl_facade_dirs)
xammac_4_5_dirs := \
corlib \
@@ -177,7 +174,6 @@ xammac_4_5_dirs := \
System.Data.Linq \
System.Net.Http \
System.Net.Http.WebRequest \
System.Runtime.InteropServices.RuntimeInformation \
System.Reflection.Context \
System.Net.Http.WinHttpHandler \
$(pcl_facade_dirs)
@@ -192,10 +188,9 @@ net_4_x_dirs := \
System.Core \
System.Security \
System.Configuration \
$(resgen_dir) \
System.Drawing \
System.IO.Compression \
System.IO.Compression.FileSystem \
System.Drawing \
System.Transactions \
System.EnterpriseServices \
Mono.Data.Tds \
@@ -264,8 +259,7 @@ net_4_x_dirs := \
System.Net.Http.Formatting \
System.Web.Http \
System.Web.Http.SelfHost \
System.Web.Http.WebHost \
System.Runtime.InteropServices.RuntimeInformation
System.Web.Http.WebHost
# These are the subdirs which depends on libs in net_4_x_dirs
# or have proper dependencies between each other
@@ -335,10 +329,10 @@ xbuild_4_0_dirs := \
$(xbuild_2_0_dirs) \
Microsoft.Build
orbis_exclude_dirs := \
Microsoft.CSharp \
Mono.CSharp \
Mono.Data.Sqlite
orbis_dirs := \
$(filter-out Microsoft.CSharp Mono.CSharp Mono.Data.Sqlite,$(mobile_common_dirs)) \
System.Drawing \
$(pcl_facade_dirs)
monodroid_SUBDIRS := $(monodroid_dirs)
monotouch_SUBDIRS := $(monotouch_dirs)
@@ -357,7 +351,7 @@ net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs)
xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
winaot_SUBDIRS := $(winaot_dirs)
orbis_SUBDIRS := $(filter-out $(orbis_exclude_dirs),$(monotouch_dirs))
orbis_SUBDIRS := $(orbis_dirs)
include ../build/rules.make
@@ -400,7 +394,7 @@ monolite_dir := monolite/$(MONO_CORLIB_VERSION)
# Files needed to bootstrap C# compiler
build_files = mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll \
System.Numerics.dll System.Xml.Linq.dll System.Runtime.InteropServices.RuntimeInformation.dll \
System.Numerics.dll System.Xml.Linq.dll \
Facades/System.Collections.Concurrent.dll Facades/System.Linq.dll Facades/System.Runtime.dll Facades/System.Collections.dll \
Facades/System.Reflection.Extensions.dll Facades/System.Text.Encoding.Extensions.dll Facades/System.Diagnostics.Debug.dll \
Facades/System.Reflection.Primitives.dll Facades/System.Text.Encoding.dll Facades/System.Diagnostics.Tools.dll Facades/System.Reflection.dll \
@@ -36,46 +36,50 @@ using NUnit.Framework;
namespace MonoTests.System.Linq.Expressions {
[TestFixture]
public class ExpressionTest_Loop {
public class ExpressionTest_Loop
{
public static void Print (int arg)
{
}
[Test]
public void ComplexTest ()
{
var breakLabel = Expression.Label ("LoopBreak");
var counter = Expression.Variable (typeof (int), "counter");
var breakLabel = Expression.Label ("LoopBreak");
var counter = Expression.Variable (typeof (int), "counter");
var l = Expression.Block (new[] { counter },
Expression.Assign (counter, Expression.Constant (-1)),
Expression.Loop (
Expression.Block (Expression.IfThenElse (
Expression.Equal (Expression.Assign (counter, Expression.Add (counter, Expression.Constant (1))), Expression.Constant (1000)),
Expression.Block (Expression.Break (breakLabel)),
Expression.Call (null, typeof (Console).GetMethod ("WriteLine", new Type[] { typeof (int) }), counter)
)),
breakLabel)
);
var l = Expression.Block (new[] { counter },
Expression.Assign (counter, Expression.Constant (-1)),
Expression.Loop (
Expression.Block (Expression.IfThenElse (
Expression.Equal (Expression.Assign (counter, Expression.Add (counter, Expression.Constant (1))), Expression.Constant (1000)),
Expression.Block (Expression.Break (breakLabel)),
Expression.Call (null, typeof (ExpressionTest_Loop).GetMethod ("Print", new Type[] { typeof (int) }), counter)
)),
breakLabel)
);
var res = Expression.Lambda<Action> (l).Compile ();
}
var res = Expression.Lambda<Action> (l).Compile ();
}
[Test]
public void ComplexTest_2 ()
{
var breakLabel = Expression.Label ("LoopBreak");
var counter = Expression.Variable (typeof (int), "counter");
var breakLabel = Expression.Label ("LoopBreak");
var counter = Expression.Variable (typeof (int), "counter");
var l = Expression.Block (new[] { counter },
Expression.Assign (counter, Expression.Constant(-1)),
Expression.Loop (
Expression.IfThenElse (
Expression.Equal (Expression.Assign (counter, Expression.Add (counter, Expression.Constant (1))), Expression.Constant (1000)),
Expression.Break (breakLabel),
Expression.Call (null, typeof (Console).GetMethod ("WriteLine", new Type[] { typeof (int) }), counter)
),
breakLabel)
);
var l = Expression.Block (new[] { counter },
Expression.Assign (counter, Expression.Constant(-1)),
Expression.Loop (
Expression.IfThenElse (
Expression.Equal (Expression.Assign (counter, Expression.Add (counter, Expression.Constant (1))), Expression.Constant (1000)),
Expression.Break (breakLabel),
Expression.Call (null, typeof (ExpressionTest_Loop).GetMethod ("Print", new Type[] { typeof (int) }), counter)
),
breakLabel)
);
var res = Expression.Lambda<Action> (l).Compile ();
var res = Expression.Lambda<Action> (l).Compile ();
}
}
}
@@ -151,4 +151,4 @@ ProviderTests/System.Data.SqlClient/SqlTransactionTest.cs
ProviderTests/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs
ProviderTests/System.Data.SqlClient/SqlConnectionTest.cs
ProviderTests/System.Data.SqlClient/SqlParameterTest.cs
ProviderTests/System.Data.SqlClient/SqlParameterCollectionTest.cs
ProviderTests/System.Data.SqlClient/SqlParameterCollectionTest.cs
@@ -23,4 +23,4 @@ System.Data.SqlClient/SqlTransactionTest.cs
System.Data.SqlClient/SqlConnectionStringBuilderTest.cs
System.Data.SqlClient/SqlConnectionTest.cs
System.Data.SqlClient/SqlParameterTest.cs
System.Data.SqlClient/SqlParameterCollectionTest.cs
System.Data.SqlClient/SqlParameterCollectionTest.cs
@@ -60,7 +60,8 @@ namespace MonoTests.System.Data.Connected.SqlClient
{
if (conn != null)
conn.Dispose ();
SqlConnection.ClearAllPools ();
if (connectionString != null)
SqlConnection.ClearAllPools ();
}
[Test]
@@ -41,6 +41,14 @@ namespace MonoTests.System.Data.Connected.SqlClient
public class SqlParameterCollectionTest
{
EngineConfig engine;
[SetUp]
public void SetUp ()
{
engine = ConnectionManager.Instance.Sql.EngineConfig;
}
[Test]
public void CopyToTest ()
{
+1 -1
View File
@@ -291,4 +291,4 @@
../referencesource/System.Data/System/Data/SqlClient/SqlConnectionStringBuilder.cs
../referencesource/System.Data/System/Data/SqlClient/SqlUtil.cs
../referencesource/System.Data/System/Data/SqlClient/TdsEnums.cs
../referencesource/System.Data/System/Data/SqlClient/TdsParserStaticMethods.cs
../referencesource/System.Data/System/Data/SqlClient/TdsParserStaticMethods.cs
+5 -3
View File
@@ -10,10 +10,12 @@ LIB_MCS_FLAGS = /unsafe \
-resource:Assembly/Error.ico,Error.ico -resource:Assembly/Warning.ico,Warning.ico \
-resource:Assembly/Question.ico,Question.ico -resource:Assembly/Shield.ico,Shield.ico
ifneq (winaot, $(PROFILE))
LIB_MCS_FLAGS += -d:FEATURE_TYPECONVERTER,SUPPORTS_WINDOWS_COLORS
else
ifeq (winaot, $(PROFILE))
LIB_MCS_FLAGS += /keyfile:../msfinal.pub
else ifeq (orbis, $(PROFILE))
LIB_MCS_FLAGS += /keyfile:../msfinal.pub
else
LIB_MCS_FLAGS += -d:FEATURE_TYPECONVERTER,SUPPORTS_WINDOWS_COLORS
endif
TEST_LIB_REFS = System.Drawing System.Runtime.Serialization.Formatters.Soap System.Xml
@@ -0,0 +1,3 @@
Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
#include netstandard.sources
@@ -1,3 +1,3 @@
Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
#include netstandard.sources
#include netstandard.sources
@@ -11,4 +11,4 @@ corefx/SR.cs
../../../external/corefx/src/System.Buffers/src/System/Buffers/ArrayPoolEventSource.cs
../../../external/corefx/src/System.Buffers/src/System/Buffers/DefaultArrayPool.cs
../../../external/corefx/src/System.Buffers/src/System/Buffers/DefaultArrayPoolBucket.cs
../../../external/corefx/src/System.Buffers/src/System/Buffers/Utilities.cs
../../../external/corefx/src/System.Buffers/src/System/Buffers/Utilities.cs
@@ -30,13 +30,17 @@ using System.Threading;
using System.Threading.Tasks;
using System.IO;
using System.Net;
using System.Runtime.ExceptionServices;
#if XAMCORE_4_0
using CFNetwork;
using CoreFoundation;
#elif XAMCORE_2_0
using CoreServices;
using CoreFoundation;
#else
using MonoTouch.CoreServices;
using MonoTouch.CoreFoundation;
#endif
namespace System.Net.Http
@@ -54,6 +58,7 @@ namespace System.Net.Http
Mutex data_mutex;
AutoResetEvent data_event;
AutoResetEvent data_read_event;
ExceptionDispatchInfo http_exception;
// The requirements are:
// * We must read at least one byte from the stream every time
@@ -77,6 +82,7 @@ namespace System.Net.Http
public CFContentStream (CFHTTPStream stream)
{
this.http_stream = stream;
this.http_stream.ErrorEvent += HandleErrorEvent;
data = new BufferData () {
Buffer = new byte [4096],
};
@@ -85,6 +91,17 @@ namespace System.Net.Http
data_mutex = new Mutex ();
}
void HandleErrorEvent (object sender, CFStream.StreamEventArgs e)
{
var gotMutex = data_mutex.WaitOne ();
if (gotMutex) {
var stream = (CFHTTPStream)sender;
if (e.EventType == CFStreamEventType.ErrorOccurred)
Volatile.Write (ref http_exception, ExceptionDispatchInfo.Capture (stream.GetError ()));
data_mutex.ReleaseMutex ();
}
}
public void ReadStreamData ()
{
data_read_event.WaitOne (); // make sure there's no pending data.
@@ -102,6 +119,7 @@ namespace System.Net.Http
data_mutex.WaitOne ();
data = null;
this.http_stream.ErrorEvent -= HandleErrorEvent;
data_mutex.ReleaseMutex ();
data_event.Set ();
@@ -111,6 +129,11 @@ namespace System.Net.Http
{
while (data_event.WaitOne ()) {
data_mutex.WaitOne ();
if (http_exception != null) {
http_exception.Throw ();
data_mutex.ReleaseMutex ();
break;
}
if (data == null || data.Length <= 0) {
data_mutex.ReleaseMutex ();
data_read_event.Set ();
@@ -1,62 +0,0 @@
//
// AssemblyInfo.cs
//
// Author:
// Alexander Köplinger ([email protected])
//
// (C) 2016 Xamarin, Inc.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Resources;
using System.Security;
using System.Security.Permissions;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about the assembly
[assembly: AssemblyTitle ("System.Reflection.DispatchProxy.dll")]
[assembly: AssemblyDescription ("System.Reflection.DispatchProxy.dll")]
[assembly: AssemblyDefaultAlias ("System.Reflection.DispatchProxy.dll")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile("../msfinal.pub")]
[assembly: SecurityCritical]
[assembly: ComVisible (false)]
@@ -1,11 +0,0 @@
thisdir = class/System.Reflection.DispatchProxy
SUBDIRS =
include ../../build/rules.make
LIBRARY = System.Reflection.DispatchProxy.dll
LIB_REFS = System
LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
@@ -1,5 +0,0 @@
../../build/common/Consts.cs
../../build/common/Locale.cs
../../build/common/MonoTODOAttribute.cs
Assembly/AssemblyInfo.cs
System.Reflection/DispatchProxy.cs
@@ -1,11 +0,0 @@
thisdir = class/System.Runtime.InteropServices.RuntimeInformation
SUBDIRS =
include ../../build/rules.make
LIBRARY = System.Runtime.InteropServices.RuntimeInformation.dll
LIB_REFS = System
LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
@@ -1,9 +0,0 @@
// This *will be* auto-generated file
namespace System.Runtime.InteropServices
{
static class SR
{
public const string Argument_EmptyValue = "Value cannot be empty.";
}
}
@@ -1,7 +0,0 @@
../../build/common/Consts.cs
Assembly/AssemblyInfo.cs
System.Runtime.InteropServices/RuntimeInformation.cs
SR.cs
../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/OSPlatform.cs
../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/Architecture.cs
@@ -1,11 +0,0 @@
thisdir = class/System.Xml.XPath.XmlDocument
SUBDIRS =
include ../../build/rules.make
LIBRARY = System.Xml.XPath.XmlDocument.dll
LIB_REFS = System System.Xml
LIB_MCS_FLAGS =
NO_TEST = yes
include ../../build/library.make
@@ -1,5 +0,0 @@
../../build/common/Consts.cs
../../build/common/Locale.cs
../../build/common/MonoTODOAttribute.cs
Assembly/AssemblyInfo.cs
System.Xml/XmlDocumentXPathExtensions.cs
@@ -36,14 +36,63 @@ namespace Mono.AppleTls
*/
var certificate2 = certificate as X509Certificate2;
if (certificate2 != null)
#if MONOTOUCH
return SecIdentity.Import (certificate2);
#else
return SecImportExport.ItemImport (certificate2);
#endif
/*
* Otherwise, we require the private key to be in the keychain.
* Reading Certificates from the Mac Keychain
* ==========================================
*
* Reading the private key from the keychain is a new feature introduced with
* AppleTls on XamMac and iOS. On Desktop Mono, this new feature has several
* known issues and it also did not received any testing yet. We go back to the old
* way of doing things, which is to explicitly provide an X509Certificate2 with a
* private key.
*
* Keychain Dialog Popups
* ======================
*
* When using Xamarin.Mac or Xamarin.iOS, we try to search the keychain
* for the certificate and private key.
*
* On Xamarin.iOS, this is easy because each app has its own keychain.
*
* On Xamarin.Mac, the .app package needs to be trusted via code-sign
* to get permission to access the user's keychain. [FIXME: I still have to
* research how to actually do that.] Without this, you will get a popup
* message each time, asking you whether you want to allow the app to access
* the keychain, but you can make these go away by selecting "Trust always".
*
* On Desktop Mono, this is problematic because selecting "Trust always"
* give the 'mono' binary (and thus everything you'll ever run with Mono)
* permission to retrieve the private key from the keychain.
*
* This code would also trigger constant keychain popup messages,
* which could only be suppressed by granting full trust. It also makes it
* impossible to run Mono in headless mode.
*
* SecIdentityCreate
* =================
*
* To avoid these problems, we are currently using an undocumented API
* called SecIdentityRef() to avoid using the Mac keychain whenever a
* X509Certificate2 with a private key is used.
*
* On iOS and XamMac, you can still provide the X509Certificate without
* a private key - in this case, a keychain search will be performed (and you
* may get a popup message on XamMac).
*/
#if MOBILE
using (var secCert = new SecCertificate (certificate)) {
return SecKeyChain.FindIdentity (secCert, true);
}
#else
return null;
#endif
}
public static SecIdentity GetIdentity (X509Certificate certificate, out SecCertificate[] intermediateCerts)
+115 -6
View File
@@ -31,6 +31,7 @@
#if SECURITY_DEP && MONO_FEATURE_APPLETLS
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using Mono.Net;
@@ -198,6 +199,8 @@ namespace Mono.AppleTls {
static readonly CFString ImportExportPassphase;
static readonly CFString ImportItemIdentity;
static readonly CFString ImportExportAccess;
static readonly CFString ImportExportKeychain;
static SecIdentity ()
{
@@ -208,6 +211,8 @@ namespace Mono.AppleTls {
try {
ImportExportPassphase = CFObject.GetStringConstant (handle, "kSecImportExportPassphrase");
ImportItemIdentity = CFObject.GetStringConstant (handle, "kSecImportItemIdentity");
ImportExportAccess = CFObject.GetStringConstant (handle, "kSecImportExportAccess");
ImportExportKeychain = CFObject.GetStringConstant (handle, "kSecImportExportKeychain");
} finally {
CFObject.dlclose (handle);
}
@@ -240,16 +245,46 @@ namespace Mono.AppleTls {
}
}
public static SecIdentity Import (byte[] data, string password)
internal class ImportOptions
{
#if !MONOTOUCH
public SecAccess Access {
get; set;
}
public SecKeyChain KeyChain {
get; set;
}
#endif
}
static CFDictionary CreateImportOptions (CFString password, ImportOptions options = null)
{
if (options == null)
return CFDictionary.FromObjectAndKey (password.Handle, ImportExportPassphase.Handle);
var items = new List<Tuple<IntPtr, IntPtr>> ();
items.Add (new Tuple<IntPtr, IntPtr> (ImportExportPassphase.Handle, password.Handle));
#if !MONOTOUCH
if (options.KeyChain != null)
items.Add (new Tuple<IntPtr, IntPtr> (ImportExportKeychain.Handle, options.KeyChain.Handle));
if (options.Access != null)
items.Add (new Tuple<IntPtr, IntPtr> (ImportExportAccess.Handle, options.Access.Handle));
#endif
return CFDictionary.FromKeysAndObjects (items);
}
public static SecIdentity Import (byte[] data, string password, ImportOptions options = null)
{
if (data == null)
throw new ArgumentNullException ("data");
if (string.IsNullOrEmpty (password)) // SecPKCS12Import() doesn't allow empty passwords.
throw new ArgumentException ("password");
using (var pwstring = CFString.Create (password))
using (var options = CFDictionary.FromObjectAndKey (pwstring.Handle, ImportExportPassphase.Handle)) {
using (var optionDict = CreateImportOptions (pwstring, options)) {
CFDictionary [] array;
SecStatusCode result = SecImportExport.ImportPkcs12 (data, options, out array);
SecStatusCode result = SecImportExport.ImportPkcs12 (data, optionDict, out array);
if (result != SecStatusCode.Success)
throw new InvalidOperationException (result.ToString ());
@@ -257,7 +292,7 @@ namespace Mono.AppleTls {
}
}
public static SecIdentity Import (X509Certificate2 certificate)
public static SecIdentity Import (X509Certificate2 certificate, ImportOptions options = null)
{
if (certificate == null)
throw new ArgumentNullException ("certificate");
@@ -270,7 +305,7 @@ namespace Mono.AppleTls {
*/
var password = Guid.NewGuid ().ToString ();
var pkcs12 = certificate.Export (X509ContentType.Pfx, password);
return Import (pkcs12, password);
return Import (pkcs12, password, options);
}
~SecIdentity ()
@@ -301,6 +336,7 @@ namespace Mono.AppleTls {
partial class SecKey : INativeObject, IDisposable {
internal IntPtr handle;
internal IntPtr owner;
public SecKey (IntPtr handle, bool owns = false)
{
@@ -309,6 +345,17 @@ namespace Mono.AppleTls {
CFObject.CFRetain (handle);
}
/*
* SecItemImport() returns a SecArrayRef. We need to free the array, not the items inside it.
*
*/
internal SecKey (IntPtr handle, IntPtr owner)
{
this.handle = handle;
this.owner = owner;
CFObject.CFRetain (owner);
}
[DllImport (AppleTlsContext.SecurityLibrary, EntryPoint="SecKeyGetTypeID")]
public extern static IntPtr GetTypeID ();
@@ -331,11 +378,73 @@ namespace Mono.AppleTls {
protected virtual void Dispose (bool disposing)
{
if (handle != IntPtr.Zero){
if (owner != IntPtr.Zero) {
CFObject.CFRelease (owner);
owner = handle = IntPtr.Zero;
} else if (handle != IntPtr.Zero) {
CFObject.CFRelease (handle);
handle = IntPtr.Zero;
}
}
}
#if !MONOTOUCH
class SecAccess : INativeObject, IDisposable {
internal IntPtr handle;
public SecAccess (IntPtr handle, bool owns = false)
{
this.handle = handle;
if (!owns)
CFObject.CFRetain (handle);
}
~SecAccess ()
{
Dispose (false);
}
public IntPtr Handle {
get {
return handle;
}
}
[DllImport (AppleTlsContext.SecurityLibrary)]
extern static /* OSStatus */ SecStatusCode SecAccessCreate (/* CFStringRef */ IntPtr descriptor, /* CFArrayRef */ IntPtr trustedList, /* SecAccessRef _Nullable * */ out IntPtr accessRef);
public static SecAccess Create (string descriptor)
{
var descriptorHandle = CFString.Create (descriptor);
if (descriptorHandle == null)
throw new InvalidOperationException ();
try {
IntPtr accessRef;
var result = SecAccessCreate (descriptorHandle.Handle, IntPtr.Zero, out accessRef);
if (result != SecStatusCode.Success)
throw new InvalidOperationException (result.ToString ());
return new SecAccess (accessRef, true);
} finally {
descriptorHandle.Dispose ();
}
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (handle != IntPtr.Zero) {
CFObject.CFRelease (handle);
handle = IntPtr.Zero;
}
}
}
#endif
}
#endif
+379 -1
View File
@@ -9,8 +9,386 @@ namespace Mono.AppleTls {
// values are defined in Security.framework/Headers/SecBase.h
enum SecStatusCode {
Success = 0,
DuplicateItem = -25299,
Unimplemented = -4,
DiskFull = -34,
IO = -36,
OpWr = -49,
Param = -50,
WritePermissions = -61,
Allocate = -108,
UserCanceled = -128,
BadReq = -909,
InternalComponent = -2070,
CoreFoundationUnknown = -4960,
NotAvailable = -25291,
ReadOnly = -25292,
AuthFailed = -25293,
NoSuchKeyChain = -25294,
InvalidKeyChain = -25295,
DuplicateKeyChain = -25296,
DuplicateItem = -25299,
ItemNotFound = -25300,
InteractionNotAllowed = -25308,
Decode = -26275,
DuplicateCallback = -25297,
InvalidCallback = -25298,
BufferTooSmall = -25301,
DataTooLarge = -25302,
NoSuchAttribute = -25303,
InvalidItemRef = -25304,
InvalidSearchRef = -25305,
NoSuchClass = -25306,
NoDefaultKeychain = -25307,
ReadOnlyAttribute = -25309,
WrongSecVersion = -25310,
KeySizeNotAllowed = -25311,
NoStorageModule = -25312,
NoCertificateModule = -25313,
NoPolicyModule = -25314,
InteractionRequired = -25315,
DataNotAvailable = -25316,
DataNotModifiable = -25317,
CreateChainFailed = -25318,
InvalidPrefsDomain = -25319,
InDarkWake = -25320,
ACLNotSimple = -25240,
PolicyNotFound = -25241,
InvalidTrustSetting = -25242,
NoAccessForItem = -25243,
InvalidOwnerEdit = -25244,
TrustNotAvailable = -25245,
UnsupportedFormat = -25256,
UnknownFormat = -25257,
KeyIsSensitive = -25258,
MultiplePrivateKeys = -25259,
PassphraseRequired = -25260,
InvalidPasswordRef = -25261,
InvalidTrustSettings = -25262,
NoTrustSettings = -25263,
Pkcs12VerifyFailure = -25264,
NotSigner = -26267,
ServiceNotAvailable = -67585,
InsufficientClientID = -67586,
DeviceReset = -67587,
DeviceFailed = -67588,
AppleAddAppACLSubject = -67589,
ApplePublicKeyIncomplete = -67590,
AppleSignatureMismatch = -67591,
AppleInvalidKeyStartDate = -67592,
AppleInvalidKeyEndDate = -67593,
ConversionError = -67594,
AppleSSLv2Rollback = -67595,
QuotaExceeded = -67596,
FileTooBig = -67597,
InvalidDatabaseBlob = -67598,
InvalidKeyBlob = -67599,
IncompatibleDatabaseBlob = -67600,
IncompatibleKeyBlob = -67601,
HostNameMismatch = -67602,
UnknownCriticalExtensionFlag = -67603,
NoBasicConstraints = -67604,
NoBasicConstraintsCA = -67605,
InvalidAuthorityKeyID = -67606,
InvalidSubjectKeyID = -67607, /* The subject key ID is not valid. */
InvalidKeyUsageForPolicy = -67608, /* The key usage is not valid for the specified policy. */
InvalidExtendedKeyUsage = -67609, /* The extended key usage is not valid. */
InvalidIDLinkage = -67610, /* The ID linkage is not valid. */
PathLengthConstraintExceeded = -67611, /* The path length constraint was exceeded. */
InvalidRoot = -67612, /* The root or anchor certificate is not valid. */
CRLExpired = -67613, /* The CRL has expired. */
CRLNotValidYet = -67614, /* The CRL is not yet valid. */
CRLNotFound = -67615, /* The CRL was not found. */
CRLServerDown = -67616, /* The CRL server is down. */
CRLBadURI = -67617, /* The CRL has a bad Uniform Resource Identifier. */
UnknownCertExtension = -67618, /* An unknown certificate extension was encountered. */
UnknownCRLExtension = -67619, /* An unknown CRL extension was encountered. */
CRLNotTrusted = -67620, /* The CRL is not trusted. */
CRLPolicyFailed = -67621, /* The CRL policy failed. */
IDPFailure = -67622, /* The issuing distribution point was not valid. */
SMIMEEmailAddressesNotFound = -67623, /* An email address mismatch was encountered. */
SMIMEBadExtendedKeyUsage = -67624, /* The appropriate extended key usage for SMIME was not found. */
SMIMEBadKeyUsage = -67625, /* The key usage is not compatible with SMIME. */
SMIMEKeyUsageNotCritical = -67626, /* The key usage extension is not marked as critical. */
SMIMENoEmailAddress = -67627, /* No email address was found in the certificate. */
SMIMESubjAltNameNotCritical = -67628, /* The subject alternative name extension is not marked as critical. */
SSLBadExtendedKeyUsage = -67629, /* The appropriate extended key usage for SSL was not found. */
OCSPBadResponse = -67630, /* The OCSP response was incorrect or could not be parsed. */
OCSPBadRequest = -67631, /* The OCSP request was incorrect or could not be parsed. */
OCSPUnavailable = -67632, /* OCSP service is unavailable. */
OCSPStatusUnrecognized = -67633, /* The OCSP server did not recognize this certificate. */
EndOfData = -67634, /* An end-of-data was detected. */
IncompleteCertRevocationCheck = -67635, /* An incomplete certificate revocation check occurred. */
NetworkFailure = -67636, /* A network failure occurred. */
OCSPNotTrustedToAnchor = -67637, /* The OCSP response was not trusted to a root or anchor certificate. */
RecordModified = -67638, /* The record was modified. */
OCSPSignatureError = -67639, /* The OCSP response had an invalid signature. */
OCSPNoSigner = -67640, /* The OCSP response had no signer. */
OCSPResponderMalformedReq = -67641, /* The OCSP responder was given a malformed request. */
OCSPResponderInternalError = -67642, /* The OCSP responder encountered an internal error. */
OCSPResponderTryLater = -67643, /* The OCSP responder is busy, try again later. */
OCSPResponderSignatureRequired = -67644, /* The OCSP responder requires a signature. */
OCSPResponderUnauthorized = -67645, /* The OCSP responder rejected this request as unauthorized. */
OCSPResponseNonceMismatch = -67646, /* The OCSP response nonce did not match the request. */
CodeSigningBadCertChainLength = -67647, /* Code signing encountered an incorrect certificate chain length. */
CodeSigningNoBasicConstraints = -67648, /* Code signing found no basic constraints. */
CodeSigningBadPathLengthConstraint = -67649, /* Code signing encountered an incorrect path length constraint. */
CodeSigningNoExtendedKeyUsage = -67650, /* Code signing found no extended key usage. */
CodeSigningDevelopment = -67651, /* Code signing indicated use of a development-only certificate. */
ResourceSignBadCertChainLength = -67652, /* Resource signing has encountered an incorrect certificate chain length. */
ResourceSignBadExtKeyUsage = -67653, /* Resource signing has encountered an error in the extended key usage. */
TrustSettingDeny = -67654, /* The trust setting for this policy was set to Deny. */
InvalidSubjectName = -67655, /* An invalid certificate subject name was encountered. */
UnknownQualifiedCertStatement = -67656, /* An unknown qualified certificate statement was encountered. */
MobileMeRequestQueued = -67657, /* The MobileMe request will be sent during the next connection. */
MobileMeRequestRedirected = -67658, /* The MobileMe request was redirected. */
MobileMeServerError = -67659, /* A MobileMe server error occurred. */
MobileMeServerNotAvailable = -67660, /* The MobileMe server is not available. */
MobileMeServerAlreadyExists = -67661, /* The MobileMe server reported that the item already exists. */
MobileMeServerServiceErr = -67662, /* A MobileMe service error has occurred. */
MobileMeRequestAlreadyPending = -67663, /* A MobileMe request is already pending. */
MobileMeNoRequestPending = -67664, /* MobileMe has no request pending. */
MobileMeCSRVerifyFailure = -67665, /* A MobileMe CSR verification failure has occurred. */
MobileMeFailedConsistencyCheck = -67666, /* MobileMe has found a failed consistency check. */
NotInitialized = -67667, /* A function was called without initializing CSSM. */
InvalidHandleUsage = -67668, /* The CSSM handle does not match with the service type. */
PVCReferentNotFound = -67669, /* A reference to the calling module was not found in the list of authorized callers. */
FunctionIntegrityFail = -67670, /* A function address was not within the verified module. */
InternalError = -67671, /* An internal error has occurred. */
MemoryError = -67672, /* A memory error has occurred. */
InvalidData = -67673, /* Invalid data was encountered. */
MDSError = -67674, /* A Module Directory Service error has occurred. */
InvalidPointer = -67675, /* An invalid pointer was encountered. */
SelfCheckFailed = -67676, /* Self-check has failed. */
FunctionFailed = -67677, /* A function has failed. */
ModuleManifestVerifyFailed = -67678, /* A module manifest verification failure has occurred. */
InvalidGUID = -67679, /* An invalid GUID was encountered. */
InvalidHandle = -67680, /* An invalid handle was encountered. */
InvalidDBList = -67681, /* An invalid DB list was encountered. */
InvalidPassthroughID = -67682, /* An invalid passthrough ID was encountered. */
InvalidNetworkAddress = -67683, /* An invalid network address was encountered. */
CRLAlreadySigned = -67684, /* The certificate revocation list is already signed. */
InvalidNumberOfFields = -67685, /* An invalid number of fields were encountered. */
VerificationFailure = -67686, /* A verification failure occurred. */
UnknownTag = -67687, /* An unknown tag was encountered. */
InvalidSignature = -67688, /* An invalid signature was encountered. */
InvalidName = -67689, /* An invalid name was encountered. */
InvalidCertificateRef = -67690, /* An invalid certificate reference was encountered. */
InvalidCertificateGroup = -67691, /* An invalid certificate group was encountered. */
TagNotFound = -67692, /* The specified tag was not found. */
InvalidQuery = -67693, /* The specified query was not valid. */
InvalidValue = -67694, /* An invalid value was detected. */
CallbackFailed = -67695, /* A callback has failed. */
ACLDeleteFailed = -67696, /* An ACL delete operation has failed. */
ACLReplaceFailed = -67697, /* An ACL replace operation has failed. */
ACLAddFailed = -67698, /* An ACL add operation has failed. */
ACLChangeFailed = -67699, /* An ACL change operation has failed. */
InvalidAccessCredentials = -67700, /* Invalid access credentials were encountered. */
InvalidRecord = -67701, /* An invalid record was encountered. */
InvalidACL = -67702, /* An invalid ACL was encountered. */
InvalidSampleValue = -67703, /* An invalid sample value was encountered. */
IncompatibleVersion = -67704, /* An incompatible version was encountered. */
PrivilegeNotGranted = -67705, /* The privilege was not granted. */
InvalidScope = -67706, /* An invalid scope was encountered. */
PVCAlreadyConfigured = -67707, /* The PVC is already configured. */
InvalidPVC = -67708, /* An invalid PVC was encountered. */
EMMLoadFailed = -67709, /* The EMM load has failed. */
EMMUnloadFailed = -67710, /* The EMM unload has failed. */
AddinLoadFailed = -67711, /* The add-in load operation has failed. */
InvalidKeyRef = -67712, /* An invalid key was encountered. */
InvalidKeyHierarchy = -67713, /* An invalid key hierarchy was encountered. */
AddinUnloadFailed = -67714, /* The add-in unload operation has failed. */
LibraryReferenceNotFound = -67715, /* A library reference was not found. */
InvalidAddinFunctionTable = -67716, /* An invalid add-in function table was encountered. */
InvalidServiceMask = -67717, /* An invalid service mask was encountered. */
ModuleNotLoaded = -67718, /* A module was not loaded. */
InvalidSubServiceID = -67719, /* An invalid subservice ID was encountered. */
AttributeNotInContext = -67720, /* An attribute was not in the context. */
ModuleManagerInitializeFailed = -67721, /* A module failed to initialize. */
ModuleManagerNotFound = -67722, /* A module was not found. */
EventNotificationCallbackNotFound = -67723, /* An event notification callback was not found. */
InputLengthError = -67724, /* An input length error was encountered. */
OutputLengthError = -67725, /* An output length error was encountered. */
PrivilegeNotSupported = -67726, /* The privilege is not supported. */
DeviceError = -67727, /* A device error was encountered. */
AttachHandleBusy = -67728, /* The CSP handle was busy. */
NotLoggedIn = -67729, /* You are not logged in. */
AlgorithmMismatch = -67730, /* An algorithm mismatch was encountered. */
KeyUsageIncorrect = -67731, /* The key usage is incorrect. */
KeyBlobTypeIncorrect = -67732, /* The key blob type is incorrect. */
KeyHeaderInconsistent = -67733, /* The key header is inconsistent. */
UnsupportedKeyFormat = -67734, /* The key header format is not supported. */
UnsupportedKeySize = -67735, /* The key size is not supported. */
InvalidKeyUsageMask = -67736, /* The key usage mask is not valid. */
UnsupportedKeyUsageMask = -67737, /* The key usage mask is not supported. */
InvalidKeyAttributeMask = -67738, /* The key attribute mask is not valid. */
UnsupportedKeyAttributeMask = -67739, /* The key attribute mask is not supported. */
InvalidKeyLabel = -67740, /* The key label is not valid. */
UnsupportedKeyLabel = -67741, /* The key label is not supported. */
InvalidKeyFormat = -67742, /* The key format is not valid. */
UnsupportedVectorOfBuffers = -67743, /* The vector of buffers is not supported. */
InvalidInputVector = -67744, /* The input vector is not valid. */
InvalidOutputVector = -67745, /* The output vector is not valid. */
InvalidContext = -67746, /* An invalid context was encountered. */
InvalidAlgorithm = -67747, /* An invalid algorithm was encountered. */
InvalidAttributeKey = -67748, /* A key attribute was not valid. */
MissingAttributeKey = -67749, /* A key attribute was missing. */
InvalidAttributeInitVector = -67750, /* An init vector attribute was not valid. */
MissingAttributeInitVector = -67751, /* An init vector attribute was missing. */
InvalidAttributeSalt = -67752, /* A salt attribute was not valid. */
MissingAttributeSalt = -67753, /* A salt attribute was missing. */
InvalidAttributePadding = -67754, /* A padding attribute was not valid. */
MissingAttributePadding = -67755, /* A padding attribute was missing. */
InvalidAttributeRandom = -67756, /* A random number attribute was not valid. */
MissingAttributeRandom = -67757, /* A random number attribute was missing. */
InvalidAttributeSeed = -67758, /* A seed attribute was not valid. */
MissingAttributeSeed = -67759, /* A seed attribute was missing. */
InvalidAttributePassphrase = -67760, /* A passphrase attribute was not valid. */
MissingAttributePassphrase = -67761, /* A passphrase attribute was missing. */
InvalidAttributeKeyLength = -67762, /* A key length attribute was not valid. */
MissingAttributeKeyLength = -67763, /* A key length attribute was missing. */
InvalidAttributeBlockSize = -67764, /* A block size attribute was not valid. */
MissingAttributeBlockSize = -67765, /* A block size attribute was missing. */
InvalidAttributeOutputSize = -67766, /* An output size attribute was not valid. */
MissingAttributeOutputSize = -67767, /* An output size attribute was missing. */
InvalidAttributeRounds = -67768, /* The number of rounds attribute was not valid. */
MissingAttributeRounds = -67769, /* The number of rounds attribute was missing. */
InvalidAlgorithmParms = -67770, /* An algorithm parameters attribute was not valid. */
MissingAlgorithmParms = -67771, /* An algorithm parameters attribute was missing. */
InvalidAttributeLabel = -67772, /* A label attribute was not valid. */
MissingAttributeLabel = -67773, /* A label attribute was missing. */
InvalidAttributeKeyType = -67774, /* A key type attribute was not valid. */
MissingAttributeKeyType = -67775, /* A key type attribute was missing. */
InvalidAttributeMode = -67776, /* A mode attribute was not valid. */
MissingAttributeMode = -67777, /* A mode attribute was missing. */
InvalidAttributeEffectiveBits = -67778, /* An effective bits attribute was not valid. */
MissingAttributeEffectiveBits = -67779, /* An effective bits attribute was missing. */
InvalidAttributeStartDate = -67780, /* A start date attribute was not valid. */
MissingAttributeStartDate = -67781, /* A start date attribute was missing. */
InvalidAttributeEndDate = -67782, /* An end date attribute was not valid. */
MissingAttributeEndDate = -67783, /* An end date attribute was missing. */
InvalidAttributeVersion = -67784, /* A version attribute was not valid. */
MissingAttributeVersion = -67785, /* A version attribute was missing. */
InvalidAttributePrime = -67786, /* A prime attribute was not valid. */
MissingAttributePrime = -67787, /* A prime attribute was missing. */
InvalidAttributeBase = -67788, /* A base attribute was not valid. */
MissingAttributeBase = -67789, /* A base attribute was missing. */
InvalidAttributeSubprime = -67790, /* A subprime attribute was not valid. */
MissingAttributeSubprime = -67791, /* A subprime attribute was missing. */
InvalidAttributeIterationCount = -67792, /* An iteration count attribute was not valid. */
MissingAttributeIterationCount = -67793, /* An iteration count attribute was missing. */
InvalidAttributeDLDBHandle = -67794, /* A database handle attribute was not valid. */
MissingAttributeDLDBHandle = -67795, /* A database handle attribute was missing. */
InvalidAttributeAccessCredentials = -67796, /* An access credentials attribute was not valid. */
MissingAttributeAccessCredentials = -67797, /* An access credentials attribute was missing. */
InvalidAttributePublicKeyFormat = -67798, /* A public key format attribute was not valid. */
MissingAttributePublicKeyFormat = -67799, /* A public key format attribute was missing. */
InvalidAttributePrivateKeyFormat = -67800, /* A private key format attribute was not valid. */
MissingAttributePrivateKeyFormat = -67801, /* A private key format attribute was missing. */
InvalidAttributeSymmetricKeyFormat = -67802, /* A symmetric key format attribute was not valid. */
MissingAttributeSymmetricKeyFormat = -67803, /* A symmetric key format attribute was missing. */
InvalidAttributeWrappedKeyFormat = -67804, /* A wrapped key format attribute was not valid. */
MissingAttributeWrappedKeyFormat = -67805, /* A wrapped key format attribute was missing. */
StagedOperationInProgress = -67806, /* A staged operation is in progress. */
StagedOperationNotStarted = -67807, /* A staged operation was not started. */
VerifyFailed = -67808, /* A cryptographic verification failure has occurred. */
QuerySizeUnknown = -67809, /* The query size is unknown. */
BlockSizeMismatch = -67810, /* A block size mismatch occurred. */
PublicKeyInconsistent = -67811, /* The public key was inconsistent. */
DeviceVerifyFailed = -67812, /* A device verification failure has occurred. */
InvalidLoginName = -67813, /* An invalid login name was detected. */
AlreadyLoggedIn = -67814, /* The user is already logged in. */
InvalidDigestAlgorithm = -67815, /* An invalid digest algorithm was detected. */
InvalidCRLGroup = -67816, /* An invalid CRL group was detected. */
CertificateCannotOperate = -67817, /* The certificate cannot operate. */
CertificateExpired = -67818, /* An expired certificate was detected. */
CertificateNotValidYet = -67819, /* The certificate is not yet valid. */
CertificateRevoked = -67820, /* The certificate was revoked. */
CertificateSuspended = -67821, /* The certificate was suspended. */
InsufficientCredentials = -67822, /* Insufficient credentials were detected. */
InvalidAction = -67823, /* The action was not valid. */
InvalidAuthority = -67824, /* The authority was not valid. */
VerifyActionFailed = -67825, /* A verify action has failed. */
InvalidCertAuthority = -67826, /* The certificate authority was not valid. */
InvalidCRLAuthority = -67827, /* The CRL authority was not valid. */
#if MONOMAC
[Obsolete ("Use InvalidCRLAuthority")]
InvaldCRLAuthority = InvalidCRLAuthority,
#endif
InvalidCRLEncoding = -67828, /* The CRL encoding was not valid. */
InvalidCRLType = -67829, /* The CRL type was not valid. */
InvalidCRL = -67830, /* The CRL was not valid. */
InvalidFormType = -67831, /* The form type was not valid. */
InvalidID = -67832, /* The ID was not valid. */
InvalidIdentifier = -67833, /* The identifier was not valid. */
InvalidIndex = -67834, /* The index was not valid. */
InvalidPolicyIdentifiers = -67835, /* The policy identifiers are not valid. */
InvalidTimeString = -67836, /* The time specified was not valid. */
InvalidReason = -67837, /* The trust policy reason was not valid. */
InvalidRequestInputs = -67838, /* The request inputs are not valid. */
InvalidResponseVector = -67839, /* The response vector was not valid. */
InvalidStopOnPolicy = -67840, /* The stop-on policy was not valid. */
InvalidTuple = -67841, /* The tuple was not valid. */
MultipleValuesUnsupported = -67842, /* Multiple values are not supported. */
NotTrusted = -67843, /* The trust policy was not trusted. */
NoDefaultAuthority = -67844, /* No default authority was detected. */
RejectedForm = -67845, /* The trust policy had a rejected form. */
RequestLost = -67846, /* The request was lost. */
RequestRejected = -67847, /* The request was rejected. */
UnsupportedAddressType = -67848, /* The address type is not supported. */
UnsupportedService = -67849, /* The service is not supported. */
InvalidTupleGroup = -67850, /* The tuple group was not valid. */
InvalidBaseACLs = -67851, /* The base ACLs are not valid. */
InvalidTupleCredentials = -67852, /* The tuple credentials are not valid. */
#if MONOMAC
[Obsolete ("Use InvalidTupleCredentials")]
InvalidTupleCredendtials = InvalidTupleCredentials,
#endif
InvalidEncoding = -67853, /* The encoding was not valid. */
InvalidValidityPeriod = -67854, /* The validity period was not valid. */
InvalidRequestor = -67855, /* The requestor was not valid. */
RequestDescriptor = -67856, /* The request descriptor was not valid. */
InvalidBundleInfo = -67857, /* The bundle information was not valid. */
InvalidCRLIndex = -67858, /* The CRL index was not valid. */
NoFieldValues = -67859, /* No field values were detected. */
UnsupportedFieldFormat = -67860, /* The field format is not supported. */
UnsupportedIndexInfo = -67861, /* The index information is not supported. */
UnsupportedLocality = -67862, /* The locality is not supported. */
UnsupportedNumAttributes = -67863, /* The number of attributes is not supported. */
UnsupportedNumIndexes = -67864, /* The number of indexes is not supported. */
UnsupportedNumRecordTypes = -67865, /* The number of record types is not supported. */
FieldSpecifiedMultiple = -67866, /* Too many fields were specified. */
IncompatibleFieldFormat = -67867, /* The field format was incompatible. */
InvalidParsingModule = -67868, /* The parsing module was not valid. */
DatabaseLocked = -67869, /* The database is locked. */
DatastoreIsOpen = -67870, /* The data store is open. */
MissingValue = -67871, /* A missing value was detected. */
UnsupportedQueryLimits = -67872, /* The query limits are not supported. */
UnsupportedNumSelectionPreds = -67873, /* The number of selection predicates is not supported. */
UnsupportedOperator = -67874, /* The operator is not supported. */
InvalidDBLocation = -67875, /* The database location is not valid. */
InvalidAccessRequest = -67876, /* The access request is not valid. */
InvalidIndexInfo = -67877, /* The index information is not valid. */
InvalidNewOwner = -67878, /* The new owner is not valid. */
InvalidModifyMode = -67879, /* The modify mode is not valid. */
MissingRequiredExtension = -67880, /* A required certificate extension is missing. */
ExtendedKeyUsageNotCritical = -67881, /* The extended key usage extension was not marked critical. */
TimestampMissing = -67882, /* A timestamp was expected but was not found. */
TimestampInvalid = -67883, /* The timestamp was not valid. */
TimestampNotTrusted = -67884, /* The timestamp was not trusted. */
TimestampServiceNotAvailable = -67885, /* The timestamp service is not available. */
TimestampBadAlg = -67886, /* An unrecognized or unsupported Algorithm Identifier in timestamp. */
TimestampBadRequest = -67887, /* The timestamp transaction is not permitted or supported. */
TimestampBadDataFormat = -67888, /* The timestamp data submitted has the wrong format. */
TimestampTimeNotAvailable = -67889, /* The time source for the Timestamp Authority is not available. */
TimestampUnacceptedPolicy = -67890, /* The requested policy is not supported by the Timestamp Authority. */
TimestampUnacceptedExtension = -67891, /* The requested extension is not supported by the Timestamp Authority. */
TimestampAddInfoNotAvailable = -67892, /* The additional information requested is not available. */
TimestampSystemFailure = -67893, /* The timestamp request cannot be handled due to system failure. */
SigningTimeMissing = -67894, /* A signing time was expected but was not found. */
TimestampRejection = -67895, /* A timestamp transaction was rejected. */
TimestampWaiting = -67896, /* A timestamp transaction is waiting. */
TimestampRevocationWarning = -67897, /* A timestamp authority revocation warning was issued. */
TimestampRevocationNotification = -67898, /* A timestamp authority revocation notification was issued. */
}
// typedef uint32_t SecTrustResultType;
+164 -2
View File
@@ -1,4 +1,4 @@
#if SECURITY_DEP && MONO_FEATURE_APPLETLS
#if SECURITY_DEP && MONO_FEATURE_APPLETLS
//
// ImportExport.cs
//
@@ -29,9 +29,17 @@
using System;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using ObjCRuntime;
using Mono.Net;
#if MONO_FEATURE_BTLS
using Mono.Btls;
#else
using Mono.Security.Cryptography;
#endif
namespace Mono.AppleTls {
internal partial class SecImportExport {
@@ -54,9 +62,163 @@ namespace Mono.AppleTls {
IntPtr handle;
SecStatusCode code = SecPKCS12Import (data.Handle, options.Handle, out handle);
array = CFArray.ArrayFromHandle <CFDictionary> (handle, h => new CFDictionary (h, false));
CFObject.CFRelease (handle);
if (handle != IntPtr.Zero)
CFObject.CFRelease (handle);
return code;
}
#if !MONOTOUCH
[DllImport (AppleTlsContext.SecurityLibrary)]
extern static SecStatusCode SecItemImport (
/* CFDataRef */ IntPtr importedData,
/* CFStringRef */ IntPtr fileNameOrExtension, // optional
/* SecExternalFormat* */ ref SecExternalFormat inputFormat, // optional, IN/OUT
/* SecExternalItemType* */ ref SecExternalItemType itemType, // optional, IN/OUT
/* SecItemImportExportFlags */ SecItemImportExportFlags flags,
/* const SecItemImportExportKeyParameters* */ IntPtr keyParams, // optional
/* SecKeychainRef */ IntPtr importKeychain, // optional
/* CFArrayRef* */ out IntPtr outItems);
static public CFArray ItemImport (byte[] buffer, string password)
{
using (var data = CFData.FromData (buffer))
using (var pwstring = CFString.Create (password)) {
SecItemImportExportKeyParameters keyParams = new SecItemImportExportKeyParameters ();
keyParams.passphrase = pwstring.Handle;
return ItemImport (data, SecExternalFormat.PKCS12, SecExternalItemType.Aggregate, SecItemImportExportFlags.None, keyParams);
}
}
static CFArray ItemImport (CFData data, SecExternalFormat format, SecExternalItemType itemType,
SecItemImportExportFlags flags = SecItemImportExportFlags.None,
SecItemImportExportKeyParameters? keyParams = null)
{
return ItemImport (data, ref format, ref itemType, flags, keyParams);
}
static CFArray ItemImport (CFData data, ref SecExternalFormat format, ref SecExternalItemType itemType,
SecItemImportExportFlags flags = SecItemImportExportFlags.None,
SecItemImportExportKeyParameters? keyParams = null)
{
IntPtr keyParamsPtr = IntPtr.Zero;
if (keyParams != null) {
keyParamsPtr = Marshal.AllocHGlobal (Marshal.SizeOf (keyParams.Value));
if (keyParamsPtr == IntPtr.Zero)
throw new OutOfMemoryException ();
Marshal.StructureToPtr (keyParams.Value, keyParamsPtr, false);
}
IntPtr result;
var status = SecItemImport (data.Handle, IntPtr.Zero, ref format, ref itemType, flags, keyParamsPtr, IntPtr.Zero, out result);
if (keyParamsPtr != IntPtr.Zero)
Marshal.FreeHGlobal (keyParamsPtr);
if (status != SecStatusCode.Success)
throw new NotSupportedException (status.ToString ());
return new CFArray (result, true);
}
[DllImport (AppleTlsContext.SecurityLibrary)]
extern static /* SecIdentityRef */ IntPtr SecIdentityCreate (
/* CFAllocatorRef */ IntPtr allocator,
/* SecCertificateRef */ IntPtr certificate,
/* SecKeyRef */ IntPtr privateKey);
static public SecIdentity ItemImport (X509Certificate2 certificate)
{
if (!certificate.HasPrivateKey)
throw new NotSupportedException ();
using (var key = ImportPrivateKey (certificate))
using (var cert = new SecCertificate (certificate)) {
var identity = SecIdentityCreate (IntPtr.Zero, cert.Handle, key.Handle);
if (CFType.GetTypeID (identity) != SecIdentity.GetTypeID ())
throw new InvalidOperationException ();
return new SecIdentity (identity, true);
}
}
static byte[] ExportKey (RSA key)
{
#if MONO_FEATURE_BTLS
using (var btlsKey = MonoBtlsKey.CreateFromRSAPrivateKey (key))
return btlsKey.GetBytes (true);
#else
return PKCS8.PrivateKeyInfo.Encode (key);
#endif
}
static SecKey ImportPrivateKey (X509Certificate2 certificate)
{
if (!certificate.HasPrivateKey)
throw new NotSupportedException ();
CFArray items;
using (var data = CFData.FromData (ExportKey ((RSA)certificate.PrivateKey)))
items = ItemImport (data, SecExternalFormat.OpenSSL, SecExternalItemType.PrivateKey);
try {
if (items.Count != 1)
throw new InvalidOperationException ("Private key import failed.");
var imported = items[0];
if (CFType.GetTypeID (imported) != SecKey.GetTypeID ())
throw new InvalidOperationException ("Private key import doesn't return SecKey.");
return new SecKey (imported, items.Handle);
} finally {
items.Dispose ();
}
}
const int SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION = 0;
// Native enum; don't change.
enum SecExternalFormat : int {
Unknown = 0,
OpenSSL = 1,
X509Cert = 9,
PEMSequence = 10,
PKCS7 = 11,
PKCS12 = 12
}
// Native enum; don't change.
enum SecExternalItemType : int {
Unknown = 0,
PrivateKey = 1,
PublicKey = 2,
SessionKey = 3,
Certificate = 4,
Aggregate = 5
}
// Native enum; don't change
enum SecItemImportExportFlags : int {
None,
PemArmour = 0x00000001, /* exported blob is PEM formatted */
}
// Native struct; don't change
[StructLayout (LayoutKind.Sequential)]
struct SecItemImportExportKeyParameters {
public int version; /* SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION */
public int flags; /* SecKeyImportExportFlags bits */
public IntPtr passphrase; /* SecExternalFormat.PKCS12 only. Legal types are CFStringRef and CFDataRef. */
IntPtr alertTitle;
IntPtr alertPrompt;
public IntPtr accessRef; /* SecAccessRef */
IntPtr keyUsage;
IntPtr keyAttributes;
}
#endif
}
}
#endif
+160 -62
View File
@@ -1,4 +1,4 @@
#if SECURITY_DEP && MONO_FEATURE_APPLETLS
#if SECURITY_DEP && MONO_FEATURE_APPLETLS
//
// Items.cs: Implements the KeyChain query access APIs
//
@@ -40,13 +40,32 @@ using Mono.Net;
namespace Mono.AppleTls {
enum SecKind {
Identity
Identity,
Certificate
}
#if MONOTOUCH
static class SecKeyChain {
static readonly IntPtr MatchLimitAll;
static readonly IntPtr MatchLimitOne;
static readonly IntPtr MatchLimit;
#else
class SecKeyChain : INativeObject, IDisposable {
#endif
internal static readonly IntPtr MatchLimitAll;
internal static readonly IntPtr MatchLimitOne;
internal static readonly IntPtr MatchLimit;
#if !MONOTOUCH
IntPtr handle;
internal SecKeyChain (IntPtr handle, bool owns = false)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("Invalid handle");
this.handle = handle;
if (!owns)
CFObject.CFRetain (handle);
}
#endif
static SecKeyChain ()
{
@@ -98,39 +117,47 @@ namespace Mono.AppleTls {
return null;
}
public static INativeObject[] QueryAsReference (SecRecord query, int max, out SecStatusCode result)
static INativeObject [] QueryAsReference (SecRecord query, int max, out SecStatusCode result)
{
if (query == null){
if (query == null) {
result = SecStatusCode.Param;
return null;
}
using (var copy = query.queryDict.MutableCopy ()) {
using (var copy = query.QueryDict.MutableCopy ()) {
copy.SetValue (CFBoolean.True.Handle, SecItem.ReturnRef);
SetLimit (copy, max);
IntPtr ptr;
result = SecItem.SecItemCopyMatching (copy.Handle, out ptr);
if ((result == SecStatusCode.Success) && (ptr != IntPtr.Zero)) {
var array = CFArray.ArrayFromHandle<INativeObject> (ptr, p => {
IntPtr cfType = CFType.GetTypeID (p);
if (cfType == SecCertificate.GetTypeID ())
return new SecCertificate (p, true);
else if (cfType == SecKey.GetTypeID ())
return new SecKey (p, true);
else if (cfType == SecIdentity.GetTypeID ())
return new SecIdentity (p, true);
else
throw new Exception (String.Format ("Unexpected type: 0x{0:x}", cfType));
});
return array;
}
return null;
return QueryAsReference (copy, out result);
}
}
static CFNumber SetLimit (CFMutableDictionary dict, int max)
static INativeObject [] QueryAsReference (CFDictionary query, out SecStatusCode result)
{
if (query == null) {
result = SecStatusCode.Param;
return null;
}
IntPtr ptr;
result = SecItem.SecItemCopyMatching (query.Handle, out ptr);
if (result == SecStatusCode.Success && ptr != IntPtr.Zero) {
var array = CFArray.ArrayFromHandle<INativeObject> (ptr, p => {
IntPtr cfType = CFType.GetTypeID (p);
if (cfType == SecCertificate.GetTypeID ())
return new SecCertificate (p, true);
if (cfType == SecKey.GetTypeID ())
return new SecKey (p, true);
if (cfType == SecIdentity.GetTypeID ())
return new SecIdentity (p, true);
throw new Exception (String.Format ("Unexpected type: 0x{0:x}", cfType));
});
return array;
}
return null;
}
internal static CFNumber SetLimit (CFMutableDictionary dict, int max)
{
CFNumber n = null;
IntPtr val;
@@ -142,47 +169,61 @@ namespace Mono.AppleTls {
n = CFNumber.FromInt32 (max);
val = n.Handle;
}
dict.SetValue (val, SecKeyChain.MatchLimit);
return n;
}
}
class SecRecord : IDisposable {
static readonly IntPtr SecClassKey;
static SecRecord ()
#if !MONOTOUCH
[DllImport (AppleTlsContext.SecurityLibrary)]
extern static /* OSStatus */ SecStatusCode SecKeychainCreate (/* const char * */ IntPtr pathName, uint passwordLength, /* const void * */ IntPtr password,
bool promptUser, /* SecAccessRef */ IntPtr initialAccess,
/* SecKeychainRef _Nullable * */ out IntPtr keychain);
internal static SecKeyChain Create (string pathName, string password)
{
var handle = CFObject.dlopen (AppleTlsContext.SecurityLibrary, 0);
if (handle == IntPtr.Zero)
return;
IntPtr handle;
var pathNamePtr = Marshal.StringToHGlobalAnsi (pathName);
var passwordPtr = Marshal.StringToHGlobalAnsi (password);
var result = SecKeychainCreate (pathNamePtr, (uint)password.Length, passwordPtr, false, IntPtr.Zero, out handle);
if (result != SecStatusCode.Success)
throw new InvalidOperationException (result.ToString ());
return new SecKeyChain (handle, true);
}
try {
SecClassKey = CFObject.GetIntPtr (handle, "kSecClassKey");
[DllImport (AppleTlsContext.SecurityLibrary)]
extern static /* OSStatus */ SecStatusCode SecKeychainOpen (/* const char * */ IntPtr pathName, /* SecKeychainRef _Nullable * */ out IntPtr keychain);
internal static SecKeyChain Open (string pathName)
{
IntPtr handle;
IntPtr pathNamePtr = IntPtr.Zero;
try {
pathNamePtr = Marshal.StringToHGlobalAnsi (pathName);
var result = SecKeychainOpen (pathNamePtr, out handle);
if (result != SecStatusCode.Success)
throw new InvalidOperationException (result.ToString ());
return new SecKeyChain (handle, true);
} finally {
CFObject.dlclose (handle);
if (pathNamePtr != IntPtr.Zero)
Marshal.FreeHGlobal (pathNamePtr);
}
}
// Fix <= iOS 6 Behaviour - Desk #83099
// NSCFDictionary: mutating method sent to immutable object
// iOS 6 returns an inmutable NSDictionary handle and when we try to set its values it goes kaboom
// By explicitly calling `MutableCopy` we ensure we always have a mutable reference we expect that.
CFDictionary _queryDict;
internal CFDictionary queryDict
{
get {
return _queryDict;
}
set {
_queryDict = value != null ? value.Copy () : null;
}
}
public SecRecord (SecKind secKind)
internal static SecKeyChain OpenSystemRootCertificates ()
{
var kind = SecClass.FromSecKind (secKind);
queryDict = CFDictionary.FromObjectAndKey (kind, SecClassKey);
return Open ("/System/Library/Keychains/SystemRootCertificates.keychain");
}
~SecKeyChain ()
{
Dispose (false);
}
public IntPtr Handle {
get {
return handle;
}
}
public void Dispose ()
@@ -193,10 +234,61 @@ namespace Mono.AppleTls {
protected virtual void Dispose (bool disposing)
{
if (queryDict != null){
if (handle != IntPtr.Zero) {
CFObject.CFRelease (handle);
handle = IntPtr.Zero;
}
}
#endif
}
class SecRecord : IDisposable {
internal static readonly IntPtr SecClassKey;
static SecRecord ()
{
var handle = CFObject.dlopen (AppleTlsContext.SecurityLibrary, 0);
if (handle == IntPtr.Zero)
return;
try {
SecClassKey = CFObject.GetIntPtr (handle, "kSecClass");
} finally {
CFObject.dlclose (handle);
}
}
CFMutableDictionary _queryDict;
internal CFMutableDictionary QueryDict {
get {
return _queryDict;
}
}
internal void SetValue (IntPtr key, IntPtr value)
{
_queryDict.SetValue (key, value);
}
public SecRecord (SecKind secKind)
{
var kind = SecClass.FromSecKind (secKind);
_queryDict = CFMutableDictionary.Create ();
_queryDict.SetValue (SecClassKey, kind);
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (_queryDict != null){
if (disposing){
queryDict.Dispose ();
queryDict = null;
_queryDict.Dispose ();
_queryDict = null;
}
}
}
@@ -209,6 +301,7 @@ namespace Mono.AppleTls {
partial class SecItem {
public static readonly IntPtr ReturnRef;
public static readonly IntPtr MatchSearchList;
static SecItem ()
{
@@ -218,6 +311,7 @@ namespace Mono.AppleTls {
try {
ReturnRef = CFObject.GetIntPtr (handle, "kSecReturnRef");
MatchSearchList = CFObject.GetIntPtr (handle, "kSecMatchSearchList");
} finally {
CFObject.dlclose (handle);
}
@@ -230,6 +324,7 @@ namespace Mono.AppleTls {
static partial class SecClass {
public static readonly IntPtr Identity;
public static readonly IntPtr Certificate;
static SecClass ()
{
@@ -237,8 +332,9 @@ namespace Mono.AppleTls {
if (handle == IntPtr.Zero)
return;
try {
try {
Identity = CFObject.GetIntPtr (handle, "kSecClassIdentity");
Certificate = CFObject.GetIntPtr (handle, "kSecClassCertificate");
} finally {
CFObject.dlclose (handle);
}
@@ -249,6 +345,8 @@ namespace Mono.AppleTls {
switch (secKind){
case SecKind.Identity:
return Identity;
case SecKind.Certificate:
return Certificate;
default:
throw new ArgumentException ("secKind");
}
@@ -161,18 +161,28 @@ namespace Mono.Net.Security
if (providerRegistration != null)
return;
providerRegistration = new Dictionary<string,string> ();
providerRegistration.Add ("legacy", "Mono.Net.Security.LegacyTlsProvider");
if (Platform.IsMacOS)
providerRegistration.Add ("default", "Mono.AppleTls.AppleTlsProvider");
else
providerRegistration.Add ("default", "Mono.Net.Security.LegacyTlsProvider");
if (IsBtlsSupported ())
providerRegistration.Add ("btls", "Mono.Btls.MonoBtlsProvider");
string legacyProvider = "Mono.Net.Security.LegacyTlsProvider";
providerRegistration.Add ("legacy", legacyProvider);
string defaultProvider = null;
if (IsBtlsSupported ()) {
var btlsProvider = "Mono.Btls.MonoBtlsProvider";
providerRegistration.Add ("btls", btlsProvider);
defaultProvider = btlsProvider;
}
providerRegistration.Add ("apple", "Mono.AppleTls.AppleTlsProvider");
if (Platform.IsMacOS) {
var appleProvider = "Mono.AppleTls.AppleTlsProvider";
providerRegistration.Add ("apple", appleProvider);
defaultProvider = appleProvider;
}
if (defaultProvider == null)
defaultProvider = legacyProvider;
providerRegistration.Add ("default", defaultProvider);
X509Helper2.Initialize ();
}
}
@@ -48,6 +48,9 @@ namespace Mono.Audio {
protected uint chunk_size;
static AudioDevice TryAlsa (string name) {
#if XAMMAC_4_5
return null;
#else
AudioDevice dev;
try {
dev = new AlsaDevice (name);
@@ -55,6 +58,7 @@ namespace Mono.Audio {
} catch {
return null;
}
#endif
}
public static AudioDevice CreateDevice (string name) {
@@ -87,6 +91,7 @@ namespace Mono.Audio {
}
}
#if !XAMMAC_4_5
class AlsaDevice: AudioDevice, IDisposable {
IntPtr handle;
IntPtr hw_param;
@@ -319,6 +324,7 @@ namespace Mono.Audio {
snd_pcm_drain (handle);
}
}
#endif
}
@@ -901,12 +901,11 @@ namespace System.Net.Sockets
SocketAsyncResult ares;
if (!GetCheckedIPs (e, out addresses)) {
e.socket_async_result.EndPoint = e.RemoteEndPoint;
//NOTE: DualMode may cause Socket's RemoteEndpoint to differ in AddressFamily from the
// SocketAsyncEventArgs, but the SocketAsyncEventArgs itself is not changed
ares = (SocketAsyncResult) BeginConnect (e.RemoteEndPoint, ConnectAsyncCallback, e);
} else {
DnsEndPoint dep = (e.RemoteEndPoint as DnsEndPoint);
e.socket_async_result.Addresses = addresses;
e.socket_async_result.Port = dep.Port;
DnsEndPoint dep = (DnsEndPoint)e.RemoteEndPoint;
ares = (SocketAsyncResult) BeginConnect (addresses, dep.Port, ConnectAsyncCallback, e);
}
@@ -984,8 +983,8 @@ namespace System.Net.Sockets
sockares.Complete (new SocketException ((int) SocketError.AddressNotAvailable), true);
return sockares;
}
remoteEP = RemapIPEndPoint (ep);
sockares.EndPoint = remoteEP = RemapIPEndPoint (ep);
}
int error = 0;
@@ -97,6 +97,8 @@ namespace System.Net {
stream = ssl_stream.AuthenticatedStream;
}
timer = new Timer (OnTimeout, null, Timeout.Infinite, Timeout.Infinite);
if (ssl_stream != null)
ssl_stream.AuthenticateAsServer (cert, true, (SslProtocols)ServicePointManager.SecurityProtocol, false);
Init ();
}
@@ -110,10 +112,6 @@ namespace System.Net {
void Init ()
{
if (ssl_stream != null) {
ssl_stream.AuthenticateAsServer (cert, true, (SslProtocols)ServicePointManager.SecurityProtocol, false);
}
context_bound = false;
i_stream = null;
o_stream = null;
+27 -4
View File
@@ -47,7 +47,7 @@ namespace Mono.Net
public static extern IntPtr dlopen (string path, int mode);
[DllImport (SystemLibrary)]
public static extern IntPtr dlsym (IntPtr handle, string symbol);
static extern IntPtr dlsym (IntPtr handle, string symbol);
[DllImport (SystemLibrary)]
public static extern void dlclose (IntPtr handle);
@@ -469,7 +469,18 @@ namespace Mono.Net
{
return new CFDictionary (CFDictionaryCreate (IntPtr.Zero, new IntPtr[] { key }, new IntPtr [] { obj }, (IntPtr)1, KeyCallbacks, ValueCallbacks), true);
}
public static CFDictionary FromKeysAndObjects (IList<Tuple<IntPtr,IntPtr>> items)
{
var keys = new IntPtr [items.Count];
var values = new IntPtr [items.Count];
for (int i = 0; i < items.Count; i++) {
keys [i] = items [i].Item1;
values [i] = items [i].Item2;
}
return new CFDictionary (CFDictionaryCreate (IntPtr.Zero, keys, values, (IntPtr)items.Count, KeyCallbacks, ValueCallbacks), true);
}
[DllImport (CoreFoundationLibrary)]
extern static IntPtr CFDictionaryCreate (IntPtr allocator, IntPtr[] keys, IntPtr[] vals, IntPtr len, IntPtr keyCallbacks, IntPtr valCallbacks);
@@ -513,8 +524,20 @@ namespace Mono.Net
CFDictionarySetValue (Handle, key, val);
}
public static CFMutableDictionary Create ()
{
var handle = CFDictionaryCreateMutable (IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
if (handle == IntPtr.Zero)
throw new InvalidOperationException ();
return new CFMutableDictionary (handle, true);
}
[DllImport (CoreFoundationLibrary)]
extern static void CFDictionarySetValue (IntPtr handle, IntPtr key, IntPtr val);
[DllImport (CoreFoundationLibrary)]
extern static IntPtr CFDictionaryCreateMutable (IntPtr allocator, IntPtr capacity, IntPtr keyCallback, IntPtr valueCallbacks);
}
internal class CFUrl : CFObject
@@ -1249,8 +1272,8 @@ namespace Mono.Net
if (handle == IntPtr.Zero)
return;
try {
True = new CFBoolean (CFObject.dlsym (handle, "kCFBooleanTrue"), false);
False = new CFBoolean (CFObject.dlsym (handle, "kCFBooleanFalse"), false);
True = new CFBoolean (CFObject.GetCFObjectHandle (handle, "kCFBooleanTrue"), false);
False = new CFBoolean (CFObject.GetCFObjectHandle (handle, "kCFBooleanFalse"), false);
}
finally {
CFObject.dlclose (handle);
@@ -1016,6 +1016,18 @@ namespace System.Net
IAsyncResult result = null;
try {
result = s.BeginWrite (buffer, offset, size, cb, state);
} catch (ObjectDisposedException) {
lock (this) {
if (Data.request != request)
return null;
}
throw;
} catch (IOException e) {
SocketException se = e.InnerException as SocketException;
if (se != null && se.SocketErrorCode == SocketError.NotConnected) {
return null;
}
throw;
} catch (Exception) {
status = WebExceptionStatus.SendFailure;
throw;
@@ -1123,7 +1123,7 @@ namespace MonoTests.System.Diagnostics
}
[Test]
[ExpectedException(typeof(InvalidOperationException))]
[NUnit.Framework.Category ("NotWorking")] //Getting the name of init works fine on Android and Linux, but fails on OSX, SELinux and iOS
public void HigherPrivilegeProcessName ()
{
if (!RunningOnUnix)
@@ -1133,6 +1133,7 @@ namespace MonoTests.System.Diagnostics
}
[Test]
[NUnit.Framework.Category ("AndroidNotWorking")] //SELinux makes probing the parent process impossible
public void NonChildProcessWaitForExit ()
{
if (!RunningOnUnix)
@@ -1156,6 +1157,7 @@ namespace MonoTests.System.Diagnostics
}
[Test]
[NUnit.Framework.Category ("AndroidNotWorking")] //SELinux makes probing the parent process impossible
public void NonChildProcessName ()
{
if (!RunningOnUnix)
@@ -1170,6 +1172,7 @@ namespace MonoTests.System.Diagnostics
}
[Test]
[NUnit.Framework.Category ("AndroidNotWorking")] //SELinux makes probing the parent process impossible
public void NonChildProcessId ()
{
if (!RunningOnUnix)
@@ -4620,6 +4620,8 @@ namespace MonoTests.System.Net.Sockets
client.DualMode = true;
var ar1 = client.BeginConnect (ep, BCCallback, client);
Assert.IsTrue (BCCalledBack.WaitOne (10000), "#1");
Assert.AreEqual(server.AddressFamily, client.RemoteEndPoint.AddressFamily, "#2");
Assert.AreEqual(server.AddressFamily, client.LocalEndPoint.AddressFamily, "#3");
client.Disconnect (false);
client.Close ();
@@ -4627,7 +4629,9 @@ namespace MonoTests.System.Net.Sockets
client = new Socket (AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
client.DualMode = true;
var ar2 = client.BeginConnect (IPAddress.Loopback, ep.Port, BCCallback, client);
Assert.IsTrue (BCCalledBack.WaitOne (10000), "#2");
Assert.IsTrue (BCCalledBack.WaitOne (10000), "#4");
Assert.AreEqual(server.AddressFamily, client.RemoteEndPoint.AddressFamily, "#5");
Assert.AreEqual(server.AddressFamily, client.LocalEndPoint.AddressFamily, "#6");
client.Disconnect (false);
client.Close ();
@@ -4635,7 +4639,9 @@ namespace MonoTests.System.Net.Sockets
client = new Socket (AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
client.DualMode = true;
var ar3 = client.BeginConnect (new [] {IPAddress.Loopback}, ep.Port, BCCallback, client);
Assert.IsTrue (BCCalledBack.WaitOne (10000), "#2");
Assert.IsTrue (BCCalledBack.WaitOne (10000), "#7");
Assert.AreEqual(server.AddressFamily, client.RemoteEndPoint.AddressFamily, "#8");
Assert.AreEqual(server.AddressFamily, client.LocalEndPoint.AddressFamily, "#9");
client.Disconnect (false);
client.Close();
}
+2 -15
View File
@@ -37,7 +37,7 @@ namespace MonoTests.System.Net
IAsyncResult async = Dns.BeginGetHostByName (site1Name, null, null);
IPHostEntry entry = Dns.EndGetHostByName (async);
SubTestValidIPHostEntry (entry);
Assert.IsTrue (entry.HostName == "google-public-dns-a.google.com");
Assert.AreEqual ("google-public-dns-a.google.com", entry.HostName, "#1");
}
[Test]
@@ -219,26 +219,13 @@ namespace MonoTests.System.Net
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
[NUnit.Framework.Category ("AndroidNotWorking")] //Some Android devices like to return catch-all IPs for invalid host names.
public void GetHostByName ()
{
SubTestGetHostByName (site1Name, site1Dot);
SubTestGetHostByName (site2Name, site2Dot);
try {
var entry = Dns.GetHostByName (noneExistingSite);
/*
* Work around broken t-online.de DNS Server.
*
* T-Online's DNS Server for DSL Customers resolves
* non-exisitng domain names to
* http://navigationshilfe1.t-online.de/dnserror?url=....
* instead of reporting an error.
*/
var navigationshilfe1 = IPAddress.Parse ("80.156.86.78");
var navigationshilfe2 = IPAddress.Parse ("62.157.140.133");
foreach (var addr in entry.AddressList) {
if (addr.Equals (navigationshilfe1) || addr.Equals (navigationshilfe2))
return;
}
Assert.Fail ("Should raise a SocketException (assuming that '" + noneExistingSite + "' does not exist)");
} catch (SocketException) {
}
+1 -1
View File
@@ -1 +1 @@
#include common.sources
#include mobile_System.dll.sources
+1 -1
View File
@@ -1 +1 @@
#include common.sources
#include mobile_System.dll.sources
+1 -1
View File
@@ -65,7 +65,7 @@ $(csc_MCS_image): $(csc_MCS_dll) $(runtime_dep)
$(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_MCS_image) --debug $(csc_MCS_dll) || (cat $(PROFILE)_aot.log; exit 1)
$(csc_SRM_image): $(csc_SRM_dll) $(runtime_dep)
$(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_SRM_image) --debug $(csc_SRM_dll) || (cat $(PROFILE)_aot.log; exit 1)
$(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_SRM_image) --debug --apply-bindings=$(csc_exe).config $(csc_SRM_dll) || (cat $(PROFILE)_aot.log; exit 1)
$(csc_SCI_image): $(csc_SCI_dll) $(runtime_dep)
$(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version$(profile_arg),outfile=$(csc_SCI_image) --debug $(csc_SCI_dll) || (cat $(PROFILE)_aot.log; exit 1)
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if WIN_PLATFORM
#if WIN_PLATFORM || XAMMAC_4_5
using System;
using System.Text;
Loaded 100 of 174 files, more files were not shown because too many files have changed in this diff. Show more