Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@@ -14,7 +14,9 @@ using System.IO;
using System.Reflection;
using System.Collections;
using System.Security.Cryptography;
#if HAS_MONO_SECURITY
using Mono.Security;
#endif
namespace Mono.ILASM {
@@ -52,7 +54,9 @@ namespace Mono.ILASM {
private CodeGen codegen;
private bool keycontainer = false;
private string keyname;
#if HAS_MONO_SECURITY
private StrongName sn;
#endif
bool noautoinherit;
public DriverMain (string[] args)
@@ -84,9 +88,13 @@ namespace Mono.ILASM {
// if we have a key and aren't assembling a netmodule
if ((keyname != null) && !codegen.IsThisAssembly (null)) {
#if HAS_MONO_SECURITY
LoadKey ();
// this overrides any attribute or .publickey directive in the source
codegen.ThisAssembly.SetPublicKey (sn.PublicKey);
#else
throw new NotSupportedException ();
#endif
}
try {
@@ -103,6 +111,7 @@ namespace Mono.ILASM {
return false;
}
#if HAS_MONO_SECURITY
try {
if (sn != null) {
Report.Message ("Signing assembly with the specified strongname keypair");
@@ -111,6 +120,7 @@ namespace Mono.ILASM {
} catch {
return false;
}
#endif
return true;
}
@@ -121,6 +131,7 @@ namespace Mono.ILASM {
Console.WriteLine ("***** FAILURE *****\n");
}
#if HAS_MONO_SECURITY
private void LoadKey ()
{
if (keycontainer) {
@@ -146,6 +157,7 @@ namespace Mono.ILASM {
// exists
return sn.Sign (filename);
}
#endif
private void ProcessFile (string file_path)
{

View File

@@ -4,7 +4,17 @@ include ../build/rules.make
PROGRAM = ilasm.exe
BUILT_SOURCES = ILParser.cs
LIB_REFS = PEAPI Mono.CompilerServices.SymbolWriter Mono.Security
LIB_REFS = PEAPI System
API_BUILD := $(filter build, $(PROFILE))
ifdef API_BUILD
TARGET_NET_REFERENCE = $(BOOTSTRAP_BIN_PROFILE)
PROGRAM_USE_INTERMEDIATE_FILE = 1
else
LIB_REFS += Mono.Security
LOCAL_MCS_FLAGS += -d:HAS_MONO_SECURITY
endif
CLEAN_FILES = parser/y.output

View File

@@ -84,3 +84,9 @@ scanner/NumberHelper.cs
scanner/StringHelperBase.cs
scanner/StringHelper.cs
../build/common/Consts.cs
../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
../class/Mono.CompilerServices.SymbolWriter/SourceMethodBuilder.cs
../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
../class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs
../class/Mono.CompilerServices.SymbolWriter/MonoSymbolWriter.cs