mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
Compare commits
248
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cb79a3854 | ||
|
|
7e087da798 | ||
|
|
753c3237d9 | ||
|
|
28bfe7cee2 | ||
|
|
2cac09666c | ||
|
|
f9087fc43a | ||
|
|
4697b3a8ea | ||
|
|
104b14ecf9 | ||
|
|
e10df7ebf6 | ||
|
|
39cddf8a68 | ||
|
|
0982d3a325 | ||
|
|
10a4bf2efa | ||
|
|
6c583a2b7f | ||
|
|
e29bed4063 | ||
|
|
b1a5a05ad1 | ||
|
|
be6f705c08 | ||
|
|
37dea728dd | ||
|
|
775c9b819c | ||
|
|
b48c3afbae | ||
|
|
f4f6441b3d | ||
|
|
7b7fe93bca | ||
|
|
226a68909a | ||
|
|
ddc8aae311 | ||
|
|
79260d2d07 | ||
|
|
3044c4a61d | ||
|
|
1c2ae72289 | ||
|
|
bc6fbd6bcc | ||
|
|
5792758c46 | ||
|
|
696b0f5467 | ||
|
|
6a93bb2af6 | ||
|
|
6d0f3fd4ca | ||
|
|
df2b5d5286 | ||
|
|
5e4c9ee41e | ||
|
|
f1417d0c92 | ||
|
|
7adea6681b | ||
|
|
a3d81eb0f1 | ||
|
|
78f3e813ed | ||
|
|
fabb10ad11 | ||
|
|
94c5c521e6 | ||
|
|
900d99ee7b | ||
|
|
5ad28260db | ||
|
|
affcfa72d7 | ||
|
|
8f4becb13d | ||
|
|
cb66512665 | ||
|
|
99642da77c | ||
|
|
88ef4cd570 | ||
|
|
70ddfd4bcc | ||
|
|
1229e7daf1 | ||
|
|
8b237bc4b7 | ||
|
|
bd3d8b8c6f | ||
|
|
c12a9b1d93 | ||
|
|
472a9f26ed | ||
|
|
eabe712b8b | ||
|
|
08daf31bbe | ||
|
|
3ded86ad40 | ||
|
|
2a38031d9a | ||
|
|
af7e67f956 | ||
|
|
6abedb9098 | ||
|
|
27af6d7a9f | ||
|
|
2123795fb8 | ||
|
|
61a52200c1 | ||
|
|
06906ae1b4 | ||
|
|
7ee4cabfd4 | ||
|
|
93a97ee240 | ||
|
|
8f24658bda | ||
|
|
20452351dc | ||
|
|
80331bb7da | ||
|
|
cc7f45676f | ||
|
|
a3984aa406 | ||
|
|
32ddacbc61 | ||
|
|
f76f0c9ea1 | ||
|
|
99f4d913c6 | ||
|
|
1ac151d24b | ||
|
|
1889e9581a | ||
|
|
7c372ff816 | ||
|
|
2dc98e990f | ||
|
|
eb62294a70 | ||
|
|
da95f710cd | ||
|
|
6d0c2144a9 | ||
|
|
e9d06820c7 | ||
|
|
f8b819f184 | ||
|
|
d0b2dacbe4 | ||
|
|
361cbb0e82 | ||
|
|
aa705e5619 | ||
|
|
fa603f3bee | ||
|
|
95dd6ea1a4 | ||
|
|
24d6fe6b76 | ||
|
|
13e9655f41 | ||
|
|
20cab4607b | ||
|
|
a066fc66dc | ||
|
|
8be53f2294 | ||
|
|
0fba6804b3 | ||
|
|
c9a2f7eb14 | ||
|
|
f62d078e95 | ||
|
|
54252be418 | ||
|
|
4fc78ba4ea | ||
|
|
e1eee09270 | ||
|
|
8ba00d695d | ||
|
|
0c783ab8b1 | ||
|
|
97361f5f9c | ||
|
|
24caf69a58 | ||
|
|
bcfd0bdb59 | ||
|
|
7d1411194d | ||
|
|
e32eb2915e | ||
|
|
d408ecc25c | ||
|
|
edc150aab7 | ||
|
|
c36db18826 | ||
|
|
3ff4bc57ea | ||
|
|
c9843e2c89 | ||
|
|
10cd9adccd | ||
|
|
d7834ea50f | ||
|
|
55e2293039 | ||
|
|
1ebc5c39a4 | ||
|
|
6f310cda67 | ||
|
|
fe4e400292 | ||
|
|
5a919fe1e7 | ||
|
|
6680200ef3 | ||
|
|
1b475c438a | ||
|
|
996785933b | ||
|
|
2dbd0a3ad8 | ||
|
|
479353e65f | ||
|
|
3e7a5e370b | ||
|
|
2528cd4333 | ||
|
|
9b36ff0bbf | ||
|
|
3d266d3e19 | ||
|
|
b51d4bf5c0 | ||
|
|
e3e7d6fd04 | ||
|
|
62fc0d1475 | ||
|
|
d6d9b1ae83 | ||
|
|
ab8a3912c0 | ||
|
|
7b7d32bedc | ||
|
|
c887be36d2 | ||
|
|
cdad88da7b | ||
|
|
0935e38357 | ||
|
|
0d5c493022 | ||
|
|
3a4ccc0796 | ||
|
|
fed6c32e36 | ||
|
|
2b87f361c2 | ||
|
|
c1dd76aec2 | ||
|
|
ab1ca6f689 | ||
|
|
4de3932df4 | ||
|
|
00bb13f6a5 | ||
|
|
c38a877b2e | ||
|
|
c55c4a72d8 | ||
|
|
55c27b7f53 | ||
|
|
486b49025b | ||
|
|
845c8aed57 | ||
|
|
7fffb9c388 | ||
|
|
30fb9e2618 | ||
|
|
3581d0d32a | ||
|
|
b4f3a19ad8 | ||
|
|
ff4967bdf5 | ||
|
|
16db9f5d02 | ||
|
|
c620a32251 | ||
|
|
c2b27112b4 | ||
|
|
5d4a9b0207 | ||
|
|
b0d8d4ef4e | ||
|
|
3b834d2a46 | ||
|
|
098b1bdddb | ||
|
|
8ce2b6b548 | ||
|
|
00698f7408 | ||
|
|
9a9caf7494 | ||
|
|
143c6c2209 | ||
|
|
c6f235cd88 | ||
|
|
c8e62dada8 | ||
|
|
6d20855af2 | ||
|
|
c3af5bc992 | ||
|
|
2ada13b646 | ||
|
|
44c5a48b97 | ||
|
|
8ec4b50c19 | ||
|
|
7450e5985f | ||
|
|
49fbaad9d3 | ||
|
|
567eead66e | ||
|
|
ed6134ef61 | ||
|
|
a314396709 | ||
|
|
3b4b25dadc | ||
|
|
765d709d24 | ||
|
|
42c253731a | ||
|
|
a5d2e11456 | ||
|
|
8a2fd1e276 | ||
|
|
c044190b79 | ||
|
|
65c1997913 | ||
|
|
856aa24078 | ||
|
|
bd693bbc41 | ||
|
|
9c4da07fc1 | ||
|
|
d27243324f | ||
|
|
6f824e0b6f | ||
|
|
e3da710362 | ||
|
|
cc612cb4d0 | ||
|
|
dd63bc4cda | ||
|
|
c8c225f066 | ||
|
|
6e3d2eb291 | ||
|
|
a12ee3f98d | ||
|
|
feba93a5de | ||
|
|
9958261a8a | ||
|
|
8db00dcc40 | ||
|
|
b7c654d26d | ||
|
|
3002249dab | ||
|
|
840801ecb9 | ||
|
|
4a655c66f7 | ||
|
|
f4a3cbdaed | ||
|
|
e8b9107c3f | ||
|
|
edec9a54af | ||
|
|
5ac529a182 | ||
|
|
d6c6e7b6de | ||
|
|
48cc848a43 | ||
|
|
d8e3d0e959 | ||
|
|
6b97b22c3b | ||
|
|
a33fb26f89 | ||
|
|
6767d24b3f | ||
|
|
1301b2697c | ||
|
|
0453803999 | ||
|
|
c59dc39170 | ||
|
|
0c9216e5a4 | ||
|
|
4ef57bc080 | ||
|
|
b728d181e0 | ||
|
|
06ec2cc12e | ||
|
|
e0789c921c | ||
|
|
a35eef3a6a | ||
|
|
726c4a3f18 | ||
|
|
c0025d2188 | ||
|
|
745f4356c2 | ||
|
|
f5c88fb0fc | ||
|
|
e7e3420219 | ||
|
|
b1ee8a55ff | ||
|
|
13038ab9eb | ||
|
|
7192da2671 | ||
|
|
a8c94d1d17 | ||
|
|
cd7496d658 | ||
|
|
0d21061d41 | ||
|
|
150fa242fb | ||
|
|
fe1a1784f4 | ||
|
|
ae9f1d7f7a | ||
|
|
c88dea2f39 | ||
|
|
e06fe98fa0 | ||
|
|
3ebd1cfd57 | ||
|
|
c937b46879 | ||
|
|
b05d49ffaa | ||
|
|
1b8ba5d892 | ||
|
|
e07d3c2fe3 | ||
|
|
87033ea0ac | ||
|
|
9df06f7f5d | ||
|
|
f3106df8ba | ||
|
|
2c9e57560e | ||
|
|
9ecc046d41 | ||
|
|
0c9641f7dc | ||
|
|
e35814198d | ||
|
|
48e3e32add |
No files matched your search
@@ -38,7 +38,6 @@ obj/
|
||||
[Rr]elease*/
|
||||
Ankh.NoLoad
|
||||
*.gpState
|
||||
.vscode/
|
||||
|
||||
# Tooling
|
||||
_ReSharper*/
|
||||
|
||||
+9
-17
@@ -4,16 +4,17 @@ AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
|
||||
|
||||
# Some tools might not build when cross-compiling
|
||||
if CROSS_COMPILING
|
||||
tools_dir =
|
||||
else
|
||||
tools_dir = tools
|
||||
endif
|
||||
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
|
||||
# Keep in sync with SUBDIRS
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
|
||||
else
|
||||
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) acceptance-tests
|
||||
# Keep in sync with SUBDIRS
|
||||
## 'tools' is not normally built
|
||||
DIST_SUBDIRS = m4 po $(libgc_dir) eglib mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests
|
||||
endif
|
||||
|
||||
all: update_submodules
|
||||
|
||||
@@ -67,14 +68,6 @@ get-monolite-latest:
|
||||
cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
|
||||
cd $(mcslib) && mv -f monolite-* monolite
|
||||
|
||||
if BITCODE
|
||||
BITCODE_CHECK=yes
|
||||
endif
|
||||
|
||||
.PHONY: check-ci
|
||||
check-ci:
|
||||
MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
|
||||
|
||||
.PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
|
||||
validate: do-build-mono-mcs
|
||||
$(MAKE) mcs-do-tests
|
||||
@@ -160,7 +153,6 @@ package-inputs:
|
||||
read libou; echo " <library_output>$$libou</library_output>"; \
|
||||
read fx_ver; echo " <fx_version>$$fx_ver</fx_version>"; \
|
||||
read profile; echo " <profile>$$profile</profile>"; \
|
||||
read resxt; echo " <resources>$$resxt</resources>"; \
|
||||
read resp; echo " <response>$$resp</response>"; \
|
||||
echo " </project>") >> msvc/scripts/order.xml; \
|
||||
done
|
||||
|
||||
@@ -262,7 +262,9 @@ CORECLR_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/intrinsic/pow/pow2.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/intrinsic/pow/pow3.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime1.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime2.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/localloc/localloc3.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/newarr/newarr.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/int16.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/int32.cs \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/shift/int64.cs \
|
||||
@@ -1277,6 +1279,7 @@ CORECLR_TEST_CS_SRC= \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeybeta2/366085/366085.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/simple/finally.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/unittests/returnfromcatch.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/regression/v1/threads/functional/threadpool/cs_threadpoolnullchecks/cs_threadpoolnullchecks.cs \
|
||||
@@ -4000,15 +4003,6 @@ CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
# this test makes no sense, the expected pattern is the English one for all cultures
|
||||
CORECLR_DISABLED_TEST_CS_SRC += $(CORECLR_PATH)/tests/src/Regressions/coreclr/0584/test584.cs
|
||||
|
||||
# Requires precise stack scanning
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/lifetime/lifetime2.cs
|
||||
|
||||
# Depends on small array behavior of .net. Mono supports objects > 2Gb on 64bits and the following tests verify for that
|
||||
CORECLR_DISABLED_TEST_CS_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/newarr/newarr.cs \
|
||||
$(CORECLR_PATH)/tests/src/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs
|
||||
|
||||
CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/BBT/Scenario4/Not-Int32.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/Convert/implicitConv.il \
|
||||
@@ -4079,6 +4073,7 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/array-il/simple3.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/badendfinally.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/badtailcall.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/byrefsubbyref1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/calli2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/ceeillegal.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/ldelemnullarr2.il \
|
||||
@@ -4092,12 +4087,14 @@ CORECLR_TEST_IL_SRC = \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/volatilldind.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/volatilstind.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/arrgetlen.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/lcliimpl.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ldsshrstsfld.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ldvirtftncalli.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ovfldiv2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/ovflrem2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/stfldstatic1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/stfldstatic2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/subbyref.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly1.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly2.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/switchdefaultonly3.il \
|
||||
@@ -5121,21 +5118,6 @@ CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/CLR-x86-JIT/V1-M09.5-PDC/b28901/b28901.il \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Regression/clr-x64-JIT/v2.1/b173569/b173569.il
|
||||
|
||||
|
||||
# Bad test that tries an implicit cast from int32 to byref
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/importer/byrefsubbyref1.il
|
||||
|
||||
# Bad test that tries to implicit cast from bytef to int32
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/subbyref.il
|
||||
|
||||
# Bad test that tries to assign a byref to a class to a byref of an interface that class implements
|
||||
# This is unsafe because the byref is mutable and would allow you to store the wrong type on that cell.
|
||||
CORECLR_DISABLED_TEST_IL_SRC += \
|
||||
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/lcliimpl.il
|
||||
|
||||
|
||||
# find all CoreCLR *.il test files that aren't mentioned in this file
|
||||
CORECLR_DEFINED_IL_SRC = $(CORECLR_TEST_IL_SRC) $(CORECLR_DISABLED_TEST_IL_SRC)
|
||||
CORECLR_UPSTREAM_IL_SRC=$(shell find "$(CORECLR_PATH)/tests" -iname "*.il")
|
||||
|
||||
@@ -4,11 +4,17 @@ check-roslyn:
|
||||
sed -i -e 's/\\4.5-api"/\\4.5"/g' $$PREFIX/lib/mono/xbuild-frameworks/.NETFramework/v4.5/RedistList/FrameworkList.xml; \
|
||||
export MSBuildExtensionsPath=$$PREFIX/lib/mono/xbuild; \
|
||||
MONO_DOTNET_PORTABLE_DIR=$$PREFIX/lib/mono/xbuild-frameworks/.NETPortable/; \
|
||||
if [ ! -d "$$MONO_DOTNET_PORTABLE_DIR/v4.6" ]; then \
|
||||
MONO_NUGET_TARGETS_DIR=$$PREFIX/lib/mono/xbuild/Microsoft/NuGet/; \
|
||||
MONO_PORTABLE_TARGETS_DIR=$$PREFIX/lib/mono/xbuild/Microsoft/Portable/v5.0; \
|
||||
if [ ! -d "$$MONO_DOTNET_PORTABLE_DIR/v5.0" ]; then \
|
||||
mkdir -p $$MONO_DOTNET_PORTABLE_DIR; \
|
||||
mkdir -p $$MONO_NUGET_TARGETS_DIR; \
|
||||
mkdir -p $$MONO_PORTABLE_TARGETS_DIR; \
|
||||
curl -SL "http://download.mono-project.com/third-party/RoslynBuildDependencies.zip" > /tmp/RoslynBuildDependencies.zip; \
|
||||
unzip -o /tmp/RoslynBuildDependencies.zip -d /tmp/RoslynBuildDependencies; \
|
||||
cp -r /tmp/RoslynBuildDependencies/PortableReferenceAssemblies/* $$MONO_DOTNET_PORTABLE_DIR; \
|
||||
cp /tmp/RoslynBuildDependencies/NuGetTargets/* $$MONO_NUGET_TARGETS_DIR; \
|
||||
cp /tmp/RoslynBuildDependencies/PortableTargets/* $$MONO_PORTABLE_TARGETS_DIR; \
|
||||
fi; \
|
||||
cd $(ROSLYN_PATH); \
|
||||
sed -i -e 'N; s/bootstrapArg=".*\n.*"/bootstrapArg=""/g' cibuild.sh; \
|
||||
|
||||
+2
-3
@@ -160,9 +160,8 @@ if test -d $srcdir/eglib; then
|
||||
echo Done running eglib/autogen.sh ...
|
||||
fi
|
||||
|
||||
if test x$MONO_EXTRA_CONFIGURE_FLAGS != x; then
|
||||
echo "MONO_EXTRA_CONFIGURE_FLAGS is $MONO_EXTRA_CONFIGURE_FLAGS"
|
||||
fi
|
||||
|
||||
echo "MONO_EXTRA_CONFIGURE_FLAGS is $MONO_EXTRA_CONFIGURE_FLAGS"
|
||||
|
||||
conf_flags="$MONO_EXTRA_CONFIGURE_FLAGS --enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
@echo off
|
||||
cd mcs\jay
|
||||
vcbuild jay.vcxproj
|
||||
cd msvc\scripts
|
||||
csc prepare.cs
|
||||
prepare.exe ..\..\mcs core
|
||||
msbuild net_4_x.sln
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
(cd mcs/jay; make)
|
||||
(cd msvc/scripts/; make prepare.exe; mono prepare.exe ../../mcs core)
|
||||
(cd msvc/scripts/; make prepare.exe; mono prepare.exe `pwd`/mcs core)
|
||||
msbuild net_4_x.sln
|
||||
+122
-312
@@ -1,8 +1,7 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#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.6.0],
|
||||
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
@@ -353,18 +352,6 @@ AM_CONDITIONAL(PLATFORM_DARWIN, test x$host_darwin = xyes)
|
||||
AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
|
||||
AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
|
||||
|
||||
if test -z "$PLATFORM_DARWIN_TRUE"; then :
|
||||
PLATFORM_AOT_SUFFIX=.dylib
|
||||
fi
|
||||
|
||||
if test -z "$PLATFORM_LINUX_TRUE"; then :
|
||||
PLATFORM_AOT_SUFFIX=.so
|
||||
fi
|
||||
|
||||
AC_SUBST(PLATFORM_AOT_SUFFIX)
|
||||
|
||||
## PLATFORM_AOT_SUFFIX not so simple for windows :-)
|
||||
|
||||
AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
AC_PROG_CC
|
||||
AC_CHECK_TOOL(CXX, g++, g++)
|
||||
@@ -532,9 +519,6 @@ if test x"$GCC" = xyes; then
|
||||
# We rely on signed overflow to behave
|
||||
CFLAGS="$CFLAGS -fwrapv"
|
||||
|
||||
# We rely on zero length arrays in structs
|
||||
CFLAGS="$CFLAGS -Wno-zero-length-array"
|
||||
|
||||
CFLAGS="$CFLAGS -DMONO_DLL_EXPORT"
|
||||
if test x"$disable_visibility_hidden" = xno; then
|
||||
# Don't export any symbols by default
|
||||
@@ -742,202 +726,6 @@ AC_ARG_ENABLE(system-aot, [ --enable-system-aot Enable the Ahead-Of-Time compi
|
||||
|
||||
DISABLED_FEATURES=none
|
||||
|
||||
#
|
||||
# Set the build profiles and options before things which use them
|
||||
#
|
||||
|
||||
AC_ARG_WITH(profile4_x, [ --with-profile4=yes,no If you want to install the 4.x FX (defaults to yes)], [], [with_profile4_x=default])
|
||||
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=default])
|
||||
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the Xamarin.iOS assemblies (defaults to no)], [], [with_monotouch=default])
|
||||
AC_ARG_WITH(monotouch_watch, [ --with-monotouch_watch=yes,no If you want to build the Xamarin.WatchOS assemblies (defaults to no)],[], [with_monotouch_watch=default])
|
||||
AC_ARG_WITH(monotouch_tv, [ --with-monotouch_tv=yes,no If you want to build the Xamarin.TVOS assemblies (defaults to no)], [], [with_monotouch_tv=default])
|
||||
AC_ARG_WITH(bitcode, [ --with-bitcode=yes,no If bitcode is enabled (defaults to no)], [], [with_bitcode=default])
|
||||
AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=default])
|
||||
AC_ARG_WITH(mobile_static, [ --with-mobile_static=yes,no If you want to build the mobile_static assemblies (defaults to no)], [], [with_mobile_static=default])
|
||||
|
||||
AC_ARG_WITH(runtime_preset, [ --with-runtime_preset=net_4_x,all,mobile_static,bitcode_mobile_static Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x])
|
||||
|
||||
dnl
|
||||
dnl Profile defaults
|
||||
dnl
|
||||
TEST_PROFILE=default
|
||||
enable_llvm_default=no
|
||||
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=900,ntrampolines=8000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=2800
|
||||
|
||||
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_profile4_x_default=no
|
||||
with_monodroid_default=no
|
||||
with_monotouch_default=no
|
||||
with_monotouch_watch_default=no
|
||||
with_monotouch_tv_default=no
|
||||
with_xammac_default=no
|
||||
with_mobile_static_default=no
|
||||
with_bitcode_default=no
|
||||
with_cooperative_gc_default=no
|
||||
elif test x$with_runtime_preset = xnet_4_x; then
|
||||
with_cooperative_gc_default=no
|
||||
with_profile4_x_default=yes
|
||||
with_monodroid_default=no
|
||||
with_monotouch_default=no
|
||||
with_monotouch_watch_default=no
|
||||
with_monotouch_tv_default=no
|
||||
with_xammac_default=no
|
||||
with_mobile_static_default=no
|
||||
with_bitcode_default=no
|
||||
elif test x$with_runtime_preset = xall; then
|
||||
with_cooperative_gc_default=no
|
||||
with_profile4_x_default=yes
|
||||
with_monodroid_default=yes
|
||||
with_monotouch_default=yes
|
||||
with_monotouch_watch_default=yes
|
||||
with_monotouch_tv_default=yes
|
||||
with_xammac_default=yes
|
||||
with_mobile_static_default=no
|
||||
with_bitcode_default=no
|
||||
elif test x$with_runtime_preset = xmobile_static; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_cooperative_gc_default=no
|
||||
with_profile4_x_default=no
|
||||
with_monodroid_default=no
|
||||
with_monotouch_default=no
|
||||
with_monotouch_watch_default=no
|
||||
with_monotouch_tv_default=no
|
||||
with_xammac_default=no
|
||||
with_mobile_static_default=yes
|
||||
with_bitcode_default=no
|
||||
with_cooperative_gc_default=no
|
||||
TEST_PROFILE=mobile_static
|
||||
|
||||
mono_feature_disable_com='yes'
|
||||
mono_feature_disable_remoting='yes'
|
||||
mono_feature_disable_reflection_emit_save='yes'
|
||||
mono_feature_disable_reflection_emit='yes'
|
||||
mono_feature_disable_appdomains='yes'
|
||||
|
||||
AOT_BUILD_FLAGS="-O=gsharedvt --aot=full,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--full-aot"
|
||||
elif test x$with_runtime_preset = xbitcode_mobile_static; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
with_profile4_x_default=no
|
||||
with_monodroid_default=no
|
||||
with_monotouch_default=no
|
||||
with_monotouch_watch_default=no
|
||||
with_monotouch_tv_default=no
|
||||
with_xammac_default=no
|
||||
with_mobile_static_default=yes
|
||||
with_bitcode_default=yes
|
||||
with_cooperative_gc_default=yes
|
||||
TEST_PROFILE=mobile_static
|
||||
enable_llvm_default=yes
|
||||
|
||||
mono_feature_disable_com='yes'
|
||||
mono_feature_disable_remoting='yes'
|
||||
mono_feature_disable_reflection_emit_save='yes'
|
||||
mono_feature_disable_reflection_emit='yes'
|
||||
mono_feature_disable_appdomains='yes'
|
||||
|
||||
AOT_BUILD_FLAGS="--aot=llvmonly,$INVARIANT_AOT_OPTIONS"
|
||||
AOT_RUN_FLAGS="--llvmonly"
|
||||
else
|
||||
with_profile4_x_default=yes
|
||||
with_monodroid_default=no
|
||||
with_monotouch_default=no
|
||||
with_monotouch_watch_default=no
|
||||
with_monotouch_tv_default=no
|
||||
with_bitcode_default=no
|
||||
with_xammac_default=no
|
||||
with_mobile_static_default=no
|
||||
with_cooperative_gc_default=no
|
||||
fi
|
||||
|
||||
if test "x$AOT_BUILD_FLAGS" != "x"; then :
|
||||
AC_SUBST(AOT_BUILD_FLAGS)
|
||||
AC_SUBST(AOT_RUN_FLAGS)
|
||||
# For llvmonlycheck + fullaotcheck
|
||||
AC_SUBST(INVARIANT_AOT_OPTIONS)
|
||||
fi
|
||||
|
||||
AC_SUBST(TEST_PROFILE)
|
||||
|
||||
if test "x$with_profile4_x" = "xdefault"; then
|
||||
with_profile4_x=$with_profile4_x_default
|
||||
fi
|
||||
if test "x$with_monodroid" = "xdefault"; then
|
||||
with_monodroid=$with_monodroid_default
|
||||
fi
|
||||
if test "x$with_monotouch" = "xdefault"; then
|
||||
with_monotouch=$with_monotouch_default
|
||||
fi
|
||||
if test "x$with_monotouch_watch" = "xdefault"; then
|
||||
with_monotouch_watch=$with_monotouch_watch_default
|
||||
fi
|
||||
if test "x$with_monotouch_tv" = "xdefault"; then
|
||||
with_monotouch_tv=$with_monotouch_tv_default
|
||||
fi
|
||||
if test "x$with_bitcode" = "xdefault"; then
|
||||
with_bitcode=$with_bitcode_default
|
||||
fi
|
||||
if test "x$with_xammac" = "xdefault"; then
|
||||
with_xammac=$with_xammac_default
|
||||
fi
|
||||
if test "x$with_mobile_static" = "xdefault"; then
|
||||
with_mobile_static=$with_mobile_static_default
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"])
|
||||
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MONOTOUCH_TV, [test "x$with_monotouch_tv" != "xno"])
|
||||
AM_CONDITIONAL(BITCODE, test "x$with_bitcode" = "xyes")
|
||||
AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MOBILE_STATIC, [test "x$with_mobile_static" != "xno"])
|
||||
|
||||
AC_SUBST(INSTALL_MOBILE_STATIC)
|
||||
|
||||
default_profile=net_4_x
|
||||
if test -z "$INSTALL_MONODROID_TRUE"; then :
|
||||
default_profile=monodroid
|
||||
fi
|
||||
if test -z "$INSTALL_MONOTOUCH_TRUE"; then :
|
||||
default_profile=monotouch
|
||||
fi
|
||||
if test -z "$INSTALL_XAMMAC_TRUE"; then :
|
||||
default_profile=xammac
|
||||
fi
|
||||
if test -z "$INSTALL_MOBILE_STATIC_TRUE"; then :
|
||||
default_profile=mobile_static
|
||||
fi
|
||||
if test -z "$INSTALL_4_x_TRUE"; then :
|
||||
default_profile=net_4_x
|
||||
fi
|
||||
DEFAULT_PROFILE=$default_profile
|
||||
AC_SUBST(DEFAULT_PROFILE)
|
||||
|
||||
#
|
||||
# End build profile configuration
|
||||
#
|
||||
|
||||
if test x$USE_NLS = xprofile_default; then
|
||||
|
||||
if test x$host_darwin = xyes; then
|
||||
# We make the default value for USE_NLS
|
||||
# "no" on OSX because it isn't available on most
|
||||
# default OSX installs. The most common configurations will
|
||||
# all disable it, so this saves us typing.
|
||||
USE_NLS=no
|
||||
AC_SUBST([USE_NLS])
|
||||
AC_MSG_RESULT([$USE_NLS])
|
||||
else
|
||||
USE_NLS=yes
|
||||
AC_SUBST([USE_NLS])
|
||||
AC_MSG_RESULT([$USE_NLS])
|
||||
fi
|
||||
|
||||
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,
|
||||
@@ -1179,76 +967,72 @@ AC_ARG_WITH(libgc, [ --with-gc=included,none Controls the Boehm GC config, d
|
||||
AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
|
||||
AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
|
||||
|
||||
if test "x$support_boehm" = "xyes"; then
|
||||
|
||||
AC_ARG_ENABLE(parallel-mark, [ --enable-parallel-mark Enables Boehm GC Parallel Marking], enable_parallel_mark=$enableval, enable_parallel_mark=$parallel_mark)
|
||||
if test x$enable_parallel_mark = xyes; then
|
||||
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
|
||||
fi
|
||||
|
||||
gc_msg=""
|
||||
LIBGC_CPPFLAGS=
|
||||
LIBGC_LIBS=
|
||||
LIBGC_STATIC_LIBS=
|
||||
libgc_dir=
|
||||
case "x$libgc" in
|
||||
xincluded)
|
||||
if test "x$support_boehm" = "xyes"; then
|
||||
libgc_dir=libgc
|
||||
fi
|
||||
|
||||
LIBGC_CPPFLAGS='-I$(top_srcdir)/libgc/include'
|
||||
LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
|
||||
LIBGC_STATIC_LIBS='$(top_builddir)/libgc/libmonogc-static.la'
|
||||
|
||||
BOEHM_DEFINES="-DHAVE_BOEHM_GC"
|
||||
|
||||
if test x$target_win32 = xyes; then
|
||||
BOEHM_DEFINES="$BOEHM_DEFINES -DGC_NOT_DLL"
|
||||
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DGC_BUILD -DGC_NOT_DLL"
|
||||
fi
|
||||
|
||||
gc_msg="Included Boehm GC with typed GC"
|
||||
if test x$enable_parallel_mark = xyes; then
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description])
|
||||
gc_msg="$gc_msg and parallel mark"
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC)", [GC description])
|
||||
fi
|
||||
;;
|
||||
|
||||
xboehm|xbohem|xyes)
|
||||
AC_MSG_WARN("External Boehm is no longer supported")
|
||||
;;
|
||||
|
||||
xsgen)
|
||||
AC_MSG_WARN("Use --with-sgen instead, --with-gc= controls Boehm configuration")
|
||||
;;
|
||||
|
||||
xnone)
|
||||
AC_MSG_WARN("Compiling mono without GC.")
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "none", [GC description])
|
||||
AC_DEFINE(HAVE_NULL_GC,1,[No GC support.])
|
||||
gc_msg="none"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid argument to --with-gc.])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_WITH(large-heap, [ --with-large-heap=yes,no Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no])
|
||||
if test "x$large_heap" = "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBGC_CPPFLAGS)
|
||||
AC_SUBST(LIBGC_LIBS)
|
||||
AC_SUBST(LIBGC_STATIC_LIBS)
|
||||
AC_SUBST(libgc_dir)
|
||||
AC_SUBST(BOEHM_DEFINES)
|
||||
|
||||
AC_ARG_ENABLE(parallel-mark, [ --enable-parallel-mark Enables Boehm GC Parallel Marking], enable_parallel_mark=$enableval, enable_parallel_mark=$parallel_mark)
|
||||
if test x$enable_parallel_mark = xyes; then
|
||||
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
|
||||
fi
|
||||
|
||||
gc_msg=""
|
||||
LIBGC_CPPFLAGS=
|
||||
LIBGC_LIBS=
|
||||
LIBGC_STATIC_LIBS=
|
||||
libgc_dir=
|
||||
case "x$libgc" in
|
||||
xincluded)
|
||||
if test "x$support_boehm" = "xyes"; then
|
||||
libgc_dir=libgc
|
||||
fi
|
||||
|
||||
LIBGC_CPPFLAGS='-I$(top_srcdir)/libgc/include'
|
||||
LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
|
||||
LIBGC_STATIC_LIBS='$(top_builddir)/libgc/libmonogc-static.la'
|
||||
|
||||
BOEHM_DEFINES="-DHAVE_BOEHM_GC"
|
||||
|
||||
if test x$target_win32 = xyes; then
|
||||
BOEHM_DEFINES="$BOEHM_DEFINES -DGC_NOT_DLL"
|
||||
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DGC_BUILD -DGC_NOT_DLL"
|
||||
fi
|
||||
|
||||
gc_msg="Included Boehm GC with typed GC"
|
||||
if test x$enable_parallel_mark = xyes; then
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description])
|
||||
gc_msg="$gc_msg and parallel mark"
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC)", [GC description])
|
||||
fi
|
||||
;;
|
||||
|
||||
xboehm|xbohem|xyes)
|
||||
AC_MSG_WARN("External Boehm is no longer supported")
|
||||
;;
|
||||
|
||||
xsgen)
|
||||
AC_MSG_WARN("Use --with-sgen instead, --with-gc= controls Boehm configuration")
|
||||
;;
|
||||
|
||||
xnone)
|
||||
AC_MSG_WARN("Compiling mono without GC.")
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "none", [GC description])
|
||||
AC_DEFINE(HAVE_NULL_GC,1,[No GC support.])
|
||||
gc_msg="none"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid argument to --with-gc.])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_WITH(large-heap, [ --with-large-heap=yes,no Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no])
|
||||
if test "x$large_heap" = "xyes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBGC_CPPFLAGS)
|
||||
AC_SUBST(LIBGC_LIBS)
|
||||
AC_SUBST(LIBGC_STATIC_LIBS)
|
||||
AC_SUBST(libgc_dir)
|
||||
AC_SUBST(BOEHM_DEFINES)
|
||||
|
||||
dnl
|
||||
dnl End of Boehm GC Configuration
|
||||
dnl
|
||||
@@ -2788,17 +2572,13 @@ dnl **************
|
||||
dnl *** LLVM ***
|
||||
dnl **************
|
||||
|
||||
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=default)
|
||||
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
|
||||
AC_ARG_ENABLE(loadedllvm,[ --enable-loadedllvm Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no)
|
||||
AC_ARG_ENABLE(llvm-version-check,[ --enable-llvm-version-check Check that the LLVM matches the version expected by mono], enable_llvm_version_check=$enableval, enable_llvm_version_check=no)
|
||||
AC_ARG_ENABLE(llvm-runtime,[ --enable-llvm-runtime Enable runtime support for llvmonly code], enable_llvm_runtime=$enableval, enable_llvm_runtime=no)
|
||||
|
||||
AC_ARG_WITH(llvm, [ --with-llvm=<llvm prefix> Enable the LLVM back-end], enable_llvm=yes,)
|
||||
|
||||
if test "x$enable_llvm" = "xdefault"; then
|
||||
enable_llvm=$enable_llvm_default
|
||||
fi
|
||||
|
||||
if test "x$enable_llvm" = "xyes"; then
|
||||
if test "x$with_llvm" != "x"; then
|
||||
LLVM_CONFIG=$with_llvm/bin/llvm-config
|
||||
@@ -3779,6 +3559,15 @@ case "x$libgc" in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_WITH(profile4_x, [ --with-profile4=yes,no If you want to install the 4.6 FX (defaults to yes)], [], [with_profile4_x=yes])
|
||||
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=no])
|
||||
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the Xamarin.iOS assemblies (defaults to no)], [], [with_monotouch=no])
|
||||
AC_ARG_WITH(monotouch_watch, [ --with-monotouch_watch=yes,no If you want to build the Xamarin.WatchOS assemblies (defaults to no)],[], [with_monotouch_watch=no])
|
||||
AC_ARG_WITH(monotouch_tv, [ --with-monotouch_tv=yes,no If you want to build the Xamarin.TVOS assemblies (defaults to no)], [], [with_monotouch_tv=no])
|
||||
AC_ARG_WITH(bitcode, [ --with-bitcode=yes,no If bitcode is enabled (defaults to no)], [], [with_bitcode=no])
|
||||
AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=no])
|
||||
AC_ARG_WITH(mobile_static, [ --with-mobile_static=yes,no If you want to build the mobile_static assemblies (defaults to no)], [], [with_mobile_static=no])
|
||||
|
||||
MALLOC_MEMPOOLS=no
|
||||
AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for each single mempool allocation (only for runtime debugging, defaults to no)],[
|
||||
if test x$with_malloc_mempools = xyes; then
|
||||
@@ -3788,18 +3577,15 @@ AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for eac
|
||||
])
|
||||
|
||||
|
||||
DISABLE_MCS_DOCS=default
|
||||
DISABLE_MCS_DOCS=no
|
||||
AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the documentation under mcs (defaults to yes)],[
|
||||
if test x$with_mcs_docs != xyes; then
|
||||
DISABLE_MCS_DOCS=yes
|
||||
fi
|
||||
])
|
||||
if test -n "$INSTALL_4_x_TRUE"; then :
|
||||
if test x$with_profile4_x != xyes; then
|
||||
DISABLE_MCS_DOCS=yes
|
||||
fi
|
||||
if test "x$DISABLE_MCS_DOCS" = "xdefault"; then
|
||||
DISABLE_MCS_DOCS=$DISABLE_MCS_DOCS_default
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(lazy_gc_thread_creation, [ --with-lazy-gc-thread-creation=yes|no Enable lazy runtime thread creation, embedding host must do it explicitly (defaults to no)],[
|
||||
if test x$with_lazy_gc_thread_creation != xno ; then
|
||||
@@ -3807,15 +3593,11 @@ AC_ARG_WITH(lazy_gc_thread_creation, [ --with-lazy-gc-thread-creation=yes|no
|
||||
fi
|
||||
], [with_lazy_gc_thread_creation=no])
|
||||
|
||||
AC_ARG_WITH(cooperative_gc, [ --with-cooperative-gc=yes|no Enable cooperative stop-the-world garbage collection (sgen only) (defaults to no)], [], [with_cooperative_gc=default])
|
||||
|
||||
if test x$with_cooperative_gc = xdefault; then
|
||||
with_cooperative_gc=$with_cooperative_gc_default
|
||||
fi
|
||||
|
||||
if test x$with_cooperative_gc != xno; then
|
||||
AC_DEFINE(USE_COOP_GC,1,[Enable cooperative stop-the-world garbage collection.])
|
||||
fi
|
||||
AC_ARG_WITH(cooperative_gc, [ --with-cooperative-gc=yes|no Enable cooperative stop-the-world garbage collection (sgen only) (defaults to no)],[
|
||||
if test x$with_cooperative_gc != xno ; then
|
||||
AC_DEFINE(USE_COOP_GC,1,[Enable cooperative stop-the-world garbage collection.])
|
||||
fi
|
||||
], [with_cooperative_gc=no])
|
||||
|
||||
AM_CONDITIONAL([ENABLE_COOP], [test x$with_cooperative_gc != xno])
|
||||
|
||||
@@ -3873,6 +3655,20 @@ else
|
||||
fi
|
||||
AC_SUBST(LIBMONO_LA)
|
||||
|
||||
dnl
|
||||
dnl Consistency settings
|
||||
dnl
|
||||
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
|
||||
DISABLE_MCS_DOCS=yes
|
||||
with_profile4_x=no
|
||||
with_monodroid=no
|
||||
with_monotouch=no
|
||||
with_monotouch_watch=no
|
||||
with_monotouch_tv=no
|
||||
with_xammac=no
|
||||
with_mobile_static=no
|
||||
fi
|
||||
|
||||
if test x$DISABLE_MCS_DOCS = xyes; then
|
||||
docs_dir=""
|
||||
else
|
||||
@@ -3885,6 +3681,15 @@ AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_bui
|
||||
|
||||
libmono_ldflags="$libmono_ldflags $LIBS"
|
||||
|
||||
AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = xyes])
|
||||
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MONOTOUCH_TV, [test "x$with_monotouch_tv" != "xno"])
|
||||
AM_CONDITIONAL(BITCODE, test "x$with_bitcode" = "xyes")
|
||||
AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
|
||||
AM_CONDITIONAL(INSTALL_MOBILE_STATIC, [test "x$with_mobile_static" != "xno"])
|
||||
|
||||
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
|
||||
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
|
||||
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
|
||||
@@ -3939,6 +3744,22 @@ else
|
||||
fi
|
||||
AC_SUBST(mono_cfg_dir)
|
||||
|
||||
default_profile=net_4_x
|
||||
if test -z "$INSTALL_MONODROID_TRUE"; then :
|
||||
default_profile=monodroid
|
||||
fi
|
||||
if test -z "$INSTALL_MONOTOUCH_TRUE"; then :
|
||||
default_profile=monotouch
|
||||
fi
|
||||
if test -z "$INSTALL_XAMMAC_TRUE"; then :
|
||||
default_profile=xammac
|
||||
fi
|
||||
if test -z "$INSTALL_4_x_TRUE"; then :
|
||||
default_profile=net_4_x
|
||||
fi
|
||||
DEFAULT_PROFILE=$default_profile
|
||||
AC_SUBST(DEFAULT_PROFILE)
|
||||
|
||||
AC_CONFIG_FILES([po/mcs/Makefile.in])
|
||||
|
||||
AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
|
||||
@@ -4105,7 +3926,6 @@ AC_OUTPUT([
|
||||
Makefile
|
||||
mono-uninstalled.pc
|
||||
acceptance-tests/Makefile
|
||||
llvm/Makefile
|
||||
scripts/mono-find-provides
|
||||
scripts/mono-find-requires
|
||||
mono/Makefile
|
||||
@@ -4172,7 +3992,6 @@ tools/Makefile
|
||||
tools/locale-builder/Makefile
|
||||
tools/sgen/Makefile
|
||||
tools/monograph/Makefile
|
||||
tools/pedump/Makefile
|
||||
runtime/Makefile
|
||||
msvc/Makefile
|
||||
po/Makefile
|
||||
@@ -4243,10 +4062,6 @@ fi
|
||||
echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
|
||||
fi
|
||||
|
||||
if test "x$PLATFORM_AOT_SUFFIX" != "x"; then
|
||||
echo "PLATFORM_AOT_SUFFIX = $PLATFORM_AOT_SUFFIX" >> $mcs_topdir/build/config.make
|
||||
fi
|
||||
|
||||
if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then
|
||||
enable_system_aot=yes
|
||||
fi
|
||||
@@ -4269,11 +4084,6 @@ fi
|
||||
echo "BCL_OPTIMIZE = 1" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
if test "x$AOT_BUILD_FLAGS" != "x" ; then
|
||||
echo "AOT_RUN_FLAGS=$AOT_RUN_FLAGS" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "AOT_BUILD_FLAGS=$AOT_BUILD_FLAGS" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
)
|
||||
@@ -4295,7 +4105,7 @@ echo "
|
||||
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
|
||||
|
||||
Libraries:
|
||||
.NET 4.x: $with_profile4_x
|
||||
.NET 4.6: $with_profile4_x
|
||||
Xamarin.Android: $with_monodroid
|
||||
Xamarin.iOS: $with_monotouch
|
||||
Xamarin.WatchOS: $with_monotouch_watch
|
||||
|
||||
+1
-10
@@ -138,15 +138,6 @@ AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
AC_CHECK_FUNCS(fork execv execve)
|
||||
|
||||
AC_ARG_WITH([overridable-allocators], [ --with-overridable-allocators allow g_*alloc/g_free to call custom allocators set via g_mem_set_vtable])
|
||||
|
||||
if test x$with_overridable_allocators == xyes; then
|
||||
AC_DEFINE(ENABLE_OVERRIDABLE_ALLOCATORS,1,[Overridable allocator support enabled])
|
||||
AC_MSG_NOTICE([Overridable allocator support enabled])
|
||||
else
|
||||
AC_MSG_NOTICE([Overridable allocator support disabled])
|
||||
fi
|
||||
|
||||
#
|
||||
# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
|
||||
# the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be
|
||||
@@ -160,7 +151,7 @@ elif test x$target_ios = xno; then
|
||||
AC_CHECK_FUNCS(strndup getpwuid_r)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno || test x$with_overridable_allocators == xyes)
|
||||
AM_CONDITIONAL(NEED_VASPRINTF, test x$ac_cv_func_vasprintf = xno )
|
||||
AM_ICONV()
|
||||
AC_SEARCH_LIBS(sqrtf, m)
|
||||
|
||||
|
||||
+11
-1
@@ -11,6 +11,14 @@ unix_files = \
|
||||
gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \
|
||||
gmodule-unix.c gtimer-unix.c
|
||||
|
||||
# some unices and windows do not have an implementation of vasprintf
|
||||
# used by eglib, use provided implementation instead
|
||||
if NEED_VASPRINTF
|
||||
vasprintf_files = vasprintf.c
|
||||
else
|
||||
vaprinttf_files = foo.c
|
||||
endif
|
||||
|
||||
if HOST_WIN32
|
||||
os_files = $(win_files)
|
||||
else
|
||||
@@ -24,6 +32,7 @@ libeglib_la_SOURCES = \
|
||||
garray.c \
|
||||
gbytearray.c \
|
||||
gerror.c \
|
||||
vasprintf.h \
|
||||
ghashtable.c \
|
||||
giconv.c \
|
||||
gmem.c \
|
||||
@@ -46,7 +55,8 @@ libeglib_la_SOURCES = \
|
||||
gutf8.c \
|
||||
gunicode.c \
|
||||
unicode-data.h \
|
||||
$(os_files)
|
||||
$(os_files) \
|
||||
$(vasprintf_files)
|
||||
|
||||
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
|
||||
|
||||
|
||||
+6
-4
@@ -28,8 +28,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <config.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
GError *
|
||||
g_error_new (gpointer domain, gint code, const char *format, ...)
|
||||
{
|
||||
@@ -40,7 +42,7 @@ g_error_new (gpointer domain, gint code, const char *format, ...)
|
||||
err->code = code;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&err->message, format, args) == -1)
|
||||
if (vasprintf (&err->message, format, args) == -1)
|
||||
err->message = g_strdup_printf ("internal: invalid format string %s", format);
|
||||
va_end (args);
|
||||
|
||||
@@ -55,7 +57,7 @@ g_error_vnew (gpointer domain, gint code, const char *format, va_list ap)
|
||||
err->domain = domain;
|
||||
err->code = code;
|
||||
|
||||
if (g_vasprintf (&err->message, format, ap) == -1)
|
||||
if (vasprintf (&err->message, format, ap) == -1)
|
||||
err->message = g_strdup_printf ("internal: invalid format string %s", format);
|
||||
|
||||
return err;
|
||||
@@ -75,7 +77,7 @@ g_error_free (GError *error)
|
||||
{
|
||||
g_return_if_fail (error != NULL);
|
||||
|
||||
g_free (error->message);
|
||||
free (error->message);
|
||||
g_free (error);
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -1,5 +1,6 @@
|
||||
#ifndef __GLIB_H
|
||||
#define __GLIB_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -8,7 +9,6 @@
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
|
||||
#endif
|
||||
@@ -126,7 +126,6 @@ void g_free (void *ptr);
|
||||
gpointer g_realloc (gpointer obj, gsize size);
|
||||
gpointer g_malloc (gsize x);
|
||||
gpointer g_malloc0 (gsize x);
|
||||
gpointer g_calloc (gsize n, gsize x);
|
||||
gpointer g_try_malloc (gsize x);
|
||||
gpointer g_try_realloc (gpointer obj, gsize size);
|
||||
|
||||
@@ -139,7 +138,7 @@ gpointer g_try_realloc (gpointer obj, gsize size);
|
||||
#define g_alloca(size) alloca (size)
|
||||
|
||||
gpointer g_memdup (gconstpointer mem, guint byte_size);
|
||||
static inline gchar *g_strdup (const gchar *str) { if (str) { return (gchar*) g_memdup (str, (guint)strlen (str) + 1); } return NULL; }
|
||||
static inline gchar *g_strdup (const gchar *str) { if (str) {return strdup (str);} return NULL; }
|
||||
gchar **g_strdupv (gchar **str_array);
|
||||
|
||||
typedef struct {
|
||||
@@ -147,9 +146,11 @@ typedef struct {
|
||||
gpointer (*realloc) (gpointer mem, gsize n_bytes);
|
||||
void (*free) (gpointer mem);
|
||||
gpointer (*calloc) (gsize n_blocks, gsize n_block_bytes);
|
||||
gpointer (*try_malloc) (gsize n_bytes);
|
||||
gpointer (*try_realloc) (gpointer mem, gsize n_bytes);
|
||||
} GMemVTable;
|
||||
|
||||
void g_mem_set_vtable (GMemVTable* vtable);
|
||||
#define g_mem_set_vtable(x)
|
||||
|
||||
struct _GMemChunk {
|
||||
guint alloc_size;
|
||||
@@ -222,11 +223,11 @@ gint g_printf (gchar const *format, ...);
|
||||
gint g_fprintf (FILE *file, gchar const *format, ...);
|
||||
gint g_sprintf (gchar *string, gchar const *format, ...);
|
||||
gint g_snprintf (gchar *string, gulong n, gchar const *format, ...);
|
||||
gint g_vasprintf (gchar **ret, const gchar *fmt, va_list ap);
|
||||
#define g_vprintf vprintf
|
||||
#define g_vfprintf vfprintf
|
||||
#define g_vsprintf vsprintf
|
||||
#define g_vsnprintf vsnprintf
|
||||
#define g_vasprintf vasprintf
|
||||
|
||||
gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size);
|
||||
gchar *g_stpcpy (gchar *dest, const char *src);
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ g_markup_parse_context_parse (GMarkupParseContext *context,
|
||||
if (context->parser.end_element != NULL && context->state == START_ELEMENT){
|
||||
context->parser.end_element (context, ename, context->user_data, error);
|
||||
if (error != NULL && *error != NULL){
|
||||
g_free (ename);
|
||||
free (ename);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-47
@@ -25,45 +25,15 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
|
||||
#if defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
|
||||
static GMemVTable sGMemVTable = { malloc, realloc, free, calloc };
|
||||
|
||||
void
|
||||
g_mem_set_vtable (GMemVTable* vtable)
|
||||
{
|
||||
sGMemVTable.calloc = vtable->calloc ? vtable->calloc : calloc;
|
||||
sGMemVTable.realloc = vtable->realloc ? vtable->realloc : realloc;
|
||||
sGMemVTable.malloc = vtable->malloc ? vtable->malloc : malloc;
|
||||
sGMemVTable.free = vtable->free ? vtable->free : free;
|
||||
}
|
||||
|
||||
#define G_FREE_INTERNAL sGMemVTable.free
|
||||
#define G_REALLOC_INTERNAL sGMemVTable.realloc
|
||||
#define G_CALLOC_INTERNAL sGMemVTable.calloc
|
||||
#define G_MALLOC_INTERNAL sGMemVTable.malloc
|
||||
#else
|
||||
|
||||
void
|
||||
g_mem_set_vtable (GMemVTable* vtable)
|
||||
{
|
||||
}
|
||||
|
||||
#define G_FREE_INTERNAL free
|
||||
#define G_REALLOC_INTERNAL realloc
|
||||
#define G_CALLOC_INTERNAL calloc
|
||||
#define G_MALLOC_INTERNAL malloc
|
||||
#endif
|
||||
void
|
||||
g_free (void *ptr)
|
||||
{
|
||||
if (ptr != NULL)
|
||||
G_FREE_INTERNAL (ptr);
|
||||
free (ptr);
|
||||
}
|
||||
|
||||
gpointer
|
||||
@@ -88,7 +58,7 @@ gpointer g_realloc (gpointer obj, gsize size)
|
||||
g_free (obj);
|
||||
return 0;
|
||||
}
|
||||
ptr = G_REALLOC_INTERNAL (obj, size);
|
||||
ptr = realloc (obj, size);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", size);
|
||||
@@ -100,31 +70,27 @@ g_malloc (gsize x)
|
||||
gpointer ptr;
|
||||
if (!x)
|
||||
return 0;
|
||||
ptr = G_MALLOC_INTERNAL (x);
|
||||
ptr = malloc (x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", x);
|
||||
}
|
||||
|
||||
gpointer g_calloc (gsize n, gsize x)
|
||||
{
|
||||
gpointer ptr;
|
||||
if (!x || !n)
|
||||
return 0;
|
||||
ptr = G_CALLOC_INTERNAL (n, x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i (%i * %i) bytes", x*n, n, x);
|
||||
}
|
||||
gpointer g_malloc0 (gsize x)
|
||||
{
|
||||
return g_calloc (1,x);
|
||||
gpointer ptr;
|
||||
if (!x)
|
||||
return 0;
|
||||
ptr = calloc(1,x);
|
||||
if (ptr)
|
||||
return ptr;
|
||||
g_error ("Could not allocate %i bytes", x);
|
||||
}
|
||||
|
||||
gpointer g_try_malloc (gsize x)
|
||||
{
|
||||
if (x)
|
||||
return G_MALLOC_INTERNAL (x);
|
||||
return malloc (x);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -132,8 +98,8 @@ gpointer g_try_malloc (gsize x)
|
||||
gpointer g_try_realloc (gpointer obj, gsize size)
|
||||
{
|
||||
if (!size) {
|
||||
G_FREE_INTERNAL (obj);
|
||||
g_free (obj);
|
||||
return 0;
|
||||
}
|
||||
return G_REALLOC_INTERNAL (obj, size);
|
||||
return realloc (obj, size);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ g_win32_getlocale(void)
|
||||
gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
|
||||
buf[ccBuf - 1] = '-';
|
||||
ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
|
||||
return g_strdup (buf);
|
||||
return strdup(buf);
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -128,9 +128,6 @@ g_get_home_dir (void)
|
||||
}
|
||||
}
|
||||
|
||||
g_free (drive);
|
||||
g_free (path);
|
||||
|
||||
return home_dir;
|
||||
}
|
||||
|
||||
|
||||
+8
-6
@@ -31,6 +31,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "vasprintf.h"
|
||||
|
||||
/* The current fatal levels, error is always fatal */
|
||||
static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR;
|
||||
static GLogFunc default_log_func;
|
||||
@@ -47,7 +49,7 @@ g_print (const gchar *format, ...)
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&msg, format, args) < 0)
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
va_end (args);
|
||||
|
||||
@@ -55,7 +57,7 @@ g_print (const gchar *format, ...)
|
||||
stdout_handler = default_stdout_handler;
|
||||
|
||||
stdout_handler (msg);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -65,7 +67,7 @@ g_printerr (const gchar *format, ...)
|
||||
va_list args;
|
||||
|
||||
va_start (args, format);
|
||||
if (g_vasprintf (&msg, format, args) < 0)
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
va_end (args);
|
||||
|
||||
@@ -73,7 +75,7 @@ g_printerr (const gchar *format, ...)
|
||||
stderr_handler = default_stderr_handler;
|
||||
|
||||
stderr_handler (msg);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
GLogLevelFlags
|
||||
@@ -105,11 +107,11 @@ g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format,
|
||||
if (!default_log_func)
|
||||
default_log_func = g_log_default_handler;
|
||||
|
||||
if (g_vasprintf (&msg, format, args) < 0)
|
||||
if (vasprintf (&msg, format, args) < 0)
|
||||
return;
|
||||
|
||||
default_log_func (log_domain, log_level, msg, default_log_func_user_data);
|
||||
g_free (msg);
|
||||
free (msg);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+4
-39
@@ -32,17 +32,13 @@
|
||||
#include <ctype.h>
|
||||
#include <glib.h>
|
||||
|
||||
/*
|
||||
* g_strndup and g_vasprintf need to allocate memory with g_malloc if
|
||||
* ENABLE_OVERRIDABLE_ALLOCATORS is defined so that it can be safely freed with g_free
|
||||
* rather than free.
|
||||
*/
|
||||
#include "vasprintf.h"
|
||||
|
||||
/* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */
|
||||
gchar *
|
||||
g_strndup (const gchar *str, gsize n)
|
||||
{
|
||||
#if defined (HAVE_STRNDUP) && !defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
#ifdef HAVE_STRNDUP
|
||||
return strndup (str, n);
|
||||
#else
|
||||
if (str) {
|
||||
@@ -56,37 +52,6 @@ g_strndup (const gchar *str, gsize n)
|
||||
#endif
|
||||
}
|
||||
|
||||
gint g_vasprintf (gchar **ret, const gchar *fmt, va_list ap)
|
||||
{
|
||||
#if defined (HAVE_VASPRINTF) && !defined (ENABLE_OVERRIDABLE_ALLOCATORS)
|
||||
return vasprintf (ret, fmt, ap);
|
||||
#else
|
||||
char *buf;
|
||||
int len;
|
||||
size_t buflen;
|
||||
va_list ap2;
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
ap2 = ap;
|
||||
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
|
||||
#else
|
||||
va_copy(ap2, ap);
|
||||
len = vsnprintf(NULL, 0, fmt, ap2);
|
||||
#endif
|
||||
|
||||
if (len >= 0 && (buf = g_malloc ((buflen = (size_t) (len + 1)))) != NULL) {
|
||||
len = vsnprintf(buf, buflen, fmt, ap);
|
||||
*ret = buf;
|
||||
} else {
|
||||
*ret = NULL;
|
||||
len = -1;
|
||||
}
|
||||
|
||||
va_end(ap2);
|
||||
return len;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
g_strfreev (gchar **str_array)
|
||||
{
|
||||
@@ -168,7 +133,7 @@ g_strdup_vprintf (const gchar *format, va_list args)
|
||||
int n;
|
||||
char *ret;
|
||||
|
||||
n = g_vasprintf (&ret, format, args);
|
||||
n = vasprintf (&ret, format, args);
|
||||
if (n == -1)
|
||||
return NULL;
|
||||
|
||||
@@ -183,7 +148,7 @@ g_strdup_printf (const gchar *format, ...)
|
||||
int n;
|
||||
|
||||
va_start (args, format);
|
||||
n = g_vasprintf (&ret, format, args);
|
||||
n = vasprintf (&ret, format, args);
|
||||
va_end (args);
|
||||
if (n == -1)
|
||||
return NULL;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap)
|
||||
{
|
||||
char *buf;
|
||||
int len;
|
||||
size_t buflen;
|
||||
va_list ap2;
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
|
||||
ap2 = ap;
|
||||
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
|
||||
#else
|
||||
va_copy(ap2, ap);
|
||||
len = vsnprintf(NULL, 0, fmt, ap2);
|
||||
#endif
|
||||
|
||||
if (len >= 0 && (buf = malloc ((buflen = (size_t) (len + 1)))) != NULL) {
|
||||
len = vsnprintf(buf, buflen, fmt, ap);
|
||||
*ret = buf;
|
||||
} else {
|
||||
*ret = NULL;
|
||||
len = -1;
|
||||
}
|
||||
|
||||
va_end(ap2);
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef __VASPRINTF_H
|
||||
#define __VASPRINTF_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <config.h>
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
int vasprintf(char **ret, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#endif /* __VASPRINTF_H */
|
||||
+8
-1
@@ -46,6 +46,13 @@
|
||||
#include "test.h"
|
||||
|
||||
extern gint global_passed, global_tests;
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
/* systen does not provide a vasprintf function, use the one
|
||||
provided within eglib itself */
|
||||
extern int vasprintf(char **ret, const char *format, va_list ap);
|
||||
#endif
|
||||
|
||||
static gchar *last_result = NULL;
|
||||
|
||||
gboolean
|
||||
@@ -176,7 +183,7 @@ FAILED(const gchar *format, ...)
|
||||
return NULL;
|
||||
#else
|
||||
va_start(args, format);
|
||||
n = g_vasprintf(&ret, format, args);
|
||||
n = vasprintf(&ret, format, args);
|
||||
va_end(args);
|
||||
|
||||
if(n == -1) {
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
@@ -1,30 +0,0 @@
|
||||
#
|
||||
# Conditional submodule for llvm
|
||||
#
|
||||
# make reset-llvm will checkout a version of llvm which is suitable for this version of mono
|
||||
# into $top_srcdir/llvm/llvm.
|
||||
#
|
||||
|
||||
LLVM_PATH=llvm
|
||||
|
||||
SUBMODULES_CONFIG_FILE = $(top_srcdir)/llvm/SUBMODULES.json
|
||||
include $(top_srcdir)/scripts/submodules/versions.mk
|
||||
|
||||
$(eval $(call ValidateVersionTemplate,llvm,LLVM))
|
||||
|
||||
# Bump the given submodule to the revision given by the REV make variable
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-llvm: __bump-version-llvm
|
||||
|
||||
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-branch-llvm: __bump-branch-llvm
|
||||
|
||||
# Bump the given submodule to its current GIT version
|
||||
# If COMMIT is 1, commit the change
|
||||
bump-current-llvm: __bump-current-version-llvm
|
||||
|
||||
clean-local:
|
||||
$(RM) -r $(LLVM_PATH)
|
||||
|
||||
EXTRA_DIST=SUBMODULES.json
|
||||
@@ -1,10 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "llvm",
|
||||
"url": "git://github.com/mono/llvm.git",
|
||||
"rev": "9f79399f87282524fee099b328bd8cbf07929daf",
|
||||
"remote-branch": "origin/master",
|
||||
"branch": "master",
|
||||
"directory": "llvm"
|
||||
}
|
||||
]
|
||||
@@ -26,7 +26,7 @@ AC_DEFUN([AM_NLS],
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE([nls],
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=profile_default)
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT([$USE_NLS])
|
||||
AC_SUBST([USE_NLS])
|
||||
])
|
||||
+8
-18
@@ -7,7 +7,7 @@
|
||||
.\" Author:
|
||||
.\" Miguel de Icaza ([email protected])
|
||||
.\"
|
||||
.TH Mono "Mono 4.7.0"
|
||||
.TH Mono "Mono 3.0"
|
||||
.SH NAME
|
||||
mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
|
||||
.SH SYNOPSIS
|
||||
@@ -1100,7 +1100,7 @@ a Mono process through the environment. This is useful for example
|
||||
to force all of your Mono processes to use LLVM or SGEN without having
|
||||
to modify any launch scripts.
|
||||
.TP
|
||||
\fBMONO_SDB_ENV_OPTIONS\fR
|
||||
\fBMONO_ENV_OPTIONS\fR
|
||||
Used to pass extra options to the debugger agent in the runtime, as they were passed
|
||||
using --debugger-agent=.
|
||||
.TP
|
||||
@@ -1302,12 +1302,12 @@ statistics when shutting down.
|
||||
.TP
|
||||
\fBcollect-before-allocs\fR
|
||||
.TP
|
||||
\fBcheck-remset-consistency\fR
|
||||
This performs a remset consistency check at various opportunities, and
|
||||
also clears the nursery at collection time, instead of the default,
|
||||
when buffers are allocated (clear-at-gc). The consistency check
|
||||
ensures that there are no major to minor references that are not on
|
||||
the remembered sets.
|
||||
\fBcheck-at-minor-collections\fR
|
||||
This performs a consistency check on minor collections and also clears
|
||||
the nursery at collection time, instead of the default, when buffers
|
||||
are allocated (clear-at-gc). The consistency check ensures that
|
||||
there are no major to minor references that are not on the remembered
|
||||
sets.
|
||||
.TP
|
||||
\fBmod-union-consistency-check\fR
|
||||
Checks that the mod-union cardtable is consistent before each
|
||||
@@ -1732,16 +1732,6 @@ messages for a certain component. You can use multiple masks by comma
|
||||
separating them. For example to see config file messages and assembly loader
|
||||
messages set you mask to "asm,cfg".
|
||||
.TP
|
||||
\fBMONO_LOG_DEST\fR
|
||||
Controls where trace log messages are written. If not set then the messages go to stdout.
|
||||
If set, the string either specifies a path to a file that will have messages appended to
|
||||
it, or the string "syslog" in which case the messages will be written to the system log.
|
||||
Under Windows, this is simulated by writing to a file called "mono.log".
|
||||
\fBMONO_LOG_HEADER\fR
|
||||
Controls whether trace log messages not directed to syslog have the id, timestamp, and
|
||||
pid as the prefix to the log message. To enable a header this environment variable need
|
||||
just be non-null.
|
||||
.TP
|
||||
\fBMONO_TRACE\fR
|
||||
Used for runtime tracing of method calls. The format of the comma separated
|
||||
trace options is:
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ monotouch_watch_runtime_SUBDIRS := build class
|
||||
monotouch_tv_runtime_SUBDIRS := build class
|
||||
xammac_SUBDIRS := build class
|
||||
mobile_SUBDIRS := build class
|
||||
mobile_static_SUBDIRS := build class ilasm
|
||||
mobile_static_SUBDIRS := build class
|
||||
binary_reference_assemblies_SUBDIRS := build class
|
||||
net_4_x_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
|
||||
xammac_net_4_5_SUBDIRS := build class
|
||||
|
||||
@@ -15,6 +15,8 @@ build system needs to let us do, specifically:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
** Makefile structure
|
||||
|
||||
A general makefile looks like this:
|
||||
@@ -436,15 +438,7 @@ To give it flags, set $(LOCAL_CFLAGS). As with compiling C#, the
|
||||
variable $(CFLAGS) will automatically be included on the command line.
|
||||
|
||||
|
||||
* Compiling resources with resgen
|
||||
|
||||
If you have a resource that should be compiled with resgen and
|
||||
included in your assembly, you can use the RESOURCES_DEFS variable.
|
||||
This variable can contain lists of pairs that are separated by comma
|
||||
to represent the resource ID as embedded in the assembly followed by
|
||||
the file name, like this:
|
||||
|
||||
RESOURCE_DEFS = Messages,TextResources.resx Errors,ErrorList.txt
|
||||
|
||||
|
||||
* Documentation-related needs? Use $(MDOC)
|
||||
|
||||
@@ -173,7 +173,6 @@ csproj-local:
|
||||
echo $(build_lib); \
|
||||
echo $(FRAMEWORK_VERSION); \
|
||||
echo $(PROFILE); \
|
||||
echo $(RESOURCE_DEFS); \
|
||||
echo $(response)) > $(topdir)/../msvc/scripts/inputs/$$config_file
|
||||
|
||||
|
||||
|
||||
+4
-27
@@ -145,7 +145,6 @@ csproj-library:
|
||||
echo $(build_lib); \
|
||||
echo $(FRAMEWORK_VERSION); \
|
||||
echo $(PROFILE); \
|
||||
echo $(RESOURCE_DEFS); \
|
||||
echo $(response)) > $(topdir)/../msvc/scripts/inputs/$$config_file
|
||||
|
||||
csproj-test:
|
||||
@@ -217,28 +216,7 @@ clean-local:
|
||||
test-local run-test-local run-test-ondotnet-local:
|
||||
@:
|
||||
|
||||
#
|
||||
# RESOURCES_DEFS is a list of ID,FILE pairs separated by spaces
|
||||
# for each of those, generate a rule that produces ID.resource from
|
||||
# FILE using the resgen tool, adds the generated file to CLENA_FILES and
|
||||
# passes the resource to the compiler
|
||||
#
|
||||
ccomma = ,
|
||||
define RESOURCE_template
|
||||
$(1).resources: $(2)
|
||||
$(RESGEN) "$$<" "$$@"
|
||||
|
||||
GEN_RESOURCE_DEPS += $(1).resources
|
||||
GEN_RESOURCE_FLAGS += -resource:$(1).resources
|
||||
CLEAN_FILES += $(1).resources
|
||||
DIST_LISTED_RESOURCES += $(2)
|
||||
endef
|
||||
|
||||
ifdef RESOURCE_DEFS
|
||||
$(foreach pair,$(RESOURCE_DEFS), $(eval $(call RESOURCE_template,$(word 1, $(subst $(ccomma), ,$(pair))), $(word 2, $(subst $(ccomma), ,$(pair))))))
|
||||
endif
|
||||
|
||||
DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES) $(DIST_LISTED_RESOURCES)
|
||||
DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES)
|
||||
|
||||
ASSEMBLY = $(LIBRARY)
|
||||
ASSEMBLY_EXT = .dll
|
||||
@@ -258,7 +236,6 @@ csproj-test:
|
||||
echo $(test_lib); \
|
||||
echo $(FRAMEWORK_VERSION); \
|
||||
echo $(PROFILE); \
|
||||
echo ""; \
|
||||
echo $(test_response)) > $(topdir)/../msvc/scripts/inputs/$$config_file
|
||||
|
||||
endif
|
||||
@@ -298,12 +275,12 @@ endif
|
||||
|
||||
$(the_lib): $(the_libdir)/.stamp
|
||||
|
||||
$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp) $(GEN_RESOURCE_DEPS)
|
||||
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(GEN_RESOURCE_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
|
||||
$(build_lib): $(response) $(sn) $(BUILT_SOURCES) $(build_libdir:=/.stamp)
|
||||
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) -target:library -out:$@ $(BUILT_SOURCES_cmdline) @$(response)
|
||||
$(Q) $(SN) -R $@ $(LIBRARY_SNK)
|
||||
ifdef RESOURCE_STRINGS_FILES
|
||||
$(Q) $(STRING_REPLACER) $(RESOURCE_STRINGS_FILES) $@
|
||||
endif
|
||||
$(Q) $(SN) -R $@ $(LIBRARY_SNK)
|
||||
|
||||
ifdef LIBRARY_USE_INTERMEDIATE_FILE
|
||||
$(the_lib): $(build_lib)
|
||||
|
||||
@@ -23,6 +23,8 @@ PLATFORM_PATH_SEPARATOR = :
|
||||
# This is for changing / to \ on windows
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD = cat
|
||||
|
||||
PLATFORM_AOT_SUFFIX = .dylib
|
||||
|
||||
hidden_prefix = .
|
||||
hidden_suffix =
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@ PLATFORM_PATH_SEPARATOR = :
|
||||
# This is for changing / to \ on windows
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD = cat
|
||||
|
||||
PLATFORM_AOT_SUFFIX = .so
|
||||
|
||||
hidden_prefix = .
|
||||
hidden_suffix =
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ PLATFORM_PATH_SEPARATOR = ;
|
||||
|
||||
override CURDIR:=$(shell cygpath -m $(CURDIR))
|
||||
|
||||
## not so simple :-)
|
||||
#PLATFORM_AOT_SUFFIX = .dll
|
||||
|
||||
hidden_prefix =
|
||||
hidden_suffix = .tmp
|
||||
|
||||
|
||||
@@ -41,7 +41,19 @@ MOBILE_PROFILE = yes
|
||||
NO_VTS_TEST = yes
|
||||
|
||||
# Note need for trailing comma. If you add, keep it
|
||||
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,PKITS,
|
||||
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,
|
||||
|
||||
ifndef MONO_DISABLE_GSHAREDVT
|
||||
GSHAREDVT_FLAG = -O=gsharedvt
|
||||
endif
|
||||
|
||||
ifneq ($(MONO_LLVMONLY),)
|
||||
AOT_BUILD_FLAGS_PREFIX = --aot=llvmonly,
|
||||
AOT_RUN_FLAGS = --llvmonly
|
||||
else
|
||||
AOT_BUILD_FLAGS_PREFIX = $(GSHAREDVT_FLAG) --aot=full,
|
||||
AOT_RUN_FLAGS = --full-aot
|
||||
endif
|
||||
|
||||
ALWAYS_AOT = yes
|
||||
|
||||
+29
-22
@@ -132,6 +132,29 @@ endif
|
||||
# Make sure propagates
|
||||
export TEST_HARNESS
|
||||
|
||||
# start aot config
|
||||
|
||||
# We set the prefix of the aot build flags
|
||||
# in the profile. This determines the aot type,
|
||||
# whether it be llvmonly or full. To this we append the
|
||||
# options which do not change between them, the INVARIANT_AOT_OPTIONS
|
||||
ifndef AOT_BUILD_FLAGS_PREFIX
|
||||
AOT_BUILD_FLAGS_PREFIX = --aot=
|
||||
endif
|
||||
|
||||
# Set the options for building and running AOT
|
||||
# The trampoline numbers are provisional, they are what is required
|
||||
# to run the corlib test suite. They should be considered a lower bound.
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=900,ntrampolines=8000
|
||||
|
||||
ifndef MONO_DISABLE_GSHAREDVT
|
||||
INVARIANT_AOT_OPTIONS:=$(INVARIANT_AOT_OPTIONS),ngsharedvt-trampolines=900
|
||||
endif
|
||||
|
||||
AOT_BUILD_FLAGS = $(AOT_BUILD_FLAGS_PREFIX)$(INVARIANT_AOT_OPTIONS)
|
||||
|
||||
# end AOT config
|
||||
|
||||
ifdef BCL_OPTIMIZE
|
||||
PROFILE_MCS_FLAGS += -optimize
|
||||
endif
|
||||
@@ -179,33 +202,17 @@ STD_TARGETS = test run-test run-test-ondotnet clean install uninstall doc-update
|
||||
$(STD_TARGETS): %: do-%
|
||||
|
||||
ifdef PLATFORM_AOT_SUFFIX
|
||||
AOT_PROFILE_ASSEMBLIES = $(shell cd $(topdir)/class/lib/$(PROFILE)/ && find . | grep -E '(dll|exe)$$' | grep -v -E 'bare|plaincore|secxml|Facades' | sed 's:\./::g' | tr '\n' ' ')
|
||||
Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] AOT All Assemblies";)
|
||||
LIST_ALL_PROFILE_ASSEMBLIES = find . | grep -E '(dll|exe)$$' | grep -v -E 'bare|plaincore|secxml|Facades'
|
||||
COMPILE_ALL_PROFILE_ASSEMBLIES = $(LIST_ALL_PROFILE_ASSEMBLIES) | MONO_PATH="./" xargs -I '{}' $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS) '{}'
|
||||
|
||||
do-all-aot:
|
||||
$(MAKE) do-all TOP_LEVEL_DO=do-all
|
||||
$(MAKE) aot-all-profile
|
||||
|
||||
# When we recursively call $(MAKE) aot-all-profile
|
||||
# we will have created this directory, and so will
|
||||
# be able to evaluate the .dylibs to make
|
||||
ifneq ("$(wildcard $(topdir)/class/lib/$(PROFILE))","")
|
||||
|
||||
AOT_PROFILE_ASSEMBLIES_CMD = cd $(topdir)/class/lib/$(PROFILE)/ && find . | grep -E '(dll|exe)$$' | grep -v -E 'bare|plaincore|secxml|Facades|ilasm' | sed 's:\./::g' | tr '\n' ' '
|
||||
AOT_PROFILE_ASSEMBLIES_CMD_SAFE = $(AOT_PROFILE_ASSEMBLIES_CMD) || true
|
||||
AOT_PROFILE_ASSEMBLIES = $(shell $(AOT_PROFILE_ASSEMBLIES_CMD_SAFE))
|
||||
|
||||
# This can run in parallel
|
||||
.PHONY: aot-all-profile
|
||||
aot-all-profile: $(patsubst %,$(topdir)/class/lib/$(PROFILE)/%$(PLATFORM_AOT_SUFFIX),$(AOT_PROFILE_ASSEMBLIES))
|
||||
|
||||
$(topdir)/class/lib/$(PROFILE)/%$(PLATFORM_AOT_SUFFIX): $(topdir)/class/lib/$(PROFILE)/%
|
||||
@ mkdir -p $(topdir)/class/lib/$(PROFILE)/$*_bitcode_tmp
|
||||
@echo "AOT [$(PROFILE)] AOT $* " && cd $(topdir)/class/lib/$(PROFILE)/ && MONO_PATH="." $(RUNTIME) $(RUNTIME_FLAGS) $(AOT_BUILD_FLAGS),temp-path=$*_bitcode_tmp $* >> $(PROFILE)-aot.log
|
||||
@ rm -rf $(topdir)/class/lib/$(PROFILE)/$*_bitcode_tmp
|
||||
|
||||
endif #ifneq ("$(wildcard $(topdir)/class/lib/$(PROFILE))","")
|
||||
|
||||
endif # PLATFORM_AOT_SUFFIX
|
||||
aot-all-profile:
|
||||
$(Q_AOT) cd $(topdir)/class/lib/$(PROFILE)/ && $(COMPILE_ALL_PROFILE_ASSEMBLIES) &> $(PROFILE)-aot.log
|
||||
endif
|
||||
|
||||
do-run-test:
|
||||
ok=:; $(MAKE) run-test-recursive || ok=false; $(MAKE) run-test-local || ok=false; $$ok
|
||||
|
||||
@@ -101,7 +101,7 @@ $(ProjectDir)\..\..\jay\jay -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(Proje
|
||||
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
$(ProjectDir)\..\..\jay\jay -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
|
||||
$(ProjectDir)\..\..\jay\jay.exe -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
|
||||
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System System.Data System.Xml
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -13,6 +13,8 @@ KEY_FILE = ../../msfinal.pub
|
||||
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System.Runtime.Serialization
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -18,6 +18,8 @@ ifeq (2.1, $(FRAMEWORK_VERSION))
|
||||
LIB_MCS_FLAGS += /d:NO_CODEDOM
|
||||
endif
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System System.Core
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System.Core
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -19,6 +19,8 @@ endif
|
||||
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -21,6 +21,8 @@ endif
|
||||
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
|
||||
namespace System.Text
|
||||
{
|
||||
public sealed class CodePagesEncodingProvider : EncodingProvider
|
||||
public sealed partial class CodePagesEncodingProvider : EncodingProvider
|
||||
{
|
||||
static readonly CodePagesEncodingProvider instance = new CodePagesEncodingProvider ();
|
||||
static CodePagesEncodingProvider instance = new CodePagesEncodingProvider ();
|
||||
|
||||
private CodePagesEncodingProvider ()
|
||||
{
|
||||
}
|
||||
|
||||
public static EncodingProvider Instance {
|
||||
public static System.Text.EncodingProvider Instance {
|
||||
get {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) -unsafe
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
@@ -14,6 +14,8 @@ SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
|
||||
LIB_REFS = System System.Xml System.Xml.Linq
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS)
|
||||
|
||||
PLATFORM_DEBUG_FLAGS =
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include $(MCS_BUILD_DIR)/library.make
|
||||
|
||||
+2
-3
@@ -27,6 +27,7 @@ mobile_common_dirs := \
|
||||
System.XML \
|
||||
I18N \
|
||||
System.ServiceModel.Internals \
|
||||
SMDiagnostics \
|
||||
System.Runtime.Serialization \
|
||||
System.Xml.Linq \
|
||||
System.ServiceModel \
|
||||
@@ -38,6 +39,7 @@ mobile_common_dirs := \
|
||||
System.Numerics \
|
||||
System.Numerics.Vectors \
|
||||
System.Data \
|
||||
Mono.Cairo \
|
||||
Mono.Data.Sqlite \
|
||||
System.Data.Services.Client \
|
||||
System.IO.Compression \
|
||||
@@ -62,9 +64,6 @@ mobile_common_dirs := \
|
||||
mobile_static_dirs := \
|
||||
$(mobile_common_dirs) \
|
||||
Mono.Dynamic.Interpreter \
|
||||
PEAPI \
|
||||
Mono.CompilerServices.SymbolWriter \
|
||||
Mono.Simd \
|
||||
$(pcl_facade_dirs)
|
||||
|
||||
mobile_dynamic_dirs := \
|
||||
|
||||
@@ -167,11 +167,9 @@
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
$(ProjectDir)\..\..\jay\jay -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Microsoft.Build.Internal\ExpressionParser.jay > $(ProjectDir)\Microsoft.Build.Internal\ExpressionParser.cs
|
||||
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
$(ProjectDir)\..\..\jay\jay -ct < $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Microsoft.Build.Internal\ExpressionParser.jay > $(ProjectDir)\Microsoft.Build.Internal\ExpressionParser.cs
|
||||
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
|
||||
|
||||
@@ -5,4 +5,3 @@ Evaluator/EvaluatorFixture.cs
|
||||
Evaluator/EvaluatorTest.cs
|
||||
Evaluator/ExpressionsTest.cs
|
||||
Evaluator/TypesTest.cs
|
||||
Visit/ASTVisitorTest.cs
|
||||
@@ -120,8 +120,7 @@ namespace MonoTests.EvaluatorTest
|
||||
Evaluator.Run ("var a = new int[]{1,2,3};");
|
||||
|
||||
object res = Evaluator.Evaluate ("from x in a select x + 1;");
|
||||
|
||||
Assert.AreEqual (new int[] { 2, 3, 4 }, ((IEnumerable<int>) res).ToArray ());
|
||||
CollectionAssert.AreEqual (new int[] { 2, 3, 4 }, ((IEnumerable<int>) res).ToArray ());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -202,4 +201,4 @@ namespace MonoTests.EvaluatorTest
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,21 +38,24 @@ completionList.Add (""delegate"" + sb, ""md-keyword"", GettextCatalog.GetString
|
||||
|
||||
var stream = new MemoryStream (Encoding.UTF8.GetBytes (content));
|
||||
|
||||
var ctx = new CompilerContext (new CompilerSettings (), new AssertReportPrinter ());
|
||||
var ctx = new CompilerContext (new CompilerSettings (), new Report (new AssertReportPrinter ()));
|
||||
|
||||
ModuleContainer module = new ModuleContainer (ctx);
|
||||
var file = new SourceFile ("test", "asdfas", 0);
|
||||
CSharpParser parser = new CSharpParser (
|
||||
new SeekableStreamReader (stream, Encoding.UTF8),
|
||||
new CompilationSourceFile (module, file),
|
||||
ctx.Report,
|
||||
new ParserSession ());
|
||||
new CompilationUnit ("name", "path", 0),
|
||||
module);
|
||||
|
||||
RootContext.ToplevelTypes = module;
|
||||
Location.Initialize (new List<SourceFile> { file });
|
||||
Location.AddFile (ctx.Report, "asdfas");
|
||||
Location.Initialize ();
|
||||
parser.LocationsBag = new LocationsBag ();
|
||||
parser.parse ();
|
||||
|
||||
Assert.AreEqual (0, ctx.Report.Errors);
|
||||
var m = module.Types[0].Methods[0] as Method;
|
||||
var s = m.Block.FirstStatement;
|
||||
var o = s.loc.Column;
|
||||
|
||||
|
||||
module.Accept (new TestVisitor ());
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
Evaluator/BuildinCommands.cs
|
||||
Evaluator/CompletionTest.cs
|
||||
Evaluator/EvaluatorFixture.cs
|
||||
Evaluator/EvaluatorTest.cs
|
||||
Evaluator/ExpressionsTest.cs
|
||||
Evaluator/TypesTest.cs
|
||||
@@ -1 +0,0 @@
|
||||
#include Mono.CSharp_test.dll.sources
|
||||
@@ -1 +1,2 @@
|
||||
#include mobile_static_Mono.CSharp.dll.sources
|
||||
monotouch.cs
|
||||
@@ -1 +1,2 @@
|
||||
#include mobile_static_Mono.CSharp.dll.sources
|
||||
monotouch.cs
|
||||
@@ -1 +1,2 @@
|
||||
#include mobile_static_Mono.CSharp.dll.sources
|
||||
monotouch.cs
|
||||
@@ -50,7 +50,7 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
|
||||
Hashtable documents = new Hashtable ();
|
||||
|
||||
#if !CECIL && !MOBILE
|
||||
#if !CECIL
|
||||
ModuleBuilder mb;
|
||||
delegate Guid GetGuidFunc (ModuleBuilder mb);
|
||||
GetGuidFunc get_guid_func;
|
||||
|
||||
@@ -42,5 +42,5 @@ $(PREBUILT): %.prebuilt: %
|
||||
cp $* $@
|
||||
|
||||
$(RESX_RESOURCES): %.resources: %.resx
|
||||
$(RESGEN) -useSourcePath $< || cp $@.prebuilt $@
|
||||
$(RESGEN) $< || cp $@.prebuilt $@
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="resources/SR.resources.prebuilt">
|
||||
<EmbeddedResource Include="resources/SR.resx">
|
||||
<LogicalName>SR.resources</LogicalName>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="resources/SQLiteCommand.bmp">
|
||||
|
||||
@@ -119,12 +119,12 @@
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="DataTypes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>DataTypes.xml;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
<value>resources/DataTypes.xml;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="Keywords" xml:space="preserve">
|
||||
<value>ALL,ALTER,AND,AS,AUTOINCREMENT,BETWEEN,BY,CASE,CHECK,COLLATE,COMMIT,CONSTRAINT,CREATE,CROSS,DEFAULT,DEFERRABLE,DELETE,DISTINCT,DROP,ELSE,ESCAPE,EXCEPT,FOREIGN,FROM,FULL,GROUP,HAVING,IN,INDEX,INNER,INSERT,INTERSECT,INTO,IS,ISNULL,JOIN,LEFT,LIMIT,NATURAL,NOT,NOTNULL,NULL,ON,OR,ORDER,OUTER,PRIMARY,REFERENCES,RIGHT,ROLLBACK,SELECT,SET,TABLE,THEN,TO,TRANSACTION,UNION,UNIQUE,UPDATE,USING,VALUES,WHEN,WHERE</value>
|
||||
</data>
|
||||
<data name="MetaDataCollections" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>MetaDataCollections.xml;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
<value>resources/MetaDataCollections.xml;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
||||
@@ -15,13 +15,10 @@ VALID_TEST_PROFILE := $(filter net_4_x, $(PROFILE))
|
||||
# The test exe is not profile specific, and compiling a 2.0 will make the 4.5 tests fail
|
||||
ifdef VALID_TEST_PROFILE
|
||||
|
||||
TEST_HELPERS_SOURCES = \
|
||||
../test-helpers/NetworkHelpers.cs
|
||||
|
||||
test-local: dtest-app.exe dtest-excfilter.exe
|
||||
|
||||
dtest-app.exe: Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs $(TEST_HELPERS_SOURCES)
|
||||
dtest-app.exe: Test/dtest-app.cs
|
||||
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Core.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -out:$@ -unsafe $(PLATFORM_DEBUG_FLAGS) -optimize- Test/dtest-app.cs
|
||||
|
||||
dtest-excfilter.exe: Test/dtest-excfilter.il
|
||||
MONO_PATH=$(topdir)/class/lib/$(PROFILE) $(INTERNAL_ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il
|
||||
|
||||
@@ -9,11 +9,8 @@ using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using MonoTests.Helpers;
|
||||
|
||||
public class TestsBase
|
||||
{
|
||||
@@ -314,10 +311,6 @@ public class Tests : TestsBase, ITest2
|
||||
wait_one ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "threadpool-io") {
|
||||
threadpool_io ();
|
||||
return 0;
|
||||
}
|
||||
breakpoints ();
|
||||
single_stepping ();
|
||||
arguments ();
|
||||
@@ -1548,49 +1541,6 @@ public class Tests : TestsBase, ITest2
|
||||
public override string virtual_method () {
|
||||
return "V2";
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void threadpool_bp () { }
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void threadpool_io () {
|
||||
// Start a threadpool task that blocks on I/O.
|
||||
// Regression test for #42625
|
||||
const int nbytes = 16;
|
||||
var bsOut = new byte[nbytes];
|
||||
for (int i = 0; i < nbytes; i++) {
|
||||
bsOut[i] = (byte)i;
|
||||
}
|
||||
var endPoint = NetworkHelpers.LocalEphemeralEndPoint ();
|
||||
var l = new TcpListener (endPoint);
|
||||
l.Start ();
|
||||
Task<byte[]> t = Task.Run (async () => {
|
||||
var c = new TcpClient ();
|
||||
await c.ConnectAsync (endPoint.Address, endPoint.Port);
|
||||
var streamIn = c.GetStream ();
|
||||
var bs = new byte[nbytes];
|
||||
int nread = 0;
|
||||
int nremain = nbytes;
|
||||
while (nread < nbytes) {
|
||||
int r = await streamIn.ReadAsync (bs, nread, nremain);
|
||||
nread += r;
|
||||
nremain -= r;
|
||||
}
|
||||
streamIn.Close ();
|
||||
return bs;
|
||||
});
|
||||
var s = l.AcceptTcpClient ();
|
||||
l.Stop ();
|
||||
// write bytes in two groups so that the task blocks on the ReadAsync
|
||||
var streamOut = s.GetStream ();
|
||||
var nbytesFirst = nbytes / 2;
|
||||
var nbytesRest = nbytes - nbytesFirst;
|
||||
streamOut.Write (bsOut, 0, nbytesFirst);
|
||||
threadpool_bp ();
|
||||
streamOut.Write (bsOut, nbytesFirst, nbytesRest);
|
||||
streamOut.Close ();
|
||||
var bsIn = t.Result;
|
||||
}
|
||||
}
|
||||
|
||||
class TypeLoadClass {
|
||||
|
||||
@@ -4035,22 +4035,6 @@ public class DebuggerTests
|
||||
// Make sure we are still in the cctor
|
||||
Assert.AreEqual (".cctor", e.Thread.GetFrames ()[0].Location.Method.Name);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ThreadpoolIOsinglestep () {
|
||||
TearDown ();
|
||||
Start ("dtest-app.exe", "threadpool-io");
|
||||
// This is a regression test for #42625. It tests the
|
||||
// interaction (particularly in coop GC) of the
|
||||
// threadpool I/O mechanism and the soft debugger.
|
||||
Event e = run_until ("threadpool_io");
|
||||
// run until we sent the task half the bytes it
|
||||
// expects, so that it blocks waiting for the rest.
|
||||
e = run_until ("threadpool_bp");
|
||||
var req = create_step (e);
|
||||
e = step_out (); // leave threadpool_bp
|
||||
e = step_out (); // leave threadpool_io
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31,9 +31,9 @@ public class MD2Test {
|
||||
if ((array1 == null) && (array2 == null))
|
||||
return;
|
||||
if (array1 == null)
|
||||
Assert.Fail (msg + " -> First array is NULL");
|
||||
Assertion.Fail (msg + " -> First array is NULL");
|
||||
if (array2 == null)
|
||||
Assert.Fail (msg + " -> Second array is NULL");
|
||||
Assertion.Fail (msg + " -> Second array is NULL");
|
||||
|
||||
bool a = (array1.Length == array2.Length);
|
||||
if (a) {
|
||||
@@ -48,7 +48,7 @@ public class MD2Test {
|
||||
msg += " -> Expected " + BitConverter.ToString (array1, 0);
|
||||
msg += " is different than " + BitConverter.ToString (array2, 0);
|
||||
}
|
||||
Assert.IsTrue (a, msg);
|
||||
Assertion.Assert (msg, a);
|
||||
}
|
||||
|
||||
// MD2 ("") = 8350e5a3e24c153df2275c9f80692773
|
||||
@@ -208,7 +208,7 @@ public class MD2Test {
|
||||
for (int i=0; i < input.Length - 1; i++)
|
||||
hash.TransformBlock (input, i, 1, copy, i);
|
||||
byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
|
||||
Assert.AreEqual (input [input.Length - 1], output [0], testName + ".e.1");
|
||||
Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
|
||||
AssertEquals (testName + ".e.2", result, hash.Hash);
|
||||
// required or next operation will still return old hash
|
||||
hash.Initialize ();
|
||||
@@ -218,9 +218,9 @@ public class MD2Test {
|
||||
public virtual void StaticInfo ()
|
||||
{
|
||||
string className = hash.ToString ();
|
||||
Assert.AreEqual (128, hash.HashSize, className + ".HashSize",);
|
||||
Assert.AreEqual (1, hash.InputBlockSize, className + ".InputBlockSize");
|
||||
Assert.AreEqual (1, hash.OutputBlockSize, className + ".OutputBlockSize");
|
||||
Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
|
||||
Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
|
||||
Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ public class MD4Test {
|
||||
if ((array1 == null) && (array2 == null))
|
||||
return;
|
||||
if (array1 == null)
|
||||
Assert.Fail (msg + " -> First array is NULL");
|
||||
Assertion.Fail (msg + " -> First array is NULL");
|
||||
if (array2 == null)
|
||||
Assert.Fail (msg + " -> Second array is NULL");
|
||||
Assertion.Fail (msg + " -> Second array is NULL");
|
||||
|
||||
bool a = (array1.Length == array2.Length);
|
||||
if (a) {
|
||||
@@ -48,7 +48,7 @@ public class MD4Test {
|
||||
msg += " -> Expected " + BitConverter.ToString (array1, 0);
|
||||
msg += " is different than " + BitConverter.ToString (array2, 0);
|
||||
}
|
||||
Assert.IsTrue (a, msg);
|
||||
Assertion.Assert (msg, a);
|
||||
}
|
||||
|
||||
// MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
|
||||
@@ -208,7 +208,7 @@ public class MD4Test {
|
||||
for (int i=0; i < input.Length - 1; i++)
|
||||
hash.TransformBlock (input, i, 1, copy, i);
|
||||
byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
|
||||
Assert.AreEqual (input [input.Length - 1], output [0], testName + ".e.1");
|
||||
Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
|
||||
AssertEquals (testName + ".e.2", result, hash.Hash);
|
||||
// required or next operation will still return old hash
|
||||
hash.Initialize ();
|
||||
@@ -218,9 +218,9 @@ public class MD4Test {
|
||||
public virtual void StaticInfo ()
|
||||
{
|
||||
string className = hash.ToString ();
|
||||
Assert.AreEqual (128, hash.HashSize, className + ".HashSize");
|
||||
Assert.AreEqual (1, hash.InputBlockSize, className + ".InputBlockSize");
|
||||
Assert.AreEqual (1, hash.OutputBlockSize, className + ".OutputBlockSize");
|
||||
Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
|
||||
Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
|
||||
Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ public class MD5Test {
|
||||
if ((array1 == null) && (array2 == null))
|
||||
return;
|
||||
if (array1 == null)
|
||||
Assert.Fail (msg + " -> First array is NULL");
|
||||
Assertion.Fail (msg + " -> First array is NULL");
|
||||
if (array2 == null)
|
||||
Assert.Fail (msg + " -> Second array is NULL");
|
||||
Assertion.Fail (msg + " -> Second array is NULL");
|
||||
|
||||
bool a = (array1.Length == array2.Length);
|
||||
if (a) {
|
||||
@@ -50,7 +50,7 @@ public class MD5Test {
|
||||
msg += " -> Expected " + BitConverter.ToString (array1, 0);
|
||||
msg += " is different than " + BitConverter.ToString (array2, 0);
|
||||
}
|
||||
Assert.IsTrue (a, msg);
|
||||
Assertion.Assert (msg, a);
|
||||
}
|
||||
|
||||
// MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
|
||||
@@ -210,7 +210,7 @@ public class MD5Test {
|
||||
for (int i=0; i < input.Length - 1; i++)
|
||||
hash.TransformBlock (input, i, 1, copy, i);
|
||||
byte[] output = hash.TransformFinalBlock (input, input.Length - 1, 1);
|
||||
Assert.AreEqual (input [input.Length - 1], output [0], testName + ".e.1");
|
||||
Assertion.AssertEquals (testName + ".e.1", input [input.Length - 1], output [0]);
|
||||
AssertEquals (testName + ".e.2", result, hash.Hash);
|
||||
// required or next operation will still return old hash
|
||||
hash.Initialize ();
|
||||
@@ -220,9 +220,9 @@ public class MD5Test {
|
||||
public virtual void StaticInfo ()
|
||||
{
|
||||
string className = hash.ToString ();
|
||||
Assert.AreEqual (128, hash.HashSize, className + ".HashSize");
|
||||
Assert.AreEqual (1, hash.InputBlockSize, className + ".InputBlockSize");
|
||||
Assert.AreEqual (1, hash.OutputBlockSize, className + ".OutputBlockSize");
|
||||
Assertion.AssertEquals (className + ".HashSize", 128, hash.HashSize);
|
||||
Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
|
||||
Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ public class SHA1Test {
|
||||
if ((array1 == null) && (array2 == null))
|
||||
return;
|
||||
if (array1 == null)
|
||||
Assert.Fail (msg + " -> First array is NULL");
|
||||
Assertion.Fail (msg + " -> First array is NULL");
|
||||
if (array2 == null)
|
||||
Assert.Fail (msg + " -> Second array is NULL");
|
||||
Assertion.Fail (msg + " -> Second array is NULL");
|
||||
|
||||
bool a = (array1.Length == array2.Length);
|
||||
if (a) {
|
||||
@@ -48,7 +48,7 @@ public class SHA1Test {
|
||||
}
|
||||
msg += " -> Expected " + BitConverter.ToString (array1, 0);
|
||||
msg += " is different than " + BitConverter.ToString (array2, 0);
|
||||
Assert.IsTrue (a, msg);
|
||||
Assertion.Assert (msg, a);
|
||||
}
|
||||
|
||||
[SetUp]
|
||||
@@ -63,12 +63,12 @@ public class SHA1Test {
|
||||
{
|
||||
// test all values static for SHA1
|
||||
string className = hash.ToString ();
|
||||
Assert.AreEqual (className + ".HashSize", 160, hash.HashSize);
|
||||
Assert.AreEqual (className + ".InputBlockSize", 1, hash.InputBlockSize);
|
||||
Assert.AreEqual (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
|
||||
Assert.AreEqual (className + ".CanReuseTransform", true, hash.CanReuseTransform);
|
||||
Assert.AreEqual (className + ".CanTransformMultipleBlocks", true, hash.CanTransformMultipleBlocks);
|
||||
Assert.AreEqual (className + ".ToString()", "Mono.Security.Cryptography.SHA1CryptoServiceProvider", className);
|
||||
Assertion.AssertEquals (className + ".HashSize", 160, hash.HashSize);
|
||||
Assertion.AssertEquals (className + ".InputBlockSize", 1, hash.InputBlockSize);
|
||||
Assertion.AssertEquals (className + ".OutputBlockSize", 1, hash.OutputBlockSize);
|
||||
Assertion.AssertEquals (className + ".CanReuseTransform", true, hash.CanReuseTransform);
|
||||
Assertion.AssertEquals (className + ".CanTransformMultipleBlocks", true, hash.CanTransformMultipleBlocks);
|
||||
Assertion.AssertEquals (className + ".ToString()", "Mono.Security.Cryptography.SHA1CryptoServiceProvider", className);
|
||||
}
|
||||
|
||||
// First test, we hash the string "abc"
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace MonoTests.Mono.Math {
|
||||
|
||||
protected void Expect (BigInteger actual, BigInteger expected)
|
||||
{
|
||||
Assert.AreEqual (expected, actual, Name);
|
||||
Assertion.AssertEquals (Name, expected, actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,12 +81,12 @@ namespace MonoTests.Mono.Math {
|
||||
|
||||
private void ExpectComposite (BigInteger bi)
|
||||
{
|
||||
Assert.AreEqual (false, bi.IsProbablePrime ());
|
||||
Assertion.AssertEquals (false, bi.IsProbablePrime ());
|
||||
}
|
||||
|
||||
private void ExpectPrime (BigInteger bi)
|
||||
{
|
||||
Assert.AreEqual (true, bi.IsProbablePrime ());
|
||||
Assertion.AssertEquals (true, bi.IsProbablePrime ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace MonoTests.Mono.Math {
|
||||
// Adapted from http://lists.ximian.com/archives/public/mono-devel-list/2003-November/003026.html
|
||||
// Note: these primes are taken from RFC 2412 [http://www.faqs.org/rfcs/rfc2412.html]
|
||||
[TestFixture]
|
||||
public class Rfc2412WellTestedPrimes {
|
||||
public class Rfc2412WellTestedPrimes : Assertion {
|
||||
|
||||
// E.1. Well-Known Group 1: A 768 bit prime
|
||||
[Test]
|
||||
@@ -203,8 +203,8 @@ namespace MonoTests.Mono.Math {
|
||||
{
|
||||
string prime = "1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919";
|
||||
BigInteger bi = BigInteger.Parse (prime);
|
||||
Assert.IsTrue (bi.IsProbablePrime (), "isProbablePrime-768");
|
||||
Assert.AreEqual (prime, bi.ToString (), "ToString()");
|
||||
Assert ("isProbablePrime-768", bi.IsProbablePrime ());
|
||||
AssertEquals ("ToString()", prime, bi.ToString ());
|
||||
}
|
||||
|
||||
// E.2. Well-Known Group 2: A 1024 bit prime
|
||||
@@ -213,8 +213,8 @@ namespace MonoTests.Mono.Math {
|
||||
{
|
||||
string prime = "179769313486231590770839156793787453197860296048756011706444423684197180216158519368947833795864925541502180565485980503646440548199239100050792877003355816639229553136239076508735759914822574862575007425302077447712589550957937778424442426617334727629299387668709205606050270810842907692932019128194467627007";
|
||||
BigInteger bi = BigInteger.Parse (prime);
|
||||
Assert.IsTrue (bi.IsProbablePrime (), "isProbablePrime-1024");
|
||||
Assert.AreEqual (prime, bi.ToString (), "ToString()");
|
||||
Assert ("isProbablePrime-1024", bi.IsProbablePrime ());
|
||||
AssertEquals ("ToString()", prime, bi.ToString ());
|
||||
}
|
||||
|
||||
// Note: E.3 and E.4 are for Elliptic Curve Groups
|
||||
@@ -225,8 +225,8 @@ namespace MonoTests.Mono.Math {
|
||||
{
|
||||
string prime = "2410312426921032588552076022197566074856950548502459942654116941958108831682612228890093858261341614673227141477904012196503648957050582631942730706805009223062734745341073406696246014589361659774041027169249453200378729434170325843778659198143763193776859869524088940195577346119843545301547043747207749969763750084308926339295559968882457872412993810129130294592999947926365264059284647209730384947211681434464714438488520940127459844288859336526896320919633919";
|
||||
BigInteger bi = BigInteger.Parse (prime);
|
||||
Assert.IsTrue (bi.IsProbablePrime (), "isProbablePrime-1536");
|
||||
Assert.AreEqual (prime, bi.ToString (), "ToString()");
|
||||
Assert ("isProbablePrime-1536", bi.IsProbablePrime ());
|
||||
AssertEquals ("ToString()", prime, bi.ToString ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace MonoTests.Mono.Math {
|
||||
ContextData ctx = (ContextData)Context;
|
||||
|
||||
|
||||
Assert.AreEqual (ctx.bits, bits);
|
||||
Assertion.AssertEquals (ctx.bits, bits);
|
||||
uint d = ctx.testData;
|
||||
|
||||
for (uint i = (uint)bits - 2; d > 0; i--, d >>= 1)
|
||||
@@ -65,7 +65,7 @@ namespace MonoTests.Mono.Math {
|
||||
Assert.IsTrue (p.TestBit (1));
|
||||
uint d = ctx.testData;
|
||||
for (uint j = 128 - 2; d > 0; j--, d >>= 1)
|
||||
Assert.AreEqual ((d&1) == 1, p.TestBit (j));
|
||||
Assertion.AssertEquals ((d&1) == 1, p.TestBit (j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace MonoTests.Mono.Security.Authenticode {
|
||||
// makecert -n "CN=PVK1" -sv 1.pvk 1.cer
|
||||
|
||||
[TestFixture]
|
||||
public class PrivateKeyTest {
|
||||
public class PrivateKeyTest : Assertion {
|
||||
|
||||
// because most crypto stuff works with byte[] buffers
|
||||
static public void AssertEquals (string msg, byte[] array1, byte[] array2)
|
||||
@@ -76,9 +76,9 @@ public class PrivateKeyTest {
|
||||
if ((array1 == null) && (array2 == null))
|
||||
return;
|
||||
if (array1 == null)
|
||||
Assert.Fail (msg + " -> First array is NULL");
|
||||
Fail (msg + " -> First array is NULL");
|
||||
if (array2 == null)
|
||||
Assert.Fail (msg + " -> Second array is NULL");
|
||||
Fail (msg + " -> Second array is NULL");
|
||||
|
||||
bool a = (array1.Length == array2.Length);
|
||||
if (a) {
|
||||
@@ -93,7 +93,7 @@ public class PrivateKeyTest {
|
||||
msg += " -> Expected " + BitConverter.ToString (array1, 0);
|
||||
msg += " is different than " + BitConverter.ToString (array2, 0);
|
||||
}
|
||||
Assert.IsTrue (a, msg);
|
||||
Assert (msg, a);
|
||||
}
|
||||
|
||||
string testfile;
|
||||
@@ -152,10 +152,10 @@ public class PrivateKeyTest {
|
||||
{
|
||||
WriteBuffer (nopwd);
|
||||
PrivateKey pvk = PrivateKey.CreateFromFile (testfile);
|
||||
Assert.IsNotNull (pvk.RSA, "msnopwd.RSA");
|
||||
Assert.IsTrue (!pvk.Encrypted, "msnopwd.Encrypted");
|
||||
Assert.IsTrue (pvk.Weak, "msnopwd.Weak");
|
||||
Assert.AreEqual (2, pvk.KeyType, "msnopwd.KeyType");
|
||||
AssertNotNull ("msnopwd.RSA", pvk.RSA);
|
||||
Assert ("msnopwd.Encrypted", !pvk.Encrypted);
|
||||
Assert ("msnopwd.Weak", pvk.Weak);
|
||||
AssertEquals ("msnopwd.KeyType", 2, pvk.KeyType);
|
||||
}
|
||||
|
||||
// this will convert a PVK file without a password to a PVK file
|
||||
@@ -168,11 +168,11 @@ public class PrivateKeyTest {
|
||||
string rsa1 = pvk.RSA.ToXmlString (true);
|
||||
pvk.Save (testfile, "password");
|
||||
pvk = PrivateKey.CreateFromFile (testfile, "password");
|
||||
Assert.IsNotNull (pvk.RSA, "topwd.RSA");
|
||||
AssertNotNull ("topwd.RSA", pvk.RSA);
|
||||
string rsa2 = pvk.RSA.ToXmlString (true);
|
||||
Assert.AreEqual (rsa1, rsa2, "topwd.RSA identical");
|
||||
Assert.IsTrue (pvk.Encrypted, "topwd.Encrypted");
|
||||
Assert.IsTrue (pvk.Weak, "topwd.Weak");
|
||||
AssertEquals ("topwd.RSA identical", rsa1, rsa2);
|
||||
Assert ("topwd.Encrypted", pvk.Encrypted);
|
||||
Assert ("topwd.Weak", pvk.Weak);
|
||||
}
|
||||
|
||||
// this will convert a PVK file without a password to a PVK file
|
||||
@@ -186,11 +186,11 @@ public class PrivateKeyTest {
|
||||
pvk.Weak = false; // we want strong crypto
|
||||
pvk.Save (testfile, "password");
|
||||
pvk = PrivateKey.CreateFromFile (testfile, "password");
|
||||
Assert.IsNotNull (pvk.RSA, "topwd.RSA");
|
||||
AssertNotNull ("topwd.RSA", pvk.RSA);
|
||||
string rsa2 = pvk.RSA.ToXmlString (true);
|
||||
Assert.AreEqual (rsa1, rsa2, "topwd.RSA identical");
|
||||
Assert.IsTrue (pvk.Encrypted, "topwd.Encrypted");
|
||||
Assert.IsTrue (!pvk.Weak, "topwd.Weak");
|
||||
AssertEquals ("topwd.RSA identical", rsa1, rsa2);
|
||||
Assert ("topwd.Encrypted", pvk.Encrypted);
|
||||
Assert ("topwd.Weak", !pvk.Weak);
|
||||
}
|
||||
|
||||
static byte[] pwd = {
|
||||
@@ -229,9 +229,9 @@ public class PrivateKeyTest {
|
||||
{
|
||||
WriteBuffer (pwd);
|
||||
PrivateKey pvk = PrivateKey.CreateFromFile (testfile, "password");
|
||||
Assert.IsNotNull (pvk.RSA, "mspwd.RSA");
|
||||
Assert.IsTrue (pvk.Encrypted, "mspwd.Encrypted");
|
||||
Assert.IsTrue (pvk.Weak, "mspwd.Weak");
|
||||
AssertNotNull ("mspwd.RSA", pvk.RSA);
|
||||
Assert ("mspwd.Encrypted", pvk.Encrypted);
|
||||
Assert ("mspwd.Weak", pvk.Weak);
|
||||
}
|
||||
|
||||
// this will convert a PVK file with a password to a PVK file
|
||||
@@ -244,11 +244,11 @@ public class PrivateKeyTest {
|
||||
string rsa1 = pvk.RSA.ToXmlString (true);
|
||||
pvk.Save (testfile);
|
||||
pvk = PrivateKey.CreateFromFile (testfile);
|
||||
Assert.IsNotNull (pvk.RSA, "nomorepwd.RSA");
|
||||
AssertNotNull ("nomorepwd.RSA", pvk.RSA);
|
||||
string rsa2 = pvk.RSA.ToXmlString (true);
|
||||
Assert.AreEqual (rsa1, rsa2, "nomorepwd.RSA identical");
|
||||
Assert.IsTrue (!pvk.Encrypted, "nomorepwd.Encrypted");
|
||||
Assert.IsTrue (pvk.Weak, "nomorepwd.Weak");
|
||||
AssertEquals ("nomorepwd.RSA identical", rsa1, rsa2);
|
||||
Assert ("nomorepwd.Encrypted", !pvk.Encrypted);
|
||||
Assert ("nomorepwd.Weak", pvk.Weak);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -261,11 +261,11 @@ public class PrivateKeyTest {
|
||||
pvk.Save (testfile, "mono");
|
||||
|
||||
pvk = PrivateKey.CreateFromFile (testfile, "mono");
|
||||
Assert.IsNotNull (pvk.RSA, "new.RSA");
|
||||
AssertNotNull ("new.RSA", pvk.RSA);
|
||||
string rsa2 = pvk.RSA.ToXmlString (true);
|
||||
Assert.AreEqual (rsa1, rsa2, "new.RSA identical");
|
||||
Assert.IsTrue (pvk.Encrypted, "new.Encrypted");
|
||||
Assert.IsTrue (!pvk.Weak, "new.Weak");
|
||||
AssertEquals ("new.RSA identical", rsa1, rsa2);
|
||||
Assert ("new.Encrypted", pvk.Encrypted);
|
||||
Assert ("new.Weak", !pvk.Weak);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -15,7 +15,7 @@ using Mono.Security.Cryptography;
|
||||
namespace MonoTests.Mono.Security.Cryptography {
|
||||
|
||||
[TestFixture]
|
||||
public class CryptoConvertTest {
|
||||
public class CryptoConvertTest : Assertion {
|
||||
|
||||
// because most crypto stuff works with byte[] buffers
|
||||
static public void AssertEquals (string msg, byte[] array1, byte[] array2)
|
||||
@@ -23,9 +23,9 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
if ((array1 == null) && (array2 == null))
|
||||
return;
|
||||
if (array1 == null)
|
||||
Assert.Fail (msg + " -> First array is NULL");
|
||||
Fail (msg + " -> First array is NULL");
|
||||
if (array2 == null)
|
||||
Assert.Fail (msg + " -> Second array is NULL");
|
||||
Fail (msg + " -> Second array is NULL");
|
||||
|
||||
bool a = (array1.Length == array2.Length);
|
||||
if (a) {
|
||||
@@ -38,7 +38,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
}
|
||||
msg += " -> Expected " + BitConverter.ToString (array1, 0);
|
||||
msg += " is different than " + BitConverter.ToString (array2, 0);
|
||||
Assert.IsTrue (a, msg);
|
||||
Assert (msg, a);
|
||||
}
|
||||
|
||||
// strongname generated using "sn -k unit.snk"
|
||||
@@ -163,16 +163,16 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
{
|
||||
// keypair
|
||||
RSA rsa = CryptoConvert.FromCapiKeyBlob (strongName, 0);
|
||||
Assert.AreEqual (strongNameString, rsa.ToXmlString (true), "KeyPair");
|
||||
Assert.AreEqual (strongNamePublicKeyString, rsa.ToXmlString (false), "PublicKey-1");
|
||||
AssertEquals ("KeyPair", strongNameString, rsa.ToXmlString (true));
|
||||
AssertEquals ("PublicKey-1", strongNamePublicKeyString, rsa.ToXmlString (false));
|
||||
|
||||
// public key (direct)
|
||||
rsa = CryptoConvert.FromCapiKeyBlob (strongNamePublicKey, 12);
|
||||
Assert.AreEqual (strongNamePublicKeyString, rsa.ToXmlString (false), "PublicKey-2");
|
||||
AssertEquals ("PublicKey-2", strongNamePublicKeyString, rsa.ToXmlString (false));
|
||||
|
||||
// public key (indirect - inside header)
|
||||
rsa = CryptoConvert.FromCapiKeyBlob (strongNamePublicKey, 0);
|
||||
Assert.AreEqual (strongNamePublicKeyString, rsa.ToXmlString (false), "PublicKey-3");
|
||||
AssertEquals ("PublicKey-3", strongNamePublicKeyString, rsa.ToXmlString (false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -201,7 +201,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
public void FromCapiPrivateKeyBlob ()
|
||||
{
|
||||
RSA rsa = CryptoConvert.FromCapiPrivateKeyBlob (strongName, 0);
|
||||
Assert.AreEqual (strongNameString, rsa.ToXmlString (true), "KeyPair");
|
||||
AssertEquals ("KeyPair", strongNameString, rsa.ToXmlString (true));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -229,7 +229,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
public void FromCapiPublicKeyBlob ()
|
||||
{
|
||||
RSA rsa = CryptoConvert.FromCapiPublicKeyBlob (strongNamePublicKey, 12);
|
||||
Assert.AreEqual (strongNamePublicKeyString, rsa.ToXmlString (false), "PublicKey");
|
||||
AssertEquals ("PublicKey", strongNamePublicKeyString, rsa.ToXmlString (false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -262,12 +262,12 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
AssertEquals ("RSA-KeyPair", strongName, keypair);
|
||||
|
||||
byte[] publicKey = CryptoConvert.ToCapiKeyBlob (rsa, false);
|
||||
Assert.AreEqual (BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey), "RSA-PublicKey");
|
||||
AssertEquals ("RSA-PublicKey", BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey));
|
||||
|
||||
AsymmetricAlgorithm dsa = DSA.Create ();
|
||||
dsa.FromXmlString (dsaKeyPairString);
|
||||
AssertEquals ("DSA-KeyPair", dsaPrivBlob, CryptoConvert.ToCapiKeyBlob (dsa, true));
|
||||
Assert.AreEqual (BitConverter.ToString (dsaPubBlob), BitConverter.ToString (CryptoConvert.ToCapiKeyBlob (dsa, false)), "DSA-PublicKey");
|
||||
AssertEquals ("DSA-PublicKey", BitConverter.ToString (dsaPubBlob), BitConverter.ToString (CryptoConvert.ToCapiKeyBlob (dsa, false)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -279,7 +279,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
AssertEquals ("KeyPair", strongName, keypair);
|
||||
|
||||
byte[] publicKey = CryptoConvert.ToCapiKeyBlob (rsa, false);
|
||||
Assert.AreEqual (BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey), "PublicKey");
|
||||
AssertEquals ("PublicKey", BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -323,11 +323,11 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
// full keypair
|
||||
rsa.FromXmlString (strongNameString);
|
||||
byte[] publicKey = CryptoConvert.ToCapiPublicKeyBlob (rsa);
|
||||
Assert.AreEqual (BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey), "PublicKey-1");
|
||||
AssertEquals ("PublicKey-1", BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey));
|
||||
// public key only
|
||||
rsa.FromXmlString (strongNamePublicKeyString);
|
||||
publicKey = CryptoConvert.ToCapiPublicKeyBlob (rsa);
|
||||
Assert.AreEqual (BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey), "PublicKey-2");
|
||||
AssertEquals ("PublicKey-2", BitConverter.ToString (strongNamePublicKey, 12), BitConverter.ToString (publicKey));
|
||||
}
|
||||
|
||||
/* DSA key tests */
|
||||
@@ -419,8 +419,8 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
public void FromCapiKeyBlobDSA ()
|
||||
{
|
||||
DSA dsa = CryptoConvert.FromCapiKeyBlobDSA (dsaPrivBlob);
|
||||
Assert.AreEqual (dsaKeyPairString, dsa.ToXmlString (true), "KeyPair");
|
||||
Assert.AreEqual (dsaPubKeyString, dsa.ToXmlString (false), "PublicKey");
|
||||
AssertEquals ("KeyPair", dsaKeyPairString, dsa.ToXmlString (true));
|
||||
AssertEquals ("PublicKey", dsaPubKeyString, dsa.ToXmlString (false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -449,7 +449,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
public void FromCapiPrivateKeyBlobDSA ()
|
||||
{
|
||||
DSA dsa = CryptoConvert.FromCapiPrivateKeyBlobDSA (dsaPrivBlob, 0);
|
||||
Assert.AreEqual (dsaKeyPairString, dsa.ToXmlString (true), "KeyPair");
|
||||
AssertEquals ("KeyPair", dsaKeyPairString, dsa.ToXmlString (true));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -478,7 +478,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
public void FromCapiPublicKeyBlobDSA ()
|
||||
{
|
||||
DSA dsa = CryptoConvert.FromCapiPublicKeyBlobDSA (dsaPubBlob, 0);
|
||||
Assert.AreEqual (dsaPubKeyString, dsa.ToXmlString (false), "PublicKey");
|
||||
AssertEquals ("PublicKey", dsaPubKeyString, dsa.ToXmlString (false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -512,7 +512,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
AssertEquals ("KeyPair", dsaPrivBlob, keypair);
|
||||
|
||||
byte[] pubkey = CryptoConvert.ToCapiKeyBlob (dsa, false);
|
||||
Assert.AreEqual (BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey), "PublicKey");
|
||||
AssertEquals ("PublicKey", BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -548,20 +548,20 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
// full keypair
|
||||
dsa.FromXmlString (dsaKeyPairString);
|
||||
byte[] pubkey = CryptoConvert.ToCapiPublicKeyBlob (dsa);
|
||||
Assert.AreEqual (BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey), "PublicKey-1");
|
||||
AssertEquals ("PublicKey-1", BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey));
|
||||
|
||||
// public key only
|
||||
dsa.FromXmlString (dsaPubKeyString);
|
||||
pubkey = CryptoConvert.ToCapiPublicKeyBlob (dsa);
|
||||
Assert.AreEqual (BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey), "PublicKey-2");
|
||||
AssertEquals ("PublicKey-2", BitConverter.ToString (dsaPubBlob), BitConverter.ToString (pubkey));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FromHex ()
|
||||
{
|
||||
Assert.IsNull (CryptoConvert.FromHex (null), "FromHex(null)");
|
||||
AssertNull ("FromHex(null)", CryptoConvert.FromHex (null));
|
||||
string result = BitConverter.ToString (CryptoConvert.FromHex ("0123456789aBcDeF"));
|
||||
Assert.AreEqual ("01-23-45-67-89-AB-CD-EF", result, "0123456789abcdef");
|
||||
AssertEquals ("0123456789abcdef", "01-23-45-67-89-AB-CD-EF", result);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -581,9 +581,9 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
[Test]
|
||||
public void ToHex ()
|
||||
{
|
||||
Assert.IsNull (CryptoConvert.FromHex (null), "FromHex(null)");
|
||||
AssertNull ("FromHex(null)", CryptoConvert.FromHex (null));
|
||||
byte[] data = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
|
||||
Assert.AreEqual ("0123456789ABCDEF", CryptoConvert.ToHex (data), "0123456789abcdef");
|
||||
AssertEquals ("0123456789abcdef", "0123456789ABCDEF", CryptoConvert.ToHex (data));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -595,8 +595,8 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
RSA rsa = CryptoConvert.FromCapiKeyBlob (strongNameNUnit, 0);
|
||||
// note the bad D parameters !!!
|
||||
// this only works because CRT is being used
|
||||
Assert.AreEqual ("<RSAKeyValue><Modulus>rB8h0TaMs8fWA+5WMdcjOjejCZwhYwuFHUZPS0cC9TOG6FJtvlHPpZLQAg0xfLr2SivPRol1Xw9SqhuaYQNJA7sAaOb8Rvgmx93XbmcNotY9ob4TGaesk+M8VsdexsIJ3WlyLbmRlf0EjT52nboyauEL3UC85zkMjW1LNb8LSs8=</Modulus><Exponent>AQAB</Exponent><P>2d4pGForvc792ztFxhNuzxIihDnXp+qK9F8t/NduhRBdu+JXK4d8a9EGwzpMxLUPlHjCZfXRraZiSQszkH+nzQ==</P><Q>yj9BeGmOrucOUCNZYTtXI0ykzz+1g+cVMSxi+6xzoLEOqmdE4gjcWaxak4MF1+pIR6UycnNa/jg1LBl7MKxpCw==</Q><DP>cMkAjznG4Sjx4/dIRKU0vP/PXJIxIR1bN+y5+uVvsnTpgWVH6SHneE0qahCZQ0/UM/Fb+bqLBJFY2iVxWUGslQ==</DP><DQ>gz6TXPGbLzMv3Z9i5C8e+ABHv1pHj6ZI4VU9kraxfmkH7FsBn3FClUq8qJdRFnGpoBy65Pyo4upUzx5mDAsGSw==</DQ><InverseQ>x+UShV+0d9cicoiB9fkSLqpLDyF4dYzVu0uqX0eCcoGJpk19jtSaMI3Eo8VN6MJAW1zrRy+MA1Fqb9qeThLqZQ==</InverseQ><D>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</D></RSAKeyValue>", rsa.ToXmlString (true), "KeyPair");
|
||||
Assert.AreEqual ("<RSAKeyValue><Modulus>rB8h0TaMs8fWA+5WMdcjOjejCZwhYwuFHUZPS0cC9TOG6FJtvlHPpZLQAg0xfLr2SivPRol1Xw9SqhuaYQNJA7sAaOb8Rvgmx93XbmcNotY9ob4TGaesk+M8VsdexsIJ3WlyLbmRlf0EjT52nboyauEL3UC85zkMjW1LNb8LSs8=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>", rsa.ToXmlString (false), "PublicKey");
|
||||
AssertEquals ("KeyPair", "<RSAKeyValue><Modulus>rB8h0TaMs8fWA+5WMdcjOjejCZwhYwuFHUZPS0cC9TOG6FJtvlHPpZLQAg0xfLr2SivPRol1Xw9SqhuaYQNJA7sAaOb8Rvgmx93XbmcNotY9ob4TGaesk+M8VsdexsIJ3WlyLbmRlf0EjT52nboyauEL3UC85zkMjW1LNb8LSs8=</Modulus><Exponent>AQAB</Exponent><P>2d4pGForvc792ztFxhNuzxIihDnXp+qK9F8t/NduhRBdu+JXK4d8a9EGwzpMxLUPlHjCZfXRraZiSQszkH+nzQ==</P><Q>yj9BeGmOrucOUCNZYTtXI0ykzz+1g+cVMSxi+6xzoLEOqmdE4gjcWaxak4MF1+pIR6UycnNa/jg1LBl7MKxpCw==</Q><DP>cMkAjznG4Sjx4/dIRKU0vP/PXJIxIR1bN+y5+uVvsnTpgWVH6SHneE0qahCZQ0/UM/Fb+bqLBJFY2iVxWUGslQ==</DP><DQ>gz6TXPGbLzMv3Z9i5C8e+ABHv1pHj6ZI4VU9kraxfmkH7FsBn3FClUq8qJdRFnGpoBy65Pyo4upUzx5mDAsGSw==</DQ><InverseQ>x+UShV+0d9cicoiB9fkSLqpLDyF4dYzVu0uqX0eCcoGJpk19jtSaMI3Eo8VN6MJAW1zrRy+MA1Fqb9qeThLqZQ==</InverseQ><D>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</D></RSAKeyValue>", rsa.ToXmlString (true));
|
||||
AssertEquals ("PublicKey", "<RSAKeyValue><Modulus>rB8h0TaMs8fWA+5WMdcjOjejCZwhYwuFHUZPS0cC9TOG6FJtvlHPpZLQAg0xfLr2SivPRol1Xw9SqhuaYQNJA7sAaOb8Rvgmx93XbmcNotY9ob4TGaesk+M8VsdexsIJ3WlyLbmRlf0EjT52nboyauEL3UC85zkMjW1LNb8LSs8=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>", rsa.ToXmlString (false));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
// http://www.ietf.org/rfc/rfc2631.txt
|
||||
|
||||
[TestFixture]
|
||||
public class DiffieHellmanManagedTest {
|
||||
public class DiffieHellmanManagedTest : Assertion {
|
||||
|
||||
// because most crypto stuff works with byte[] buffers
|
||||
static public void AssertEquals (string msg, byte[] array1, byte[] array2)
|
||||
@@ -32,9 +32,9 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
if ((array1 == null) && (array2 == null))
|
||||
return;
|
||||
if (array1 == null)
|
||||
Assert.Fail (msg + " -> First array is NULL");
|
||||
Assertion.Fail (msg + " -> First array is NULL");
|
||||
if (array2 == null)
|
||||
Assert.Fail (msg + " -> Second array is NULL");
|
||||
Assertion.Fail (msg + " -> Second array is NULL");
|
||||
|
||||
bool a = (array1.Length == array2.Length);
|
||||
if (a) {
|
||||
@@ -49,7 +49,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
msg += " -> Expected " + BitConverter.ToString (array1, 0);
|
||||
msg += " is different than " + BitConverter.ToString (array2, 0);
|
||||
}
|
||||
Assert.IsTrue (a, msg);
|
||||
Assertion.Assert (msg, a);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -70,7 +70,7 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
// let the second DH instance compute the shared secret using the first DH public key
|
||||
byte[] dh2k = dh2.DecryptKeyExchange (ke1);
|
||||
// both shared secrets are the same
|
||||
Assert.AreEqual (dh1k, dh2k, "Shared Secret");
|
||||
AssertEquals ("Shared Secret", dh1k, dh2k);
|
||||
}
|
||||
|
||||
// TODO: More is needed !
|
||||
|
||||
@@ -19,7 +19,7 @@ using NUnit.Framework;
|
||||
namespace MonoTests.Mono.Security.Cryptography {
|
||||
|
||||
[TestFixture]
|
||||
public class PKCS8Test {
|
||||
public class PKCS8Test : Assertion {
|
||||
|
||||
static public byte[] pkcs8_der = { 0x30, 0x82, 0x02, 0xB2, 0x30, 0x1C, 0x06, 0x0A, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x0C, 0x01, 0x03, 0x30, 0x0E, 0x04, 0x08, 0x86, 0x2A, 0xA9, 0x71, 0x6D, 0xA4, 0xB8, 0x2D, 0x02, 0x02, 0x07, 0xD0, 0x04, 0x82, 0x02, 0x90, 0x90, 0x14, 0xB5, 0xF0, 0xB6, 0x86, 0x56, 0xCB, 0xFA, 0x63, 0xAD, 0x9F, 0x5A, 0x59, 0x6C, 0xAD, 0x00, 0x3C, 0x37, 0x8A, 0xC3, 0x88, 0x58, 0x8B, 0xD7, 0x48, 0x53, 0x7A, 0xC8, 0x5B, 0x0D, 0x98, 0xDD, 0x8B, 0xB3, 0xEC, 0x4C, 0xAC, 0x61, 0x18, 0xE3, 0x5E, 0x47, 0xAD, 0xC7, 0x92, 0xBC, 0xD3, 0x00, 0x07, 0xFF, 0x1A, 0x68, 0x74, 0x45, 0x8E, 0xD8, 0x7C, 0x9F, 0x18, 0x7B, 0xD7, 0xC8,
|
||||
0x47, 0xBA, 0x6B, 0x19, 0xF2, 0xBF, 0x7E, 0x51, 0x0B, 0x4B, 0x43, 0xE8, 0xB9, 0x56, 0x7E, 0xD0, 0x74, 0xC7, 0xDE, 0x76, 0xDB, 0xFF, 0x5C, 0x6B, 0x53, 0xBE, 0x31, 0x06, 0xAE, 0x6C, 0x8F, 0xDC, 0x49, 0x04, 0x71, 0x74, 0xEE, 0xB8, 0x06, 0xCB, 0xAD, 0x86, 0xB4, 0x4E, 0xB9, 0x46, 0xA1, 0x03, 0x5E, 0x0E, 0xA7, 0xC7, 0x37, 0x6B, 0xB0, 0x8D, 0x2D, 0x81, 0x1F, 0xE3, 0xC2, 0x05, 0xDE, 0xEF, 0x51, 0x07, 0x70, 0x6E, 0x35, 0x9A, 0xAD, 0x19, 0x5E, 0xAF, 0xEB, 0x7F, 0xEF, 0xE4, 0xAB, 0x07, 0xF3, 0xF6, 0xEA, 0xFA, 0x0E, 0x83, 0x65, 0x06, 0x3C, 0xF3, 0xBD, 0x96, 0x08, 0x14, 0xC5, 0x34, 0x26, 0xED, 0xC0, 0x10,
|
||||
@@ -32,13 +32,13 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
[Test]
|
||||
public void EncryptedPrivateKey_Farscape ()
|
||||
{
|
||||
Assert.AreEqual (PKCS8.KeyInfo.EncryptedPrivateKey, PKCS8.GetType (pkcs8_der), "PKCS8.GetType");
|
||||
AssertEquals ("PKCS8.GetType", PKCS8.KeyInfo.EncryptedPrivateKey, PKCS8.GetType (pkcs8_der));
|
||||
PKCS8.EncryptedPrivateKeyInfo p8 = new PKCS8.EncryptedPrivateKeyInfo (pkcs8_der);
|
||||
Assert.AreEqual ("1.2.840.113549.1.12.1.3", p8.Algorithm, "Algorithm");
|
||||
Assert.AreEqual ("90-14-B5-F0-B6-86-56-CB-FA-63-AD-9F-5A-59-6C-AD-00-3C-37-8A-C3-88-58-8B-D7-48-53-7A-C8-5B-0D-98-DD-8B-B3-EC-4C-AC-61-18-E3-5E-47-AD-C7-92-BC-D3-00-07-FF-1A-68-74-45-8E-D8-7C-9F-18-7B-D7-C8-47-BA-6B-19-F2-BF-7E-51-0B-4B-43-E8-B9-56-7E-D0-74-C7-DE-76-DB-FF-5C-6B-53-BE-31-06-AE-6C-8F-DC-49-04-71-74-EE-B8-06-CB-AD-86-B4-4E-B9-46-A1-03-5E-0E-A7-C7-37-6B-B0-8D-2D-81-1F-E3-C2-05-DE-EF-51-07-70-6E-35-9A-AD-19-5E-AF-EB-7F-EF-E4-AB-07-F3-F6-EA-FA-0E-83-65-06-3C-F3-BD-96-08-14-C5-34-26-ED-C0-10-CC-AE-2D-8F-BE-ED-98-0D-88-1B-1E-C7-37-F0-FC-DB-3C-E3-1B-66-52-45-6E-05-A6-D9-12-23-05-5F-E3-9F-7D-21-9B-2E-3E-9E-3C-EE-D1-9B-55-DE-57-60-A5-24-2D-C7-94-EC-FC-B1-6A-65-BD-85-02-5C-58-AA-5A-6A-F3-AC-6B-DD-0E-63-B2-4B-5B-67-3D-C3-BF-E4-C8-EF-3F-89-5A-CD-6D-EF-05-22-2B-72-FF-80-7A-DD-F1-59-A7-6F-00-B1-BD-4D-88-D6-E4-8A-DD-A9-FC-D9-01-0A-65-8E-52-F9-7E-20-72-67-0D-5B-EE-67-5B-46-4A-15-A2-6F-15-2B-5B-9A-93-12-4F-F4-AD-49-D0-11-F1-7E-40-DE-32-96-2E-B3-E8-71-60-27-6E-A2-71-83-C7-FE-0E-8B-31-06-64-E1-19-02-B9-44-25-0C-94-64-7E-5F-89-4D-7E-99-0B-91-B8-22-A5-33-92-D3-49-07-1D-C6-25-4A-D7-6D-E2-94-3F-FA-10-72-59-62-F5-C6-D4-3A-EE-8F-BC-9C-BC-FC-C7-37-BF-7C-A0-67-B0-FF-0F-29-A0-A2-71-6B-21-00-F4-54-D9-3D-1B-CE-F4-FE-6F-F5-21-CB-47-58-17-F6-45-2F-A0-3B-8B-D9-B8-8A-33-3F-16-E0-C7-8A-B8-11-2F-A8-7E-7D-A7-7B-65-27-89-3C-67-4D-D5-70-28-76-60-96-68-BF-FB-CD-49-E0-8A-7C-6F-76-06-48-6D-63-67-8A-47-82-5E-7F-0E-AC-46-B6-BC-0A-6D-E2-1A-3A-20-A5-C7-81-71-6E-2B-16-97-D4-FA-C0-DD-72-5B-9F-A3-43-F4-85-B1-C6-A8-E0-62-81-5D-A5-07-29-6A-6A-2D-E1-1D-BE-12-6D-42-58-6F-4E-30-3D-BF-32-11-38-BC-36-76-60-FC-57-2F-D3-9E-C4-1A-92-EA-DE-85-FD-E7-AA-30-A6-97-2C-36-3B-3B-0E-92-52-FF-42-D7-62-6C-C1-3A-E7-1B-4E-13-8C-95-B3-4B-A7-9E-42-75-A8-CA-63-76-C4-45-74-96-43-D8-86-82-BE-37-FF-9B-EB-B7-18-A1-2F-E3-6C-08-E8-11-96-8C-5E-9E-2B-E7-DB-7D-54-E1-DB-1E-D3-8F-B5-19-4B-B2-16-DB-CF-EC-88-0B-6C-3C-E4-F2-C4-FF-4D-3E-53-52-3A-81-0B-6E-AC-95-EA-5A-6E-4D-83-23-82-C9-90-02-74-10-2A-6C-FB-97-4F-5F-70-8E-F0-B9", BitConverter.ToString (p8.EncryptedData),
|
||||
"EncryptedData");
|
||||
Assert.AreEqual ("86-2A-A9-71-6D-A4-B8-2D", BitConverter.ToString (p8.Salt), "Salt");
|
||||
Assert.AreEqual (2000, p8.IterationCount, "IterationCount");
|
||||
AssertEquals ("Algorithm", "1.2.840.113549.1.12.1.3", p8.Algorithm);
|
||||
AssertEquals ("EncryptedData", "90-14-B5-F0-B6-86-56-CB-FA-63-AD-9F-5A-59-6C-AD-00-3C-37-8A-C3-88-58-8B-D7-48-53-7A-C8-5B-0D-98-DD-8B-B3-EC-4C-AC-61-18-E3-5E-47-AD-C7-92-BC-D3-00-07-FF-1A-68-74-45-8E-D8-7C-9F-18-7B-D7-C8-47-BA-6B-19-F2-BF-7E-51-0B-4B-43-E8-B9-56-7E-D0-74-C7-DE-76-DB-FF-5C-6B-53-BE-31-06-AE-6C-8F-DC-49-04-71-74-EE-B8-06-CB-AD-86-B4-4E-B9-46-A1-03-5E-0E-A7-C7-37-6B-B0-8D-2D-81-1F-E3-C2-05-DE-EF-51-07-70-6E-35-9A-AD-19-5E-AF-EB-7F-EF-E4-AB-07-F3-F6-EA-FA-0E-83-65-06-3C-F3-BD-96-08-14-C5-34-26-ED-C0-10-CC-AE-2D-8F-BE-ED-98-0D-88-1B-1E-C7-37-F0-FC-DB-3C-E3-1B-66-52-45-6E-05-A6-D9-12-23-05-5F-E3-9F-7D-21-9B-2E-3E-9E-3C-EE-D1-9B-55-DE-57-60-A5-24-2D-C7-94-EC-FC-B1-6A-65-BD-85-02-5C-58-AA-5A-6A-F3-AC-6B-DD-0E-63-B2-4B-5B-67-3D-C3-BF-E4-C8-EF-3F-89-5A-CD-6D-EF-05-22-2B-72-FF-80-7A-DD-F1-59-A7-6F-00-B1-BD-4D-88-D6-E4-8A-DD-A9-FC-D9-01-0A-65-8E-52-F9-7E-20-72-67-0D-5B-EE-67-5B-46-4A-15-A2-6F-15-2B-5B-9A-93-12-4F-F4-AD-49-D0-11-F1-7E-40-DE-32-96-2E-B3-E8-71-60-27-6E-A2-71-83-C7-FE-0E-8B-31-06-64-E1-19-02-B9-44-25-0C-94-64-7E-5F-89-4D-7E-99-0B-91-B8-22-A5-33-92-D3-49-07-1D-C6-25-4A-D7-6D-E2-94-3F-FA-10-72-59-62-F5-C6-D4-3A-EE-8F-BC-9C-BC-FC-C7-37-BF-7C-A0-67-B0-FF-0F-29-A0-A2-71-6B-21-00-F4-54-D9-3D-1B-CE-F4-FE-6F-F5-21-CB-47-58-17-F6-45-2F-A0-3B-8B-D9-B8-8A-33-3F-16-E0-C7-8A-B8-11-2F-A8-7E-7D-A7-7B-65-27-89-3C-67-4D-D5-70-28-76-60-96-68-BF-FB-CD-49-E0-8A-7C-6F-76-06-48-6D-63-67-8A-47-82-5E-7F-0E-AC-46-B6-BC-0A-6D-E2-1A-3A-20-A5-C7-81-71-6E-2B-16-97-D4-FA-C0-DD-72-5B-9F-A3-43-F4-85-B1-C6-A8-E0-62-81-5D-A5-07-29-6A-6A-2D-E1-1D-BE-12-6D-42-58-6F-4E-30-3D-BF-32-11-38-BC-36-76-60-FC-57-2F-D3-9E-C4-1A-92-EA-DE-85-FD-E7-AA-30-A6-97-2C-36-3B-3B-0E-92-52-FF-42-D7-62-6C-C1-3A-E7-1B-4E-13-8C-95-B3-4B-A7-9E-42-75-A8-CA-63-76-C4-45-74-96-43-D8-86-82-BE-37-FF-9B-EB-B7-18-A1-2F-E3-6C-08-E8-11-96-8C-5E-9E-2B-E7-DB-7D-54-E1-DB-1E-D3-8F-B5-19-4B-B2-16-DB-CF-EC-88-0B-6C-3C-E4-F2-C4-FF-4D-3E-53-52-3A-81-0B-6E-AC-95-EA-5A-6E-4D-83-23-82-C9-90-02-74-10-2A-6C-FB-97-4F-5F-70-8E-F0-B9",
|
||||
BitConverter.ToString (p8.EncryptedData));
|
||||
AssertEquals ("Salt", "86-2A-A9-71-6D-A4-B8-2D", BitConverter.ToString (p8.Salt));
|
||||
AssertEquals ("IterationCount", 2000, p8.IterationCount);
|
||||
}
|
||||
|
||||
static public byte[] End_Certificate_CP_01_01_crtx = { 0x30, 0x82, 0x02, 0x78, 0x02, 0x01, 0x00, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x82, 0x02, 0x62, 0x30, 0x82, 0x02, 0x5E, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0xC6, 0x34, 0xEC, 0x6F, 0x0C, 0xE0, 0x59, 0x0E, 0xBC, 0x5F, 0xBA, 0x2E, 0x93, 0xBB, 0x04, 0xA7, 0x03, 0xB9, 0x70, 0x8A, 0xB9, 0xD7, 0xE5, 0xD7, 0xE6, 0xCA, 0x4A, 0x8C, 0x23, 0xD8, 0x60, 0xB3, 0x6B, 0xCB, 0x88, 0x88, 0xC7, 0xD8, 0x48, 0x7E, 0x64, 0xF9, 0xF6, 0x1B, 0xE3, 0x79, 0x46, 0x41, 0xE4, 0x61, 0xF7, 0x25, 0x47, 0x71, 0xF3, 0x50, 0x94, 0x4E, 0xF2, 0x7C, 0x6A, 0x37, 0xB6, 0x0C,
|
||||
@@ -68,25 +68,25 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
[Test]
|
||||
public void PrivateKeyInfo_End_Certificate_CP_01_01 ()
|
||||
{
|
||||
Assert.AreEqual (PKCS8.KeyInfo.PrivateKey, PKCS8.GetType (End_Certificate_CP_01_01_crtx), "PKCS8.GetType");
|
||||
AssertEquals ("PKCS8.GetType", PKCS8.KeyInfo.PrivateKey, PKCS8.GetType (End_Certificate_CP_01_01_crtx));
|
||||
PKCS8.PrivateKeyInfo p8 = new PKCS8.PrivateKeyInfo (End_Certificate_CP_01_01_crtx);
|
||||
Assert.AreEqual ("1.2.840.113549.1.1.1", p8.Algorithm, "Algorithm");
|
||||
Assert.AreEqual (0, p8.Attributes.Count, "Attributes");
|
||||
Assert.AreEqual (BitConverter.ToString (End_Certificate_CP_01_01_pki), BitConverter.ToString (p8.PrivateKey), "PrivateKey");
|
||||
Assert.AreEqual (0, p8.Version, "Version");
|
||||
AssertEquals ("Algorithm", "1.2.840.113549.1.1.1", p8.Algorithm);
|
||||
AssertEquals ("Attributes", 0, p8.Attributes.Count);
|
||||
AssertEquals ("PrivateKey", BitConverter.ToString (End_Certificate_CP_01_01_pki), BitConverter.ToString (p8.PrivateKey));
|
||||
AssertEquals ("Version", 0, p8.Version);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PrivateKeyInfo_End_Certificate_CP_01_02 ()
|
||||
{
|
||||
PKCS8.PrivateKeyInfo p8 = new PKCS8.PrivateKeyInfo (End_Certificate_CP_01_02_crtx);
|
||||
Assert.AreEqual ("1.2.840.113549.1.1.1", p8.Algorithm, "Algorithm");
|
||||
Assert.AreEqual (0, p8.Attributes.Count, "Attributes");
|
||||
Assert.AreEqual ("30-82-02-5B-02-01-00-02-81-81-00-D6-39-9E-21-93-E2-BA-35-7F-E5-F8-E8-87-0B-8A-5F-28-25-85-B7-E5-CC-DA-7F-D3-C7-09-2A-63-E9-AD-8F-D0-A8-EF-BA-CF-3C-FB-55-03-B9-83-29-4E-0E-89-84-FB-E2-62-16-1F-9D-87-40-16-6B-F8-F4-66-38-58-74-67-D4-B5-A1-3A-4B-6F-13-4B-08-37-3A-3A-64-0A-06-8E-A2-7B-14-88-B7-F8-CE-6A-D1-45-9B-39-93-67-BF-0A-AB-DB-37-9D-FA-CE-54-0F-37-82-09-8F-0D-33-E4-B8-6E-46-C1-CC-4F-80-5A-B4-BD-19-80-27-40-84-49-02-03-01-00-01-02-81-80-14-95-5A-AD-4D-41-56-B4-F7-42-08-85-87-1C-43-C2-5A-E0-28-16-00-5D-8B-8D-06-B3-34-1D-3F-96-5F-57-D7-2B-B4-45-15-CE-7D-33-B0-F4-ED-36-55-CA-AD-C9-FA-4D-C9-30-E8-FE-C0-D5-16-92-6F-4C-44-5A-1B-9D-7E-AE-B8-01-6D-38-9D-DC-93-68-AB-93-D6-C0-8A-8A-63-B4-D6-DA-21-C1-A0-28-8C-24-C4-27-E1-4B-30-D2-2D-87-62-F9-17-75-21-5E-E1-3C-E2-2D-92-03-C6-A1-8D-1D-E9-67-F4-CE-FF-AC-52-86-D2-F5-0F-EB-03-01-02-41-00-ED-6A-AE-A7-33-B0-B8-86-36-91-BA-E7-D2-DD-15-3A-97-A2-66-31-98-24-A6-0D-E7-09-E3-BD-36-79-91-F2-5E-23-AA-21-C9-71-43-24-10-FA-F0-E6-FC-E4-C6-1F-08-45-E8-91-74-13-69-63-A5-40-8F-38-44-2B-54-69-02-41-00-E6-FE-39-8B-6F-DB-44-CA-E7-72-D3-CA-09-5B-3D-B1-53-85-29-36-FC-F1-B9-D8-1F-64-02-D4-F7-F5-71-E5-9F-17-D7-F3-9F-5A-3A-A6-A3-62-46-F6-93-3D-D3-CD-18-F2-12-BD-68-02-AA-91-55-DA-64-26-D7-16-34-E1-02-40-60-3F-F4-C8-72-4B-3D-B3-A3-A1-D6-FD-2E-DE-54-41-E9-C1-7B-DE-B5-48-7E-4D-7A-91-E6-D3-09-A7-A5-84-75-A7-CD-CC-5E-C7-5D-29-DC-FC-6E-F7-A6-24-F5-31-15-80-89-F5-95-F2-5C-B2-7A-07-3F-48-D7-52-1D-A9-02-40-40-1B-FC-C2-9B-57-E2-DE-E1-9F-B7-F2-11-E8-B5-D5-9A-55-91-DB-C6-16-1C-BB-43-F3-10-EA-24-AB-85-61-F2-66-BE-B3-C9-DD-53-FB-DD-CA-AF-E1-4D-7A-52-67-50-EE-16-8F-64-E7-A0-89-57-A7-96-36-45-69-CF-61-02-40-3D-9E-E3-29-D6-BD-59-FF-A5-C3-AC-57-CB-74-FE-B0-C3-67-34-A8-40-EB-04-88-C3-C2-74-4F-69-77-13-48-8A-97-3C-C2-4B-CD-E8-E0-97-98-A2-3F-B6-E2-71-D3-65-9F-5A-C6-C8-AE-FE-BA-B1-ED-DA-08-8A-5B-7B-12", BitConverter.ToString (p8.PrivateKey), "PrivateKey");
|
||||
Assert.AreEqual (0, p8.Version, "Version");
|
||||
AssertEquals ("Algorithm", "1.2.840.113549.1.1.1", p8.Algorithm);
|
||||
AssertEquals ("Attributes", 0, p8.Attributes.Count);
|
||||
AssertEquals ("PrivateKey", "30-82-02-5B-02-01-00-02-81-81-00-D6-39-9E-21-93-E2-BA-35-7F-E5-F8-E8-87-0B-8A-5F-28-25-85-B7-E5-CC-DA-7F-D3-C7-09-2A-63-E9-AD-8F-D0-A8-EF-BA-CF-3C-FB-55-03-B9-83-29-4E-0E-89-84-FB-E2-62-16-1F-9D-87-40-16-6B-F8-F4-66-38-58-74-67-D4-B5-A1-3A-4B-6F-13-4B-08-37-3A-3A-64-0A-06-8E-A2-7B-14-88-B7-F8-CE-6A-D1-45-9B-39-93-67-BF-0A-AB-DB-37-9D-FA-CE-54-0F-37-82-09-8F-0D-33-E4-B8-6E-46-C1-CC-4F-80-5A-B4-BD-19-80-27-40-84-49-02-03-01-00-01-02-81-80-14-95-5A-AD-4D-41-56-B4-F7-42-08-85-87-1C-43-C2-5A-E0-28-16-00-5D-8B-8D-06-B3-34-1D-3F-96-5F-57-D7-2B-B4-45-15-CE-7D-33-B0-F4-ED-36-55-CA-AD-C9-FA-4D-C9-30-E8-FE-C0-D5-16-92-6F-4C-44-5A-1B-9D-7E-AE-B8-01-6D-38-9D-DC-93-68-AB-93-D6-C0-8A-8A-63-B4-D6-DA-21-C1-A0-28-8C-24-C4-27-E1-4B-30-D2-2D-87-62-F9-17-75-21-5E-E1-3C-E2-2D-92-03-C6-A1-8D-1D-E9-67-F4-CE-FF-AC-52-86-D2-F5-0F-EB-03-01-02-41-00-ED-6A-AE-A7-33-B0-B8-86-36-91-BA-E7-D2-DD-15-3A-97-A2-66-31-98-24-A6-0D-E7-09-E3-BD-36-79-91-F2-5E-23-AA-21-C9-71-43-24-10-FA-F0-E6-FC-E4-C6-1F-08-45-E8-91-74-13-69-63-A5-40-8F-38-44-2B-54-69-02-41-00-E6-FE-39-8B-6F-DB-44-CA-E7-72-D3-CA-09-5B-3D-B1-53-85-29-36-FC-F1-B9-D8-1F-64-02-D4-F7-F5-71-E5-9F-17-D7-F3-9F-5A-3A-A6-A3-62-46-F6-93-3D-D3-CD-18-F2-12-BD-68-02-AA-91-55-DA-64-26-D7-16-34-E1-02-40-60-3F-F4-C8-72-4B-3D-B3-A3-A1-D6-FD-2E-DE-54-41-E9-C1-7B-DE-B5-48-7E-4D-7A-91-E6-D3-09-A7-A5-84-75-A7-CD-CC-5E-C7-5D-29-DC-FC-6E-F7-A6-24-F5-31-15-80-89-F5-95-F2-5C-B2-7A-07-3F-48-D7-52-1D-A9-02-40-40-1B-FC-C2-9B-57-E2-DE-E1-9F-B7-F2-11-E8-B5-D5-9A-55-91-DB-C6-16-1C-BB-43-F3-10-EA-24-AB-85-61-F2-66-BE-B3-C9-DD-53-FB-DD-CA-AF-E1-4D-7A-52-67-50-EE-16-8F-64-E7-A0-89-57-A7-96-36-45-69-CF-61-02-40-3D-9E-E3-29-D6-BD-59-FF-A5-C3-AC-57-CB-74-FE-B0-C3-67-34-A8-40-EB-04-88-C3-C2-74-4F-69-77-13-48-8A-97-3C-C2-4B-CD-E8-E0-97-98-A2-3F-B6-E2-71-D3-65-9F-5A-C6-C8-AE-FE-BA-B1-ED-DA-08-8A-5B-7B-12", BitConverter.ToString (p8.PrivateKey));
|
||||
AssertEquals ("Version", 0, p8.Version);
|
||||
// static
|
||||
RSA rsa = PKCS8.PrivateKeyInfo.DecodeRSA (p8.PrivateKey);
|
||||
Assert.AreEqual ("<RSAKeyValue><Modulus>1jmeIZPiujV/5fjohwuKXyglhbflzNp/08cJKmPprY/QqO+6zzz7VQO5gylODomE++JiFh+dh0AWa/j0ZjhYdGfUtaE6S28TSwg3OjpkCgaOonsUiLf4zmrRRZs5k2e/CqvbN536zlQPN4IJjw0z5LhuRsHMT4BatL0ZgCdAhEk=</Modulus><Exponent>AQAB</Exponent><P>7WqupzOwuIY2kbrn0t0VOpeiZjGYJKYN5wnjvTZ5kfJeI6ohyXFDJBD68Ob85MYfCEXokXQTaWOlQI84RCtUaQ==</P><Q>5v45i2/bRMrnctPKCVs9sVOFKTb88bnYH2QC1Pf1ceWfF9fzn1o6pqNiRvaTPdPNGPISvWgCqpFV2mQm1xY04Q==</Q><DP>YD/0yHJLPbOjodb9Lt5UQenBe961SH5NepHm0wmnpYR1p83MXsddKdz8bvemJPUxFYCJ9ZXyXLJ6Bz9I11IdqQ==</DP><DQ>QBv8wptX4t7hn7fyEei11ZpVkdvGFhy7Q/MQ6iSrhWHyZr6zyd1T+93Kr+FNelJnUO4Wj2TnoIlXp5Y2RWnPYQ==</DQ><InverseQ>PZ7jKda9Wf+lw6xXy3T+sMNnNKhA6wSIw8J0T2l3E0iKlzzCS83o4JeYoj+24nHTZZ9axsiu/rqx7doIilt7Eg==</InverseQ><D>FJVarU1BVrT3QgiFhxxDwlrgKBYAXYuNBrM0HT+WX1fXK7RFFc59M7D07TZVyq3J+k3JMOj+wNUWkm9MRFobnX6uuAFtOJ3ck2irk9bAiopjtNbaIcGgKIwkxCfhSzDSLYdi+Rd1IV7hPOItkgPGoY0d6Wf0zv+sUobS9Q/rAwE=</D></RSAKeyValue>", rsa.ToXmlString (true), "DecodeRSA");
|
||||
AssertEquals ("DecodeRSA", "<RSAKeyValue><Modulus>1jmeIZPiujV/5fjohwuKXyglhbflzNp/08cJKmPprY/QqO+6zzz7VQO5gylODomE++JiFh+dh0AWa/j0ZjhYdGfUtaE6S28TSwg3OjpkCgaOonsUiLf4zmrRRZs5k2e/CqvbN536zlQPN4IJjw0z5LhuRsHMT4BatL0ZgCdAhEk=</Modulus><Exponent>AQAB</Exponent><P>7WqupzOwuIY2kbrn0t0VOpeiZjGYJKYN5wnjvTZ5kfJeI6ohyXFDJBD68Ob85MYfCEXokXQTaWOlQI84RCtUaQ==</P><Q>5v45i2/bRMrnctPKCVs9sVOFKTb88bnYH2QC1Pf1ceWfF9fzn1o6pqNiRvaTPdPNGPISvWgCqpFV2mQm1xY04Q==</Q><DP>YD/0yHJLPbOjodb9Lt5UQenBe961SH5NepHm0wmnpYR1p83MXsddKdz8bvemJPUxFYCJ9ZXyXLJ6Bz9I11IdqQ==</DP><DQ>QBv8wptX4t7hn7fyEei11ZpVkdvGFhy7Q/MQ6iSrhWHyZr6zyd1T+93Kr+FNelJnUO4Wj2TnoIlXp5Y2RWnPYQ==</DQ><InverseQ>PZ7jKda9Wf+lw6xXy3T+sMNnNKhA6wSIw8J0T2l3E0iKlzzCS83o4JeYoj+24nHTZZ9axsiu/rqx7doIilt7Eg==</InverseQ><D>FJVarU1BVrT3QgiFhxxDwlrgKBYAXYuNBrM0HT+WX1fXK7RFFc59M7D07TZVyq3J+k3JMOj+wNUWkm9MRFobnX6uuAFtOJ3ck2irk9bAiopjtNbaIcGgKIwkxCfhSzDSLYdi+Rd1IV7hPOItkgPGoY0d6Wf0zv+sUobS9Q/rAwE=</D></RSAKeyValue>", rsa.ToXmlString (true));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -109,31 +109,31 @@ namespace MonoTests.Mono.Security.Cryptography {
|
||||
public void PrivateKeyInfo ()
|
||||
{
|
||||
PKCS8.PrivateKeyInfo p8 = new PKCS8.PrivateKeyInfo ();
|
||||
Assert.IsNull (p8.Algorithm, "Default-Algorithm");
|
||||
Assert.AreEqual (0, p8.Attributes.Count, "Default-Attributes");
|
||||
Assert.IsNull (p8.PrivateKey, "Default-PrivateKey");
|
||||
Assert.AreEqual (0, p8.Version, "Default-Version");
|
||||
AssertNull ("Default-Algorithm", p8.Algorithm);
|
||||
AssertEquals ("Default-Attributes", 0, p8.Attributes.Count);
|
||||
AssertNull ("Default-PrivateKey", p8.PrivateKey);
|
||||
AssertEquals ("Default-Version", 0, p8.Version);
|
||||
|
||||
byte[] key = new byte [8];
|
||||
p8.Algorithm = "1.2.3.4.5";
|
||||
p8.Attributes.Add (new ASN1 (0x05)); // NULL
|
||||
p8.PrivateKey = key;
|
||||
p8.Version = 1;
|
||||
Assert.AreEqual ("1.2.3.4.5", p8.Algorithm, "Algorithm");
|
||||
Assert.AreEqual (1, p8.Attributes.Count, "Attributes");
|
||||
Assert.AreEqual (8, p8.PrivateKey.Length, "PrivateKey");
|
||||
Assert.AreEqual (1, p8.Version, "Version");
|
||||
AssertEquals ("Algorithm", "1.2.3.4.5", p8.Algorithm);
|
||||
AssertEquals ("Attributes", 1, p8.Attributes.Count);
|
||||
AssertEquals ("PrivateKey", 8, p8.PrivateKey.Length);
|
||||
AssertEquals ("Version", 1, p8.Version);
|
||||
|
||||
key [0] = 1;
|
||||
Assert.AreEqual (0, p8.PrivateKey [0], "PrivateKey not directly accessible");
|
||||
AssertEquals ("PrivateKey not directly accessible", 0, p8.PrivateKey [0]);
|
||||
|
||||
byte[] p8pki = p8.GetBytes ();
|
||||
|
||||
PKCS8.PrivateKeyInfo decoded = new PKCS8.PrivateKeyInfo (p8pki);
|
||||
Assert.AreEqual ("1.2.3.4.5", decoded.Algorithm, "Decoded-Algorithm");
|
||||
Assert.AreEqual (1, decoded.Attributes.Count, "Decoded-Attributes");
|
||||
Assert.AreEqual (8, decoded.PrivateKey.Length, "Decoded-PrivateKey");
|
||||
Assert.AreEqual (1, decoded.Version, "Decoded-Version");
|
||||
AssertEquals ("Decoded-Algorithm", "1.2.3.4.5", decoded.Algorithm);
|
||||
AssertEquals ("Decoded-Attributes", 1, decoded.Attributes.Count);
|
||||
AssertEquals ("Decoded-PrivateKey", 8, decoded.PrivateKey.Length);
|
||||
AssertEquals ("Decoded-Version", 1, decoded.Version);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -17,7 +17,7 @@ using NUnit.Framework;
|
||||
namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
|
||||
[TestFixture]
|
||||
public class ChallengeResponseTest {
|
||||
public class ChallengeResponseTest : Assertion {
|
||||
|
||||
[Test]
|
||||
// Example from http://www.innovation.ch/java/ntlm.html
|
||||
@@ -25,8 +25,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
byte[] SrvNonce = Encoding.ASCII.GetBytes ("SrvNonce");
|
||||
using (ChallengeResponse ntlm = new ChallengeResponse ("Beeblebrox", SrvNonce)) {
|
||||
Assert.AreEqual ("E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (ntlm.NT), "NT");
|
||||
Assert.AreEqual ("AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97", BitConverter.ToString (ntlm.LM), "LM");
|
||||
AssertEquals ("NT", "E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (ntlm.NT));
|
||||
AssertEquals ("LM", "AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97", BitConverter.ToString (ntlm.LM));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
byte[] SrvNonce = new byte [8] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
|
||||
using (ChallengeResponse ntlm = new ChallengeResponse ("WELCOME", SrvNonce)) {
|
||||
Assert.AreEqual ("7A-CE-90-85-AB-CC-37-59-38-0B-1C-68-62-E3-98-C3-C0-EF-9C-FC-22-E8-A2-C2", BitConverter.ToString (ntlm.NT), "NT");
|
||||
Assert.AreEqual ("CA-12-00-72-3C-41-D5-77-AB-18-C7-64-C6-DE-F3-4F-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM), "LM");
|
||||
AssertEquals ("NT", "7A-CE-90-85-AB-CC-37-59-38-0B-1C-68-62-E3-98-C3-C0-EF-9C-FC-22-E8-A2-C2", BitConverter.ToString (ntlm.NT));
|
||||
AssertEquals ("LM", "CA-12-00-72-3C-41-D5-77-AB-18-C7-64-C6-DE-F3-4F-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
byte[] SrvNonce = new byte [8] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
|
||||
using (ChallengeResponse ntlm = new ChallengeResponse (null, SrvNonce)) {
|
||||
Assert.AreEqual ("4A-FD-81-EC-01-87-E8-8D-97-77-8D-F7-93-C6-DA-D4-F0-3A-36-63-66-9D-20-1C", BitConverter.ToString (ntlm.NT), "NT");
|
||||
AssertEquals ("NT", "4A-FD-81-EC-01-87-E8-8D-97-77-8D-F7-93-C6-DA-D4-F0-3A-36-63-66-9D-20-1C", BitConverter.ToString (ntlm.NT));
|
||||
// note the last 8 bytes... they are the same as the previous unit test ;-)
|
||||
Assert.AreEqual ("0A-39-2B-11-CF-05-2B-02-6D-65-CF-F5-68-BD-E4-15-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM), "LM");
|
||||
AssertEquals ("LM", "0A-39-2B-11-CF-05-2B-02-6D-65-CF-F5-68-BD-E4-15-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
byte[] SrvNonce = new byte [8] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
|
||||
using (ChallengeResponse ntlm = new ChallengeResponse (String.Empty, SrvNonce)) {
|
||||
// same as the previous one as this is the same (null/empty) password expressed diffently
|
||||
Assert.AreEqual ("4A-FD-81-EC-01-87-E8-8D-97-77-8D-F7-93-C6-DA-D4-F0-3A-36-63-66-9D-20-1C", BitConverter.ToString (ntlm.NT), "NT");
|
||||
Assert.AreEqual ("0A-39-2B-11-CF-05-2B-02-6D-65-CF-F5-68-BD-E4-15-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM), "LM");
|
||||
AssertEquals ("NT", "4A-FD-81-EC-01-87-E8-8D-97-77-8D-F7-93-C6-DA-D4-F0-3A-36-63-66-9D-20-1C", BitConverter.ToString (ntlm.NT));
|
||||
AssertEquals ("LM", "0A-39-2B-11-CF-05-2B-02-6D-65-CF-F5-68-BD-E4-15-A6-1B-FA-06-71-EA-5F-C8", BitConverter.ToString (ntlm.LM));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
ChallengeResponse ntlm = new ChallengeResponse ("Mono", new byte [8]);
|
||||
// no out!
|
||||
Assert.IsNull (ntlm.Password, "Password");
|
||||
Assert.IsNull (ntlm.Challenge, "Challenge");
|
||||
AssertNull ("Password", ntlm.Password);
|
||||
AssertNull ("Challenge", ntlm.Challenge);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -104,7 +104,7 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
ChallengeResponse ntlm = new ChallengeResponse ("Mono", new byte [8]);
|
||||
ntlm.Dispose ();
|
||||
Assert.IsNotNull (ntlm.NT, "NT");
|
||||
AssertNotNull ("NT", ntlm.NT);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -113,7 +113,7 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
ChallengeResponse ntlm = new ChallengeResponse ("Mono", new byte [8]);
|
||||
ntlm.Dispose ();
|
||||
Assert.IsNotNull (ntlm.LM, "LM");
|
||||
AssertNotNull ("LM", ntlm.LM);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ using NUnit.Framework;
|
||||
namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
|
||||
[TestFixture]
|
||||
public class MessageBaseTest {
|
||||
public class MessageBaseTest : Assertion {
|
||||
|
||||
//
|
||||
|
||||
@@ -42,4 +42,4 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,17 +16,17 @@ using NUnit.Framework;
|
||||
namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
|
||||
[TestFixture]
|
||||
public class Type1MessageTest {
|
||||
public class Type1MessageTest : Assertion {
|
||||
|
||||
[Test]
|
||||
// Example from http://www.innovation.ch/java/ntlm.html
|
||||
public void Encode1 ()
|
||||
{
|
||||
Type1Message msg = new Type1Message ();
|
||||
Assert.AreEqual (1, msg.Type, "Type");
|
||||
AssertEquals ("Type", 1, msg.Type);
|
||||
msg.Domain = "Ursa-Minor";
|
||||
msg.Host = "LightCity";
|
||||
Assert.AreEqual ("4E-54-4C-4D-53-53-50-00-01-00-00-00-07-B2-00-00-0A-00-0A-00-29-00-00-00-09-00-09-00-20-00-00-00-4C-49-47-48-54-43-49-54-59-55-52-53-41-2D-4D-49-4E-4F-52", BitConverter.ToString (msg.GetBytes ()), "GetBytes");
|
||||
AssertEquals ("GetBytes", "4E-54-4C-4D-53-53-50-00-01-00-00-00-07-B2-00-00-0A-00-0A-00-29-00-00-00-09-00-09-00-20-00-00-00-4C-49-47-48-54-43-49-54-59-55-52-53-41-2D-4D-49-4E-4F-52", BitConverter.ToString (msg.GetBytes ()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -35,10 +35,10 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
byte[] data = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0xb2, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x29, 0x00, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00, 0x20, 0x00, 0x00, 0x00, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x43, 0x49, 0x54, 0x59, 0x55, 0x52, 0x53, 0x41, 0x2d, 0x4d, 0x49, 0x4e, 0x4f, 0x52 };
|
||||
Type1Message msg = new Type1Message (data);
|
||||
Assert.AreEqual ("URSA-MINOR", msg.Domain, "Domain");
|
||||
Assert.AreEqual ((NtlmFlags)0xb203, msg.Flags, "Flags");
|
||||
Assert.AreEqual ("LIGHTCITY", msg.Host, "Host");
|
||||
Assert.AreEqual (1, msg.Type, "Type");
|
||||
AssertEquals ("Domain", "URSA-MINOR", msg.Domain);
|
||||
AssertEquals ("Flags", (NtlmFlags)0xb203, msg.Flags);
|
||||
AssertEquals ("Host", "LIGHTCITY", msg.Host);
|
||||
AssertEquals ("Type", 1, msg.Type);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -47,10 +47,10 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
byte[] data = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x32, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x0b, 0x00, 0x20, 0x00, 0x00, 0x00, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x44, 0x4f, 0x4d, 0x41, 0x49, 0x4e };
|
||||
Type1Message msg = new Type1Message (data);
|
||||
Assert.AreEqual ("DOMAIN", msg.Domain, "Domain");
|
||||
Assert.AreEqual ((NtlmFlags)0x3207, msg.Flags, "Flags");
|
||||
Assert.AreEqual ("WORKSTATION", msg.Host, "Host");
|
||||
Assert.AreEqual (1, msg.Type, "Type");
|
||||
AssertEquals ("Domain", "DOMAIN", msg.Domain);
|
||||
AssertEquals ("Flags", (NtlmFlags)0x3207, msg.Flags);
|
||||
AssertEquals ("Host", "WORKSTATION", msg.Host);
|
||||
AssertEquals ("Type", 1, msg.Type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ using NUnit.Framework;
|
||||
namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
|
||||
[TestFixture]
|
||||
public class Type2MessageTest {
|
||||
public class Type2MessageTest : Assertion {
|
||||
|
||||
static byte[] nonce = { 0x53, 0x72, 0x76, 0x4e, 0x6f, 0x6e, 0x63, 0x65 };
|
||||
|
||||
@@ -26,9 +26,9 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
public void Encode1 ()
|
||||
{
|
||||
Type2Message msg = new Type2Message ();
|
||||
Assert.AreEqual (2, msg.Type, "Type");
|
||||
AssertEquals ("Type", 2, msg.Type);
|
||||
msg.Nonce = nonce;
|
||||
Assert.AreEqual ("4E-54-4C-4D-53-53-50-00-02-00-00-00-00-00-00-00-28-00-00-00-01-82-00-00-53-72-76-4E-6F-6E-63-65-00-00-00-00-00-00-00-00", BitConverter.ToString (msg.GetBytes ()), "GetBytes");
|
||||
AssertEquals ("GetBytes", "4E-54-4C-4D-53-53-50-00-02-00-00-00-00-00-00-00-28-00-00-00-01-82-00-00-53-72-76-4E-6F-6E-63-65-00-00-00-00-00-00-00-00", BitConverter.ToString (msg.GetBytes ()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -37,9 +37,9 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
byte[] data = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x01, 0x82, 0x00, 0x00, 0x53, 0x72, 0x76, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
Type2Message msg = new Type2Message (data);
|
||||
Assert.AreEqual ((NtlmFlags)0x8201, msg.Flags, "Flags");
|
||||
Assert.AreEqual (BitConverter.ToString (nonce), BitConverter.ToString (msg.Nonce), "Nonce");
|
||||
Assert.AreEqual (2, msg.Type, "Type");
|
||||
AssertEquals ("Flags", (NtlmFlags)0x8201, msg.Flags);
|
||||
AssertEquals ("Nonce", BitConverter.ToString (nonce), BitConverter.ToString (msg.Nonce));
|
||||
AssertEquals ("Type", 2, msg.Type);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -48,9 +48,9 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
{
|
||||
byte[] data = { 0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x02, 0x81, 0x00, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x62, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x4f, 0x00, 0x4d, 0x00, 0x41, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x44, 0x00, 0x4f, 0x00, 0x4d, 0x00, 0x41, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x53, 0x00, 0x45, 0x00, 0x52, 0x00, 0x56, 0x00, 0x45, 0x00, 0x52, 0x00, 0x04, 0x00, 0x14, 0x00, 0x64, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x03, 0x00, 0x22, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x76, 0x00, 0x65, 0x00, 0x72, 0x00, 0x2e, 0x00, 0x64, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
Type2Message msg = new Type2Message (data);
|
||||
Assert.AreEqual ((NtlmFlags)0x00810201, msg.Flags, "Flags");
|
||||
Assert.AreEqual ("01-23-45-67-89-AB-CD-EF", BitConverter.ToString (msg.Nonce), "Nonce");
|
||||
Assert.AreEqual (2, msg.Type, "Type");
|
||||
AssertEquals ("Flags", (NtlmFlags)0x00810201, msg.Flags);
|
||||
AssertEquals ("Nonce", "01-23-45-67-89-AB-CD-EF", BitConverter.ToString (msg.Nonce));
|
||||
AssertEquals ("Type", 2, msg.Type);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -17,7 +17,7 @@ using NUnit.Framework;
|
||||
namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
|
||||
[TestFixture]
|
||||
public class Type3MessageTest {
|
||||
public class Type3MessageTest : Assertion {
|
||||
|
||||
static byte[] nonce = { 0x53, 0x72, 0x76, 0x4e, 0x6f, 0x6e, 0x63, 0x65 };
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
msg.Host = "HOST";
|
||||
msg.Password = "WELCOME";
|
||||
msg.Username = "username";
|
||||
Assert.AreEqual (3, msg.Type, "Type");
|
||||
Assert.AreEqual ("4E-54-4C-4D-53-53-50-00-03-00-00-00-18-00-18-00-64-00-00-00-18-00-18-00-7C-00-00-00-0C-00-0C-00-40-00-00-00-10-00-10-00-4C-00-00-00-08-00-08-00-5C-00-00-00-00-00-00-00-94-00-00-00-01-B2-00-00-44-00-4F-00-4D-00-41-00-49-00-4E-00-75-00-73-00-65-00-72-00-6E-00-61-00-6D-00-65-00-48-00-4F-00-53-00-54-00-CA-12-00-72-3C-41-D5-77-AB-18-C7-64-C6-DE-F3-4F-A6-1B-FA-06-71-EA-5F-C8-7A-CE-90-85-AB-CC-37-59-38-0B-1C-68-62-E3-98-C3-C0-EF-9C-FC-22-E8-A2-C2", BitConverter.ToString (msg.GetBytes ()), "GetBytes");
|
||||
AssertEquals ("Type", 3, msg.Type);
|
||||
AssertEquals ("GetBytes", "4E-54-4C-4D-53-53-50-00-03-00-00-00-18-00-18-00-64-00-00-00-18-00-18-00-7C-00-00-00-0C-00-0C-00-40-00-00-00-10-00-10-00-4C-00-00-00-08-00-08-00-5C-00-00-00-00-00-00-00-94-00-00-00-01-B2-00-00-44-00-4F-00-4D-00-41-00-49-00-4E-00-75-00-73-00-65-00-72-00-6E-00-61-00-6D-00-65-00-48-00-4F-00-53-00-54-00-CA-12-00-72-3C-41-D5-77-AB-18-C7-64-C6-DE-F3-4F-A6-1B-FA-06-71-EA-5F-C8-7A-CE-90-85-AB-CC-37-59-38-0B-1C-68-62-E3-98-C3-C0-EF-9C-FC-22-E8-A2-C2", BitConverter.ToString (msg.GetBytes ()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -55,8 +55,8 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
msg.Host = "LIGHTCITY";
|
||||
msg.Password = "Beeblebrox";
|
||||
msg.Username = "Zaphod";
|
||||
Assert.AreEqual (3, msg.Type, "Type");
|
||||
Assert.AreEqual ("4E-54-4C-4D-53-53-50-00-03-00-00-00-18-00-18-00-72-00-00-00-18-00-18-00-8A-00-00-00-14-00-14-00-40-00-00-00-0C-00-0C-00-54-00-00-00-12-00-12-00-60-00-00-00-00-00-00-00-A2-00-00-00-01-B2-00-00-55-00-52-00-53-00-41-00-2D-00-4D-00-49-00-4E-00-4F-00-52-00-5A-00-61-00-70-00-68-00-6F-00-64-00-4C-00-49-00-47-00-48-00-54-00-43-00-49-00-54-00-59-00-AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97-E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (msg.GetBytes ()), "GetBytes");
|
||||
AssertEquals ("Type", 3, msg.Type);
|
||||
AssertEquals ("GetBytes", "4E-54-4C-4D-53-53-50-00-03-00-00-00-18-00-18-00-72-00-00-00-18-00-18-00-8A-00-00-00-14-00-14-00-40-00-00-00-0C-00-0C-00-54-00-00-00-12-00-12-00-60-00-00-00-00-00-00-00-A2-00-00-00-01-B2-00-00-55-00-52-00-53-00-41-00-2D-00-4D-00-49-00-4E-00-4F-00-52-00-5A-00-61-00-70-00-68-00-6F-00-64-00-4C-00-49-00-47-00-48-00-54-00-43-00-49-00-54-00-59-00-AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97-E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (msg.GetBytes ()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -64,14 +64,14 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
public void Decode1 ()
|
||||
{
|
||||
Type3Message msg = new Type3Message (data1);
|
||||
Assert.AreEqual ("URSA-MINOR", msg.Domain, "Domain");
|
||||
Assert.AreEqual ("LIGHTCITY", msg.Host, "Host");
|
||||
Assert.AreEqual ("Zaphod", msg.Username, "Username");
|
||||
Assert.AreEqual ((NtlmFlags)0x8201, msg.Flags, "Flags");
|
||||
Assert.AreEqual (3, msg.Type, "Type");
|
||||
Assert.IsNull (msg.Password, "Password");
|
||||
Assert.AreEqual ("AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97", BitConverter.ToString (msg.LM), "LM");
|
||||
Assert.AreEqual ("E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (msg.NT), "NT");
|
||||
AssertEquals ("Domain", "URSA-MINOR", msg.Domain);
|
||||
AssertEquals ("Host", "LIGHTCITY", msg.Host);
|
||||
AssertEquals ("Username", "Zaphod", msg.Username);
|
||||
AssertEquals ("Flags", (NtlmFlags)0x8201, msg.Flags);
|
||||
AssertEquals ("Type", 3, msg.Type);
|
||||
AssertNull ("Password", msg.Password);
|
||||
AssertEquals ("LM", "AD-87-CA-6D-EF-E3-46-85-B9-C4-3C-47-7A-8C-42-D6-00-66-7D-68-92-E7-E8-97", BitConverter.ToString (msg.LM));
|
||||
AssertEquals ("NT", "E0-E0-0D-E3-10-4A-1B-F2-05-3F-07-C7-DD-A8-2D-3C-48-9A-E9-89-E1-B0-00-D3", BitConverter.ToString (msg.NT));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -79,28 +79,28 @@ namespace MonoTests.Mono.Security.Protocol.Ntlm {
|
||||
public void Decode2 ()
|
||||
{
|
||||
Type3Message msg = new Type3Message (data2);
|
||||
Assert.AreEqual ("DOMAIN", msg.Domain, "Domain");
|
||||
Assert.AreEqual ("WORKSTATION", msg.Host, "Host");
|
||||
Assert.AreEqual ("user", msg.Username, "Username");
|
||||
Assert.AreEqual ((NtlmFlags)0x201, msg.Flags, "Flags");
|
||||
Assert.AreEqual (3, msg.Type, "Type");
|
||||
Assert.IsNull (msg.Password, "Password");
|
||||
Assert.AreEqual ("C3-37-CD-5C-BD-44-FC-97-82-A6-67-AF-6D-42-7C-6D-E6-7C-20-C2-D3-E7-7C-56", BitConverter.ToString (msg.LM), "LM");
|
||||
Assert.AreEqual ("25-A9-8C-1C-31-E8-18-47-46-6B-29-B2-DF-46-80-F3-99-58-FB-8C-21-3A-9C-C6", BitConverter.ToString (msg.NT), "NT");
|
||||
AssertEquals ("Domain", "DOMAIN", msg.Domain);
|
||||
AssertEquals ("Host", "WORKSTATION", msg.Host);
|
||||
AssertEquals ("Username", "user", msg.Username);
|
||||
AssertEquals ("Flags", (NtlmFlags)0x201, msg.Flags);
|
||||
AssertEquals ("Type", 3, msg.Type);
|
||||
AssertNull ("Password", msg.Password);
|
||||
AssertEquals ("LM", "C3-37-CD-5C-BD-44-FC-97-82-A6-67-AF-6D-42-7C-6D-E6-7C-20-C2-D3-E7-7C-56", BitConverter.ToString (msg.LM));
|
||||
AssertEquals ("NT", "25-A9-8C-1C-31-E8-18-47-46-6B-29-B2-DF-46-80-F3-99-58-FB-8C-21-3A-9C-C6", BitConverter.ToString (msg.NT));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Challenge ()
|
||||
{
|
||||
Type3Message msg = new Type3Message ();
|
||||
Assert.IsNull (msg.Challenge, "Challenge");
|
||||
AssertNull ("Challenge", msg.Challenge);
|
||||
|
||||
byte[] c = new byte [8];
|
||||
msg.Challenge = c;
|
||||
Assert.AreEqual (8, msg.Challenge.Length, "Challenge.Length");
|
||||
AssertEquals ("Challenge.Length", 8, msg.Challenge.Length);
|
||||
|
||||
c [0] = 1;
|
||||
Assert.AreEqual (0, msg.Challenge [0], "Challenge not directly accessible");
|
||||
AssertEquals ("Challenge not directly accessible", 0, msg.Challenge [0]);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace MonoTests.Mono.Security {
|
||||
// sn -k test.snk
|
||||
|
||||
[TestFixture]
|
||||
public class StrongNameTest {
|
||||
public class StrongNameTest : Assertion {
|
||||
|
||||
// because most crypto stuff works with byte[] buffers
|
||||
static public void AssertEquals (string msg, byte[] array1, byte[] array2)
|
||||
@@ -30,9 +30,9 @@ namespace MonoTests.Mono.Security {
|
||||
if ((array1 == null) && (array2 == null))
|
||||
return;
|
||||
if (array1 == null)
|
||||
Assert.Fail (msg + " -> First array is NULL");
|
||||
Fail (msg + " -> First array is NULL");
|
||||
if (array2 == null)
|
||||
Assert.Fail (msg + " -> Second array is NULL");
|
||||
Fail (msg + " -> Second array is NULL");
|
||||
|
||||
bool a = (array1.Length == array2.Length);
|
||||
if (a) {
|
||||
@@ -47,7 +47,7 @@ namespace MonoTests.Mono.Security {
|
||||
msg += " -> Expected " + BitConverter.ToString (array1, 0);
|
||||
msg += " is different than " + BitConverter.ToString (array2, 0);
|
||||
}
|
||||
Assert.IsTrue (a, msg);
|
||||
Assert (msg, a);
|
||||
}
|
||||
|
||||
static byte[] test = {
|
||||
@@ -112,9 +112,9 @@ namespace MonoTests.Mono.Security {
|
||||
public void FromBuffer ()
|
||||
{
|
||||
StrongName sn = new StrongName (test);
|
||||
Assert.AreEqual ("<RSAKeyValue><Modulus>y6T/+EoARJMHW0ilpCdn+VbTffWxb1xu187/9Q+S2DwPyZ9LTNKrZgwaYmG4FPWEEH1HJxrxwh8AlD6oTz8CCcnPGKxKVFkubpIbEyvQCSTr22gUjVXXKHc2pfcCeOuNXS9kAOjv2tqpsiDbIsu9mnxfYysHWMDBqA4rxghyvT0=</Modulus><Exponent>AQAB</Exponent><P>6qYUEleRY+Wzyk7xN05UwWRna37U2aQnq2Y2VVyJeceDZPU1u1GYdQmFQw5XgvxKwWx9DAfNh1iSyLe0YmrAcw==</P><Q>3iy1IDIkPrRWBFrCAUhpUNn4/ICiVXTT7KjuEXkGr0+1Cx/V+o3eoVIo/9x2Q3IaxMbQDSa8hisIFunz/iuPjw==</Q><DP>2BouIBpfvzX8mBSOGNZePmG+0YRUeUCyfCs9XO5Fek9h1mfynVpvY1JqVbBuria2nl7Q53SEN+M+A/cT/RO9uw==</DP><DQ>pjma1ljNh2CTTrS8nAsaSJSc1gZD7l33RQRrAgWju7yN/qG2DbzhSZ9X7355uSKA5qK8/Gnz+QnvBn3JwGvE/w==</DQ><InverseQ>3U67bp3lPExfGoiTRvRyHhNtyJs6hAq/Uj7wSHKLHNoLG20kwZux8BwZKpPBBA0bQjkLUiRv9PYs18El/45/wA==</InverseQ><D>bPVOg5FMjWRBhmTbQ3ZWGkGLjRR9KEFDiTJXHs6DWjDgnZceWe9KB6KoJ0Vzkbs/Ovdcr56qBZxC2g6gTS5ALvogBYH2PrUftr4flh/z4qgOrAYCQkTecfHAGIGEldEeF1FItMbqmQa6WzVPVp4tn/+q3PAVmZqrs6/X9EARH10=</D></RSAKeyValue>", sn.RSA.ToXmlString (true), "buffer.RSA");
|
||||
Assert.AreEqual (testPublicKey, sn.PublicKey, "buffer.PublicKey");
|
||||
Assert.AreEqual (testPublicKeyToken, sn.PublicKeyToken, "buffer.PublicKeyToken");
|
||||
AssertEquals ("buffer.RSA", "<RSAKeyValue><Modulus>y6T/+EoARJMHW0ilpCdn+VbTffWxb1xu187/9Q+S2DwPyZ9LTNKrZgwaYmG4FPWEEH1HJxrxwh8AlD6oTz8CCcnPGKxKVFkubpIbEyvQCSTr22gUjVXXKHc2pfcCeOuNXS9kAOjv2tqpsiDbIsu9mnxfYysHWMDBqA4rxghyvT0=</Modulus><Exponent>AQAB</Exponent><P>6qYUEleRY+Wzyk7xN05UwWRna37U2aQnq2Y2VVyJeceDZPU1u1GYdQmFQw5XgvxKwWx9DAfNh1iSyLe0YmrAcw==</P><Q>3iy1IDIkPrRWBFrCAUhpUNn4/ICiVXTT7KjuEXkGr0+1Cx/V+o3eoVIo/9x2Q3IaxMbQDSa8hisIFunz/iuPjw==</Q><DP>2BouIBpfvzX8mBSOGNZePmG+0YRUeUCyfCs9XO5Fek9h1mfynVpvY1JqVbBuria2nl7Q53SEN+M+A/cT/RO9uw==</DP><DQ>pjma1ljNh2CTTrS8nAsaSJSc1gZD7l33RQRrAgWju7yN/qG2DbzhSZ9X7355uSKA5qK8/Gnz+QnvBn3JwGvE/w==</DQ><InverseQ>3U67bp3lPExfGoiTRvRyHhNtyJs6hAq/Uj7wSHKLHNoLG20kwZux8BwZKpPBBA0bQjkLUiRv9PYs18El/45/wA==</InverseQ><D>bPVOg5FMjWRBhmTbQ3ZWGkGLjRR9KEFDiTJXHs6DWjDgnZceWe9KB6KoJ0Vzkbs/Ovdcr56qBZxC2g6gTS5ALvogBYH2PrUftr4flh/z4qgOrAYCQkTecfHAGIGEldEeF1FItMbqmQa6WzVPVp4tn/+q3PAVmZqrs6/X9EARH10=</D></RSAKeyValue>", sn.RSA.ToXmlString (true));
|
||||
AssertEquals ("buffer.PublicKey", testPublicKey, sn.PublicKey);
|
||||
AssertEquals ("buffer.PublicKeyToken", testPublicKeyToken, sn.PublicKeyToken);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -122,9 +122,9 @@ namespace MonoTests.Mono.Security {
|
||||
{
|
||||
StrongName sn1 = new StrongName (test);
|
||||
StrongName sn2 = new StrongName (sn1.RSA);
|
||||
Assert.AreEqual (sn1.RSA.ToXmlString (true), sn2.RSA.ToXmlString (true), "key.RSA");
|
||||
Assert.AreEqual (sn1.PublicKey, sn2.PublicKey, "key.PublicKey");
|
||||
Assert.AreEqual (sn1.PublicKeyToken, sn2.PublicKeyToken, "key.PublicKeyToken");
|
||||
AssertEquals ("key.RSA", sn1.RSA.ToXmlString (true), sn2.RSA.ToXmlString (true));
|
||||
AssertEquals ("key.PublicKey", sn1.PublicKey, sn2.PublicKey);
|
||||
AssertEquals ("key.PublicKeyToken", sn1.PublicKeyToken, sn2.PublicKeyToken);
|
||||
}
|
||||
|
||||
string Signed;
|
||||
@@ -820,28 +820,28 @@ namespace MonoTests.Mono.Security {
|
||||
{
|
||||
// compare that both hellosigned and hellodelay are the same file expect for signature
|
||||
byte[] s = sn.Hash (Signed);
|
||||
Assert.IsNotNull (s, "Hash/Signed");
|
||||
AssertNotNull ("Hash/Signed", s);
|
||||
byte[] d = sn.Hash (Delay);
|
||||
Assert.IsNotNull (d, "Hash/Delay");
|
||||
AssertNotNull ("Hash/Delay", d);
|
||||
// are they the same
|
||||
Assert.AreEqual (s, d, "Hash/Compare");
|
||||
AssertEquals ("Hash/Compare", s, d);
|
||||
// are they the same as GetHashFromAssemblyFile
|
||||
byte[] knownHash = { 0x7D, 0xF7, 0x1D, 0xD4, 0x24, 0x22, 0xEA, 0xAB, 0xD2, 0x91, 0xCD, 0xAB, 0x1A, 0x55, 0x6A, 0x42, 0x05, 0xBA, 0x6E, 0x7B };
|
||||
Assert.AreEqual (knownHash, s, "Hash/GetHashFromAssemblyFile");
|
||||
AssertEquals ("Hash/GetHashFromAssemblyFile", knownHash, s);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void VerifyValid ()
|
||||
{
|
||||
// verify that hellosigned.exe is valid
|
||||
Assert.IsTrue (sn.Verify (Signed), "Verify/Valid");
|
||||
Assert ("Verify/Valid", sn.Verify (Signed));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void VerifyInvalid ()
|
||||
{
|
||||
// verify that hellodelay.exe isn't valid
|
||||
Assert.IsTrue (!sn.Verify (Delay), "Verify/Invalid");
|
||||
Assert ("Verify/Invalid", !sn.Verify (Delay));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -849,7 +849,7 @@ namespace MonoTests.Mono.Security {
|
||||
{
|
||||
Stream signed = new MemoryStream (signedData);
|
||||
// verify that hellosigned.exe is valid
|
||||
Assert.IsTrue (sn.Verify (signed), "Verify/Valid");
|
||||
Assert ("Verify/Valid", sn.Verify (signed));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -857,25 +857,25 @@ namespace MonoTests.Mono.Security {
|
||||
{
|
||||
Stream delay = new MemoryStream (delayData);
|
||||
// verify that hellodelay.exe isn't valid
|
||||
Assert.IsTrue (!sn.Verify (delay), "Verify/Invalid");
|
||||
Assert ("Verify/Invalid", !sn.Verify (delay));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Sign ()
|
||||
{
|
||||
// sign the (invalid) hellodelay.exe
|
||||
Assert.IsTrue (sn.Sign (Delay), "Sign");
|
||||
Assert ("Sign", sn.Sign (Delay));
|
||||
// and verify it's now valid
|
||||
Assert.IsTrue (sn.Verify (Delay), "Sign/Verify");
|
||||
Assert ("Sign/Verify", sn.Verify (Delay));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ReSign ()
|
||||
{
|
||||
// resign the (already valid) hellosigned.exe
|
||||
Assert.IsTrue (sn.Sign (Signed), "ReSign");
|
||||
Assert ("ReSign", sn.Sign (Signed));
|
||||
// and verify it's still valid
|
||||
Assert.IsTrue (sn.Verify (Signed), "ReSign/Verify");
|
||||
Assert ("ReSign/Verify", sn.Verify (Signed));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -907,7 +907,7 @@ namespace MonoTests.Mono.Security {
|
||||
{
|
||||
byte[] ecma = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
sn = new StrongName (ecma);
|
||||
Assert.IsTrue (!sn.CanSign, "CanSign");
|
||||
Assert ("CanSign", !sn.CanSign);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
#include monodroid_Mono.Security_test.dll.build-failure-exclude.sources
|
||||
#include monodroid_Mono.Security_test.dll.new-exclude.sources
|
||||
|
||||
#include monodroid_Mono.Data.Sqlite_test.dll.new-exclude.sources
|
||||
@@ -3,9 +3,7 @@ SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Mono.Tasklets.dll
|
||||
|
||||
LIB_MCS_FLAGS =
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
|
||||
NO_TEST = yes
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Mono.Tasklets/ContinuationsTest.cs
|
||||
@@ -1,189 +0,0 @@
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using Mono.Tasklets;
|
||||
|
||||
namespace MonoTests.System
|
||||
{
|
||||
[TestFixture]
|
||||
public class ContinuationsTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
public void FixtureSetUp ()
|
||||
{
|
||||
try {
|
||||
var temp = new Continuation ();
|
||||
} catch (NotImplementedException) {
|
||||
Assert.Ignore ("This platform doesn't support Tasklets.");
|
||||
}
|
||||
}
|
||||
|
||||
int total = 0;
|
||||
|
||||
[Test]
|
||||
public void TestContinuationsLoop()
|
||||
{
|
||||
Continuation _contA = new Continuation();
|
||||
|
||||
_contA.Mark();
|
||||
int value = 0;
|
||||
int ret = _contA.Store(0);
|
||||
for (int i = ret; i < 10; i++) {
|
||||
value += i;
|
||||
}
|
||||
|
||||
if (value > 0) {
|
||||
total += value;
|
||||
_contA.Restore(ret + 1);
|
||||
}
|
||||
|
||||
Assert.AreEqual(total, 330);
|
||||
}
|
||||
|
||||
private int yields = 0;
|
||||
|
||||
[Test]
|
||||
public void Yielding()
|
||||
{
|
||||
Continuation baseCont = new Continuation();
|
||||
Continuation taskCont = new Continuation();
|
||||
|
||||
baseCont.Mark();
|
||||
taskCont.Mark();
|
||||
|
||||
// Store the base continuation to start the task
|
||||
if (baseCont.Store(0) == 0) {
|
||||
bool done = false;
|
||||
int count = 0;
|
||||
|
||||
while (!done) {
|
||||
// Do stuff for the task.
|
||||
++count;
|
||||
|
||||
// This task is counting to 100.
|
||||
if (count == 100) {
|
||||
done = true;
|
||||
}
|
||||
|
||||
// Yield every 10 loops
|
||||
else if (count % 10 == 0) {
|
||||
|
||||
// To yield, store the task continuation then restore
|
||||
// the base continuation.
|
||||
if (taskCont.Store(0) == 0) {
|
||||
baseCont.Restore(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// When restored, 'Store' will return what was passed to Restore, in this case 1 so fall here.
|
||||
else {
|
||||
// Count the yields, then go back to the task.
|
||||
++yields;
|
||||
taskCont.Restore(1);
|
||||
}
|
||||
|
||||
Assert.AreEqual(9, yields);
|
||||
}
|
||||
|
||||
|
||||
public class MicroThread
|
||||
{
|
||||
|
||||
public void Yield()
|
||||
{
|
||||
if (MyThread.Store(0) == 0) {
|
||||
MainThread.Restore(1);
|
||||
}
|
||||
}
|
||||
|
||||
public void Resume()
|
||||
{
|
||||
if (MainThread.Store(0) == 0) {
|
||||
MyThread.Restore(1);
|
||||
}
|
||||
}
|
||||
|
||||
public void DoWork(Action action)
|
||||
{
|
||||
if (MainThread.Store(0) == 0) {
|
||||
action();
|
||||
Done = true;
|
||||
MainThread.Restore(1);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Done = false;
|
||||
public Continuation MainThread = new Continuation();
|
||||
public Continuation MyThread = new Continuation();
|
||||
}
|
||||
|
||||
public class MicroBJob
|
||||
{
|
||||
private int _Count = 0;
|
||||
public int Count
|
||||
{
|
||||
get { return _Count; }
|
||||
set { _Count = value; }
|
||||
}
|
||||
|
||||
public MicroThread MicroThread;
|
||||
public void Work()
|
||||
{
|
||||
while (Count < 100) {
|
||||
++Count;
|
||||
if (Count % 10 == 0) {
|
||||
MicroThread.Yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MicroThreadTest()
|
||||
{
|
||||
MicroThread microA = new MicroThread();
|
||||
MicroThread microB = new MicroThread();
|
||||
|
||||
microA.MainThread.Mark();
|
||||
microA.MyThread.Mark();
|
||||
microB.MainThread.Mark();
|
||||
microB.MyThread.Mark();
|
||||
|
||||
Assert.AreEqual(false, microA.Done);
|
||||
Assert.AreEqual(false, microB.Done);
|
||||
|
||||
microA.DoWork(() =>
|
||||
{
|
||||
int count = 0;
|
||||
while (count < 100) {
|
||||
++count;
|
||||
if (count % 10 == 0) {
|
||||
microA.Yield();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
MicroBJob jobB = new MicroBJob();
|
||||
jobB.MicroThread = microB;
|
||||
|
||||
microB.DoWork(jobB.Work);
|
||||
|
||||
Assert.AreEqual(false, microA.Done);
|
||||
Assert.AreEqual(false, microB.Done);
|
||||
|
||||
int yields = 0;
|
||||
while (yields < 20) {
|
||||
if (!microA.Done) microA.Resume();
|
||||
if (!microB.Done) microB.Resume();
|
||||
if (microA.Done && microB.Done) break;
|
||||
++yields;
|
||||
}
|
||||
|
||||
Assert.AreEqual(true, microA.Done);
|
||||
Assert.AreEqual(true, microB.Done);
|
||||
Assert.AreEqual(100, jobB.Count);
|
||||
Assert.AreEqual(9, yields);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,14 +5,25 @@ include ../../build/rules.make
|
||||
LIBRARY = Novell.Directory.Ldap.dll
|
||||
|
||||
LIB_REFS = System Mono.Security
|
||||
LIB_MCS_FLAGS = -warn:1 -nowarn:612
|
||||
LIB_MCS_FLAGS = \
|
||||
-warn:1 -nowarn:612 \
|
||||
$(RESX_RES:%=/res:%)
|
||||
|
||||
RESOURCE_DEFS = ResultCodeMessages,Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt
|
||||
include ../../build/library.make
|
||||
|
||||
RESULTCODE_MESSAGES = Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resources
|
||||
|
||||
RESX_RES = $(RESULTCODE_MESSAGES)
|
||||
|
||||
$(the_lib): $(RESULTCODE_MESSAGES)
|
||||
|
||||
$(RESULTCODE_MESSAGES): Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt
|
||||
$(RESGEN) $< $@
|
||||
|
||||
EXTRA_DISTFILES = \
|
||||
Novell.Directory.Ldap.Rfc2251/RfcLdapURL.cs \
|
||||
Novell.Directory.Ldap.Utilclass/ExceptionMessages.resx \
|
||||
Novell.Directory.Ldap.Utilclass/ExceptionMessages.txt \
|
||||
Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx
|
||||
Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx \
|
||||
Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt">
|
||||
<EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx">
|
||||
<LogicalName>ResultCodeMessages.resources</LogicalName>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -92,9 +92,9 @@ mono RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDi
|
||||
|
||||
</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
|
||||
mono RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $(ProjectDir)..\..\docs\specs\amqp0-9.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-9.cs
|
||||
mono RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $(ProjectDir)..\..\docs\specs\amqp0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-8.cs
|
||||
mono RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDir)..\..\docs\specs\qpid-amqp.0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-qpid-0-8.cs
|
||||
RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $(ProjectDir)..\..\docs\specs\amqp0-9.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-9.cs
|
||||
RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $(ProjectDir)..\..\docs\specs\amqp0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-8.cs
|
||||
RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDir)..\..\docs\specs\qpid-amqp.0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-qpid-0-8.cs
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,16 +4,18 @@ include ../../build/rules.make
|
||||
|
||||
LIBRARY = System.ComponentModel.Composition.dll
|
||||
LIB_REFS = System System.Core
|
||||
LIB_MCS_FLAGS = -d:CLR40 -resource:$(STRING_MESSAGES) -d:USE_ECMA_KEY,FEATURE_REFLECTIONCONTEXT,FEATURE_REFLECTIONFILEIO,FEATURE_SERIALIZATION,FEATURE_SLIMLOCK -nowarn:219,414
|
||||
|
||||
RESOURCE_DEFS = Microsoft.Internal.Strings,src/ComponentModel/Strings.resx
|
||||
LIB_MCS_FLAGS = -d:CLR40 -d:USE_ECMA_KEY,FEATURE_REFLECTIONCONTEXT,FEATURE_REFLECTIONFILEIO,FEATURE_SERIALIZATION,FEATURE_SLIMLOCK -nowarn:219,414
|
||||
|
||||
STRING_MESSAGES = Microsoft.Internal.Strings.resources
|
||||
|
||||
CLEAN_FILES += $(STRING_MESSAGES)
|
||||
|
||||
EXTRA_DISTFILES = \
|
||||
src/ComponentModel/Strings.resx
|
||||
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
$(the_lib): $(STRING_MESSAGES)
|
||||
|
||||
$(STRING_MESSAGES): src/ComponentModel/Strings.resx
|
||||
$(RESGEN) $< $@
|
||||
+1
-1
@@ -262,7 +262,7 @@
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="src/ComponentModel/Strings.resx">
|
||||
<EmbeddedResource Include="Microsoft.Internal.Strings.resx">
|
||||
<LogicalName>Microsoft.Internal.Strings.resources</LogicalName>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -4,11 +4,13 @@ include ../../build/rules.make
|
||||
|
||||
LIBRARY = System.Data.Services.Client.dll
|
||||
|
||||
RESOURCE_DEFS = System.Data.Services.Client,Client/System.Data.Services.Client.txt
|
||||
Client/System.Data.Services.Client.resources: Client/System.Data.Services.Client.txt
|
||||
$(RESGEN) "$<" "$@"
|
||||
|
||||
LIB_REFS = System System.Core System.Xml.Linq System.Data System.Xml
|
||||
LIB_MCS_FLAGS = \
|
||||
-d:NET_3_5 \
|
||||
-resource:Client/System.Data.Services.Client.resources \
|
||||
-warn:2
|
||||
|
||||
ifndef NO_WINDOWS_BASE
|
||||
@@ -19,5 +21,7 @@ endif
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
EXTRA_DISTFILES = Client/System.Data.Services.Client.txt
|
||||
$(the_lib): Client/System.Data.Services.Client.resources
|
||||
|
||||
EXTRA_DISTFILES = Client/System.Data.Services.Client.txt
|
||||
CLEAN_FILES += Client/System.Data.Services.Client.resources
|
||||
@@ -219,7 +219,7 @@
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Client/System.Data.Services.Client.txt">
|
||||
<EmbeddedResource Include="Client/System.Data.Services.Client.resx">
|
||||
<LogicalName>System.Data.Services.Client.resources</LogicalName>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
Loaded 100 of 593 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user