diff options
author | Jan Kotas <jkotas@microsoft.com> | 2018-12-03 16:11:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 16:11:29 -0800 |
commit | 3b47496ef2656333684526cf71478253a207c1a5 (patch) | |
tree | 72bc3933479a1e6d45b62a87ff4a200663a878fe /src/vm/assembly.cpp | |
parent | 248449d08f5436fbeb140a6011e412f2fea4621f (diff) | |
download | coreclr-3b47496ef2656333684526cf71478253a207c1a5.tar.gz coreclr-3b47496ef2656333684526cf71478253a207c1a5.tar.bz2 coreclr-3b47496ef2656333684526cf71478253a207c1a5.zip |
Refactor all FCalls out of AppDomain.cs (#21337)
This saves the unmanaged->managed->unmanaged trip to initialize the assembly binder.
Includes small bits of unrelated cleanup.
Diffstat (limited to 'src/vm/assembly.cpp')
-rw-r--r-- | src/vm/assembly.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/vm/assembly.cpp b/src/vm/assembly.cpp index ecba83456d..2f82a97c2e 100644 --- a/src/vm/assembly.cpp +++ b/src/vm/assembly.cpp @@ -665,24 +665,6 @@ Assembly *Assembly::CreateDynamic(AppDomain *pDomain, CreateDynamicAssemblyArgs pAssem->m_isDynamic = true; - if (publicKey.GetSize() > 0) - { - // Since we have no way to validate the public key of a dynamic assembly we don't allow - // partial trust code to emit a dynamic assembly with an arbitrary public key. - // Ideally we shouldn't allow anyone to emit a dynamic assembly with only a public key, - // but we allow a couple of exceptions to reduce the compat risk: full trust, caller's own key. - // As usual we treat anonymously hosted dynamic methods as partial trust code. - DomainAssembly* pCallerDomainAssembly = pCallerAssembly->GetDomainAssembly(pCallersDomain); - if (pCallerDomainAssembly == pCallersDomain->GetAnonymouslyHostedDynamicMethodsAssembly()) - { - DWORD cbKey = 0; - const void* pKey = pCallerAssembly->GetPublicKey(&cbKey); - - if (!publicKey.Equals((const BYTE *)pKey, cbKey)) - COMPlusThrow(kInvalidOperationException, W("InvalidOperation_StrongNameKeyPairRequired")); - } - } - //we need to suppress release for pAssem to avoid double release pAssem.SuppressRelease (); |