mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
Compare commits
502
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a7b8af8c4 | ||
|
|
0341e1fe48 | ||
|
|
25a2f3c30a | ||
|
|
bec53f1408 | ||
|
|
26e18c0dc8 | ||
|
|
0e2d4331e2 | ||
|
|
9ac5bf2f02 | ||
|
|
8aed84d16d | ||
|
|
6a097608e5 | ||
|
|
df82e0775c | ||
|
|
9b5bcfb740 | ||
|
|
e33b8850ad | ||
|
|
4760ebf8f1 | ||
|
|
16453a8e98 | ||
|
|
c3385c4b93 | ||
|
|
e5f4843417 | ||
|
|
8ca2285894 | ||
|
|
ba7f16981e | ||
|
|
78c1011587 | ||
|
|
afc625c7a3 | ||
|
|
bfe78373f0 | ||
|
|
135ebeecfc | ||
|
|
084f91256b | ||
|
|
2aade3299a | ||
|
|
2b1791a189 | ||
|
|
ad21f86ce4 | ||
|
|
6f90ed1612 | ||
|
|
214f1d3582 | ||
|
|
62b78ef7eb | ||
|
|
2ce39b5677 | ||
|
|
0de3c27f0e | ||
|
|
bce6ecb205 | ||
|
|
1bdd465b2c | ||
|
|
e0faa61821 | ||
|
|
fd447a82fa | ||
|
|
25d7403976 | ||
|
|
4cf4ce8380 | ||
|
|
05491f8e34 | ||
|
|
f11214c2b9 | ||
|
|
8a89435e61 | ||
|
|
cd26828a8e | ||
|
|
cf9ec6d715 | ||
|
|
0e142e1ac4 | ||
|
|
dd8ecf3a1d | ||
|
|
52b33a97f8 | ||
|
|
0c793ed911 | ||
|
|
61002255ab | ||
|
|
b02e6216c9 | ||
|
|
28d9c96aec | ||
|
|
51e93d4f4c | ||
|
|
eae40d43e0 | ||
|
|
ac56f51c12 | ||
|
|
f4096a8128 | ||
|
|
1bd57d124a | ||
|
|
0181639447 | ||
|
|
a3ad9dcefa | ||
|
|
bd4ac72845 | ||
|
|
549577783b | ||
|
|
c38864e93c | ||
|
|
cb2b62de5c | ||
|
|
798f8800f2 | ||
|
|
5412bf83f4 | ||
|
|
498a47eab3 | ||
|
|
0c88911717 | ||
|
|
8a272caeb7 | ||
|
|
dd3ec5387e | ||
|
|
a414782e79 | ||
|
|
6fb1799afd | ||
|
|
f15b641caa | ||
|
|
e0baa814b0 | ||
|
|
9e8f0ee257 | ||
|
|
7e89965aed | ||
|
|
da06f25114 | ||
|
|
6e9281a325 | ||
|
|
038ff4a439 | ||
|
|
b61b37b192 | ||
|
|
d9a9f4edf5 | ||
|
|
335aa396c9 | ||
|
|
e4df973be9 | ||
|
|
75c4e9e2ec | ||
|
|
28aec735e4 | ||
|
|
991a5177e8 | ||
|
|
521fc975d7 | ||
|
|
2fa80018e9 | ||
|
|
d5e3a644ba | ||
|
|
a35b282ab8 | ||
|
|
2b01b54eaf | ||
|
|
0e7e6acf97 | ||
|
|
60fbf13e0d | ||
|
|
e56681a5b1 | ||
|
|
20ba0fa18c | ||
|
|
d18e04fb82 | ||
|
|
b17cb80f03 | ||
|
|
0062606983 | ||
|
|
4fb5d0a83f | ||
|
|
7042e7de8a | ||
|
|
0531e5d86e | ||
|
|
91bd1f1596 | ||
|
|
ff5dc2a04c | ||
|
|
6a79b26d42 | ||
|
|
57cbadd21a | ||
|
|
ad24537514 | ||
|
|
cbaaac5b40 | ||
|
|
d2de9a0652 | ||
|
|
940a7c4827 | ||
|
|
df81fe40c5 | ||
|
|
ae7ea78de8 | ||
|
|
1e31bd78e6 | ||
|
|
8a1a7d51be | ||
|
|
9153ecfe60 | ||
|
|
01d3930018 | ||
|
|
29827d656b | ||
|
|
2bd5559653 | ||
|
|
bc647488db | ||
|
|
ded59a04ce | ||
|
|
6f4130a485 | ||
|
|
7f6d9038eb | ||
|
|
6b66745741 | ||
|
|
9b0d22277e | ||
|
|
aca1492e70 | ||
|
|
6c326d3938 | ||
|
|
d2623ed2af | ||
|
|
b50663aceb | ||
|
|
8fd763d4cd | ||
|
|
b7df98a4e1 | ||
|
|
5e1b0a0252 | ||
|
|
1f515263ca | ||
|
|
902b4a903d | ||
|
|
aa07a3cd80 | ||
|
|
07a1753c51 | ||
|
|
b89ab049a0 | ||
|
|
5dfd0f3802 | ||
|
|
2148d34f9f | ||
|
|
d2891e0c2e | ||
|
|
896fa81970 | ||
|
|
2eda626316 | ||
|
|
2a38c3fad8 | ||
|
|
7335f3aa1f | ||
|
|
87f3182f8f | ||
|
|
c14675323c | ||
|
|
7deecb5006 | ||
|
|
41cce14fe5 | ||
|
|
37fe814682 | ||
|
|
99f12ea907 | ||
|
|
4c51a5caac | ||
|
|
87181decdc | ||
|
|
36dd163c91 | ||
|
|
67121311ab | ||
|
|
05c682197b | ||
|
|
d990810997 | ||
|
|
e6aa904d9d | ||
|
|
93bd12af10 | ||
|
|
5f07299b3d | ||
|
|
42027df368 | ||
|
|
f5fbc321b4 | ||
|
|
890670ab80 | ||
|
|
fab452a7a8 | ||
|
|
ffdf97bd50 | ||
|
|
f2f40fa60e | ||
|
|
3fac1383a3 | ||
|
|
1514322fc9 | ||
|
|
db3db35fe8 | ||
|
|
20e0914e03 | ||
|
|
2949ce7ead | ||
|
|
868c619fd0 | ||
|
|
8093a8f124 | ||
|
|
9182938d25 | ||
|
|
f63ae59412 | ||
|
|
77a1de7001 | ||
|
|
230cd898d1 | ||
|
|
d3399c8233 | ||
|
|
f3857e2a10 | ||
|
|
a6ef4bc024 | ||
|
|
0bb2b5c69b | ||
|
|
ee6362dff3 | ||
|
|
de92ba6397 | ||
|
|
6094da8d8e | ||
|
|
f42685a7ef | ||
|
|
def42333a4 | ||
|
|
4c3e3e9760 | ||
|
|
7def1ee268 | ||
|
|
ca9e4a836e | ||
|
|
c606270c9b | ||
|
|
ace3b63d26 | ||
|
|
800dbae049 | ||
|
|
128491307c | ||
|
|
479888bec9 | ||
|
|
c55bf4ad91 | ||
|
|
e6b9ba8908 | ||
|
|
2365067bda | ||
|
|
dea12ad837 | ||
|
|
161569b8ba | ||
|
|
504fd1bea6 | ||
|
|
f4b4f97fc8 | ||
|
|
76c1bcb099 | ||
|
|
4bf6c02cc0 | ||
|
|
c7cb8e90ad | ||
|
|
8dc83f0c68 | ||
|
|
d2927b605a | ||
|
|
972c7e8998 | ||
|
|
a87e8cd4a9 | ||
|
|
26cf538ac6 | ||
|
|
e27a0c066f | ||
|
|
204d3695c7 | ||
|
|
75cd6fb9f8 | ||
|
|
241c64c46f | ||
|
|
f2448c8a85 | ||
|
|
a2d8263be9 | ||
|
|
e8f4c7c216 | ||
|
|
9129faee43 | ||
|
|
ffecf56a40 | ||
|
|
2b31b6957b | ||
|
|
18f6b64356 | ||
|
|
4e4a87dddb | ||
|
|
5396c60248 | ||
|
|
7ece22c72f | ||
|
|
c44892d7d4 | ||
|
|
c42036b51b | ||
|
|
b153e1d93d | ||
|
|
2a8afac254 | ||
|
|
244124e617 | ||
|
|
e51aa0a704 | ||
|
|
03e08ac9b5 | ||
|
|
d8e83dff76 | ||
|
|
d38b7ffedd | ||
|
|
7c0ec405fc | ||
|
|
a06e82f6c0 | ||
|
|
43558a209d | ||
|
|
bc72a85bea | ||
|
|
16b8979fd1 | ||
|
|
8b8d4c41d2 | ||
|
|
8864f4c6e9 | ||
|
|
5807bf100a | ||
|
|
78619b1580 | ||
|
|
9fa2060ae2 | ||
|
|
5c8fb06829 | ||
|
|
c9a67ffc5a | ||
|
|
6ec4d74fb7 | ||
|
|
c023b2b30a | ||
|
|
6a0acd9a03 | ||
|
|
9f4abcc38a | ||
|
|
085b653a74 | ||
|
|
a2ebdcf9de | ||
|
|
482548a503 | ||
|
|
90c3eb80e7 | ||
|
|
012d17c539 | ||
|
|
036d1c8deb | ||
|
|
4917a53814 | ||
|
|
a63e7484e0 | ||
|
|
e41ab19f36 | ||
|
|
9c54615875 | ||
|
|
279597ca63 | ||
|
|
953a8cb68d | ||
|
|
17814af191 | ||
|
|
52925e9fd0 | ||
|
|
f40ef277f6 | ||
|
|
8be6ecc66f | ||
|
|
c101a34944 | ||
|
|
24a439d9b7 | ||
|
|
412e531404 | ||
|
|
1db9061145 | ||
|
|
27210fe3dd | ||
|
|
b7a0a48637 | ||
|
|
d6fdb0187f | ||
|
|
c7ed10cd30 | ||
|
|
fa6fba7f8b | ||
|
|
a9abf98848 | ||
|
|
d6aba05c4d | ||
|
|
d4e09f5c35 | ||
|
|
04a376b2ab | ||
|
|
f15d5eb557 | ||
|
|
bdf32af198 | ||
|
|
4fbcd0a817 | ||
|
|
2613ab4063 | ||
|
|
bd1dc2169c | ||
|
|
da5839ee45 | ||
|
|
4865590736 | ||
|
|
6e8bb472af | ||
|
|
90699022b6 | ||
|
|
f07d3d7f1d | ||
|
|
0e6db9e499 | ||
|
|
6d39b0c188 | ||
|
|
97588a349d | ||
|
|
5cbb67c54c | ||
|
|
c84d659693 | ||
|
|
1085ce7424 | ||
|
|
46379bda6d | ||
|
|
dca5ff953f | ||
|
|
8594aa3456 | ||
|
|
79baed228a | ||
|
|
4fde35fdfb | ||
|
|
de6a46ee3c | ||
|
|
1ac809aad7 | ||
|
|
b77e7ab021 | ||
|
|
1a55680bfa | ||
|
|
0865083699 | ||
|
|
cd557f4992 | ||
|
|
4a3b9d4bce | ||
|
|
e897a5d7e4 | ||
|
|
4919fb1938 | ||
|
|
9bd0647bba | ||
|
|
bd34946f14 | ||
|
|
9c029cc9cd | ||
|
|
f41c45460f | ||
|
|
e066377aea | ||
|
|
d28e482915 | ||
|
|
ecbbb82986 | ||
|
|
ead28ef4ed | ||
|
|
d1a58bc9bb | ||
|
|
951f3c8837 | ||
|
|
ba04892f92 | ||
|
|
fb01e0742c | ||
|
|
960ae16ebc | ||
|
|
9638ee9ece | ||
|
|
1b234b0667 | ||
|
|
6209317c15 | ||
|
|
3090df7136 | ||
|
|
08c6cb22b7 | ||
|
|
e66a9c7086 | ||
|
|
de8c6e6e42 | ||
|
|
0851acb468 | ||
|
|
9bcb1f5081 | ||
|
|
815b3b210a | ||
|
|
4e283b76d2 | ||
|
|
33670c335f | ||
|
|
18bea6c1c0 | ||
|
|
50fdd4483d | ||
|
|
1598ce194b | ||
|
|
5f612a6044 | ||
|
|
fa98e7cc3b | ||
|
|
fad0111583 | ||
|
|
b1d68b0200 | ||
|
|
7b2a96fbd3 | ||
|
|
04379d5d73 | ||
|
|
cd1b0b8edf | ||
|
|
81b800cf0c | ||
|
|
c462f4e603 | ||
|
|
f9b5ea2d04 | ||
|
|
053458ce22 | ||
|
|
40bd0c0bce | ||
|
|
efaeebcb60 | ||
|
|
c09e0d9ee5 | ||
|
|
d99a0d5382 | ||
|
|
a1b9700735 | ||
|
|
613fbda594 | ||
|
|
6efdbf52f1 | ||
|
|
a32cff4490 | ||
|
|
a13a0a6764 | ||
|
|
aa5012088e | ||
|
|
3bba08400b | ||
|
|
dc6448964a | ||
|
|
0e0b1537db | ||
|
|
9259c0d43b | ||
|
|
3af315a5f8 | ||
|
|
27e89dadba | ||
|
|
323c660694 | ||
|
|
6d68435660 | ||
|
|
4b18517404 | ||
|
|
ee6bfbb041 | ||
|
|
00a04f8feb | ||
|
|
84fb54be56 | ||
|
|
70db685357 | ||
|
|
fa7a3ddc9b | ||
|
|
c910d330c3 | ||
|
|
36662ae5c8 | ||
|
|
e614f44499 | ||
|
|
5bfd110124 | ||
|
|
8340747664 | ||
|
|
60fc6c5649 | ||
|
|
9f5247c4b3 | ||
|
|
30633ffd58 | ||
|
|
3a1da6e5c9 | ||
|
|
9014c62f06 | ||
|
|
17c2e47270 | ||
|
|
7c8d6480e0 | ||
|
|
5d0406ce13 | ||
|
|
43babda1a0 | ||
|
|
cac2b2402e | ||
|
|
3e22fd4852 | ||
|
|
e1b914a97f | ||
|
|
f5f92d5d39 | ||
|
|
99342a6654 | ||
|
|
c4e7de38d5 | ||
|
|
1f533cf45b | ||
|
|
3ecb96bc26 | ||
|
|
818fd2a032 | ||
|
|
b2b6a6effa | ||
|
|
510399644b | ||
|
|
60fdc682f1 | ||
|
|
9167d1def0 | ||
|
|
96e2b7d9ea | ||
|
|
d5ab942572 | ||
|
|
2849de826a | ||
|
|
074e535380 | ||
|
|
f9f1147466 | ||
|
|
3f46eb6b06 | ||
|
|
099ddf1b78 | ||
|
|
cf30f6102c | ||
|
|
c03c5c8e5a | ||
|
|
bf6cffb88e | ||
|
|
dd7e330373 | ||
|
|
7c88bf755e | ||
|
|
4d28eb4b88 | ||
|
|
baebc1d8c0 | ||
|
|
2602c52de4 | ||
|
|
deac4585cb | ||
|
|
f04a619165 | ||
|
|
30fabaedd3 | ||
|
|
7002264dd2 | ||
|
|
b894d5ce4a | ||
|
|
9827f491f0 | ||
|
|
b39ff26269 | ||
|
|
f0f53513f3 | ||
|
|
e81c051ab3 | ||
|
|
90d6fc7082 | ||
|
|
36ffc29d19 | ||
|
|
ec7374048f | ||
|
|
9e46b5744b | ||
|
|
6392e1746f | ||
|
|
a71f2b45c6 | ||
|
|
07fc3dc95b | ||
|
|
c5c809d6dc | ||
|
|
334d0f84d9 | ||
|
|
4cbb1922c3 | ||
|
|
b4b21d081b | ||
|
|
63c0803b2b | ||
|
|
fc6b2d359d | ||
|
|
8f689a60fe | ||
|
|
5f174dd217 | ||
|
|
5e454f9c20 | ||
|
|
1935a43f60 | ||
|
|
9437553e54 | ||
|
|
01dcbdd3fc | ||
|
|
aaaead4d5b | ||
|
|
f2ff1683aa | ||
|
|
c5e917ca96 | ||
|
|
18ae0d10fc | ||
|
|
662513e62b | ||
|
|
37b8dc4fab | ||
|
|
0d07c695b5 | ||
|
|
fcc570920d | ||
|
|
c155563d1e | ||
|
|
5b412212cd | ||
|
|
c2e7ca6c99 | ||
|
|
7c3ae83b31 | ||
|
|
ddf9f2359d | ||
|
|
88a98e08c1 | ||
|
|
fc99fc4313 | ||
|
|
84fbbb8de7 | ||
|
|
c162180aee | ||
|
|
18235dfff1 | ||
|
|
5381bdc290 | ||
|
|
1c40419bc7 | ||
|
|
529502bf41 | ||
|
|
2a3e4002ea | ||
|
|
5c2d1761e9 | ||
|
|
f3bd113611 | ||
|
|
58bf33a539 | ||
|
|
feeeb1cd3f | ||
|
|
64ce52fa6a | ||
|
|
3ab4fe29ab | ||
|
|
9208eb2070 | ||
|
|
610984e83b | ||
|
|
b591e86c1a | ||
|
|
81822428e9 | ||
|
|
210801836e | ||
|
|
25d7170248 | ||
|
|
6f075050c2 | ||
|
|
7a87a23651 | ||
|
|
f2558db1a7 | ||
|
|
0bafe8c3c7 | ||
|
|
7b7b7c9b64 | ||
|
|
94acdcf647 | ||
|
|
5da8cfe05d | ||
|
|
95744eb659 | ||
|
|
c05627e24b | ||
|
|
4044840804 | ||
|
|
f484d0d9c0 | ||
|
|
6a5c925b65 | ||
|
|
7919e9abf8 | ||
|
|
1f03b3ff35 | ||
|
|
158a79950a | ||
|
|
52bb524f49 | ||
|
|
919b89954a | ||
|
|
475c58eaff | ||
|
|
6387e9c6d0 | ||
|
|
af086b0c70 | ||
|
|
d341594fac | ||
|
|
45bde6931d | ||
|
|
d364710817 | ||
|
|
66f6456e86 | ||
|
|
4a3bbf5b42 | ||
|
|
3c2e1c56b2 | ||
|
|
fee3014cd3 | ||
|
|
c1c53bcfca | ||
|
|
05b93203a5 | ||
|
|
377041fd6e | ||
|
|
28194f79fe | ||
|
|
9e16432697 | ||
|
|
482ab094eb | ||
|
|
f8a716bf29 | ||
|
|
762d337187 |
No files matched your search
+5
-2
@@ -1,11 +1,14 @@
|
||||
# ensure LF endings on all checkouts
|
||||
configure.ac crlf=input
|
||||
configure.ac crlf=input
|
||||
config.rpath crlf=input
|
||||
configure.host crlf=input
|
||||
mkinstalldirs crlf=input
|
||||
*.sh crlf=input
|
||||
|
||||
# ensure native line endings on checkout
|
||||
*.c crlf
|
||||
*.h crlf
|
||||
*.cs crlf
|
||||
*.sh crlf
|
||||
*.il crlf
|
||||
|
||||
.gitattributes crlf
|
||||
|
||||
@@ -39,3 +39,7 @@
|
||||
path = external/cecil-legacy
|
||||
url = git://github.com/mono/cecil.git
|
||||
branch = mono-legacy-0.9.5
|
||||
[submodule "external/boringssl"]
|
||||
path = external/boringssl
|
||||
url = git://github.com/mono/boringssl.git
|
||||
branch = mono
|
||||
+1
-1
@@ -19,7 +19,7 @@ all: update_submodules
|
||||
|
||||
SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
|
||||
update_submodules:
|
||||
@$(srcdir)/scripts/update_submodules
|
||||
@$(srcdir)/scripts/update_submodules.sh
|
||||
|
||||
.PHONY: update_submodules
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ SYS_REFS = \
|
||||
System.Data.dll \
|
||||
System.Runtime.Serialization.dll \
|
||||
System.Xml.dll \
|
||||
System.Xml.Linq.dll
|
||||
System.Xml.Linq.dll \
|
||||
Mono.Posix.dll
|
||||
|
||||
check-profiler-stress:
|
||||
@$(MAKE) validate-benchmarker RESET_VERSIONS=1
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Xml;
|
||||
using Mono.Unix.Native;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
// Shut up CLS compliance warnings from Json.NET.
|
||||
@@ -10,7 +17,8 @@ using Newtonsoft.Json;
|
||||
namespace Mono.Profiling.Tests.Stress {
|
||||
|
||||
// https://github.com/xamarin/benchmarker/blob/master/tools/libdbmodel/Benchmark.cs
|
||||
class Benchmark {
|
||||
sealed class Benchmark {
|
||||
|
||||
public string Name { get; set; }
|
||||
public string TestDirectory { get; set; }
|
||||
public bool OnlyExplicit { get; set; }
|
||||
@@ -24,8 +32,24 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
}
|
||||
}
|
||||
|
||||
sealed class TestResult {
|
||||
|
||||
public Benchmark Benchmark { get; set; }
|
||||
public ProcessStartInfo StartInfo { get; set; }
|
||||
public Stopwatch Stopwatch { get; set; } = new Stopwatch ();
|
||||
public int? ExitCode { get; set; }
|
||||
public StringBuilder StandardOutput { get; set; } = new StringBuilder ();
|
||||
public StringBuilder StandardError { get; set; } = new StringBuilder ();
|
||||
}
|
||||
|
||||
static class Program {
|
||||
|
||||
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
|
||||
|
||||
static string FilterInvalidXmlChars (string text) {
|
||||
return Regex.Replace (text, @"[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u10000-\u10FFFF]", string.Empty);
|
||||
}
|
||||
|
||||
static int Main ()
|
||||
{
|
||||
var depDir = Path.Combine ("..", "external", "benchmarker");
|
||||
@@ -44,8 +68,7 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
var rand = new Random ();
|
||||
var cpus = Environment.ProcessorCount;
|
||||
|
||||
var successes = 0;
|
||||
var failures = 0;
|
||||
var results = new List<TestResult> (benchmarks.Length);
|
||||
|
||||
var sw = Stopwatch.StartNew ();
|
||||
|
||||
@@ -66,6 +89,8 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
WorkingDirectory = Path.Combine (testDir, bench.TestDirectory),
|
||||
FileName = monoPath,
|
||||
Arguments = $"--debug --profile=log:{profOptions} " + string.Join (" ", bench.CommandLine),
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
};
|
||||
|
||||
info.EnvironmentVariables.Clear ();
|
||||
@@ -77,32 +102,177 @@ namespace Mono.Profiling.Tests.Stress {
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} Running {bench.Name} with profiler options: {profOptions}");
|
||||
Console.ResetColor ();
|
||||
|
||||
var sw2 = Stopwatch.StartNew ();
|
||||
var result = new TestResult {
|
||||
Benchmark = bench,
|
||||
StartInfo = info,
|
||||
};
|
||||
|
||||
using (var proc = Process.Start (info)) {
|
||||
proc.WaitForExit ();
|
||||
sw2.Stop ();
|
||||
using (var proc = new Process ()) {
|
||||
proc.StartInfo = info;
|
||||
|
||||
Console.WriteLine ();
|
||||
proc.OutputDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
result.StandardOutput.AppendLine (args.Data);
|
||||
};
|
||||
|
||||
if (proc.ExitCode != 0)
|
||||
failures++;
|
||||
else
|
||||
successes++;
|
||||
proc.ErrorDataReceived += (sender, args) => {
|
||||
if (args.Data != null)
|
||||
result.StandardError.AppendLine (args.Data);
|
||||
};
|
||||
|
||||
Console.ForegroundColor = proc.ExitCode != 0 ? ConsoleColor.Red : ConsoleColor.Green;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} {bench.Name} took {sw2.Elapsed.ToString ("G")} and exited with code: {proc.ExitCode}");
|
||||
Console.ResetColor ();
|
||||
result.Stopwatch.Start ();
|
||||
|
||||
proc.Start ();
|
||||
|
||||
proc.BeginOutputReadLine ();
|
||||
proc.BeginErrorReadLine ();
|
||||
|
||||
if (!proc.WaitForExit ((int) _timeout.TotalMilliseconds)) {
|
||||
// Force a thread dump.
|
||||
Syscall.kill (proc.Id, Signum.SIGQUIT);
|
||||
Thread.Sleep (1000);
|
||||
|
||||
try {
|
||||
proc.Kill ();
|
||||
} catch (Exception) {
|
||||
}
|
||||
} else
|
||||
result.ExitCode = proc.ExitCode;
|
||||
|
||||
result.Stopwatch.Stop ();
|
||||
}
|
||||
|
||||
var resultStr = result.ExitCode == null ? "timed out" : $"exited with code: {result.ExitCode}";
|
||||
|
||||
Console.ForegroundColor = result.ExitCode != 0 ? ConsoleColor.Red : ConsoleColor.Green;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] {progress} {bench.Name} took {result.Stopwatch.Elapsed.ToString ("G")} and {resultStr}");
|
||||
Console.ResetColor ();
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stdout =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardOutput.ToString ());
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine ("===== stderr =====");
|
||||
Console.ResetColor ();
|
||||
|
||||
Console.WriteLine (result.StandardError.ToString ());
|
||||
}
|
||||
|
||||
results.Add (result);
|
||||
}
|
||||
|
||||
sw.Stop ();
|
||||
|
||||
Console.ForegroundColor = failures != 0 ? ConsoleColor.Red : ConsoleColor.Green;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] Finished with {successes}/{benchmarks.Length} passing tests");
|
||||
var successes = results.Count (r => r.ExitCode == 0);
|
||||
var failures = results.Count (r => r.ExitCode != null && r.ExitCode != 0);
|
||||
var timeouts = results.Count (r => r.ExitCode == null);
|
||||
|
||||
var settings = new XmlWriterSettings {
|
||||
NewLineOnAttributes = true,
|
||||
Indent = true,
|
||||
};
|
||||
|
||||
using (var writer = XmlWriter.Create ("TestResult-profiler-stress.xml", settings)) {
|
||||
writer.WriteStartDocument ();
|
||||
writer.WriteComment ("This file represents the results of running a test suite");
|
||||
|
||||
writer.WriteStartElement ("test-results");
|
||||
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
|
||||
writer.WriteAttributeString ("total", results.Count.ToString ());
|
||||
writer.WriteAttributeString ("failures", failures.ToString ());
|
||||
writer.WriteAttributeString ("not-run", "0");
|
||||
writer.WriteAttributeString ("date", DateTime.Now.ToString ("yyyy-MM-dd"));
|
||||
writer.WriteAttributeString ("time", DateTime.Now.ToString ("HH:mm:ss"));
|
||||
|
||||
writer.WriteStartElement ("environment");
|
||||
writer.WriteAttributeString ("nunit-version", "2.4.8.0");
|
||||
writer.WriteAttributeString ("clr-version", Environment.Version.ToString ());
|
||||
writer.WriteAttributeString ("os-version", Environment.OSVersion.ToString ());
|
||||
writer.WriteAttributeString ("platform", Environment.OSVersion.Platform.ToString ());
|
||||
writer.WriteAttributeString ("cwd", Environment.CurrentDirectory);
|
||||
writer.WriteAttributeString ("machine-name", Environment.MachineName);
|
||||
writer.WriteAttributeString ("user", Environment.UserName);
|
||||
writer.WriteAttributeString ("user-domain", Environment.UserDomainName);
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("culture-info");
|
||||
writer.WriteAttributeString ("current-culture", CultureInfo.CurrentCulture.Name);
|
||||
writer.WriteAttributeString ("current-uiculture", CultureInfo.CurrentUICulture.Name);
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "profiler-stress-tests.dummy");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "MonoTests");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
writer.WriteStartElement ("test-suite");
|
||||
writer.WriteAttributeString ("name", "profiler-stress");
|
||||
writer.WriteAttributeString ("success", (failures + timeouts == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) sw.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", (failures + timeouts).ToString ());
|
||||
writer.WriteStartElement ("results");
|
||||
|
||||
foreach (var result in results) {
|
||||
var timeoutStr = result.ExitCode == null ? "_timeout" : string.Empty;
|
||||
|
||||
writer.WriteStartElement ("test-case");
|
||||
writer.WriteAttributeString ("name", $"MonoTests.profiler-stress.{result.Benchmark.Name}{timeoutStr}");
|
||||
writer.WriteAttributeString ("executed", "True");
|
||||
writer.WriteAttributeString ("success", (result.ExitCode == 0).ToString ());
|
||||
writer.WriteAttributeString ("time", ((int) result.Stopwatch.Elapsed.TotalSeconds).ToString ());
|
||||
writer.WriteAttributeString ("asserts", result.ExitCode == 0 ? "0" : "1");
|
||||
|
||||
if (result.ExitCode != 0) {
|
||||
writer.WriteStartElement ("failure");
|
||||
|
||||
writer.WriteStartElement ("message");
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardOutput.ToString ()));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteStartElement ("stack-trace");
|
||||
writer.WriteCData (FilterInvalidXmlChars (result.StandardError.ToString ()));
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndElement ();
|
||||
|
||||
writer.WriteEndDocument ();
|
||||
}
|
||||
|
||||
var failureStr = failures + timeouts != 0 ? $" ({failures} failures, {timeouts} timeouts)" : string.Empty;
|
||||
|
||||
Console.ForegroundColor = failures + timeouts != 0 ? ConsoleColor.Red : ConsoleColor.Green;
|
||||
Console.WriteLine ($"[{sw.Elapsed.ToString ("G")}] Finished with {successes}/{results.Count} passing tests{failureStr}");
|
||||
Console.ResetColor ();
|
||||
|
||||
return failures;
|
||||
return failures + timeouts;
|
||||
}
|
||||
}
|
||||
}
|
||||
+179
-24
@@ -2,7 +2,7 @@
|
||||
#AC_PREREQ([2.62])
|
||||
|
||||
# when bumping version number below, keep it in sync with man/mono.1 too
|
||||
AC_INIT(mono, [4.7.0],
|
||||
AC_INIT(mono, [4.8.0],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -52,6 +52,8 @@ CPPFLAGS_FOR_LIBGC=$CPPFLAGS
|
||||
CFLAGS_FOR_LIBGC=$CFLAGS
|
||||
CPPFLAGS_FOR_EGLIB=$CPPFLAGS
|
||||
CFLAGS_FOR_EGLIB=$CFLAGS
|
||||
CPPFLAGS_FOR_BTLS=$CPPFLAGS
|
||||
CFLAGS_FOR_BTLS=$CFLAGS
|
||||
|
||||
# libgc uses some deprecated APIs
|
||||
CFLAGS_FOR_LIBGC="$CFLAGS -Wno-deprecated-declarations"
|
||||
@@ -66,7 +68,11 @@ AC_SUBST(libmono_cflags)
|
||||
AC_SUBST(libmono_ldflags)
|
||||
|
||||
# Variable to have relocatable .pc files (lib, or lib64)
|
||||
reloc_libdir=`basename ${libdir}`
|
||||
# realpath isn't always available, and requires that all but the tip of the provided
|
||||
# path exists. Fall back to the old behaviour, but realpath allows depth >1
|
||||
# e.g. Debian puts Mono in /usr/bin and libs in /usr/lib/x86_64-linux-gnu/ which is
|
||||
# too deep for the old method to work
|
||||
reloc_libdir=`realpath --relative-to=${prefix} ${libdir} 2> /dev/null || basename ${libdir}`
|
||||
AC_SUBST(reloc_libdir)
|
||||
|
||||
# Set to yes if Unix sockets cannot be created in an anonymous namespace
|
||||
@@ -941,7 +947,7 @@ 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,
|
||||
security, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
|
||||
security, lldb, 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
|
||||
eval "mono_feature_disable_$feature='yes'"
|
||||
@@ -1091,6 +1097,11 @@ if test "x$mono_feature_disable_security" = "xyes"; then
|
||||
AC_MSG_NOTICE([Disabled CAS/CoreCLR security manager (used e.g. for Moonlight)])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_lldb" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_LLDB, 1, [Disable support code for the LLDB plugin.])
|
||||
AC_MSG_NOTICE([Disabled LLDB plugin support code.])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_sgen_remset" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_SGEN_REMSET, 1, [Disable wbarrier=remset support in SGEN.])
|
||||
AC_MSG_NOTICE([Disabled wbarrier=remset support in SGEN.])
|
||||
@@ -1156,20 +1167,6 @@ AC_COMPILE_IFELSE([
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING(for deprecated __attribute__)
|
||||
AC_TRY_COMPILE([
|
||||
int doit (void) __attribute__ ((deprecated));
|
||||
int doit (void) { return 0; }
|
||||
], [
|
||||
return 0;
|
||||
], [
|
||||
have_deprecated=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
have_deprecated=no
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Boehm GC configuration
|
||||
dnl
|
||||
@@ -2288,6 +2285,8 @@ if test x$host_win32 = xno; then
|
||||
AC_CHECK_FUNCS(system)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
AC_CHECK_FUNCS(accept4)
|
||||
AC_CHECK_FUNCS(getpid)
|
||||
AC_CHECK_FUNCS(localtime_r)
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], ,
|
||||
[#include <sys/types.h>
|
||||
@@ -2666,12 +2665,6 @@ fi
|
||||
|
||||
AC_ARG_ENABLE(bcl-opt, [ --disable-bcl-opt BCL is compiled with no optimizations (allows accurate BCL debugging)], test_bcl_opt=$enableval, test_bcl_opt=yes)
|
||||
|
||||
AC_ARG_ENABLE(perf-events, [ --enable-perf-events Enable using `perf` for profiling on Linux], test_perf_events=$enableval, test_perf_events=no)
|
||||
if test "x$test_perf_events" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_PERF_EVENTS, 1, [Enable using `perf` for profiling on Linux])
|
||||
AC_SUBST(ENABLE_PERF_EVENTS)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if big-arrays are to be enabled])
|
||||
AC_ARG_ENABLE(big-arrays, [ --enable-big-arrays Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
|
||||
if test "x$enable_big_arrays" = "xyes" ; then
|
||||
@@ -2947,6 +2940,8 @@ sizeof_register="SIZEOF_VOID_P"
|
||||
|
||||
jit_wanted=true
|
||||
boehm_supported=true
|
||||
BTLS_SUPPORTED=no
|
||||
BTLS_PLATFORM=
|
||||
case "$host" in
|
||||
mips*)
|
||||
TARGET=MIPS;
|
||||
@@ -2999,9 +2994,14 @@ case "$host" in
|
||||
;;
|
||||
linux*)
|
||||
AOT_SUPPORTED="yes"
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=i386
|
||||
AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no])
|
||||
;;
|
||||
darwin*)
|
||||
AOT_SUPPORTED="yes"
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=i386
|
||||
;;
|
||||
openbsd*|freebsd*|kfreebsd-gnu*)
|
||||
;;
|
||||
@@ -3017,9 +3017,14 @@ case "$host" in
|
||||
case $host_os in
|
||||
linux*)
|
||||
AOT_SUPPORTED="yes"
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=x86_64
|
||||
AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no])
|
||||
;;
|
||||
darwin*)
|
||||
AOT_SUPPORTED="yes"
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=x86_64
|
||||
;;
|
||||
openbsd*|freebsd*|kfreebsd-gnu*)
|
||||
;;
|
||||
@@ -3140,6 +3145,7 @@ HOST=$TARGET
|
||||
if test "x$host" != "x$target"; then
|
||||
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
|
||||
enable_mcs_build=no
|
||||
BTLS_SUPPORTED=no
|
||||
case "$target" in
|
||||
arm*-darwin*)
|
||||
TARGET=ARM;
|
||||
@@ -3425,10 +3431,12 @@ if test "x$target_mach" = "xyes"; then
|
||||
AC_DEFINE(TARGET_WATCHOS,1,[The JIT/AOT targets WatchOS])
|
||||
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
|
||||
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
|
||||
BTLS_SUPPORTED=no
|
||||
elif test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64"; then
|
||||
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
|
||||
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
|
||||
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
|
||||
BTLS_SUPPORTED=no
|
||||
else
|
||||
AC_TRY_COMPILE([#include "TargetConditionals.h"],[
|
||||
#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
|
||||
@@ -3443,6 +3451,7 @@ if test "x$target_mach" = "xyes"; then
|
||||
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
|
||||
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
|
||||
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
|
||||
BTLS_SUPPORTED=no
|
||||
])
|
||||
fi
|
||||
AC_DEFINE(TARGET_MACH,1,[The JIT/AOT targets Apple platforms])
|
||||
@@ -3750,6 +3759,45 @@ if test ${TARGET} = unknown; then
|
||||
AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
|
||||
fi
|
||||
|
||||
if test "x$platform_android" = "xyes"; then
|
||||
case "x${TARGET}" in
|
||||
xARM)
|
||||
case "x$arm_ver" in
|
||||
xARMv5)
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=android-armv5
|
||||
;;
|
||||
xARMv6)
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=android-armv6
|
||||
;;
|
||||
xARMv7)
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=android-armv7
|
||||
;;
|
||||
*)
|
||||
BTLS_SUPPORTED=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
xARM64)
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=android-v8a
|
||||
;;
|
||||
xX86)
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=android-x86
|
||||
;;
|
||||
xAMD64)
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=android-x64
|
||||
;;
|
||||
*)
|
||||
BTLS_SUPPORTED=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test ${ACCESS_UNALIGNED} = no; then
|
||||
CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
|
||||
fi
|
||||
@@ -3872,6 +3920,95 @@ else
|
||||
fi
|
||||
AC_SUBST(LIBMONO_LA)
|
||||
|
||||
dnl **************
|
||||
dnl *** Btls ***
|
||||
dnl **************
|
||||
|
||||
AC_ARG_ENABLE(btls, [ --disable-blts Disable the BoringTls provider], enable_btls=$enableval, enable_btls=$BTLS_SUPPORTED)
|
||||
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
|
||||
|
||||
AC_ARG_ENABLE(dynamic-btls, [ --enable-dynamic-btls Place the BTLS provider into a separate shared library/archive.], enable_dynamic_btls=$enableval, enable_dynamic_btls=no)
|
||||
|
||||
AM_CONDITIONAL(BTLS, test x$enable_btls = xyes)
|
||||
AM_CONDITIONAL(DYNAMIC_BTLS, test x$enable_dynamic_btls = xyes)
|
||||
|
||||
btls_android=no
|
||||
if test "x$enable_btls" = "xyes"; then
|
||||
AC_PATH_PROG(CMAKE, [cmake], [no], [$PATH:/Applications/CMake.app/Contents/bin:/usr/local/bin])
|
||||
if test "x$CMAKE" = "xno"; then
|
||||
AC_MSG_ERROR("cmake not found")
|
||||
fi
|
||||
|
||||
BTLS_ROOT=`cd $srcdir && pwd`/external/boringssl
|
||||
AC_SUBST(BTLS_ROOT)
|
||||
|
||||
btls_arch=
|
||||
btls_cflags=
|
||||
BTLS_CMAKE_ARGS=
|
||||
|
||||
case "$BTLS_PLATFORM" in
|
||||
i386)
|
||||
btls_arch=i386
|
||||
btls_cflags="-m32"
|
||||
case $host_os in
|
||||
darwin*)
|
||||
btls_cflags="$btls_cflags -arch i386"
|
||||
esac
|
||||
;;
|
||||
x86_64)
|
||||
btls_arch=x86_64
|
||||
;;
|
||||
android-armv5)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-armv6)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-armv7)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi-v7a\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-v8a)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"arm64-v8a\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-x86)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
android-x64)
|
||||
BTLS_CMAKE_ARGS="-DANDROID_ABI=\"x86_64\" -DANDROID_NATIVE_API_LEVEL=12"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(Invalid BTLS platform)
|
||||
esac
|
||||
|
||||
if test "x$platform_android" = "xyes"; then
|
||||
btls_android=yes
|
||||
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=$BTLS_ROOT/util/android-cmake/android.toolchain.cmake"
|
||||
if test "x$with_btls_android_ndk" != "x"; then
|
||||
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DANDROID_NDK=\"$with_btls_android_ndk\""
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$btls_arch" != "x"; then
|
||||
BTLS_CMAKE_ARGS="$BTLS_CMAKE_ARGS -DBTLS_ARCH=\"$btls_arch\""
|
||||
fi
|
||||
|
||||
BTLS_CFLAGS="$CPPFLAGS_FOR_BTLS $btls_cflags"
|
||||
AC_SUBST(BTLS_ARCH)
|
||||
AC_SUBST(BTLS_CFLAGS)
|
||||
AC_SUBST(BTLS_PLATFORM)
|
||||
AC_SUBST(BTLS_CMAKE_ARGS)
|
||||
|
||||
AC_DEFINE(HAVE_BTLS, 1, [BoringTls is supported])
|
||||
|
||||
if test "x$enable_dynamic_btls" = "xyes"; then
|
||||
AC_DEFINE(HAVE_DYNAMIC_BTLS, 1, [BTLS in a shared libraty])
|
||||
fi
|
||||
else
|
||||
enable_btls=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(BTLS_ANDROID, test x$btls_android = xyes)
|
||||
|
||||
if test x$DISABLE_MCS_DOCS = xyes; then
|
||||
docs_dir=""
|
||||
else
|
||||
@@ -4108,6 +4245,7 @@ llvm/Makefile
|
||||
scripts/mono-find-provides
|
||||
scripts/mono-find-requires
|
||||
mono/Makefile
|
||||
mono/btls/Makefile
|
||||
mono/utils/Makefile
|
||||
mono/metadata/Makefile
|
||||
mono/dis/Makefile
|
||||
@@ -4178,7 +4316,7 @@ po/Makefile
|
||||
])
|
||||
|
||||
# Update all submodules recursively to ensure everything is checked out
|
||||
$srcdir/scripts/update_submodules
|
||||
$srcdir/scripts/update_submodules.sh
|
||||
|
||||
if test x$host_win32 = xyes; then
|
||||
# Get rid of 'cyg' prefixes in library names
|
||||
@@ -4273,12 +4411,28 @@ fi
|
||||
echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
if test "x$enable_btls" = "xyes"; then
|
||||
echo "HAVE_BTLS=1" >> $srcdir/$mcsdir/build/config.make
|
||||
if test "x$enable_dynamic_btls" = "xyes"; then
|
||||
echo "HAVE_DYNAMIC_BTLS=1" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
)
|
||||
|
||||
libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
|
||||
|
||||
btls_platform_string=
|
||||
if test x$enable_btls = xyes; then
|
||||
if test x$btls_android = xyes; then
|
||||
btls_platform_string=" (android:$BTLS_PLATFORM)"
|
||||
else
|
||||
btls_platform_string=" ($BTLS_PLATFORM)"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "
|
||||
mcs source: $mcsdir
|
||||
|
||||
@@ -4304,6 +4458,7 @@ echo "
|
||||
JNI support: $jdk_headers_found
|
||||
libgdiplus: $libgdiplus_msg
|
||||
zlib: $zlib_msg
|
||||
BTLS: $enable_btls$btls_platform_string
|
||||
$disabled
|
||||
"
|
||||
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
|
||||
<dllmap dll="MonoPosixHelper" target="$mono_libdir/libMonoPosixHelper@libsuffix@" os="!windows" />
|
||||
<dllmap dll="libmono-btls-shared" target="$mono_libdir/libmono-btls-shared@libsuffix@" os="!windows" />
|
||||
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
|
||||
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
|
||||
|
||||
@@ -74,9 +74,6 @@
|
||||
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
|
||||
@@ -118,9 +118,6 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -135,9 +135,6 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -138,9 +138,6 @@
|
||||
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
</webRequestModules>
|
||||
<settings>
|
||||
<ipv6 enabled="false"/>
|
||||
</settings>
|
||||
</system.net>
|
||||
|
||||
<system.runtime.remoting>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <direct.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <io.h>
|
||||
@@ -68,6 +69,26 @@ int mkstemp (char *tmp_template)
|
||||
return fd;
|
||||
}
|
||||
|
||||
gchar *
|
||||
g_mkdtemp (char *tmp_template)
|
||||
{
|
||||
gunichar2* utf16_template;
|
||||
|
||||
utf16_template = u8to16 (tmp_template);
|
||||
|
||||
utf16_template = _wmktemp(utf16_template);
|
||||
if (utf16_template && *utf16_template) {
|
||||
if (_wmkdir (utf16_template) == 0){
|
||||
char *ret = u16to8 (utf16_template);
|
||||
g_free (utf16_template);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (utf16_template);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4701)
|
||||
#endif
|
||||
|
||||
@@ -887,6 +887,12 @@ gboolean g_file_test (const gchar *filename, GFileTest test);
|
||||
#define g_ascii_strtod strtod
|
||||
#define g_ascii_isalnum isalnum
|
||||
|
||||
#ifdef WIN32
|
||||
gchar *g_mkdtemp (gchar *tmpl);
|
||||
#else
|
||||
#define g_mkdtemp mkdtemp
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Pattern matching
|
||||
*/
|
||||
|
||||
+1
Submodule external/boringssl added at c06ac6b33d.
Vendored
+1
-1
Submodule external/buildtools updated: a7dbffc17d...9b6ee8686b.
Vendored
+1
-1
Submodule external/cecil updated: f38c0f5d99...2b39856e80.
Vendored
+1
-1
Submodule external/ikvm updated: 9f44f259bf...367864ef81.
@@ -1,2 +1,4 @@
|
||||
ltconfig crlf=input
|
||||
install-sh crlf=input
|
||||
/BCC_MAKEFILE -crlf
|
||||
/digimars.mak -crlf
|
||||
+42
-7
@@ -24,7 +24,8 @@ dependencies referenced, use the "--deps" command line option.
|
||||
There are two modes of operation, one uses an existing Mono binary or
|
||||
a server-hosted list of binaries and is enabled when you use either
|
||||
the
|
||||
.B --cross
|
||||
.B --cross,
|
||||
.B --sdk
|
||||
or the
|
||||
.B --runtime
|
||||
command line options.
|
||||
@@ -119,10 +120,19 @@ are using (1.0 or 2.0)
|
||||
When passed, DIR will be set for the MONO_CFG_DIR environment variable
|
||||
.TP
|
||||
.I "--cross target"
|
||||
Creates a bundle for the specified target platform. The target
|
||||
must be a directory in ~/.mono/targets/ that contains a "mono"
|
||||
binary. You can fetch various targets using the --fetch-target
|
||||
command line option.
|
||||
Use this to request mkbundle generate a cross-compiled binary. It
|
||||
Creates a bundle for the specified target platform. The target must
|
||||
be a directory in ~/.mono/targets/ that contains an SDK installation
|
||||
as produced by the mono-package-runtime tool. You can get a list of
|
||||
the precompiled versions of the runtime using --list-targets and you
|
||||
can fetch a specific target using the --fetch-target command line
|
||||
option.
|
||||
.Sp
|
||||
This flag is mutually exclusive with
|
||||
.I --sdk
|
||||
which is used to specify an absolute path to resolve the Mono runtime
|
||||
from and the --runtime option which is used to manually construct the
|
||||
cross-platform package.
|
||||
.TP
|
||||
.I "--deps"
|
||||
This option will bundle all of the referenced assemblies for the
|
||||
@@ -159,10 +169,16 @@ flag to bundle all available encodings.
|
||||
Or you can use a comma delimited list of the workds CJK, MidWest,
|
||||
Other, Rare and West to specificy which encoding assemblies to distribute.
|
||||
.TP
|
||||
.TP
|
||||
.I "-L path"
|
||||
Adds the `path' do the search list for assemblies. The rules are the
|
||||
same as for the compiler -lib: or -L flags.
|
||||
.TP
|
||||
.I "--library [LIB,]PATH"
|
||||
Embeds the dynamic library file pointed to by `PATH' and optionally
|
||||
give it the name `LIB' into the bundled executable. This is used to
|
||||
ship native library dependencies that are unpacked at startup and
|
||||
loaded from the runtime.
|
||||
.TP
|
||||
.I "--lists-targets"
|
||||
Lists all of the available local cross compilation targets available
|
||||
as precompiled binaries on the Mono distribution server.
|
||||
@@ -197,7 +213,26 @@ executed.
|
||||
Additionally, users of your binary can still configure their own
|
||||
options by setting the
|
||||
.I MONO_ENV_OPTIONS
|
||||
environment variable.
|
||||
environment variable.
|
||||
.TP
|
||||
.I "--sdk SDK_PATH"
|
||||
Use this flag to specify a path from which mkbundle will resolve the
|
||||
Mono SDK from. The SDK path should be the prefix path that you used
|
||||
to configure a Mono installation. And would typically contain files
|
||||
lik
|
||||
.I SDK_PATH/bin/mono
|
||||
,
|
||||
.I SDK_PATH/lib/mono/4.5
|
||||
and so on.
|
||||
.Sp
|
||||
When this flag is specified,
|
||||
.I mkbundle
|
||||
will resolve the runtime, the framework libraries, unmanaged resources
|
||||
and configuration files from the files located in this directory.
|
||||
.Sp
|
||||
This flag is mutually exlusive with
|
||||
.I --cross
|
||||
.
|
||||
.TP
|
||||
.I "--target-server SERVER"
|
||||
By default the mkbundle tool will download from a Mono server the
|
||||
|
||||
+20
@@ -844,6 +844,26 @@ The offsets displayed are IL offsets.
|
||||
.PP
|
||||
A more powerful coverage tool is available in the module `monocov'.
|
||||
See the monocov(1) man page for details.
|
||||
.SH AOT PROFILING
|
||||
You can improve startup performance by using the AOT profiler.
|
||||
.PP
|
||||
Typically the AOT compiler (\fBmono --aot\fR) will not generate code
|
||||
for generic instantiations. To solve this, you can run Mono with the
|
||||
AOT profiler to find out all the generic instantiations that are used,
|
||||
and then instructing the AOT compiler to produce code for these.
|
||||
.PP
|
||||
This command will run the specified app.exe and produce the
|
||||
\fBout.aotprof\fR file with the data describing the generic
|
||||
instantiations that are needed:
|
||||
.nf
|
||||
$ mono --profile=aot:output=out.aotprof app.exe
|
||||
.fi
|
||||
.PP
|
||||
Once you have this data, you can pass this to Mono's AOT compiler to
|
||||
instruct it to generate code for it:
|
||||
.nf
|
||||
$ mono --aot=profile=out.aotprof
|
||||
.fi
|
||||
.SH DEBUGGING AIDS
|
||||
To debug managed applications, you can use the
|
||||
.B mdb
|
||||
|
||||
+10
-49
@@ -92,7 +92,7 @@ provided by the Mono runtime and write them to a file named
|
||||
\f[I]output.mlpd\f[].
|
||||
When no option is specified, it is equivalent to using:
|
||||
.PP
|
||||
\f[B]--profile=log:calls,alloc,output=output.mlpd,maxframes=8,calldepth=100\f[]
|
||||
\f[B]--profile=log:calls,alloc,output=output.mlpd,maxframes=32,calldepth=100\f[]
|
||||
.PP
|
||||
The following options can be used to modify this default behaviour.
|
||||
Each option is separated from the next by a \f[B],\f[] character,
|
||||
@@ -139,41 +139,16 @@ garbage collections
|
||||
to the control port
|
||||
.RE
|
||||
.IP \[bu] 2
|
||||
\f[I]sample[=TYPE[/FREQ]]\f[]: collect statistical samples of the
|
||||
\f[I]sample[=FREQ]\f[]: collect statistical samples of the
|
||||
program behaviour.
|
||||
The default is to collect a 100 times per second (100 Hz) the
|
||||
instruction pointer.
|
||||
This is equivalent to the value \[lq]cycles/100\[rq].
|
||||
This is equivalent to the value \[lq]100\[rq].
|
||||
A value of zero for \f[I]FREQ\f[] effectively disables sampling.
|
||||
On some systems, like with recent Linux kernels, it is possible to
|
||||
cause the sampling to happen for other events provided by the
|
||||
performance counters of the cpu.
|
||||
In this case, \f[I]TYPE\f[] can be one of:
|
||||
.RS 2
|
||||
.IP \[bu] 2
|
||||
\f[I]cycles\f[]: processor cycles
|
||||
.IP \[bu] 2
|
||||
\f[I]instr\f[]: executed instructions
|
||||
.IP \[bu] 2
|
||||
\f[I]cacherefs\f[]: cache references
|
||||
.IP \[bu] 2
|
||||
\f[I]cachemiss\f[]: cache misses
|
||||
.IP \[bu] 2
|
||||
\f[I]branches\f[]: executed branches
|
||||
.IP \[bu] 2
|
||||
\f[I]branchmiss\f[]: mispredicted branches
|
||||
.RE
|
||||
.IP \[bu] 2
|
||||
\f[I]time=TIMER\f[]: use the TIMER timestamp mode.
|
||||
TIMER can have the following values:
|
||||
.RS 2
|
||||
.IP \[bu] 2
|
||||
\f[I]fast\f[]: a usually faster but possibly more inaccurate timer
|
||||
.RE
|
||||
.IP \[bu] 2
|
||||
\f[I]maxframes=NUM\f[]: when a stack trace needs to be performed,
|
||||
collect \f[I]NUM\f[] frames at the most.
|
||||
The default is 8.
|
||||
The default is 32.
|
||||
.IP \[bu] 2
|
||||
\f[I]maxsamples=NUM\f[]: stop allocating reusable sample events
|
||||
once \f[I]NUM\f[] events have been allocated (a value of zero for
|
||||
@@ -234,16 +209,15 @@ The following commands are available:
|
||||
\f[I]heapshot\f[]: perform a heapshot as soon as possible
|
||||
.RE
|
||||
.IP \[bu] 2
|
||||
\f[I]counters\f[]: sample counters values every 1 second. This allow
|
||||
a really lightweight way to have insight in some of the runtime key
|
||||
metrics. Counters displayed in non verbose mode are : Methods from AOT,
|
||||
Methods JITted using mono JIT, Methods JITted using LLVM, Total time
|
||||
spent JITting (sec), User Time, System Time, Total Time, Working Set,
|
||||
Private Bytes, Virtual Bytes, Page Faults and CPU Load Average (1min,
|
||||
5min and 15min).
|
||||
\f[I]nocounters\f[]: disables sampling of runtime and performance
|
||||
counters, which is normally done every 1 second.
|
||||
.IP \[bu] 2
|
||||
\f[I]coverage\f[]: collect code coverage data. This implies enabling
|
||||
the \f[I]calls\f[] option.
|
||||
.IP \[bu] 2
|
||||
\f[I]onlycoverage\f[]: can only be used with \f[I]coverage\f[]. This
|
||||
disables most other events so that the profiler mostly only collects
|
||||
coverage data.
|
||||
.RE
|
||||
.SS Analyzing the profile data
|
||||
.PP
|
||||
@@ -274,10 +248,6 @@ with the \f[I]--maxframes=NUM\f[] option:
|
||||
The stack trace info will be available if method enter/leave events
|
||||
have been recorded or if stack trace collection wasn't explicitly
|
||||
disabled with the \f[I]maxframes=0\f[] profiler option.
|
||||
Note that the profiler will collect up to 8 frames by default at
|
||||
specific events when the \f[I]nocalls\f[] option is used, so in
|
||||
that case, if more stack frames are required in mprof-report, a
|
||||
bigger value for maxframes when profiling must be used, too.
|
||||
.PP
|
||||
The \f[I]--traces\f[] option also controls the reverse reference
|
||||
feature in the heapshot report: for each class it reports how many
|
||||
@@ -487,15 +457,6 @@ option: especially if the managed heap is big, since every object
|
||||
needs to be inspected.
|
||||
The \f[I]MODE\f[] parameter of the \f[I]heapshot\f[] option can be
|
||||
used to reduce the frequency of the heap shots.
|
||||
.IP "\f[I]Reduce the timestamp overhead\f[]" 4
|
||||
.Sp
|
||||
On many operating systems or architectures what actually slows down
|
||||
profiling is the function provided by the system to get timestamp
|
||||
information.
|
||||
The \f[I]time=fast\f[] profiler option can be usually used to speed
|
||||
up this operation, but, depending on the system, time accounting
|
||||
may have some level of approximation (though statistically the data
|
||||
should be still fairly valuable).
|
||||
.SS Dealing with the size of the data files
|
||||
.PP
|
||||
When collecting a lot of information about a profiled program, huge
|
||||
|
||||
@@ -42,7 +42,9 @@ executable_CLEAN_FILES += $(build_lib) $(build_lib).so $(build_lib).mdb $(build_
|
||||
|
||||
makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag
|
||||
|
||||
ifndef NO_BUILD
|
||||
all-local: $(the_lib) $(PROGRAM_config)
|
||||
endif
|
||||
|
||||
install-local: all-local
|
||||
test-local: all-local
|
||||
|
||||
@@ -22,7 +22,7 @@ PROFILE_MCS_FLAGS = \
|
||||
-d:NET_4_5 \
|
||||
-d:MONO \
|
||||
-d:NETSTANDARD \
|
||||
-d:MOBILE,MOBILE_STATIC,MOBILE_LEGACY \
|
||||
-d:MOBILE,MOBILE_STATIC,MOBILE_LEGACY,ORBIS \
|
||||
-d:FULL_AOT_RUNTIME \
|
||||
-d:DISABLE_REMOTING \
|
||||
-d:DISABLE_COM \
|
||||
@@ -39,6 +39,7 @@ NO_INSTALL = yes
|
||||
MOBILE_STATIC = yes
|
||||
MOBILE_PROFILE = yes
|
||||
NO_VTS_TEST = yes
|
||||
PROFILE_DISABLE_BTLS = yes
|
||||
|
||||
# Note need for trailing comma. If you add, keep it
|
||||
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,PKITS,
|
||||
|
||||
@@ -39,3 +39,5 @@ FRAMEWORK_VERSION = 2.1
|
||||
NO_INSTALL = yes
|
||||
MOBILE_STATIC = yes
|
||||
MOBILE_PROFILE = yes
|
||||
|
||||
PROFILE_DISABLE_BTLS=1
|
||||
@@ -1,9 +1,11 @@
|
||||
include $(topdir)/build/profiles/monotouch.make
|
||||
|
||||
PROFILE_MCS_FLAGS += \
|
||||
-d:FEATURE_NO_BSD_SOCKETS \
|
||||
-d:MONOTOUCH_WATCH
|
||||
|
||||
NO_THREAD_ABORT=1
|
||||
NO_THREAD_SUSPEND_RESUME=1
|
||||
NO_MULTIPLE_APPDOMAINS=1
|
||||
NO_PROCESS_START=1
|
||||
NO_MONO_SECURITY=1
|
||||
@@ -1,6 +1,7 @@
|
||||
include $(topdir)/build/profiles/monotouch_runtime.make
|
||||
|
||||
PROFILE_MCS_FLAGS += \
|
||||
-d:FEATURE_NO_BSD_SOCKETS \
|
||||
-d:MONOTOUCH_WATCH
|
||||
|
||||
NO_THREAD_ABORT=1
|
||||
@@ -8,3 +9,4 @@ NO_THREAD_SUSPEND_RESUME=1
|
||||
# The binding generator (bwatch) still needs to execute processes,
|
||||
# so we need a System.dll that can do that.
|
||||
#NO_PROCESS_START=1
|
||||
NO_MONO_SECURITY=1
|
||||
@@ -35,3 +35,5 @@ NO_TEST = yes
|
||||
NO_INSTALL = yes
|
||||
MOBILE_DYNAMIC = yes
|
||||
MOBILE_PROFILE = yes
|
||||
|
||||
PROFILE_DISABLE_BTLS=1
|
||||
@@ -15,3 +15,5 @@ NO_SYSTEM_DRAWING_DEPENDENCY=1
|
||||
NO_SYSTEM_SERVICEMODEL_ACTIVATION_DEPENDENCY=1
|
||||
NO_SYSTEM_DESIGN_DEPENDENCY=1
|
||||
NO_SYSTEM_DIRECTORY_SERVICES_DEPENDENCY=1
|
||||
|
||||
PROFILE_DISABLE_BTLS=1
|
||||
@@ -196,7 +196,12 @@ AOT_PROFILE_ASSEMBLIES = $(shell $(AOT_PROFILE_ASSEMBLIES_CMD_SAFE))
|
||||
|
||||
# This can run in parallel
|
||||
.PHONY: aot-all-profile
|
||||
ifdef AOT_BUILD_FLAGS
|
||||
aot-all-profile: $(patsubst %,$(topdir)/class/lib/$(PROFILE)/%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_ASSEMBLIES))
|
||||
else
|
||||
aot-all-profile:
|
||||
echo AOT_BUILD_FLAGS not set, skipping AOT.
|
||||
endif
|
||||
|
||||
$(topdir)/class/lib/$(PROFILE)/%$(PLATFORM_AOT_SUFFIX): $(topdir)/class/lib/$(PROFILE)/%
|
||||
@ mkdir -p $(topdir)/class/lib/$(PROFILE)/$*_bitcode_tmp
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
EventCounter.cs
|
||||
@@ -44,3 +44,7 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTask))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.NonEventAttribute))]
|
||||
|
||||
#if NETSTANDARD
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCounter))]
|
||||
#endif
|
||||
-1
@@ -1 +0,0 @@
|
||||
#include embedded_System.Drawing.Primitives.dll.sources
|
||||
@@ -1,5 +1,2 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
SocketReceiveFromResult.cs
|
||||
SocketReceiveMessageFromResult.cs
|
||||
SocketTaskExtensions.cs
|
||||
@@ -46,4 +46,8 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.UdpClient))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.UdpReceiveResult))]
|
||||
|
||||
|
||||
#if NETSTANDARD
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveFromResult))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveMessageFromResult))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketTaskExtensions))]
|
||||
#endif
|
||||
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// DynamicMethod.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.
|
||||
//
|
||||
|
||||
#if FULL_AOT_RUNTIME
|
||||
|
||||
namespace System.Reflection.Emit
|
||||
{
|
||||
public abstract class DynamicMethod : MethodInfo, ICustomAttributeProvider
|
||||
{
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, bool restrictedSkipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Module m)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Type owner)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Module m, bool skipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Type owner, bool skipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Module m, bool skipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type owner, bool skipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public override MethodAttributes Attributes {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override CallingConventions CallingConvention {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override Type DeclaringType {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public bool InitLocals { get; set; }
|
||||
|
||||
public override MethodImplAttributes MethodImplementationFlags {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override ParameterInfo ReturnParameter {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override Type ReturnType {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public ILGenerator GetILGenerator ()
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public ILGenerator GetILGenerator (int streamSize)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public override ParameterInfo[] GetParameters ()
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
TypeForwarders.cs
|
||||
AssemblyInfo.cs
|
||||
|
||||
DynamicMethod.cs
|
||||
@@ -20,5 +20,6 @@
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.DynamicMethod))]
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,7 @@ System.Security.Cryptography.Encryption.Aes System.Security.Cryptography.Encrypt
|
||||
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.IO.FileSystem.AccessControl System.Reflection.TypeExtensions \
|
||||
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.Xml.XPath.XDocument \
|
||||
System.Security.Cryptography.Primitives System.Text.Encoding.CodePages System.IO.FileSystem.Watcher \
|
||||
System.Security.Cryptography.ProtectedData System.ServiceProcess.ServiceController System.IO.Pipes
|
||||
@@ -34,8 +34,6 @@ common_DEPS_SUBDIRS = System.Security.Cryptography.X509Certificates System.Servi
|
||||
|
||||
drawing_DEPS_SUBDIRS = System.Drawing.Primitives
|
||||
|
||||
reflection_PARALLEL_SUBDIRS = System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
|
||||
|
||||
monotouch_SUBDIRS = $(common_DEPS_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
|
||||
monotouch_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
|
||||
|
||||
@@ -43,10 +41,10 @@ mobile_static_SUBDIRS = $(monotouch_SUBDIRS)
|
||||
mobile_static_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
|
||||
|
||||
net_4_x_SUBDIRS = $(common_DEPS_SUBDIRS) $(drawing_DEPS_SUBDIRS)
|
||||
net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
|
||||
net_4_x_PARALLEL_SUBDIRS = $(common_SUBDIRS)
|
||||
|
||||
monodroid_SUBDIRS = $(monotouch_SUBDIRS)
|
||||
monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
|
||||
monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
|
||||
|
||||
xammac_SUBDIRS = $(monotouch_SUBDIRS)
|
||||
xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
|
||||
@@ -54,7 +52,7 @@ xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
|
||||
xammac_net_4_5_SUBDIRS = $(net_4_x_SUBDIRS)
|
||||
xammac_net_4_5_PARALLEL_SUBDIRS = $(net_4_x_PARALLEL_SUBDIRS)
|
||||
|
||||
monotouch_watch_SUBDIRS = $(monotouch_SUBDIRS) $(drawing_DEPS_SUBDIRS)
|
||||
monotouch_watch_SUBDIRS = $(monotouch_SUBDIRS)
|
||||
monotouch_watch_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
|
||||
|
||||
monotouch_tv_SUBDIRS = $(monotouch_SUBDIRS)
|
||||
|
||||
+13
-15
@@ -51,9 +51,6 @@ mobile_common_dirs := \
|
||||
System.Xml.Serialization \
|
||||
Mono.CSharp \
|
||||
Microsoft.CSharp \
|
||||
Mono.Security.Providers.DotNet \
|
||||
Mono.Security.Providers.NewSystemSource \
|
||||
Mono.Security.Providers.NewTls \
|
||||
System.Runtime.InteropServices.RuntimeInformation \
|
||||
System.Reflection.DispatchProxy \
|
||||
System.Xml.XPath.XmlDocument \
|
||||
@@ -68,6 +65,12 @@ mobile_static_dirs := \
|
||||
Mono.Simd \
|
||||
$(pcl_facade_dirs)
|
||||
|
||||
mobile_static_exclude_dirs := \
|
||||
Microsoft.CSharp \
|
||||
Mono.CSharp \
|
||||
Mono.Data.Sqlite \
|
||||
SMDiagnostics
|
||||
|
||||
mobile_dynamic_dirs := \
|
||||
$(mobile_common_dirs) \
|
||||
Mono.CompilerServices.SymbolWriter \
|
||||
@@ -77,12 +80,13 @@ xammac_dirs := \
|
||||
$(mobile_dynamic_dirs)
|
||||
|
||||
monodroid_dirs := \
|
||||
$(mobile_dynamic_dirs)
|
||||
$(mobile_dynamic_dirs) \
|
||||
Mono.Btls.Interface
|
||||
|
||||
monotouch_dirs := \
|
||||
$(mobile_static_dirs)
|
||||
|
||||
monotouch_watch_dirs := $(monotouch_dirs)
|
||||
monotouch_watch_dirs := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_dirs))
|
||||
monotouch_tv_dirs := $(monotouch_dirs)
|
||||
|
||||
monotouch_runtime_dirs := \
|
||||
@@ -93,7 +97,7 @@ monotouch_runtime_dirs := \
|
||||
System.XML \
|
||||
Mono.CSharp
|
||||
|
||||
monotouch_watch_runtime_dirs := $(monotouch_runtime_dirs)
|
||||
monotouch_watch_runtime_dirs := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_runtime_dirs))
|
||||
monotouch_tv_runtime_dirs := $(monotouch_runtime_dirs)
|
||||
|
||||
xammac_4_5_dirs := \
|
||||
@@ -108,6 +112,7 @@ xammac_4_5_dirs := \
|
||||
System.ServiceModel.Internals \
|
||||
SMDiagnostics \
|
||||
System.Numerics \
|
||||
System.Numerics.Vectors \
|
||||
Mono.Data.Tds \
|
||||
System.Transactions \
|
||||
System.EnterpriseServices \
|
||||
@@ -139,10 +144,6 @@ xammac_4_5_dirs := \
|
||||
System.Data.Linq \
|
||||
System.Net.Http \
|
||||
System.Net.Http.WebRequest \
|
||||
Mono.Security.Providers.DotNet \
|
||||
Mono.Security.Providers.OldTls \
|
||||
Mono.Security.Providers.NewSystemSource \
|
||||
Mono.Security.Providers.NewTls \
|
||||
System.Runtime.InteropServices.RuntimeInformation \
|
||||
System.Reflection.Context \
|
||||
System.Net.Http.WinHttpHandler \
|
||||
@@ -231,8 +232,6 @@ net_4_x_dirs := \
|
||||
System.Web.Http \
|
||||
System.Web.Http.SelfHost \
|
||||
System.Web.Http.WebHost \
|
||||
Mono.Security.Providers.NewSystemSource \
|
||||
Mono.Security.Providers.NewTls \
|
||||
System.Runtime.InteropServices.RuntimeInformation
|
||||
|
||||
# These are the subdirs which depends on libs in net_4_x_dirs
|
||||
@@ -240,6 +239,7 @@ net_4_x_dirs := \
|
||||
net_4_x_parallel_dirs := \
|
||||
PEAPI \
|
||||
I18N \
|
||||
Mono.Btls.Interface \
|
||||
Mono.Http \
|
||||
Mono.Cairo \
|
||||
Mono.Cecil \
|
||||
@@ -276,8 +276,6 @@ net_4_x_parallel_dirs := \
|
||||
System.ComponentModel.Composition.4.5 \
|
||||
System.Windows \
|
||||
System.Xml.Serialization \
|
||||
Mono.Security.Providers.DotNet \
|
||||
Mono.Security.Providers.OldTls \
|
||||
System.DirectoryServices.Protocols \
|
||||
RabbitMQ.Client \
|
||||
Microsoft.VisualC \
|
||||
@@ -311,7 +309,7 @@ monotouch_tv_SUBDIRS := $(monotouch_tv_dirs)
|
||||
monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
|
||||
monotouch_watch_runtime_SUBDIRS := $(monotouch_watch_runtime_dirs)
|
||||
monotouch_tv_runtime_SUBDIRS := $(monotouch_tv_runtime_dirs)
|
||||
mobile_static_SUBDIRS := $(mobile_static_dirs)
|
||||
mobile_static_SUBDIRS := $(filter-out $(mobile_static_exclude_dirs),$(mobile_static_dirs))
|
||||
mobile_SUBDIRS := $(mobile_dynamic_dirs)
|
||||
xammac_SUBDIRS := $(xammac_dirs)
|
||||
xammac_net_4_5_SUBDIRS := $(xammac_4_5_dirs)
|
||||
|
||||
@@ -226,6 +226,14 @@ namespace Microsoft.Build.BuildEngine {
|
||||
public void SetMetadata (string metadataName,
|
||||
string metadataValue,
|
||||
bool treatMetadataValueAsLiteral)
|
||||
{
|
||||
SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral, false);
|
||||
}
|
||||
|
||||
void SetMetadata (string metadataName,
|
||||
string metadataValue,
|
||||
bool treatMetadataValueAsLiteral,
|
||||
bool fromDynamicItem)
|
||||
{
|
||||
if (metadataName == null)
|
||||
throw new ArgumentNullException ("metadataName");
|
||||
@@ -251,9 +259,11 @@ namespace Microsoft.Build.BuildEngine {
|
||||
} else if (HasParentItem) {
|
||||
if (parent_item.child_items.Count > 1)
|
||||
SplitParentItem ();
|
||||
parent_item.SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral);
|
||||
parent_item.SetMetadata (metadataName, metadataValue, treatMetadataValueAsLiteral, fromDynamicItem);
|
||||
}
|
||||
if (FromXml || HasParentItem) {
|
||||
|
||||
// We don't want to reevalute the project for dynamic items
|
||||
if (!fromDynamicItem && !IsDynamic && (FromXml || HasParentItem)) {
|
||||
parent_item_group.ParentProject.MarkProjectAsDirty ();
|
||||
parent_item_group.ParentProject.NeedToReevaluate ();
|
||||
}
|
||||
@@ -374,7 +384,7 @@ namespace Microsoft.Build.BuildEngine {
|
||||
continue;
|
||||
|
||||
foreach (string name in evaluatedMetadata.Keys) {
|
||||
item.SetMetadata (name, (string)evaluatedMetadata [name]);
|
||||
item.SetMetadata (name, (string)evaluatedMetadata [name], false, IsDynamic);
|
||||
}
|
||||
|
||||
AddAndRemoveMetadata (project, item);
|
||||
|
||||
@@ -374,10 +374,8 @@ namespace Microsoft.Build.BuildEngine {
|
||||
return false;
|
||||
|
||||
ITaskItem[] outputs;
|
||||
if (ParentEngine.BuiltTargetsOutputByName.TryGetValue (key, out outputs)) {
|
||||
if (targetOutputs != null)
|
||||
targetOutputs.Add (target_name, outputs);
|
||||
}
|
||||
if (targetOutputs != null && ParentEngine.BuiltTargetsOutputByName.TryGetValue (key, out outputs))
|
||||
targetOutputs [target_name] = outputs;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -284,6 +284,51 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
t [0].RemoveTask (null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRunTargetTwice ()
|
||||
{
|
||||
string documentString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Target Name=""Foo"">
|
||||
<Message Text=""Foo ran""/>
|
||||
</Target>
|
||||
<Target Name=""Main"">
|
||||
<MSBuild Projects=""$(MSBuildProjectFile)"" Targets=""Foo;Foo"" />
|
||||
</Target>
|
||||
|
||||
</Project>";
|
||||
|
||||
var filepath = Path.GetTempFileName ();
|
||||
try {
|
||||
File.WriteAllText (filepath, documentString);
|
||||
|
||||
var engine = new Engine (Consts.BinPath);
|
||||
var project = engine.CreateNewProject ();
|
||||
project.Load (filepath);
|
||||
|
||||
var logger = new TestMessageLogger ();
|
||||
engine.RegisterLogger (logger);
|
||||
|
||||
var result = project.Build ("Main");
|
||||
if (!result) {
|
||||
logger.DumpMessages ();
|
||||
Assert.Fail ("Build failed, see the logs");
|
||||
}
|
||||
|
||||
Assert.AreEqual(1, logger.NormalMessageCount, "Expected number of messages");
|
||||
logger.CheckLoggedMessageHead ("Foo ran", "A1");
|
||||
|
||||
Assert.AreEqual(0, logger.NormalMessageCount, "Extra messages found");
|
||||
Assert.AreEqual(0, logger.WarningMessageCount, "Extra warning messages found");
|
||||
|
||||
Assert.AreEqual(2, logger.TargetStarted, "TargetStarted count");
|
||||
Assert.AreEqual(2, logger.TargetFinished, "TargetFinished count");
|
||||
|
||||
Assert.IsTrue (result);
|
||||
} finally {
|
||||
File.Delete (filepath);
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestTargetOutputs1 ()
|
||||
{
|
||||
@@ -697,6 +742,33 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
</Project>", "D");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemGroupInsideTarget_UpdateMetadata ()
|
||||
{
|
||||
ItemGroupInsideTarget (
|
||||
@"<Project ToolsVersion=""4.0"" xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include='xyz'/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name='Main' DependsOnTargets='CreateBar'>
|
||||
<Message Text='Before: $(Bar)'/>
|
||||
<ItemGroup>
|
||||
<ProjectReference>
|
||||
<AdditionalProperties>A=b</AdditionalProperties>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Message Text='After: $(Bar)'/>
|
||||
</Target>
|
||||
|
||||
<Target Name='CreateBar'>
|
||||
<PropertyGroup>
|
||||
<Bar>Bar01</Bar>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>", 2, "Before: Bar01", "After: Bar01");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemGroupInsideTarget_Batching ()
|
||||
{
|
||||
|
||||
@@ -153,7 +153,10 @@ namespace Microsoft.Build.Tasks {
|
||||
{
|
||||
if (!string.IsNullOrEmpty (ToolPath))
|
||||
return Path.Combine (ToolPath, ToolExe);
|
||||
return ToolLocationHelper.GetPathToDotNetFrameworkFile (ToolExe, TargetDotNetFrameworkVersion.VersionLatest);
|
||||
var possibleToolPath = ToolLocationHelper.GetPathToDotNetFrameworkFile (ToolExe, TargetDotNetFrameworkVersion.VersionLatest);
|
||||
if (!string.IsNullOrEmpty(possibleToolPath))
|
||||
return possibleToolPath;
|
||||
return ToolLocationHelper.GetPathToDotNetFrameworkBinFile(ToolExe);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
|
||||
+9
-2
@@ -1,11 +1,18 @@
|
||||
thisdir = class/Mono.Security.Providers.OldTls
|
||||
thisdir = class/Mono.Btls.Interface
|
||||
SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.Security.Providers.OldTls.dll
|
||||
LIBRARY = Mono.Btls.Interface.dll
|
||||
LIB_REFS = System Mono.Security
|
||||
LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -d:SECURITY_DEP
|
||||
|
||||
ifndef HAVE_BTLS
|
||||
NO_INSTALL = yes
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
NO_TEST = yes
|
||||
NO_BUILD = yes
|
||||
endif
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
$(the_lib): ../Mono.Security/Makefile
|
||||
@@ -0,0 +1,22 @@
|
||||
./Properties/AssemblyInfo.cs
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/Locale.cs
|
||||
../../build/common/MonoTODOAttribute.cs
|
||||
|
||||
Mono.Btls.Interface/BtlsObject.cs
|
||||
Mono.Btls.Interface/BtlsProvider.cs
|
||||
Mono.Btls.Interface/BtlsX509.cs
|
||||
Mono.Btls.Interface/BtlsX509Chain.cs
|
||||
Mono.Btls.Interface/BtlsX509Error.cs
|
||||
Mono.Btls.Interface/BtlsX509Format.cs
|
||||
Mono.Btls.Interface/BtlsX509Lookup.cs
|
||||
Mono.Btls.Interface/BtlsX509Name.cs
|
||||
Mono.Btls.Interface/BtlsX509Purpose.cs
|
||||
Mono.Btls.Interface/BtlsX509Store.cs
|
||||
Mono.Btls.Interface/BtlsX509StoreCtx.cs
|
||||
Mono.Btls.Interface/BtlsX509StoreManager.cs
|
||||
Mono.Btls.Interface/BtlsX509StoreType.cs
|
||||
Mono.Btls.Interface/BtlsX509TrustKind.cs
|
||||
Mono.Btls.Interface/BtlsX509VerifyFlags.cs
|
||||
Mono.Btls.Interface/BtlsX509VerifyParam.cs
|
||||
Mono.Btls.Interface/VersionInfo.cs
|
||||
+34
-31
@@ -1,10 +1,10 @@
|
||||
//
|
||||
// ITlsContext.cs
|
||||
// BtlsObject.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015-2016 Xamarin, Inc.
|
||||
// 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
|
||||
@@ -23,48 +23,51 @@
|
||||
// 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.
|
||||
|
||||
extern alias NewSystemSource;
|
||||
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
using Mono.Security.Interface;
|
||||
using MX = Mono.Security.X509;
|
||||
|
||||
namespace Mono.Security.Providers.NewTls
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
interface ITlsContext : IDisposable
|
||||
public abstract class BtlsObject : IDisposable
|
||||
{
|
||||
bool IsValid {
|
||||
get;
|
||||
MonoBtlsObject instance;
|
||||
|
||||
internal MonoBtlsObject Instance {
|
||||
get {
|
||||
if (!IsValid)
|
||||
throw new ObjectDisposedException (GetType ().Name);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
TlsException LastError {
|
||||
get;
|
||||
internal BtlsObject (MonoBtlsObject instance)
|
||||
{
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
bool ReceivedCloseNotify {
|
||||
get;
|
||||
public bool IsValid {
|
||||
get { return instance != null && instance.IsValid; }
|
||||
}
|
||||
|
||||
MonoTlsConnectionInfo ConnectionInfo {
|
||||
get;
|
||||
protected void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing) {
|
||||
if (instance != null) {
|
||||
instance.Dispose ();
|
||||
instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MX.X509Certificate GetRemoteCertificate (out MX.X509CertificateCollection remoteCertificateStore);
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
GC.SuppressFinalize (this);
|
||||
}
|
||||
|
||||
bool VerifyRemoteCertificate ();
|
||||
|
||||
int GenerateNextToken (TlsBuffer incoming, TlsMultiBuffer outgoing);
|
||||
|
||||
int DecryptMessage (ref TlsBuffer incoming);
|
||||
|
||||
int EncryptMessage (ref TlsBuffer incoming);
|
||||
|
||||
byte[] CreateAlert (Alert alert);
|
||||
|
||||
byte[] CreateHelloRequest ();
|
||||
~BtlsObject ()
|
||||
{
|
||||
Dispose (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// BtlsProvider.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
using Mono.Security.Interface;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using MNS = Mono.Net.Security;
|
||||
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public static class BtlsProvider
|
||||
{
|
||||
public static bool IsSupported ()
|
||||
{
|
||||
return MNS.MonoTlsProviderFactory.IsBtlsSupported ();
|
||||
}
|
||||
|
||||
public static MonoTlsProvider GetProvider ()
|
||||
{
|
||||
return new MonoBtlsProvider ();
|
||||
}
|
||||
|
||||
public static BtlsX509 CreateNative (byte[] data, BtlsX509Format format)
|
||||
{
|
||||
var x509 = MonoBtlsX509.LoadFromData (data, (MonoBtlsX509Format)format);
|
||||
return new BtlsX509 (x509);
|
||||
}
|
||||
|
||||
public static X509Certificate CreateCertificate (byte[] data, BtlsX509Format format, bool disallowFallback = false)
|
||||
{
|
||||
return MonoBtlsProvider.CreateCertificate (data, (MonoBtlsX509Format)format, disallowFallback);
|
||||
}
|
||||
|
||||
public static X509Certificate2 CreateCertificate2 (byte[] data, BtlsX509Format format, bool disallowFallback = false)
|
||||
{
|
||||
return MonoBtlsProvider.CreateCertificate2 (data, (MonoBtlsX509Format)format, disallowFallback);
|
||||
}
|
||||
|
||||
public static X509Certificate2 CreateCertificate2 (byte[] data, string password, bool disallowFallback = false)
|
||||
{
|
||||
return MonoBtlsProvider.CreateCertificate2 (data, password, disallowFallback);
|
||||
}
|
||||
|
||||
public static BtlsX509Chain CreateNativeChain ()
|
||||
{
|
||||
return new BtlsX509Chain (new MonoBtlsX509Chain ());
|
||||
}
|
||||
|
||||
public static BtlsX509Store CreateNativeStore ()
|
||||
{
|
||||
return new BtlsX509Store (new MonoBtlsX509Store ());
|
||||
}
|
||||
|
||||
public static BtlsX509StoreCtx CreateNativeStoreCtx ()
|
||||
{
|
||||
return new BtlsX509StoreCtx (new MonoBtlsX509StoreCtx ());
|
||||
}
|
||||
|
||||
public static X509Chain CreateChain ()
|
||||
{
|
||||
return MonoBtlsProvider.CreateChain ();
|
||||
}
|
||||
|
||||
public static string GetSystemStoreLocation ()
|
||||
{
|
||||
return MonoBtlsProvider.GetSystemStoreLocation ();
|
||||
}
|
||||
|
||||
public static BtlsX509VerifyParam GetVerifyParam_SslClient ()
|
||||
{
|
||||
return new BtlsX509VerifyParam (MonoBtlsX509VerifyParam.GetSslClient ());
|
||||
}
|
||||
|
||||
public static BtlsX509VerifyParam GetVerifyParam_SslServer ()
|
||||
{
|
||||
return new BtlsX509VerifyParam (MonoBtlsX509VerifyParam.GetSslServer ());
|
||||
}
|
||||
|
||||
public static X509Chain GetManagedChain (BtlsX509Chain chain)
|
||||
{
|
||||
return MonoBtlsProvider.GetManagedChain (chain.Instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// BtlsX509.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public class BtlsX509 : BtlsObject
|
||||
{
|
||||
new internal MonoBtlsX509 Instance {
|
||||
get { return (MonoBtlsX509)base.Instance; }
|
||||
}
|
||||
|
||||
internal BtlsX509 (MonoBtlsX509 x509)
|
||||
: base (x509)
|
||||
{
|
||||
}
|
||||
|
||||
public BtlsX509Name GetSubjectName ()
|
||||
{
|
||||
return new BtlsX509Name (Instance.GetSubjectName ());
|
||||
}
|
||||
|
||||
public BtlsX509Name GetIssuerName ()
|
||||
{
|
||||
return new BtlsX509Name (Instance.GetIssuerName ());
|
||||
}
|
||||
|
||||
public string GetSubjectNameString ()
|
||||
{
|
||||
return Instance.GetSubjectNameString ();
|
||||
}
|
||||
|
||||
public string GetIssuerNameString ()
|
||||
{
|
||||
return Instance.GetIssuerNameString ();
|
||||
}
|
||||
|
||||
public byte[] GetRawData (BtlsX509Format format)
|
||||
{
|
||||
return Instance.GetRawData ((MonoBtlsX509Format)format);
|
||||
}
|
||||
|
||||
public byte[] GetCertHash ()
|
||||
{
|
||||
return Instance.GetCertHash ();
|
||||
}
|
||||
|
||||
public DateTime GetNotBefore ()
|
||||
{
|
||||
return Instance.GetNotBefore ();
|
||||
}
|
||||
|
||||
public DateTime GetNotAfter ()
|
||||
{
|
||||
return Instance.GetNotAfter ();
|
||||
}
|
||||
|
||||
public byte[] GetPublicKeyData ()
|
||||
{
|
||||
return Instance.GetPublicKeyData ();
|
||||
}
|
||||
|
||||
public byte[] GetSerialNumber (bool mono_style)
|
||||
{
|
||||
return Instance.GetSerialNumber (mono_style);
|
||||
}
|
||||
|
||||
public int GetVersion ()
|
||||
{
|
||||
return Instance.GetVersion ();
|
||||
}
|
||||
|
||||
public Oid GetSignatureAlgorithm ()
|
||||
{
|
||||
return Instance.GetSignatureAlgorithm ();
|
||||
}
|
||||
|
||||
public AsnEncodedData GetPublicKeyAsn1 ()
|
||||
{
|
||||
return Instance.GetPublicKeyAsn1 ();
|
||||
}
|
||||
|
||||
public AsnEncodedData GetPublicKeyParameters ()
|
||||
{
|
||||
return Instance.GetPublicKeyParameters ();
|
||||
}
|
||||
|
||||
public long GetSubjectNameHash ()
|
||||
{
|
||||
using (var name = GetSubjectName ())
|
||||
return name.GetHash ();
|
||||
}
|
||||
|
||||
public void Print (Stream stream)
|
||||
{
|
||||
using (var bio = MonoBtlsBio.CreateMonoStream (stream))
|
||||
Instance.Print (bio);
|
||||
}
|
||||
|
||||
public void ExportAsPEM (Stream stream, bool includeHumanReadableForm)
|
||||
{
|
||||
using (var bio = MonoBtlsBio.CreateMonoStream (stream))
|
||||
Instance.ExportAsPEM (bio, includeHumanReadableForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// BtlsX509Chain.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public class BtlsX509Chain : BtlsObject
|
||||
{
|
||||
new internal MonoBtlsX509Chain Instance {
|
||||
get { return (MonoBtlsX509Chain)base.Instance; }
|
||||
}
|
||||
|
||||
internal BtlsX509Chain (MonoBtlsX509Chain chain)
|
||||
: base (chain)
|
||||
{
|
||||
}
|
||||
|
||||
public int Count {
|
||||
get { return Instance.Count; }
|
||||
}
|
||||
|
||||
public BtlsX509 this[int index] {
|
||||
get {
|
||||
var x509 = Instance.GetCertificate (index);
|
||||
return new BtlsX509 (x509.Copy ());
|
||||
}
|
||||
}
|
||||
|
||||
public void Add (BtlsX509 x509)
|
||||
{
|
||||
Instance.AddCertificate (x509.Instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// BtlsX509Error.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
// Keep in sync with NativeBoringX509Error
|
||||
public enum BtlsX509Error
|
||||
{
|
||||
OK = 0,
|
||||
/* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */
|
||||
|
||||
UNABLE_TO_GET_ISSUER_CERT = 2,
|
||||
UNABLE_TO_GET_CRL = 3,
|
||||
UNABLE_TO_DECRYPT_CERT_SIGNATURE = 4,
|
||||
UNABLE_TO_DECRYPT_CRL_SIGNATURE = 5,
|
||||
UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY = 6,
|
||||
CERT_SIGNATURE_FAILURE = 7,
|
||||
CRL_SIGNATURE_FAILURE = 8,
|
||||
CERT_NOT_YET_VALID = 9,
|
||||
CERT_HAS_EXPIRED = 10,
|
||||
CRL_NOT_YET_VALID = 11,
|
||||
CRL_HAS_EXPIRED = 12,
|
||||
ERROR_IN_CERT_NOT_BEFORE_FIELD = 13,
|
||||
ERROR_IN_CERT_NOT_AFTER_FIELD = 14,
|
||||
ERROR_IN_CRL_LAST_UPDATE_FIELD = 15,
|
||||
ERROR_IN_CRL_NEXT_UPDATE_FIELD = 16,
|
||||
OUT_OF_MEM = 17,
|
||||
DEPTH_ZERO_SELF_SIGNED_CERT = 18,
|
||||
SELF_SIGNED_CERT_IN_CHAIN = 19,
|
||||
UNABLE_TO_GET_ISSUER_CERT_LOCALLY = 20,
|
||||
UNABLE_TO_VERIFY_LEAF_SIGNATURE = 21,
|
||||
CERT_CHAIN_TOO_LONG = 22,
|
||||
CERT_REVOKED = 23,
|
||||
INVALID_CA = 24,
|
||||
PATH_LENGTH_EXCEEDED = 25,
|
||||
INVALID_PURPOSE = 26,
|
||||
CERT_UNTRUSTED = 27,
|
||||
CERT_REJECTED = 28,
|
||||
/* These are 'informational' when looking for issuer cert */
|
||||
SUBJECT_ISSUER_MISMATCH = 29,
|
||||
AKID_SKID_MISMATCH = 30,
|
||||
AKID_ISSUER_SERIAL_MISMATCH = 31,
|
||||
KEYUSAGE_NO_CERTSIGN = 32,
|
||||
|
||||
UNABLE_TO_GET_CRL_ISSUER = 33,
|
||||
UNHANDLED_CRITICAL_EXTENSION = 34,
|
||||
KEYUSAGE_NO_CRL_SIGN = 35,
|
||||
UNHANDLED_CRITICAL_CRL_EXTENSION = 36,
|
||||
INVALID_NON_CA = 37,
|
||||
PROXY_PATH_LENGTH_EXCEEDED = 38,
|
||||
KEYUSAGE_NO_DIGITAL_SIGNATURE = 39,
|
||||
PROXY_CERTIFICATES_NOT_ALLOWED = 40,
|
||||
|
||||
INVALID_EXTENSION = 41,
|
||||
INVALID_POLICY_EXTENSION = 42,
|
||||
NO_EXPLICIT_POLICY = 43,
|
||||
DIFFERENT_CRL_SCOPE = 44,
|
||||
UNSUPPORTED_EXTENSION_FEATURE = 45,
|
||||
|
||||
UNNESTED_RESOURCE = 46,
|
||||
|
||||
PERMITTED_VIOLATION = 47,
|
||||
EXCLUDED_VIOLATION = 48,
|
||||
SUBTREE_MINMAX = 49,
|
||||
UNSUPPORTED_CONSTRAINT_TYPE = 51,
|
||||
UNSUPPORTED_CONSTRAINT_SYNTAX = 52,
|
||||
UNSUPPORTED_NAME_SYNTAX = 53,
|
||||
CRL_PATH_VALIDATION_ERROR = 54,
|
||||
|
||||
/* Suite B mode algorithm violation */
|
||||
SUITE_B_INVALID_VERSION = 56,
|
||||
SUITE_B_INVALID_ALGORITHM = 57,
|
||||
SUITE_B_INVALID_CURVE = 58,
|
||||
SUITE_B_INVALID_SIGNATURE_ALGORITHM = 59,
|
||||
SUITE_B_LOS_NOT_ALLOWED = 60,
|
||||
SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 = 61,
|
||||
|
||||
/* Host, email and IP check errors */
|
||||
HOSTNAME_MISMATCH = 62,
|
||||
EMAIL_MISMATCH = 63,
|
||||
IP_ADDRESS_MISMATCH = 64,
|
||||
|
||||
/* The application is not happy */
|
||||
APPLICATION_VERIFICATION = 50
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// BtlsX509Format.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
// Keep in sync with NativeBoringX509Format
|
||||
public enum BtlsX509Format
|
||||
{
|
||||
DER = 1,
|
||||
PEM = 2
|
||||
}
|
||||
}
|
||||
|
||||
+31
-30
@@ -1,10 +1,10 @@
|
||||
//
|
||||
// IMonoTlsContext.cs
|
||||
// BtlsX509Lookup.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 Xamarin, Inc.
|
||||
// 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
|
||||
@@ -24,48 +24,49 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Mono.Security.Interface
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
interface IMonoTlsContext : IDisposable
|
||||
public class BtlsX509Lookup : BtlsObject
|
||||
{
|
||||
bool IsServer {
|
||||
get;
|
||||
new internal MonoBtlsX509Lookup Instance {
|
||||
get { return (MonoBtlsX509Lookup)base.Instance; }
|
||||
}
|
||||
|
||||
bool IsValid {
|
||||
get;
|
||||
internal BtlsX509Lookup (MonoBtlsX509Lookup lookup)
|
||||
: base (lookup)
|
||||
{
|
||||
}
|
||||
|
||||
void Initialize (IMonoTlsEventSink eventSink);
|
||||
|
||||
bool HasCredentials {
|
||||
get;
|
||||
public void Initialize ()
|
||||
{
|
||||
Instance.Initialize ();
|
||||
}
|
||||
|
||||
void SetCertificate (X509Certificate certificate, AsymmetricAlgorithm privateKey);
|
||||
|
||||
int GenerateNextToken (IBufferOffsetSize incoming, out IBufferOffsetSize outgoing);
|
||||
|
||||
int EncryptMessage (ref IBufferOffsetSize incoming);
|
||||
|
||||
int DecryptMessage (ref IBufferOffsetSize incoming);
|
||||
|
||||
bool ReceivedCloseNotify {
|
||||
get;
|
||||
public void Shutdown ()
|
||||
{
|
||||
Instance.Shutdown ();
|
||||
}
|
||||
|
||||
byte[] CreateCloseNotify ();
|
||||
public BtlsX509 LookupBySubject (BtlsX509Name name)
|
||||
{
|
||||
var x509 = Instance.LookupBySubject (name.Instance);
|
||||
if (x509 == null)
|
||||
return null;
|
||||
|
||||
byte[] CreateHelloRequest ();
|
||||
return new BtlsX509 (x509);
|
||||
}
|
||||
|
||||
X509Certificate GetRemoteCertificate (out X509CertificateCollection remoteCertificateStore);
|
||||
public void LoadFile (string file, BtlsX509Format type)
|
||||
{
|
||||
Instance.LoadFile (file, (MonoBtlsX509FileType)type);
|
||||
}
|
||||
|
||||
bool VerifyRemoteCertificate ();
|
||||
|
||||
MonoTlsConnectionInfo GetConnectionInfo ();
|
||||
public void AddDirectory (string dir, BtlsX509Format type)
|
||||
{
|
||||
Instance.AddDirectory (dir, (MonoBtlsX509FileType)type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// BtlsX509Name.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public class BtlsX509Name : BtlsObject
|
||||
{
|
||||
new internal MonoBtlsX509Name Instance {
|
||||
get { return (MonoBtlsX509Name)base.Instance; }
|
||||
}
|
||||
|
||||
internal BtlsX509Name (MonoBtlsX509Name name)
|
||||
: base (name)
|
||||
{
|
||||
}
|
||||
|
||||
public string GetString ()
|
||||
{
|
||||
return Instance.GetString ();
|
||||
}
|
||||
|
||||
public byte[] GetRawData (bool use_canon_enc)
|
||||
{
|
||||
return Instance.GetRawData (use_canon_enc);
|
||||
}
|
||||
|
||||
public long GetHash ()
|
||||
{
|
||||
return Instance.GetHash ();
|
||||
}
|
||||
|
||||
public long GetHashOld ()
|
||||
{
|
||||
return Instance.GetHashOld ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// BtlsX509Purpose.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
// Keep in sync with NativeBoringX509Purpose
|
||||
public enum BtlsX509Purpose
|
||||
{
|
||||
SSL_CLIENT = 1,
|
||||
SSL_SERVER = 2,
|
||||
NS_SSL_SERVER = 3,
|
||||
SMIME_SIGN = 4,
|
||||
SMIME_ENCRYPT = 5,
|
||||
CRL_SIGN = 6,
|
||||
ANY = 7,
|
||||
OCSP_HELPER = 8,
|
||||
TIMESTAMP_SIGN = 9,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// BtlsX509Store.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public class BtlsX509Store : BtlsObject
|
||||
{
|
||||
new internal MonoBtlsX509Store Instance {
|
||||
get { return (MonoBtlsX509Store)base.Instance; }
|
||||
}
|
||||
|
||||
internal BtlsX509Store (MonoBtlsX509Store store)
|
||||
: base (store)
|
||||
{
|
||||
}
|
||||
|
||||
public void LoadLocations (string file, string path)
|
||||
{
|
||||
Instance.LoadLocations (file, path);
|
||||
}
|
||||
|
||||
public void AddTrustedRoots ()
|
||||
{
|
||||
Instance.AddTrustedRoots ();
|
||||
}
|
||||
|
||||
public void AddCertificate (BtlsX509 x509)
|
||||
{
|
||||
Instance.AddCertificate (x509.Instance);
|
||||
}
|
||||
|
||||
public int GetCount ()
|
||||
{
|
||||
return Instance.GetCount ();
|
||||
}
|
||||
|
||||
public void AddLookup (X509CertificateCollection certificates, BtlsX509TrustKind trust)
|
||||
{
|
||||
Instance.AddCollection (certificates, (MonoBtlsX509TrustKind)trust);
|
||||
}
|
||||
|
||||
static MonoBtlsX509FileType GetFileType (BtlsX509Format format)
|
||||
{
|
||||
switch (format) {
|
||||
case BtlsX509Format.DER:
|
||||
return MonoBtlsX509FileType.ASN1;
|
||||
case BtlsX509Format.PEM:
|
||||
return MonoBtlsX509FileType.PEM;
|
||||
default:
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public void AddDirectoryLookup (string dir, BtlsX509Format format)
|
||||
{
|
||||
Instance.AddDirectoryLookup (dir, GetFileType (format));
|
||||
}
|
||||
|
||||
public void AddFileLookup (string file, BtlsX509Format format)
|
||||
{
|
||||
Instance.AddFileLookup (file, GetFileType (format));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// BtlsX509StoreCtx.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public class BtlsX509StoreCtx : BtlsObject
|
||||
{
|
||||
new internal MonoBtlsX509StoreCtx Instance {
|
||||
get { return (MonoBtlsX509StoreCtx)base.Instance; }
|
||||
}
|
||||
|
||||
internal BtlsX509StoreCtx (MonoBtlsX509StoreCtx ctx)
|
||||
: base (ctx)
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize (BtlsX509Store store, BtlsX509Chain chain)
|
||||
{
|
||||
Instance.Initialize (store.Instance, chain.Instance);
|
||||
}
|
||||
|
||||
public void SetVerifyParam (BtlsX509VerifyParam param)
|
||||
{
|
||||
Instance.SetVerifyParam (param.Instance);
|
||||
}
|
||||
|
||||
public int Verify ()
|
||||
{
|
||||
return Instance.Verify ();
|
||||
}
|
||||
|
||||
public BtlsX509Error GetError ()
|
||||
{
|
||||
return (BtlsX509Error)Instance.GetError ();
|
||||
}
|
||||
|
||||
public Exception GetException ()
|
||||
{
|
||||
return Instance.GetException ();
|
||||
}
|
||||
|
||||
public BtlsX509Chain GetChain ()
|
||||
{
|
||||
return new BtlsX509Chain (Instance.GetChain ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// BtlsX509StoreManager.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public static class BtlsX509StoreManager
|
||||
{
|
||||
public static bool HasStore (BtlsX509StoreType type)
|
||||
{
|
||||
return MonoBtlsX509StoreManager.HasStore ((MonoBtlsX509StoreType)type);
|
||||
}
|
||||
|
||||
public static string GetStorePath (BtlsX509StoreType type)
|
||||
{
|
||||
return MonoBtlsX509StoreManager.GetStorePath ((MonoBtlsX509StoreType)type);
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
-17
@@ -1,10 +1,10 @@
|
||||
//
|
||||
// ITlsContext.cs
|
||||
// BtlsX509StoreType.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015-2016 Xamarin, Inc.
|
||||
// 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
|
||||
@@ -23,25 +23,21 @@
|
||||
// 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.IO;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
using Mono.Security.Interface;
|
||||
using MX = Mono.Security.X509;
|
||||
|
||||
namespace Mono.Security.Providers.NewTls
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
interface ITlsConfiguration
|
||||
// Keep in sync with MonoBtlsX509StoreType
|
||||
public enum BtlsX509StoreType
|
||||
{
|
||||
bool HasCredentials {
|
||||
get;
|
||||
}
|
||||
|
||||
void SetCertificate (MX.X509Certificate certificate, AsymmetricAlgorithm privateKey);
|
||||
|
||||
bool? AskForClientCertificate {
|
||||
get; set;
|
||||
}
|
||||
Custom,
|
||||
MachineTrustedRoots,
|
||||
MachineIntermediateCA,
|
||||
MachineUntrusted,
|
||||
UserTrustedRoots,
|
||||
UserIntermediateCA,
|
||||
UserUntrusted
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// BtlsX509TrustKind.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
// Keep in sync with MonoBtlsX509TrustKind
|
||||
[Flags]
|
||||
public enum BtlsX509TrustKind
|
||||
{
|
||||
DEFAULT = 0,
|
||||
TRUST_CLIENT = 1,
|
||||
TRUST_SERVER = 2,
|
||||
TRUST_ALL = 4,
|
||||
REJECT_CLIENT = 32,
|
||||
REJECT_SERVER = 64,
|
||||
REJECT_ALL = 128
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// BtlsX509VerifyFlags.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
// Keep in sync with NativeBoringX509VerifyFlags
|
||||
public enum BtlsX509VerifyFlags
|
||||
{
|
||||
DEFAULT = 0,
|
||||
CRL_CHECK = 1,
|
||||
CRL_CHECK_ALL = 2,
|
||||
X509_STRIC = 4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// BtlsX509VerifyParam.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public class BtlsX509VerifyParam : BtlsObject
|
||||
{
|
||||
new internal MonoBtlsX509VerifyParam Instance {
|
||||
get { return (MonoBtlsX509VerifyParam)base.Instance; }
|
||||
}
|
||||
|
||||
internal BtlsX509VerifyParam (MonoBtlsX509VerifyParam param)
|
||||
: base (param)
|
||||
{
|
||||
}
|
||||
|
||||
public BtlsX509VerifyParam Copy ()
|
||||
{
|
||||
return new BtlsX509VerifyParam (Instance.Copy ());
|
||||
}
|
||||
|
||||
public void SetName (string name)
|
||||
{
|
||||
Instance.SetName (name);
|
||||
}
|
||||
|
||||
public void SetHost (string name)
|
||||
{
|
||||
Instance.SetHost (name);
|
||||
}
|
||||
|
||||
public void AddHost (string name)
|
||||
{
|
||||
Instance.AddHost (name);
|
||||
}
|
||||
|
||||
public BtlsX509VerifyFlags GetFlags ()
|
||||
{
|
||||
return (BtlsX509VerifyFlags)Instance.GetFlags ();
|
||||
}
|
||||
|
||||
public void SetFlags (BtlsX509VerifyFlags flags)
|
||||
{
|
||||
Instance.SetFlags ((ulong)flags);
|
||||
}
|
||||
|
||||
public void SetPurpose (BtlsX509Purpose purpose)
|
||||
{
|
||||
Instance.SetPurpose ((MonoBtlsX509Purpose)purpose);
|
||||
}
|
||||
|
||||
public int GetDepth ()
|
||||
{
|
||||
return Instance.GetDepth ();
|
||||
}
|
||||
|
||||
public void SetDepth (int depth)
|
||||
{
|
||||
Instance.SetDepth (depth);
|
||||
}
|
||||
|
||||
public void SetTime (DateTime time)
|
||||
{
|
||||
Instance.SetTime (time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// VersionInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[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.
|
||||
using System;
|
||||
namespace Mono.Btls.Interface
|
||||
{
|
||||
public static class VersionInfo
|
||||
{
|
||||
public const string Version = "1.0.0";
|
||||
}
|
||||
}
|
||||
|
||||
+6
-5
@@ -1,10 +1,11 @@
|
||||
//
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 Xamarin, Inc.
|
||||
// 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
|
||||
@@ -36,10 +37,10 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyVersion (Consts.FxVersion)]
|
||||
|
||||
[assembly: AssemblyCompany ("MONO development team")]
|
||||
[assembly: AssemblyCopyright ("(c) 2015 Xamarin")]
|
||||
[assembly: AssemblyDescription ("Mono.Security.Providers.DotNet.dll")]
|
||||
[assembly: AssemblyCopyright ("(c) 2016 Xamarin")]
|
||||
[assembly: AssemblyDescription ("Mono.Btls.Interface")]
|
||||
[assembly: AssemblyProduct ("MONO CLI")]
|
||||
[assembly: AssemblyTitle ("Mono.Security.Providers.DotNet.dll")]
|
||||
[assembly: AssemblyTitle ("Mono.Btls.Interface")]
|
||||
[assembly: CLSCompliant (true)]
|
||||
[assembly: ComVisible (false)]
|
||||
[assembly: NeutralResourcesLanguage ("en-US")]
|
||||
@@ -0,0 +1,9 @@
|
||||
Mono.Btls.Interface
|
||||
===================
|
||||
|
||||
The purpose of this assembly is to allow test suites such as xamarin/web-tests
|
||||
(https://github.com/xamarin/web-tests/tree/stable) to test parts of BTLS without
|
||||
making System.dll internals visible.
|
||||
|
||||
It should not be considered a stable and maintained API for third parties.
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
#include Mono.CSharp.dll.sources
|
||||
../corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
|
||||
../corlib/System.Reflection.Emit/FlowControl.cs
|
||||
../corlib/System.Reflection.Emit/OpCode.cs
|
||||
../corlib/System.Reflection.Emit/OpCodeNames.cs
|
||||
../corlib/System.Reflection.Emit/OpCodes.cs
|
||||
../corlib/System.Reflection.Emit/OpCodeType.cs
|
||||
../corlib/System.Reflection.Emit/OperandType.cs
|
||||
../corlib/System.Reflection.Emit/PEFileKinds.cs
|
||||
../corlib/System.Reflection.Emit/Label.cs
|
||||
../corlib/System.Reflection.Emit/MethodToken.cs
|
||||
../corlib/System.Reflection.Emit/StackBehaviour.cs
|
||||
monotouch.cs
|
||||
@@ -28,66 +28,6 @@
|
||||
|
||||
namespace System.Reflection.Emit
|
||||
{
|
||||
public class ILGenerator
|
||||
{
|
||||
public void BeginCatchBlock (Type exceptionType)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public Label BeginExceptionBlock ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void BeginExceptFilterBlock ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void BeginFinallyBlock ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public LocalBuilder DeclareLocal (params object[] args)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public Label DefineLabel ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void Emit (OpCode opcode)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void Emit (OpCode opcode, object args)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void EmitCall (OpCode opcode, params object[] args)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void EndExceptionBlock ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void MarkLabel (Label loc)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public int ILOffset { get; set; }
|
||||
}
|
||||
|
||||
public class TypeBuilder : Type
|
||||
{
|
||||
#region implemented abstract members of MemberInfo
|
||||
@@ -528,230 +468,6 @@ namespace System.Reflection.Emit
|
||||
}
|
||||
}
|
||||
|
||||
public class LocalBuilder : LocalVariableInfo
|
||||
{
|
||||
}
|
||||
|
||||
public class GenericTypeParameterBuilder : Type
|
||||
{
|
||||
#region implemented abstract members of MemberInfo
|
||||
|
||||
public override bool IsDefined (Type attributeType, bool inherit)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override object[] GetCustomAttributes (bool inherit)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region implemented abstract members of Type
|
||||
|
||||
public override Type GetInterface (string name, bool ignoreCase)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type[] GetInterfaces ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type GetElementType ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override EventInfo GetEvent (string name, BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override EventInfo[] GetEvents (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override FieldInfo GetField (string name, BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override FieldInfo[] GetFields (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override MemberInfo[] GetMembers (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override MethodInfo[] GetMethods (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type GetNestedType (string name, BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Type[] GetNestedTypes (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override PropertyInfo[] GetProperties (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override PropertyInfo GetPropertyImpl (string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override ConstructorInfo GetConstructorImpl (BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override TypeAttributes GetAttributeFlagsImpl ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override bool HasElementTypeImpl ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override bool IsArrayImpl ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override bool IsByRefImpl ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override bool IsCOMObjectImpl ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override bool IsPointerImpl ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
protected override bool IsPrimitiveImpl ()
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override ConstructorInfo[] GetConstructors (BindingFlags bindingAttr)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public override Assembly Assembly {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override string AssemblyQualifiedName {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override Type BaseType {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override string FullName {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override Guid GUID {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override Module Module {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override string Namespace {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override Type UnderlyingSystemType {
|
||||
get {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void SetCustomAttribute (params object[] args)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void SetGenericParameterAttributes (GenericParameterAttributes genericParameterAttributes)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void SetInterfaceConstraints (params Type[] interfaceConstraints)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void SetBaseTypeConstraint (Type baseTypeConstraint)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public class ConstructorBuilder : MethodBase
|
||||
{
|
||||
#region implemented abstract members of MemberInfo
|
||||
@@ -1087,19 +803,6 @@ namespace System.Reflection.Emit
|
||||
}
|
||||
}
|
||||
|
||||
public class ParameterBuilder : ParameterInfo
|
||||
{
|
||||
public void SetConstant (object arg)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void SetCustomAttribute (params object[] args)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public class EventBuilder
|
||||
{
|
||||
public void SetAddOnMethod (MethodBuilder mdBuilder)
|
||||
@@ -1118,11 +821,4 @@ namespace System.Reflection.Emit
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomAttributeBuilder
|
||||
{
|
||||
public CustomAttributeBuilder (params object[] args)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,13 +187,54 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
public void DefineMethod (MonoSymbolFile file, int token)
|
||||
{
|
||||
var blocks = Blocks;
|
||||
if (blocks.Length > 0) {
|
||||
//
|
||||
// When index is provided by user it can be inserted in
|
||||
// any order but mdb format does not store its value. It
|
||||
// uses stored order as the index instead.
|
||||
//
|
||||
var sorted = new List<CodeBlockEntry> (blocks.Length);
|
||||
int max_index = 0;
|
||||
for (int i = 0; i < blocks.Length; ++i) {
|
||||
max_index = System.Math.Max (max_index, blocks [i].Index);
|
||||
}
|
||||
|
||||
//
|
||||
// When index is provided by user it can be inserted in
|
||||
// any order but mdb format does not store its value. It
|
||||
// uses store order instead as the index.
|
||||
//
|
||||
Array.Sort (blocks, (x, y) => x.Index.CompareTo (y.Index));
|
||||
for (int i = 0; i < max_index; ++i) {
|
||||
var scope_index = i + 1;
|
||||
|
||||
//
|
||||
// Common fast path
|
||||
//
|
||||
if (i < blocks.Length && blocks [i].Index == scope_index) {
|
||||
sorted.Add (blocks [i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
for (int ii = 0; ii < blocks.Length; ++ii) {
|
||||
if (blocks [ii].Index == scope_index) {
|
||||
sorted.Add (blocks [ii]);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found)
|
||||
continue;
|
||||
|
||||
//
|
||||
// Ideally this should never happen but with current design we can
|
||||
// generate scope index for unreachable code before reachable code
|
||||
//
|
||||
sorted.Add (new CodeBlockEntry (scope_index, -1, CodeBlockEntry.Type.CompilerGenerated, 0));
|
||||
}
|
||||
|
||||
blocks = sorted.ToArray ();
|
||||
//for (int i = 0; i < blocks.Length; ++i) {
|
||||
// if (blocks [i].Index - 1 != i)
|
||||
// throw new ArgumentException ("CodeBlocks cannot be converted to mdb format");
|
||||
//}
|
||||
}
|
||||
|
||||
var entry = new MethodEntry (
|
||||
file, _comp_unit.Entry, token, ScopeVariables,
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace Mono.Data.Sqlite
|
||||
case SQLiteDateFormats.UnixEpoch:
|
||||
return ((long)(dateValue.Subtract(UnixEpoch).Ticks / TimeSpan.TicksPerSecond)).ToString();
|
||||
default:
|
||||
return dateValue.ToString(_datetimeFormats[7], CultureInfo.InvariantCulture);
|
||||
return dateValue.ToString(_datetimeFormats[5], CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,4 +6,4 @@ SqliteExceptionUnitTests.cs
|
||||
SqliteParameterUnitTests.cs
|
||||
SqliteFunctionTests.cs
|
||||
Bug27864.cs
|
||||
|
||||
SqliteTests.cs
|
||||
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// SqliteTests.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.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Mono.Data.Sqlite;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.Mono.Data.Sqlite
|
||||
{
|
||||
[TestFixture]
|
||||
public class SqliteTests
|
||||
{
|
||||
string _databasePath;
|
||||
|
||||
[SetUp]
|
||||
public void Setup ()
|
||||
{
|
||||
var dataFolder = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "SqlTest");
|
||||
|
||||
_databasePath = Path.Combine (dataFolder, "database.db");
|
||||
|
||||
if (!Directory.Exists (dataFolder)) {
|
||||
Directory.CreateDirectory (dataFolder);
|
||||
}
|
||||
|
||||
File.Delete (_databasePath);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown ()
|
||||
{
|
||||
try {
|
||||
File.Delete (_databasePath);
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DateTimeConvert ()
|
||||
{
|
||||
var dateTime = new DateTime (2016, 9, 15, 12, 1, 53);
|
||||
var guid = Guid.NewGuid ();
|
||||
|
||||
using (var connection = new SqliteConnection ("Data Source=" + _databasePath)) {
|
||||
connection.Open ();
|
||||
|
||||
var sqlCreate = "CREATE TABLE TestTable (ID uniqueidentifier PRIMARY KEY, Modified datetime)";
|
||||
using (var cmd = new SqliteCommand (sqlCreate, connection)) {
|
||||
cmd.ExecuteNonQuery ();
|
||||
}
|
||||
|
||||
var sqlInsert = "INSERT INTO TestTable (ID, Modified) VALUES (@id, @mod)";
|
||||
using (var cmd = new SqliteCommand (sqlInsert, connection)) {
|
||||
cmd.Parameters.Add (new SqliteParameter ("@id", guid));
|
||||
cmd.Parameters.Add (new SqliteParameter ("@mod", dateTime));
|
||||
cmd.ExecuteNonQuery ();
|
||||
}
|
||||
}
|
||||
|
||||
using (var connection = new SqliteConnection ("Data Source=" + _databasePath)) {
|
||||
connection.Open ();
|
||||
|
||||
var sqlSelect = "SELECT * from TestTable";
|
||||
using (var cmd = new SqliteCommand (sqlSelect, connection))
|
||||
using (var reader = cmd.ExecuteReader ()) {
|
||||
while (reader.Read ()) {
|
||||
Assert.AreEqual (guid, reader.GetGuid (0), "#1");
|
||||
Assert.AreEqual (dateTime, reader.GetDateTime (1), "#2");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ namespace Mono.Debugger.Soft
|
||||
ModuleMirror main_module;
|
||||
AssemblyName aname;
|
||||
AssemblyDefinition meta;
|
||||
AppDomainMirror domain;
|
||||
Dictionary<string, long> typeCacheIgnoreCase = new Dictionary<string, long> (StringComparer.InvariantCultureIgnoreCase);
|
||||
Dictionary<string, long> typeCache = new Dictionary<string, long> ();
|
||||
|
||||
@@ -50,6 +51,17 @@ namespace Mono.Debugger.Soft
|
||||
}
|
||||
}
|
||||
|
||||
// Since Protocol version 2.45
|
||||
public AppDomainMirror Domain {
|
||||
get {
|
||||
if (domain == null) {
|
||||
vm.CheckProtocolVersion (2, 45);
|
||||
domain = vm.GetDomain (vm.conn.Assembly_GetIdDomain (id));
|
||||
}
|
||||
return domain;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual AssemblyName GetName () {
|
||||
if (aname == null) {
|
||||
string name = vm.conn.Assembly_GetName (id);
|
||||
|
||||
@@ -420,7 +420,7 @@ namespace Mono.Debugger.Soft
|
||||
* with newer runtimes, and vice versa.
|
||||
*/
|
||||
internal const int MAJOR_VERSION = 2;
|
||||
internal const int MINOR_VERSION = 43;
|
||||
internal const int MINOR_VERSION = 45;
|
||||
|
||||
enum WPSuspendPolicy {
|
||||
NONE = 0,
|
||||
@@ -532,7 +532,8 @@ namespace Mono.Debugger.Soft
|
||||
GET_MANIFEST_MODULE = 3,
|
||||
GET_OBJECT = 4,
|
||||
GET_TYPE = 5,
|
||||
GET_NAME = 6
|
||||
GET_NAME = 6,
|
||||
GET_DOMAIN = 7
|
||||
}
|
||||
|
||||
enum CmdModule {
|
||||
@@ -590,6 +591,7 @@ namespace Mono.Debugger.Soft
|
||||
GET_THIS = 2,
|
||||
SET_VALUES = 3,
|
||||
GET_DOMAIN = 4,
|
||||
SET_THIS = 5,
|
||||
}
|
||||
|
||||
enum CmdArrayRef {
|
||||
@@ -2113,6 +2115,10 @@ namespace Mono.Debugger.Soft
|
||||
return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_NAME, new PacketWriter ().WriteId (id)).ReadString ();
|
||||
}
|
||||
|
||||
internal long Assembly_GetIdDomain (long id) {
|
||||
return SendReceive (CommandSet.ASSEMBLY, (int)CmdAssembly.GET_DOMAIN, new PacketWriter ().WriteId (id)).ReadId ();
|
||||
}
|
||||
|
||||
/*
|
||||
* TYPE
|
||||
*/
|
||||
@@ -2410,6 +2416,10 @@ namespace Mono.Debugger.Soft
|
||||
return SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_DOMAIN, new PacketWriter ().WriteId (thread_id).WriteId (id)).ReadId ();
|
||||
}
|
||||
|
||||
internal void StackFrame_SetThis (long thread_id, long id, ValueImpl value) {
|
||||
SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.SET_THIS, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteValue (value));
|
||||
}
|
||||
|
||||
/*
|
||||
* ARRAYS
|
||||
*/
|
||||
|
||||
@@ -166,6 +166,15 @@ namespace Mono.Debugger.Soft
|
||||
return vm.DecodeValue (vm.conn.StackFrame_GetThis (thread.Id, Id));
|
||||
}
|
||||
|
||||
// Since protocol version 2.44
|
||||
public void SetThis (Value value) {
|
||||
if (value == null)
|
||||
throw new ArgumentNullException ("value");
|
||||
if (Method.IsStatic || !Method.DeclaringType.IsValueType)
|
||||
throw new InvalidOperationException ("The frame's method needs to be a valuetype instance method.");
|
||||
vm.conn.StackFrame_SetThis (thread.Id, Id, vm.EncodeValue (value));
|
||||
}
|
||||
|
||||
public void SetValue (LocalVariable var, Value value) {
|
||||
if (var == null)
|
||||
throw new ArgumentNullException ("var");
|
||||
|
||||
@@ -430,6 +430,7 @@ public class Tests : TestsBase, ITest2
|
||||
ss_recursive2 (1);
|
||||
ss_recursive_chaotic ();
|
||||
ss_fp_clobber ();
|
||||
ss_no_frames ();
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
@@ -679,6 +680,25 @@ public class Tests : TestsBase, ITest2
|
||||
public static void ss_fp_clobber_2 (double d) {
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void ss_no_frames () {
|
||||
Action a = ss_no_frames_2;
|
||||
var ar = a.BeginInvoke (null, null);
|
||||
ar.AsyncWaitHandle.WaitOne ();
|
||||
// Avoid waiting every time this runs
|
||||
if (static_i == 56)
|
||||
Thread.Sleep (200);
|
||||
ss_no_frames_3 ();
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void ss_no_frames_2 () {
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void ss_no_frames_3 () {
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static bool is_even (int i) {
|
||||
return i % 2 == 0;
|
||||
@@ -1302,6 +1322,8 @@ public class Tests : TestsBase, ITest2
|
||||
|
||||
o.invoke_2 ();
|
||||
|
||||
o.assembly_load ();
|
||||
|
||||
AppDomain.Unload (domain);
|
||||
|
||||
domains_3 ();
|
||||
@@ -1333,6 +1355,11 @@ public class Tests : TestsBase, ITest2
|
||||
public static void invoke_in_domain_2 () {
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void assembly_load_in_domain () {
|
||||
Assembly.Load ("System.Transactions");
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void dynamic_methods () {
|
||||
var m = new DynamicMethod ("dyn_method", typeof (void), new Type [] { typeof (int) }, typeof (object).Module);
|
||||
@@ -1613,6 +1640,10 @@ public class CrossDomain : MarshalByRefObject
|
||||
public int invoke_3 () {
|
||||
return 42;
|
||||
}
|
||||
|
||||
public void assembly_load () {
|
||||
Tests.assembly_load_in_domain ();
|
||||
}
|
||||
}
|
||||
|
||||
public class Foo
|
||||
|
||||
@@ -890,6 +890,28 @@ public class DebuggerTests
|
||||
req.Disable ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SingleSteppingNoFrames () {
|
||||
//
|
||||
// Test what happens when starting a single step operation on a thread
|
||||
// with no managed frames
|
||||
//
|
||||
// Run a delegate on a tp thread
|
||||
var e = run_until ("ss_no_frames_2");
|
||||
|
||||
var this_type = e.Thread.GetFrames ()[0].Method.DeclaringType;
|
||||
this_type.SetValue (this_type.GetField ("static_i"), vm.CreateValue (56));
|
||||
|
||||
var thread = e.Thread;
|
||||
var e2 = run_until ("ss_no_frames_3");
|
||||
// The tp thread should be idle now
|
||||
step_req = vm.CreateStepRequest (thread);
|
||||
step_req.Depth = StepDepth.Over;
|
||||
AssertThrows<Exception> (delegate {
|
||||
step_req.Enable ();
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MethodEntryExit () {
|
||||
run_until ("single_stepping");
|
||||
@@ -1767,6 +1789,16 @@ public class DebuggerTests
|
||||
AssertValue ("T", s ["s"]);
|
||||
AssertValue (45, s ["k"]);
|
||||
|
||||
// Test SetThis ()
|
||||
s ["i"] = vm.CreateValue (55);
|
||||
frame.SetThis (s);
|
||||
obj = frame.GetThis ();
|
||||
Assert.IsTrue (obj is StructMirror);
|
||||
s = obj as StructMirror;
|
||||
AssertValue (55, s ["i"]);
|
||||
AssertValue ("T", s ["s"]);
|
||||
AssertValue (45, s ["k"]);
|
||||
|
||||
// this on static vtype methods
|
||||
e = run_until ("vtypes3");
|
||||
e = step_until (e.Thread, "static_foo");
|
||||
@@ -3267,6 +3299,7 @@ public class DebuggerTests
|
||||
// d_method is from another domain
|
||||
MethodMirror d_method = (e as BreakpointEvent).Method;
|
||||
Assert.IsTrue (m != d_method);
|
||||
Assert.AreEqual (domain, d_method.DeclaringType.Assembly.Domain);
|
||||
|
||||
var frames = e.Thread.GetFrames ();
|
||||
Assert.AreEqual ("invoke_in_domain", frames [0].Method.Name);
|
||||
@@ -3297,6 +3330,9 @@ public class DebuggerTests
|
||||
vm.Resume ();
|
||||
e = GetNextEvent ();
|
||||
if (e is AssemblyUnloadEvent) {
|
||||
AssertThrows<Exception> (delegate () {
|
||||
var assembly_obj = (e as AssemblyUnloadEvent).Assembly.GetAssemblyObject ();
|
||||
});
|
||||
continue;
|
||||
} else {
|
||||
break;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
thisdir = class/Mono.Security.Providers.DotNet
|
||||
SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.Security.Providers.DotNet.dll
|
||||
LIB_REFS = System Mono.Security
|
||||
LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign
|
||||
|
||||
EXTRA_DISTFILES = README.md
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
$(the_lib): ../Mono.Security/Makefile
|
||||
|
||||
-101
@@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{391EDD2B-85AC-4FCA-B607-AAD6C51E6799}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<OutputPath>./../../class/lib/net_4_x</OutputPath>
|
||||
<IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<NoStdLib>True</NoStdLib>
|
||||
|
||||
<NoConfig>True</NoConfig>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>
|
||||
</RootNamespace>
|
||||
<AssemblyName>Mono.Security.Providers.DotNet</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>true</DelaySign>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
|
||||
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
|
||||
is a problem to compile the Mono mscorlib.dll -->
|
||||
<PropertyGroup>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\Locale.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.DotNet\DotNetSslStreamImpl.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.DotNet\DotNetTlsProvider.cs" />
|
||||
<Compile Include=".\Properties\AssemblyInfo.cs" />␍ </ItemGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../corlib/corlib-net_4_x.csproj">
|
||||
<Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>
|
||||
<Name>corlib-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../System/System-net_4_x.csproj">
|
||||
<Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
|
||||
<Name>System-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../Mono.Security/Mono.Security-net_4_x.csproj">
|
||||
<Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>
|
||||
<Name>Mono.Security-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
./Properties/AssemblyInfo.cs
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/Locale.cs
|
||||
|
||||
./Mono.Security.Providers.DotNet/DotNetTlsProvider.cs
|
||||
./Mono.Security.Providers.DotNet/DotNetSslStreamImpl.cs
|
||||
-317
@@ -1,317 +0,0 @@
|
||||
//
|
||||
// DotNetSslStreamImpl.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Security.Principal;
|
||||
using System.Security.Cryptography;
|
||||
using MSI = Mono.Security.Interface;
|
||||
|
||||
namespace Mono.Security.Providers.DotNet
|
||||
{
|
||||
class DotNetSslStreamImpl : MSI.IMonoSslStream
|
||||
{
|
||||
DotNetTlsProvider provider;
|
||||
SslStream impl;
|
||||
|
||||
internal SslStream Impl {
|
||||
get {
|
||||
CheckDisposed ();
|
||||
return impl;
|
||||
}
|
||||
}
|
||||
|
||||
public DotNetSslStreamImpl (
|
||||
Stream innerStream, bool leaveInnerStreamOpen, DotNetTlsProvider provider,
|
||||
RemoteCertificateValidationCallback userCertificateValidationCallback,
|
||||
LocalCertificateSelectionCallback userCertificateSelectionCallback)
|
||||
{
|
||||
this.provider = provider;
|
||||
impl = new SslStream (
|
||||
innerStream, leaveInnerStreamOpen,
|
||||
userCertificateValidationCallback,
|
||||
userCertificateSelectionCallback);
|
||||
}
|
||||
|
||||
public void AuthenticateAsClient (string targetHost)
|
||||
{
|
||||
Impl.AuthenticateAsClient (targetHost);
|
||||
}
|
||||
|
||||
public void AuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
|
||||
{
|
||||
Impl.AuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
return Impl.BeginAuthenticateAsClient (targetHost, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginAuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
return Impl.BeginAuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
public void EndAuthenticateAsClient (IAsyncResult asyncResult)
|
||||
{
|
||||
Impl.EndAuthenticateAsClient (asyncResult);
|
||||
}
|
||||
|
||||
public void AuthenticateAsServer (X509Certificate serverCertificate)
|
||||
{
|
||||
Impl.AuthenticateAsServer (serverCertificate);
|
||||
}
|
||||
|
||||
public void AuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
|
||||
{
|
||||
Impl.AuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
return Impl.BeginAuthenticateAsServer (serverCertificate, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
return Impl.BeginAuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
public void EndAuthenticateAsServer (IAsyncResult asyncResult)
|
||||
{
|
||||
Impl.EndAuthenticateAsServer (asyncResult);
|
||||
}
|
||||
|
||||
public Task AuthenticateAsClientAsync (string targetHost)
|
||||
{
|
||||
return Impl.AuthenticateAsClientAsync (targetHost);
|
||||
}
|
||||
|
||||
public Task AuthenticateAsClientAsync (string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
|
||||
{
|
||||
return Impl.AuthenticateAsClientAsync (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
|
||||
}
|
||||
|
||||
public Task AuthenticateAsServerAsync (X509Certificate serverCertificate)
|
||||
{
|
||||
return Impl.AuthenticateAsServerAsync (serverCertificate);
|
||||
}
|
||||
|
||||
public Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
|
||||
{
|
||||
return Impl.AuthenticateAsServerAsync (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation);
|
||||
}
|
||||
|
||||
public void Flush ()
|
||||
{
|
||||
Impl.Flush ();
|
||||
}
|
||||
|
||||
public int Read (byte[] buffer, int offset, int count)
|
||||
{
|
||||
return Impl.Read (buffer, offset, count);
|
||||
}
|
||||
|
||||
public void Write (byte[] buffer)
|
||||
{
|
||||
Impl.Write (buffer);
|
||||
}
|
||||
|
||||
public void Write (byte[] buffer, int offset, int count)
|
||||
{
|
||||
Impl.Write (buffer, offset, count);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
return Impl.BeginRead (buffer, offset, count, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
public int EndRead (IAsyncResult asyncResult)
|
||||
{
|
||||
return Impl.EndRead (asyncResult);
|
||||
}
|
||||
|
||||
public IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
return Impl.BeginWrite (buffer, offset, count, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
public void EndWrite (IAsyncResult asyncResult)
|
||||
{
|
||||
Impl.EndWrite (asyncResult);
|
||||
}
|
||||
|
||||
public TransportContext TransportContext {
|
||||
get { throw new NotSupportedException (); }
|
||||
}
|
||||
|
||||
public bool IsAuthenticated {
|
||||
get { return Impl.IsAuthenticated; }
|
||||
}
|
||||
|
||||
public bool IsMutuallyAuthenticated {
|
||||
get { return Impl.IsMutuallyAuthenticated; }
|
||||
}
|
||||
|
||||
public bool IsEncrypted {
|
||||
get { return Impl.IsEncrypted; }
|
||||
}
|
||||
|
||||
public bool IsSigned {
|
||||
get { return Impl.IsSigned; }
|
||||
}
|
||||
|
||||
public bool IsServer {
|
||||
get { return Impl.IsServer; }
|
||||
}
|
||||
|
||||
public CipherAlgorithmType CipherAlgorithm {
|
||||
get { return Impl.CipherAlgorithm; }
|
||||
}
|
||||
|
||||
public int CipherStrength {
|
||||
get { return Impl.CipherStrength; }
|
||||
}
|
||||
|
||||
public HashAlgorithmType HashAlgorithm {
|
||||
get { return Impl.HashAlgorithm; }
|
||||
}
|
||||
|
||||
public int HashStrength {
|
||||
get { return Impl.HashStrength; }
|
||||
}
|
||||
|
||||
public ExchangeAlgorithmType KeyExchangeAlgorithm {
|
||||
get { return Impl.KeyExchangeAlgorithm; }
|
||||
}
|
||||
|
||||
public int KeyExchangeStrength {
|
||||
get { return KeyExchangeStrength; }
|
||||
}
|
||||
|
||||
public bool CanRead {
|
||||
get { return Impl.CanRead; }
|
||||
}
|
||||
|
||||
public bool CanTimeout {
|
||||
get { return Impl.CanTimeout; }
|
||||
}
|
||||
|
||||
public bool CanWrite {
|
||||
get { return Impl.CanWrite; }
|
||||
}
|
||||
|
||||
public long Length {
|
||||
get { return Impl.Length; }
|
||||
}
|
||||
|
||||
public long Position {
|
||||
get { return Impl.Position; }
|
||||
}
|
||||
|
||||
public void SetLength (long value)
|
||||
{
|
||||
Impl.SetLength (value);
|
||||
}
|
||||
|
||||
public AuthenticatedStream AuthenticatedStream {
|
||||
get { return Impl; }
|
||||
}
|
||||
|
||||
public int ReadTimeout {
|
||||
get { return Impl.ReadTimeout; }
|
||||
set { Impl.ReadTimeout = value; }
|
||||
}
|
||||
|
||||
public int WriteTimeout {
|
||||
get { return Impl.WriteTimeout; }
|
||||
set { Impl.WriteTimeout = value; }
|
||||
}
|
||||
|
||||
public bool CheckCertRevocationStatus {
|
||||
get { return Impl.CheckCertRevocationStatus; }
|
||||
}
|
||||
|
||||
public X509Certificate InternalLocalCertificate {
|
||||
get {
|
||||
try {
|
||||
return LocalCertificate;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public X509Certificate LocalCertificate {
|
||||
get { return Impl.LocalCertificate; }
|
||||
}
|
||||
|
||||
public X509Certificate RemoteCertificate {
|
||||
get { return Impl.RemoteCertificate; }
|
||||
}
|
||||
|
||||
public SslProtocols SslProtocol {
|
||||
get { return Impl.SslProtocol; }
|
||||
}
|
||||
|
||||
MSI.MonoTlsProvider MSI.IMonoSslStream.Provider {
|
||||
get { return provider; }
|
||||
}
|
||||
|
||||
MSI.MonoTlsConnectionInfo MSI.IMonoSslStream.GetConnectionInfo ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
void CheckDisposed ()
|
||||
{
|
||||
if (impl == null)
|
||||
throw new ObjectDisposedException ("MonoSslStream");
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
GC.SuppressFinalize (this);
|
||||
}
|
||||
|
||||
protected void Dispose (bool disposing)
|
||||
{
|
||||
if (impl != null && disposing) {
|
||||
impl.Dispose ();
|
||||
impl = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-118
@@ -1,118 +0,0 @@
|
||||
//
|
||||
// MonoDefaultTlsProvider.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Mono.Security.Interface;
|
||||
|
||||
namespace Mono.Security.Providers.DotNet
|
||||
{
|
||||
/*
|
||||
* This provider only uses the public .NET APIs from System.dll.
|
||||
*
|
||||
* It is primarily intended for testing.
|
||||
*/
|
||||
public class DotNetTlsProvider : MonoTlsProvider
|
||||
{
|
||||
static readonly Guid id = new Guid ("3a7b3a26-0dbd-4572-a5b8-fdce766bf0dd");
|
||||
|
||||
public override Guid ID {
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get { return "dotnet"; }
|
||||
}
|
||||
|
||||
public override bool SupportsSslStream {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool SupportsConnectionInfo {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public override bool SupportsMonoExtensions {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
internal override bool SupportsTlsContext {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public override SslProtocols SupportedProtocols {
|
||||
get { return (SslProtocols)ServicePointManager.SecurityProtocol; }
|
||||
}
|
||||
|
||||
public override IMonoSslStream CreateSslStream (
|
||||
Stream innerStream, bool leaveInnerStreamOpen,
|
||||
MonoTlsSettings settings = null)
|
||||
{
|
||||
if (settings != null)
|
||||
throw new NotSupportedException ("Mono-specific API Extensions not available.");
|
||||
|
||||
RemoteCertificateValidationCallback validation_callback = null;
|
||||
LocalCertificateSelectionCallback selection_callback = null;
|
||||
|
||||
if (settings != null) {
|
||||
validation_callback = ConvertCallback (settings.RemoteCertificateValidationCallback);
|
||||
selection_callback = ConvertCallback (settings.ClientCertificateSelectionCallback);
|
||||
}
|
||||
|
||||
return new DotNetSslStreamImpl (innerStream, leaveInnerStreamOpen, this, validation_callback, selection_callback);
|
||||
}
|
||||
|
||||
internal override IMonoTlsContext CreateTlsContext (
|
||||
string hostname, bool serverMode, TlsProtocols protocolFlags,
|
||||
X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
|
||||
bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
|
||||
MonoTlsSettings settings)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
internal static RemoteCertificateValidationCallback ConvertCallback (MonoRemoteCertificateValidationCallback callback)
|
||||
{
|
||||
if (callback == null)
|
||||
return null;
|
||||
|
||||
return (s, c, ch, e) => callback (null, c, ch, (MonoSslPolicyErrors)e);
|
||||
}
|
||||
|
||||
internal static LocalCertificateSelectionCallback ConvertCallback (MonoLocalCertificateSelectionCallback callback)
|
||||
{
|
||||
if (callback == null)
|
||||
return null;
|
||||
|
||||
return (s, t, lc, rc, ai) => callback (t, lc, rc, ai);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
See mcs/class/Mono.Security.Providers.NewSystemSource/README.md for a detailed README.
|
||||
@@ -1,24 +0,0 @@
|
||||
thisdir = class/Mono.Security.Providers.NewSystemSource
|
||||
SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
LIB_REFS = System
|
||||
|
||||
LIBRARY = Mono.Security.Providers.NewSystemSource.dll
|
||||
|
||||
LIB_MCS_FLAGS = -d:SECURITY_DEP \
|
||||
-unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign -d:MONO -d:FEATURE_PAL -d:MONO_FEATURE_NEW_TLS \
|
||||
-d:MONO_FEATURE_NEW_SYSTEM_SOURCE -d:DISABLE_CAS_USE
|
||||
|
||||
ifdef MOBILE_PROFILE
|
||||
LIB_REFS += Mono.Security
|
||||
else
|
||||
LIB_REFS += MonoSecurity=Mono.Security
|
||||
LIB_MCS_FLAGS += -d:MONO_SECURITY_ALIAS
|
||||
endif
|
||||
|
||||
EXTRA_DISTFILES = README.md
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
$(the_lib): ../Mono.Security/Makefile
|
||||
-126
@@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<OutputPath>./../../class/lib/net_4_x</OutputPath>
|
||||
<IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<NoStdLib>True</NoStdLib>
|
||||
|
||||
<NoConfig>True</NoConfig>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>
|
||||
</RootNamespace>
|
||||
<AssemblyName>Mono.Security.Providers.NewSystemSource</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>true</DelaySign>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;SECURITY_DEP;MONO;FEATURE_PAL;MONO_FEATURE_NEW_TLS;MONO_FEATURE_NEW_SYSTEM_SOURCE;DISABLE_CAS_USE;MONO_SECURITY_ALIAS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;SECURITY_DEP;MONO;FEATURE_PAL;MONO_FEATURE_NEW_TLS;MONO_FEATURE_NEW_SYSTEM_SOURCE;DISABLE_CAS_USE;MONO_SECURITY_ALIAS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
|
||||
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
|
||||
is a problem to compile the Mono mscorlib.dll -->
|
||||
<PropertyGroup>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\Locale.cs" />
|
||||
<Compile Include="..\..\build\common\SR.cs" />
|
||||
<Compile Include="..\referencesource\mscorlib\InternalApis\NDP_Common\inc\PinnableBufferCache.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\_LazyAsyncResult.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\_LoggingObject.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\_NTAuthentication.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\_SecureChannel.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\_SslSessionsCache.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\Logging.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\_FixedSizeReader.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\_HelperAsyncResults.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\_SslState.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\_SslStream.cs" />
|
||||
<Compile Include="..\referencesource\System\net\System\Net\SecureProtocols\SslStream.cs" />
|
||||
<Compile Include="..\System\Mono.Net.Security\CallbackHelpers.cs" />
|
||||
<Compile Include="..\System\Mono.Net.Security\IMonoTlsProvider.cs" />
|
||||
<Compile Include="..\System\Mono.Net.Security\MonoTlsProviderFactory.cs" />
|
||||
<Compile Include="..\System\Mono.Net.Security\MonoTlsProviderWrapper.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\_SecureChannel.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\_SslState.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\_SslStream.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\Internal.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\SR.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\SR2.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\SslStream.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\SSPIConfiguration.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\SSPISafeHandles.cs" />
|
||||
<Compile Include="..\System\ReferenceSources\SSPIWrapper.cs" />
|
||||
<Compile Include=".\Properties\AssemblyInfo.cs" />␍ </ItemGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../corlib/corlib-net_4_x.csproj">
|
||||
<Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>
|
||||
<Name>corlib-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../System/System-net_4_x.csproj">
|
||||
<Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
|
||||
<Name>System-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../Mono.Security/Mono.Security-net_4_x.csproj">
|
||||
<Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>
|
||||
<Name>Mono.Security-net_4_x</Name>
|
||||
<Aliases>MonoSecurity</Aliases> </ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
./Properties/AssemblyInfo.cs
|
||||
../../build/common/SR.cs
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/Locale.cs
|
||||
|
||||
../referencesource/System/net/System/Net/Logging.cs
|
||||
../referencesource/System/net/System/Net/_SslSessionsCache.cs
|
||||
../referencesource/System/net/System/Net/_LazyAsyncResult.cs
|
||||
../referencesource/System/net/System/Net/_LoggingObject.cs
|
||||
../referencesource/System/net/System/Net/_NTAuthentication.cs
|
||||
../referencesource/System/net/System/Net/_SecureChannel.cs
|
||||
../referencesource/System/net/System/Net/SecureProtocols/SslStream.cs
|
||||
../referencesource/System/net/System/Net/SecureProtocols/_SslState.cs
|
||||
../referencesource/System/net/System/Net/SecureProtocols/_SslStream.cs
|
||||
../referencesource/System/net/System/Net/SecureProtocols/_FixedSizeReader.cs
|
||||
../referencesource/System/net/System/Net/SecureProtocols/_HelperAsyncResults.cs
|
||||
../referencesource/mscorlib/InternalApis/NDP_Common/inc/PinnableBufferCache.cs
|
||||
|
||||
../System/ReferenceSources/SR.cs
|
||||
../System/ReferenceSources/SR2.cs
|
||||
../System/ReferenceSources/Internal.cs
|
||||
../System/ReferenceSources/SSPIWrapper.cs
|
||||
../System/ReferenceSources/SSPISafeHandles.cs
|
||||
../System/ReferenceSources/SslStream.cs
|
||||
../System/ReferenceSources/_SslState.cs
|
||||
../System/ReferenceSources/_SslStream.cs
|
||||
../System/ReferenceSources/_SecureChannel.cs
|
||||
../System/ReferenceSources/SSPIConfiguration.cs
|
||||
../System/Mono.Net.Security/CallbackHelpers.cs
|
||||
../System/Mono.Net.Security/IMonoTlsProvider.cs
|
||||
../System/Mono.Net.Security/MonoTlsProviderFactory.cs
|
||||
../System/Mono.Net.Security/MonoTlsProviderWrapper.cs
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about the system assembly
|
||||
|
||||
[assembly: AssemblyVersion (Consts.FxVersion)]
|
||||
|
||||
[assembly: AssemblyCompany ("MONO development team")]
|
||||
[assembly: AssemblyCopyright ("(c) 2015 Xamarin")]
|
||||
[assembly: AssemblyDescription ("Mono.Security.Providers.NewSystemSource.dll")]
|
||||
[assembly: AssemblyProduct ("MONO CLI")]
|
||||
[assembly: AssemblyTitle ("Mono.Security.Providers.NewSystemSource.dll")]
|
||||
[assembly: CLSCompliant (true)]
|
||||
[assembly: ComVisible (false)]
|
||||
[assembly: NeutralResourcesLanguage ("en-US")]
|
||||
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000003336d6aed41624ca156ab579881fe90a576f1dfec48378fc94e4e440f4556776224e2d70c18996d91f36227f539fdb44340e07651f1455a489b29a7e6219a8f85e52b0f8588b4f8a857746a8468d37b556223d1452f3fcbaf0f269cdf1900ceb68f69485dc5887750d19571030c732331e00387d9b813a9ad52891087301793")]
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
|
||||
@@ -1,95 +0,0 @@
|
||||
Mono.Security.Interface / Mono.Security.Providers
|
||||
=================================================
|
||||
|
||||
This is not a public API yet, but will eventually become public.
|
||||
|
||||
|
||||
Mono.Security.Interface
|
||||
-----------------------
|
||||
|
||||
`Mono.Security.Interface` provides an abstraction layer for the TLS
|
||||
APIs that are currently being used by Mono's class libraries.
|
||||
|
||||
The main API entry points are `MonoTlsProviderFactory.GetProvider()`
|
||||
and `MonoTlsProviderFactory.InstallProvider()`.
|
||||
|
||||
Mono.Net.Security
|
||||
-----------------
|
||||
|
||||
`Mono.Net.Security` provides the internal implementation and lives
|
||||
inside `System.dll` as private and internal APIs. `Mono.Security.dll`
|
||||
uses reflection to access these.
|
||||
|
||||
On Mobile, the `Mono.Security.Interface` APIs are included as public
|
||||
APIs in `System.dll`.
|
||||
|
||||
Mono.Security.Providers
|
||||
-----------------------
|
||||
|
||||
Implementations of the `Mono.Security.Interface.MonoTlsProvider` class
|
||||
to provide TLS functionality.
|
||||
|
||||
The default provider is inside `System.dll` - it will be used automatically
|
||||
if you don't explicitly install a custom provider, so simply call
|
||||
`MonoTlsProviderFactory.GetProvider()` to use it.
|
||||
|
||||
* DotNet:
|
||||
Provides the default `SslStream` implementation from `System.dll`, only using
|
||||
public .NET types.
|
||||
|
||||
* NewSystemSource:
|
||||
Compiles several referencesource files which would normally live inside
|
||||
`System.dll` if we compiled it with their `SslStream` implementation.
|
||||
|
||||
This allows to keep the code in `System.dll` as-is, while still providing the
|
||||
new `SslStream`, which will be required by the new TLS code.
|
||||
|
||||
`System.dll` needs to make its internals visible and we're using several compiler /
|
||||
external alias tricks in here to make this work.
|
||||
|
||||
In this configuration, `MONO_SYSTEM_ALIAS`, `MONO_FEATURE_NEW_TLS` and
|
||||
`MONO_FEATURE_NEW_SYSTEM_SOURCE` (defining conditional for this configuration)
|
||||
are defined. We do not define `MONO_X509_ALIAS here`.
|
||||
|
||||
The `Mono.Security.Providers.DotNet` and `Mono.Security.Providers.NewSystemSource` directory is currently
|
||||
enabled in the top-level `Makefile`, but the resulting binaries should only be used to test the new TLS
|
||||
code and not shipped as stable APIs.
|
||||
|
||||
Pending changes
|
||||
---------------
|
||||
|
||||
This code is not actually being used in `System.dll` yet. I have some
|
||||
local changes which will switch the existing code in `WebClient`,
|
||||
`SmptClient` and `FtpWebRequest` over, but these need to be carefully
|
||||
tested.
|
||||
|
||||
At the moment, this work branch only provides new code and build
|
||||
changes, which shuffle some stuff around. There are also several
|
||||
new files which are conditional and not actually being built by
|
||||
default.
|
||||
|
||||
Build Configurations
|
||||
--------------------
|
||||
|
||||
* Normal build:
|
||||
Builds everything as before with some new APIs added, but without
|
||||
modifying any existing functionality.
|
||||
|
||||
* Build with the `newtls` profile:
|
||||
Builds `System.dll` with the new `SslStream` implementation from the
|
||||
referencesource. This is currently a "build then throw away" profile
|
||||
and not enabled from the top-level Makefile. The resulting `System.dll`
|
||||
won't actually work at runtime since it's missing the new TLS code;
|
||||
building it helps find problems and ensures that it will actually
|
||||
be possible to build this once we deploy it.
|
||||
|
||||
* Mono.Security.Providers:
|
||||
The new TLS code requires the newly built `System` and `Mono.Security.Providers.NewSystemSource`
|
||||
from this branch installed in the system. It is recommended to install it
|
||||
into a custom prefix and set that as custom runtime in Xamarin Studio.
|
||||
|
||||
|
||||
Last changed March 07th, 2015,
|
||||
Martin Baulig <martin.baulig@xamarin.com>
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
thisdir = class/Mono.Security.Providers.NewTls
|
||||
SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.Security.Providers.NewTls.dll
|
||||
LIB_REFS = System NewSystemSource=Mono.Security.Providers.NewSystemSource Mono.Security
|
||||
LIB_MCS_FLAGS = -unsafe -nowarn:1030 -keyfile:../mono.pub -delaysign
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
$(the_lib): ../Mono.Security/Makefile
|
||||
|
||||
-111
@@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{C8B8E524-BB3A-44E2-8C22-E3313E9F477C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<OutputPath>./../../class/lib/net_4_x</OutputPath>
|
||||
<IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<NoStdLib>True</NoStdLib>
|
||||
|
||||
<NoConfig>True</NoConfig>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>
|
||||
</RootNamespace>
|
||||
<AssemblyName>Mono.Security.Providers.NewTls</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>true</DelaySign>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
|
||||
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
|
||||
is a problem to compile the Mono mscorlib.dll -->
|
||||
<PropertyGroup>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\Locale.cs" />
|
||||
<Compile Include="..\..\build\common\SR.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.NewTls\ITlsConfiguration.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.NewTls\ITlsContext.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.NewTls\MonoNewTlsStream.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.NewTls\MonoNewTlsStreamFactory.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.NewTls\NewTlsProvider.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.NewTls\TlsContextWrapper.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.NewTls\TlsProviderFactory.cs" />
|
||||
<Compile Include=".\Properties\AssemblyInfo.cs" />␍ </ItemGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../corlib/corlib-net_4_x.csproj">
|
||||
<Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>
|
||||
<Name>corlib-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../System/System-net_4_x.csproj">
|
||||
<Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
|
||||
<Name>System-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../Mono.Security/Mono.Security-net_4_x.csproj">
|
||||
<Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>
|
||||
<Name>Mono.Security-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource-net_4_x.csproj">
|
||||
<Project>{0BB4541F-9B1A-4CBC-BEB1-00B31B37F74E}</Project>
|
||||
<Name>Mono.Security.Providers.NewSystemSource-net_4_x</Name>
|
||||
<Aliases>NewSystemSource</Aliases> </ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
./Properties/AssemblyInfo.cs
|
||||
../../build/common/SR.cs
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/Locale.cs
|
||||
|
||||
./Mono.Security.Providers.NewTls/ITlsConfiguration.cs
|
||||
./Mono.Security.Providers.NewTls/ITlsContext.cs
|
||||
|
||||
./Mono.Security.Providers.NewTls/MonoNewTlsStream.cs
|
||||
./Mono.Security.Providers.NewTls/MonoNewTlsStreamFactory.cs
|
||||
./Mono.Security.Providers.NewTls/NewTlsProvider.cs
|
||||
./Mono.Security.Providers.NewTls/TlsContextWrapper.cs
|
||||
./Mono.Security.Providers.NewTls/TlsProviderFactory.cs
|
||||
-93
@@ -1,93 +0,0 @@
|
||||
//
|
||||
// MonoNewTlsStream.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.
|
||||
|
||||
extern alias NewSystemSource;
|
||||
|
||||
using EncryptionPolicy = NewSystemSource::System.Net.Security.EncryptionPolicy;
|
||||
using LocalCertificateSelectionCallback = NewSystemSource::System.Net.Security.LocalCertificateSelectionCallback;
|
||||
using RemoteCertificateValidationCallback = NewSystemSource::System.Net.Security.RemoteCertificateValidationCallback;
|
||||
using SslStream = NewSystemSource::System.Net.Security.SslStream;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using MSI = Mono.Security.Interface;
|
||||
|
||||
using XAuthenticatedStream = System.Net.Security.AuthenticatedStream;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Mono.Security.Providers.NewTls
|
||||
{
|
||||
public class MonoNewTlsStream : SslStream, MSI.IMonoSslStream
|
||||
{
|
||||
MSI.MonoTlsProvider provider;
|
||||
|
||||
internal MonoNewTlsStream (Stream innerStream, MSI.MonoTlsProvider provider, MSI.MonoTlsSettings settings)
|
||||
: this (innerStream, false, provider, settings)
|
||||
{
|
||||
}
|
||||
|
||||
internal MonoNewTlsStream (Stream innerStream, bool leaveOpen, MSI.MonoTlsProvider provider, MSI.MonoTlsSettings settings)
|
||||
: base (innerStream, leaveOpen, EncryptionPolicy.RequireEncryption, provider, settings)
|
||||
{
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
public MSI.MonoTlsProvider Provider {
|
||||
get { return provider; }
|
||||
}
|
||||
|
||||
new public bool IsClosed {
|
||||
get { return base.IsClosed; }
|
||||
}
|
||||
|
||||
public MSI.MonoTlsConnectionInfo GetConnectionInfo ()
|
||||
{
|
||||
return GetMonoConnectionInfo ();
|
||||
}
|
||||
|
||||
public Task Shutdown ()
|
||||
{
|
||||
return Task.Factory.FromAsync ((state, result) => BeginShutdown (state, result), EndShutdown, null);
|
||||
}
|
||||
|
||||
public Task RequestRenegotiation ()
|
||||
{
|
||||
return Task.Factory.FromAsync ((state, result) => BeginRenegotiate (state, result), EndRenegotiate, null);
|
||||
}
|
||||
|
||||
X509Certificate MSI.IMonoSslStream.InternalLocalCertificate {
|
||||
get { return InternalLocalCertificate; }
|
||||
}
|
||||
|
||||
XAuthenticatedStream MSI.IMonoSslStream.AuthenticatedStream {
|
||||
get { return this; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-91
@@ -1,91 +0,0 @@
|
||||
//
|
||||
// MonoNewTlsStreamFactory.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.
|
||||
|
||||
extern alias NewSystemSource;
|
||||
|
||||
using XEncryptionPolicy = NewSystemSource::System.Net.Security.EncryptionPolicy;
|
||||
using XSslPolicyErrors = NewSystemSource::System.Net.Security.SslPolicyErrors;
|
||||
using XLocalCertificateSelectionCallback = NewSystemSource::System.Net.Security.LocalCertificateSelectionCallback;
|
||||
using XRemoteCertificateValidationCallback = NewSystemSource::System.Net.Security.RemoteCertificateValidationCallback;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
|
||||
using Mono.Security.Interface;
|
||||
|
||||
using PSSCX = System.Security.Cryptography.X509Certificates;
|
||||
using SSCX = System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Mono.Security.Providers.NewTls
|
||||
{
|
||||
public static class MonoNewTlsStreamFactory
|
||||
{
|
||||
internal static IMonoSslStream CreateSslStream (
|
||||
Stream innerStream, bool leaveInnerStreamOpen,
|
||||
MonoTlsProvider provider, MonoTlsSettings settings = null)
|
||||
{
|
||||
return new MonoNewTlsStream (innerStream, leaveInnerStreamOpen, provider, settings);
|
||||
}
|
||||
|
||||
public static MonoNewTlsStream CreateServer (
|
||||
Stream innerStream, bool leaveOpen, MonoTlsProvider provider, MonoTlsSettings settings,
|
||||
SSCX.X509Certificate serverCertificate, bool clientCertificateRequired,
|
||||
SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
|
||||
{
|
||||
var stream = new MonoNewTlsStream (innerStream, leaveOpen, provider, settings);
|
||||
|
||||
try {
|
||||
stream.AuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation);
|
||||
} catch (Exception ex) {
|
||||
var tlsEx = stream.LastError;
|
||||
if (tlsEx != null)
|
||||
throw new AggregateException (ex, tlsEx);
|
||||
throw;
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
public static MonoNewTlsStream CreateClient (
|
||||
Stream innerStream, bool leaveOpen, MonoTlsProvider provider, MonoTlsSettings settings,
|
||||
string targetHost, PSSCX.X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
|
||||
{
|
||||
var stream = new MonoNewTlsStream (innerStream, leaveOpen, provider, settings);
|
||||
|
||||
try {
|
||||
stream.AuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
|
||||
} catch (Exception ex) {
|
||||
var tlsEx = stream.LastError;
|
||||
if (tlsEx != null)
|
||||
throw new AggregateException (ex, tlsEx);
|
||||
throw;
|
||||
}
|
||||
return stream;
|
||||
}
|
||||
}
|
||||
}
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
//
|
||||
// NewTlsProvider.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.
|
||||
|
||||
extern alias NewSystemSource;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
|
||||
using MSI = Mono.Security.Interface;
|
||||
using MX = Mono.Security.X509;
|
||||
|
||||
using PSSCX = System.Security.Cryptography.X509Certificates;
|
||||
using SSCX = System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Mono.Security.Providers.NewTls
|
||||
{
|
||||
public class NewTlsProvider : MSI.MonoTlsProvider
|
||||
{
|
||||
static readonly Guid id = new Guid ("e5ff34f1-8b7a-4aa6-aff9-24719d709693");
|
||||
|
||||
public override Guid ID {
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get { return "newtls"; }
|
||||
}
|
||||
|
||||
public override bool SupportsSslStream {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool SupportsConnectionInfo {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool SupportsMonoExtensions {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
internal override bool SupportsTlsContext {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override SslProtocols SupportedProtocols {
|
||||
get { return SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; }
|
||||
}
|
||||
|
||||
public override MSI.IMonoSslStream CreateSslStream (
|
||||
Stream innerStream, bool leaveInnerStreamOpen,
|
||||
MSI.MonoTlsSettings settings = null)
|
||||
{
|
||||
return MonoNewTlsStreamFactory.CreateSslStream (innerStream, leaveInnerStreamOpen, this, settings);
|
||||
}
|
||||
|
||||
internal override MSI.IMonoTlsContext CreateTlsContext (
|
||||
string hostname, bool serverMode, MSI.TlsProtocols protocolFlags,
|
||||
SSCX.X509Certificate serverCertificate, PSSCX.X509CertificateCollection clientCertificates,
|
||||
bool remoteCertRequired, MSI.MonoEncryptionPolicy encryptionPolicy,
|
||||
MSI.MonoTlsSettings settings)
|
||||
{
|
||||
var config = TlsProviderFactory.CreateTlsConfiguration (
|
||||
hostname, serverMode, protocolFlags, serverCertificate,
|
||||
remoteCertRequired, settings);
|
||||
return new TlsContextWrapper (config, serverMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-221
@@ -1,221 +0,0 @@
|
||||
//
|
||||
// TlsContextWrapper.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.
|
||||
|
||||
extern alias NewSystemSource;
|
||||
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
using SSCX = System.Security.Cryptography.X509Certificates;
|
||||
using PSSCX = System.Security.Cryptography.X509Certificates;
|
||||
|
||||
using MSI = Mono.Security.Interface;
|
||||
using MX = Mono.Security.X509;
|
||||
|
||||
namespace Mono.Security.Providers.NewTls
|
||||
{
|
||||
class TlsContextWrapper : IDisposable, MSI.IMonoTlsContext
|
||||
{
|
||||
ITlsConfiguration config;
|
||||
ITlsContext context;
|
||||
bool serverMode;
|
||||
|
||||
public TlsContextWrapper (ITlsConfiguration config, bool serverMode)
|
||||
{
|
||||
this.config = config;
|
||||
this.serverMode = serverMode;
|
||||
}
|
||||
|
||||
public bool IsServer {
|
||||
get { return serverMode; }
|
||||
}
|
||||
|
||||
public bool IsValid {
|
||||
get { return context != null && context.IsValid; }
|
||||
}
|
||||
|
||||
public void Initialize (MSI.IMonoTlsEventSink eventSink)
|
||||
{
|
||||
if (context != null)
|
||||
throw new InvalidOperationException ();
|
||||
context = TlsProviderFactory.CreateTlsContext (config, serverMode, eventSink);
|
||||
}
|
||||
|
||||
void Clear ()
|
||||
{
|
||||
if (context != null) {
|
||||
context.Dispose ();
|
||||
context = null;
|
||||
}
|
||||
}
|
||||
|
||||
public ITlsConfiguration Configuration {
|
||||
get {
|
||||
if (config == null)
|
||||
throw new ObjectDisposedException ("TlsConfiguration");
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
public ITlsContext Context {
|
||||
get {
|
||||
if (!IsValid)
|
||||
throw new ObjectDisposedException ("TlsContext");
|
||||
return context;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasCredentials {
|
||||
get { return Configuration.HasCredentials; }
|
||||
}
|
||||
|
||||
public void SetCertificate (SSCX.X509Certificate certificate, AsymmetricAlgorithm privateKey)
|
||||
{
|
||||
var monoCert = new MX.X509Certificate (certificate.GetRawCertData ());
|
||||
Configuration.SetCertificate (monoCert, privateKey);
|
||||
}
|
||||
|
||||
public int GenerateNextToken (MSI.IBufferOffsetSize incoming, out MSI.IBufferOffsetSize outgoing)
|
||||
{
|
||||
var input = incoming != null ? new MSI.TlsBuffer (BOSWrapper.Wrap (incoming)) : null;
|
||||
var output = new MSI.TlsMultiBuffer ();
|
||||
var retval = Context.GenerateNextToken (input, output);
|
||||
if (output.IsEmpty)
|
||||
outgoing = null;
|
||||
outgoing = BOSWrapper.Wrap (output.StealBuffer ());
|
||||
return (int)retval;
|
||||
}
|
||||
|
||||
public int EncryptMessage (ref MSI.IBufferOffsetSize incoming)
|
||||
{
|
||||
var buffer = new MSI.TlsBuffer (BOSWrapper.Wrap (incoming));
|
||||
var retval = Context.EncryptMessage (ref buffer);
|
||||
incoming = BOSWrapper.Wrap (buffer.GetRemaining ());
|
||||
return (int)retval;
|
||||
}
|
||||
|
||||
public int DecryptMessage (ref MSI.IBufferOffsetSize incoming)
|
||||
{
|
||||
var buffer = new MSI.TlsBuffer (BOSWrapper.Wrap (incoming));
|
||||
var retval = Context.DecryptMessage (ref buffer);
|
||||
incoming = buffer != null ? BOSWrapper.Wrap (buffer.GetRemaining ()) : null;
|
||||
return (int)retval;
|
||||
}
|
||||
|
||||
class BOSWrapper : MSI.IBufferOffsetSize
|
||||
{
|
||||
public byte[] Buffer {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public int Offset {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public int Size {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
BOSWrapper (byte[] buffer, int offset, int size)
|
||||
{
|
||||
Buffer = buffer;
|
||||
Offset = offset;
|
||||
Size = size;
|
||||
}
|
||||
|
||||
public static BOSWrapper Wrap (MSI.IBufferOffsetSize bos)
|
||||
{
|
||||
return bos != null ? new BOSWrapper (bos.Buffer, bos.Offset, bos.Size) : null;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] CreateCloseNotify ()
|
||||
{
|
||||
return Context.CreateAlert (new MSI.Alert (MSI.AlertLevel.Warning, MSI.AlertDescription.CloseNotify));
|
||||
}
|
||||
|
||||
public byte[] CreateHelloRequest ()
|
||||
{
|
||||
return Context.CreateHelloRequest ();
|
||||
}
|
||||
|
||||
public SSCX.X509Certificate GetRemoteCertificate (out PSSCX.X509CertificateCollection remoteCertificateStore)
|
||||
{
|
||||
MX.X509CertificateCollection monoCollection;
|
||||
var remoteCert = Context.GetRemoteCertificate (out monoCollection);
|
||||
if (remoteCert == null) {
|
||||
remoteCertificateStore = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
remoteCertificateStore = new PSSCX.X509CertificateCollection ();
|
||||
foreach (var cert in monoCollection) {
|
||||
remoteCertificateStore.Add (new PSSCX.X509Certificate2 (cert.RawData));
|
||||
}
|
||||
return new PSSCX.X509Certificate2 (remoteCert.RawData);
|
||||
|
||||
}
|
||||
|
||||
public bool VerifyRemoteCertificate ()
|
||||
{
|
||||
return Context.VerifyRemoteCertificate ();
|
||||
}
|
||||
|
||||
public Exception LastError {
|
||||
get {
|
||||
if (context != null)
|
||||
return context.LastError;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ReceivedCloseNotify {
|
||||
get {
|
||||
return Context.ReceivedCloseNotify;
|
||||
}
|
||||
}
|
||||
|
||||
public MSI.MonoTlsConnectionInfo GetConnectionInfo ()
|
||||
{
|
||||
return Context.ConnectionInfo;
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
GC.SuppressFinalize (this);
|
||||
}
|
||||
|
||||
void Dispose (bool disposing)
|
||||
{
|
||||
Clear ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-97
@@ -1,97 +0,0 @@
|
||||
//
|
||||
// TlsProviderFactory.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015-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.
|
||||
|
||||
extern alias NewSystemSource;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
|
||||
using MSI = Mono.Security.Interface;
|
||||
using MX = Mono.Security.X509;
|
||||
|
||||
using PSSCX = System.Security.Cryptography.X509Certificates;
|
||||
using SSCX = System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Mono.Security.Providers.NewTls
|
||||
{
|
||||
static class TlsProviderFactory
|
||||
{
|
||||
const string assemblyName = "Mono.Security.NewTls, Version=4.0.0.0, Culture=neutral, PublicKeyToken=84e3aee7225169c2";
|
||||
const string tlsConfigTypeName = "Mono.Security.NewTls.TlsConfiguration";
|
||||
const string tlsContextTypeName = "Mono.Security.NewTls.TlsContext";
|
||||
|
||||
static object CreateInstance (string typeName, object[] args)
|
||||
{
|
||||
var type = Type.GetType (typeName + ", " + assemblyName);
|
||||
return Activator.CreateInstance (type, args);
|
||||
}
|
||||
|
||||
internal static ITlsConfiguration CreateTlsConfiguration (
|
||||
string hostname, bool serverMode, MSI.TlsProtocols protocolFlags,
|
||||
SSCX.X509Certificate serverCertificate, bool remoteCertRequired,
|
||||
MSI.MonoTlsSettings settings)
|
||||
{
|
||||
object[] args;
|
||||
ITlsConfiguration config;
|
||||
if (serverMode) {
|
||||
var cert = (PSSCX.X509Certificate2)serverCertificate;
|
||||
var monoCert = new MX.X509Certificate (cert.RawData);
|
||||
args = new object[] {
|
||||
(MSI.TlsProtocols)protocolFlags,
|
||||
(MSI.MonoTlsSettings)settings,
|
||||
monoCert,
|
||||
cert.PrivateKey
|
||||
};
|
||||
} else {
|
||||
args = new object[] {
|
||||
(MSI.TlsProtocols)protocolFlags,
|
||||
(MSI.MonoTlsSettings)settings,
|
||||
hostname
|
||||
};
|
||||
}
|
||||
|
||||
config = (ITlsConfiguration)CreateInstance (tlsConfigTypeName, args);
|
||||
|
||||
if (serverMode && remoteCertRequired)
|
||||
config.AskForClientCertificate = true;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
internal static ITlsContext CreateTlsContext (
|
||||
ITlsConfiguration config, bool serverMode,
|
||||
MSI.IMonoTlsEventSink eventSink)
|
||||
{
|
||||
return (ITlsContext)CreateInstance (
|
||||
tlsContextTypeName,
|
||||
new object[] { config, serverMode, eventSink });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about the system assembly
|
||||
|
||||
[assembly: AssemblyVersion (Consts.FxVersion)]
|
||||
|
||||
[assembly: AssemblyCompany ("Xamarin")]
|
||||
[assembly: AssemblyCopyright ("(c) 2015 Xamarin")]
|
||||
[assembly: AssemblyDescription ("Mono.Security.Providers.NewTls.dll")]
|
||||
[assembly: AssemblyProduct ("MONO CLI")]
|
||||
[assembly: AssemblyTitle ("Mono.Security.Providers.NewTls.dll")]
|
||||
[assembly: CLSCompliant (false)]
|
||||
[assembly: ComVisible (false)]
|
||||
[assembly: NeutralResourcesLanguage ("en-US")]
|
||||
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000003336d6aed41624ca156ab579881fe90a576f1dfec48378fc94e4e440f4556776224e2d70c18996d91f36227f539fdb44340e07651f1455a489b29a7e6219a8f85e52b0f8588b4f8a857746a8468d37b556223d1452f3fcbaf0f269cdf1900ceb68f69485dc5887750d19571030c732331e00387d9b813a9ad52891087301793")]
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
Properties/AssemblyInfo.cs
|
||||
|
||||
Mono.Security.Providers.NewTls/ITlsConfiguration.cs
|
||||
Mono.Security.Providers.NewTls/ITlsContext.cs
|
||||
|
||||
Mono.Security.Providers.NewTls/MonoNewTlsStream.cs
|
||||
Mono.Security.Providers.NewTls/MonoNewTlsStreamFactory.cs
|
||||
-1
@@ -1 +0,0 @@
|
||||
#include mobile_Mono.Security.Providers.NewTls.dll.sources
|
||||
-167
@@ -1,167 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{E485E885-59B1-4081-BC66-56AAAFD8771A}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<OutputPath>./../../class/lib/net_4_x</OutputPath>
|
||||
<IntermediateOutputPath>obj-net_4_x</IntermediateOutputPath>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<NoStdLib>True</NoStdLib>
|
||||
|
||||
<NoConfig>True</NoConfig>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>
|
||||
</RootNamespace>
|
||||
<AssemblyName>Mono.Security.Providers.OldTls</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<DelaySign>true</DelaySign>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;SECURITY_DEP</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<NoWarn>1699,1030</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;SECURITY_DEP</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
|
||||
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
|
||||
is a problem to compile the Mono mscorlib.dll -->
|
||||
<PropertyGroup>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\build\common\Consts.cs" />
|
||||
<Compile Include="..\..\build\common\Locale.cs" />
|
||||
<Compile Include="..\..\build\common\MonoTODOAttribute.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Cryptography\MD5SHA1.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Cryptography\TlsHMAC.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientCertificate.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientCertificateVerify.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientFinished.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientHello.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsClientKeyExchange.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerCertificate.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerCertificateRequest.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerFinished.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerHello.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerHelloDone.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Client\TlsServerKeyExchange.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientCertificate.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientCertificateVerify.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientFinished.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientHello.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsClientKeyExchange.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerCertificate.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerCertificateRequest.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerFinished.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerHello.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerHelloDone.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake.Server\TlsServerKeyExchange.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake\ClientCertificateType.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake\HandshakeMessage.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls.Handshake\HandshakeType.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\Alert.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\CipherAlgorithmType.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\CipherSuite.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\CipherSuiteCollection.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\CipherSuiteFactory.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ClientContext.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ClientRecordProtocol.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ClientSessionCache.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ContentType.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\Context.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\DebugHelper.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ExchangeAlgorithmType.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\HandshakeState.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\HashAlgorithmType.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\HttpsClientStream.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\RecordProtocol.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\RSASslSignatureDeformatter.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\RSASslSignatureFormatter.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SecurityCompressionType.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SecurityParameters.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SecurityProtocolType.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ServerContext.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\ServerRecordProtocol.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslCipherSuite.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslClientStream.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslHandshakeHash.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslServerStream.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\SslStreamBase.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsCipherSuite.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsClientSettings.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsException.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsServerSettings.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.Protocol.Tls\TlsStream.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtension.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\ExtendedKeyUsageExtension.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\GeneralNames.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\NetscapeCertTypeExtension.cs" />
|
||||
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\SubjectAltNameExtension.cs" />
|
||||
<Compile Include="..\System\Mono.Net.Security\LegacySslStream.cs" />
|
||||
<Compile Include=".\Mono.Security.Providers.OldTls\OldTlsProvider.cs" />
|
||||
<Compile Include=".\Properties\AssemblyInfo.cs" />␍ </ItemGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../corlib/corlib-net_4_x.csproj">
|
||||
<Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>
|
||||
<Name>corlib-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../System/System-net_4_x.csproj">
|
||||
<Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
|
||||
<Name>System-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="../Mono.Security/Mono.Security-net_4_x.csproj">
|
||||
<Project>{42D59DE7-586F-4ACF-BDD5-E7869E39E3EF}</Project>
|
||||
<Name>Mono.Security-net_4_x</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
-87
@@ -1,87 +0,0 @@
|
||||
//
|
||||
// OldTlsProvider.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig <[email protected]>
|
||||
//
|
||||
// Copyright (c) 2015 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.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Mono.Security.Interface;
|
||||
using MNS = Mono.Net.Security;
|
||||
|
||||
namespace Mono.Security.Providers.OldTls
|
||||
{
|
||||
public class OldTlsProvider : MonoTlsProvider
|
||||
{
|
||||
static readonly Guid id = new Guid ("cf8baa0d-c6ed-40ae-b512-dec8d097e9af");
|
||||
|
||||
public override Guid ID {
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get { return "old"; }
|
||||
}
|
||||
|
||||
public override bool SupportsSslStream {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool SupportsMonoExtensions {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public override bool SupportsConnectionInfo {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
internal override bool SupportsTlsContext {
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public override SslProtocols SupportedProtocols {
|
||||
get { return SslProtocols.Tls; }
|
||||
}
|
||||
|
||||
public override IMonoSslStream CreateSslStream (
|
||||
Stream innerStream, bool leaveInnerStreamOpen,
|
||||
MonoTlsSettings settings = null)
|
||||
{
|
||||
var impl = new MNS.Private.LegacySslStream (innerStream, leaveInnerStreamOpen, this, settings);
|
||||
return new MNS.Private.MonoSslStreamImpl (impl);
|
||||
}
|
||||
|
||||
internal override IMonoTlsContext CreateTlsContext (
|
||||
string hostname, bool serverMode, TlsProtocols protocolFlags,
|
||||
X509Certificate serverCertificate, X509CertificateCollection clientCertificates,
|
||||
bool remoteCertRequired, MonoEncryptionPolicy encryptionPolicy,
|
||||
MonoTlsSettings settings)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +66,3 @@ using System.Runtime.InteropServices;
|
||||
[assembly: InternalsVisibleTo ("System, PublicKey=00000000000000000400000000000000")]
|
||||
#endif
|
||||
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.OldTls, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.DotNet, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
|
||||
[assembly: InternalsVisibleTo ("Mono.Security.Providers.NewSystemSource, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
|
||||
[assembly: InternalsVisibleTo ("Xamarin.BoringTls, PublicKey=002400000480000094000000060200000024000052534131000400001100000099dd12eda85767ae6f06023ee28e711c7e5a212462095c83868c29db75eddf6d8e296e03824c14fedd5f55553fed0b6173be3cc985a4b7f9fb7c83ccff8ba3938563b3d1f45a81122f12a1bcb73edcaad61a8456c7595a6da5184b4dd9d10f011b949ef1391fccfeab1ba62aa51c267ef8bd57ef1b6ba5a4c515d0badb81a78f")]
|
||||
Loaded 100 of 1357 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user