- 09 11月, 2019 7 次提交
-
-
Commit migrated from https://github.com/dotnet/corefx/commit/edcbf94941121022162b2e3085cada121861d54e
-
由 Tomas Weinfurt 提交于
Commit migrated from https://github.com/dotnet/corefx/commit/dfb3c9efb7773376e022e4cc35e64a5628a60137
-
Commit migrated from https://github.com/dotnet/corefx/commit/ab01852685e659a685af2ace33af5b3cefdf8430
-
由 Marie Píchová 提交于
* Removed native curl usage and CurlHandler. * More CURL removal in test code. * More test fixing. * Addressing PR comments * Comments and typos. * Removed constant bool fields with all occurences. Commit migrated from https://github.com/dotnet/corefx/commit/8888c74e34f9a7df060258664dffe7ac29916443
-
由 Jeremy Barton 提交于
This change moves PFX import and export primarily into managed code to work around inconsistencies across the operating systems. Current issues: * Linux * Reading * PKCS12_parse doesn't support multiple cert-with-keys. * PKCS12_parse doesn't support reading a PFX with no MAC. * OpenSSL 1.0 had a weird bug where an ECDSA cert inexplicably didn't match to its key. * Writing * PKCS12_create doesn't support multiple cert-with-keys. * PKCS12_create doesn't support writing empty collections. * macOS * Reading * Either SecItemImport does not understand the NULL (vs Empty) password, or we called it wrong... it/we cannot load a PFX which is MACd with the NULL password. * SecItemImport can only support "normalized" PFXes, where "normalized" means "how Windows XP would have written it": * PFX * SafeContents0 (no encryption) (won't load keys from an encrypted SafeContents, IIRC) * ShroudedKey0 (won't load keys from KeyBag (unencrypted), only ShroudedKeyBag (encrypted)) * ... * ShroudedKeyN * SafeContents1 (encrypted) (won't load certs from an unencrypted SafeContents, IIRC) * Cert0 * ... * CertM * MAC * AlgId: HMAC-SHA-1 (IIRC this was a requirement, but it's also the only allowed algorithm on Win7 or Win8.1...) * Writing * SecItemExport fails to create a PFX with only public keys (or, at least, with non-keychain-based certificates). * SecItemExport fails to create a PFX where some elements are in different keychains than others (including "some elements are not in a keychain"). This change moves the necessary ASN types from the Pkcs12 library into Common so they're shared between Pkcs12Info/Pkcs12Builder and X509Certificates, then uses a managed loader and managed writer. Quirks: * SecItemImport(PKCS8) doesn't support marking keys as non-exportable, so non-exportable keyloads on macOS read a PFX, write a normalized PFX in memory, then call SecItemImport(PKCS12). * Because one of the failure modes of SecItemImport(PKCS12) is that it returns certs without private keys associated, it's not possible to call SecItemImport first and fall back to the managed loader. * Windows and Linux both will happily return the wrong private key with a cert if the PFX says to do so, but on macOS the SecIdentityRef creation fails and the cert comes back with no private key. * This isn't a very realistic situation outside of our tests, so it's not something worth doing heroics for right now. The easiest answer is to make HasPrivateKey be true but the GetPrivateKey methods throw... but that's still different than the other platforms, and would be very weird with SslStream. Commit migrated from https://github.com/dotnet/corefx/commit/1338e4e8a542c3b3e20d99e544e09860f23e99ea
-
由 Hugh Bellamy 提交于
* Add CodeGenerator tests and fix NREs/bugs * Reverting empty collection checks * Small typo * Skipping tests on full framework * Some more need to be skipped on framework * Fix test failure * Adding format for ToString Commit migrated from https://github.com/dotnet/corefx/commit/7c867c2fa7887327521f57e3a64b34754d68e390
-
由 Geoff Kizer 提交于
Commit migrated from https://github.com/dotnet/corefx/commit/1ab8b616f0b622265c0911484e9794858047a748
-
- 08 11月, 2019 5 次提交
-
-
由 Yuki Wong 提交于
Commit migrated from https://github.com/dotnet/corefx/commit/790785ac053e01f47ac42fa86378f1e8710ac4d6
-
由 Alexander Nikolaev 提交于
HttpResponseMessage.TrailingHeaders property is set to a new special instance of HttpResponseHeaders configured to validate trailing headers based on their names instead of types. When a header is being added via an explicit Add call, it checks the header type for the NonTrailing flag indicating a prohibited trailing header and throws an exception if it is found. In contrast, when a header arrives on the wire and is being added with TryAddWithoutValidation call, no extra check is performed because HttpConnection validates trailing headers in this scenario. Fixes dotnet/corefx#41262 Commit migrated from https://github.com/dotnet/corefx/commit/805d06affd41715db4fb6102e05345d6323fcdf1
-
由 Carlos Sanchez Lopez 提交于
* Add EventWaitHandle creation extension method that takes an ACL * Call OpenExisting, add basic unit tests, move MAX_PATH in csproj for all Windows platforms, ensure same exceptions are thrown in both netcore and netfx. * Address suggestions: using for the created handle, simplify try finally, merge methods, remove an unnecessary Debug.Assert * simplify using, reorganize PInvokes a bit, let VS format resx as it expects it, remove BOM from csproj * Add more unit tests * Save basic access rights in a constant, generate name randomly * Use FullControl (EVENT_ALL_ACCESS); update unit tests to use EventWaitHandleRights * Apply suggestion of creating an EWH, then replacing its SWH. * Remove using causing chaos, add more unit tests, remove null string unit test. * spacing * Address comments * Remove unnecessary checks/exceptions, update unit tests * Fix netfx x86 ut failure - different exception for mode validation. * Small documentation fix * Remove documentation for exception thrown with null security * more documentation fixes * New file for unit tests * Dispose and remove windows only attributes in tests * suggestion to not use var * Remove duplicate resx after merge * Readd cs files lost during merge * Remove resx modification since it was untouched for this PR * Address test comments Commit migrated from https://github.com/dotnet/corefx/commit/14b0893b7aa8099711cceb908b42f6d5cbb9cd5c
-
由 Carlos Sanchez Lopez 提交于
Approved API Proposal: dotnet/corefx#41662 Description We don't currently have a way to create a Semaphore with a given ACL in .NET Core. We can modify the ACL, but it would be more secure to have the proper ACL on the object from the start. Customer impact Before this change, customers had to create a Semaphore, then set its ACLs. This presents a few problems: - Potential security hole as semaphores can be accessed between creation and modification. - Porting difficulties as there isn't a 1-1 API replacement This change addresses those problems by adding a new extension method that allows creating a Semaphore and ensuring the provided ACLs are set during creation. Commit migrated from https://github.com/dotnet/corefx/commit/3a9a6dbca3a04190fcf8bb8fd6dee960e79679c5
-
由 Marco Rossignoli 提交于
* implement trypeek offset * updates * address PR feedback * amend comments Commit migrated from https://github.com/dotnet/corefx/commit/43d30a1184fda891d53062b42f7b4fd8f5303e06
-
- 07 11月, 2019 14 次提交
-
-
由 Paul Westcott 提交于
* Special case strings in OrderBy * Style change to be more inline with code base, as per review * Added OrderBy Culture test * Added different culture OrderBy.ElementAt * Make the tests Windows specific due to potential unicode ordering differences * Made sorted result set dynamic due to different culturing sorting of different OSes * Removed conditional * Use of ThreadCultureChange, fixed Assert argument ordering * Delousing... Commit migrated from https://github.com/dotnet/corefx/commit/749fcdea9873d88c182ad94aef83290e96f95ff1
-
由 Viktor Hofer 提交于
* Manual darc update from build '20191106.10' * Remove root cross folder in favor of common/cross Commit migrated from https://github.com/dotnet/corefx/commit/f9eb7fdbdfbde3bfc525c3be3a67713b3f5a75a1
-
Commit migrated from https://github.com/dotnet/corefx/commit/94a60d5238f654ab22f162ad3d6dac01adcdaeb8
-
由 Ganbarukamo41 提交于
* Speed up BitArray 1. Use AVX2, if available, for And/Or/Xor 2. Vectorize Not 3. Use Span<T>.Fill() for SetAll() 4. Add more test sizes to account for And/Or/Xor/Not loop unrolling cases * Vectorise BitArray(bool[]) * Vectorise BitArray further * Vectorise CopyTo(Array, int) when copying to a bool[] * Use Vector128/256.Create and store it in static readonly field instead of loading from PE header * Add some random test data for BitArray Commit migrated from https://github.com/dotnet/corefx/commit/a4f04476ea74c61a52168cf0b31c0281822ecad3
-
由 Hugh Bellamy 提交于
Fix CompilerResults.CompiledAssembly in .NET Core Commit migrated from https://github.com/dotnet/corefx/commit/8ebc9bb07f72a3d7807a8b1fc4876cb851ef927f
-
由 Tomas Weinfurt 提交于
* close _eventStream when stopping watcher * feedback from review * pull in ResourceLimits * add test for leaking handle * fix typo * force run for finalizers Commit migrated from https://github.com/dotnet/corefx/commit/dd4fa0d723ed6c9f08ed32540c688640b34c6e8a
-
由 Carlos Sanchez Lopez 提交于
Approved API Proposal: dotnet/corefx#41662 Description We don't currently have a way to create a Mutex with a given ACL in .NET Core. We can modify the ACL, but it would be more secure to have the proper ACL on the object from the start. Customer impact Before this change, customers had to create a Mutex, then set its ACLs. This presents a few problems: Potential security hole as mutexes can be accessed between creation and modification. Porting difficulties as there isn't a 1-1 API replacement This change addresses those problems by adding a new extension method that allows creating a Mutex and ensuring the provided ACLs are set during creation. Commit migrated from https://github.com/dotnet/corefx/commit/46edc58620f29557e23fea29ed8392a0f2c9e31c
-
由 Viktor Hofer 提交于
Commit migrated from https://github.com/dotnet/corefx/commit/475778fa982064e26a8b3a5d7545112f6586ac61
-
由 Jacob Lalonde 提交于
* Fix to support case-insensitive directory moving/renaming * More tests for other directories * Include throwing win32 exp upon directory already existing * Added ) that I dropped in previous rebase * Directory get with pattern to check for case sensitivity * Error message fix * Rework to support multiple edge cases * Rework to only support moving to the same directory case insentivity * Handle situations for case-sensitive file systems * Test changes * Stopped modifying environment's current directory * Cleanup, and tests for drive differences * Only set route to lower, but only only compare roots ordinally * Add additional if to check if any directory with that name exists * Edit to what path to use * Use destination path. * Rework file directory scan * Make utility function due to Any() with empty returning true * Get the full path before getting the filename * Check if the directory name is null or empty * Removed extra line * Now Defering to the OS for if the directory already exists * Remove extra semi-colon * Test Edit * Comment edit * Actually test the functionality the test is built for * Remove platform specific tests and make them platform agnostic * Target only OSX * Target all platforms other than linux itself * Changed how we detect case variants * Remove unix specific test * Convert OSX test into no-op test * Code review feedback and additional tests * Case-Sensitive file systems specific tests * Fix to not include osx with other unixes * Removed a , Commit migrated from https://github.com/dotnet/corefx/commit/e9ce2f734698ab5bf13f947c281fa4bec67b0216
-
由 Eirik Tsarpalis 提交于
* centralize fix for nullability in netstandard2.0 * remove project property from conditional * Revert "remove project property from conditional" This reverts commit dotnet/corefx@ffc54a15a4589381b3bd78aa5b3ef020c8a1c75e. * move to Directory.Build.targets * Add netcoreapp2.x check * update logic for projects that use nullable annotations without it being enabled * add nullable property to System.Data.SqlClient * address newly added annotated project * add nullable annotations to System.Security.Cryptography.Pkcs Commit migrated from https://github.com/dotnet/corefx/commit/e52be6965496af9de49de585e6c62bdb0915c775
-
由 Viktor Hofer 提交于
* Move tryrun out of cross to Unix Native build * Add full path and delete android tryruns Commit migrated from https://github.com/dotnet/corefx/commit/3c4cad0c2908ecbb63f390036b235cb0584ad5c8
-
由 Alexander Köplinger 提交于
As noticed in https://github.com/dotnet/corefx/pull/42408 we don't pass any minimum OSX target version to CMake. This means it falls back to the host version, e.g. if you build on Mojave it would pass `-mmacosx-version-min=10.14` to the compiler. .NET Core's minimum supported OSX version is 10.13 so pass that to CMake. Commit migrated from https://github.com/dotnet/corefx/commit/e9a2f96d5ce2d7f79d183aa07078983d95590390
-
由 Mitch Valenta 提交于
* Add parsing support for PhysicalAddresses with colon delimiter and lowercasing * Address PR feedback Commit migrated from https://github.com/dotnet/corefx/commit/0d2969f69c36e8d131f4620cc172b6a7c3840fc8
-
由 Eric StJohn 提交于
* Replace IntrinsicTypeConverters with attributes We're seeing various places where folks took dependencies on attributes being present rather than calling GetConverter (WPF and Winforms design time components). Now we can add TypeConverter attribute in more places as we pushed the type down. Do this rather than relying on the intrinsic converter table. * Add Tests that cover TypeConverter mapping Commit migrated from https://github.com/dotnet/corefx/commit/466fcb0dbb05d4d6fc4639719e0a993a9f74f76b
-
- 06 11月, 2019 12 次提交
-
-
由 Alexander Köplinger 提交于
Apple platforms like macOS/iOS allow targeting older operating system versions with a single SDK, the mere presence of a symbol in the SDK doesn't tell us whether the deployment target really supports it. The compiler raises a warning when using an unsupported API, turn that into an error so `check_symbol_exists()` can correctly identify whether the API is supported on the target. This fixes compile errors after https://github.com/dotnet/corefx/pull/37583 was merged since `clonefile()` is iOS10+. Replace usages of `check_function_exists()` since it only tests for existence of functions and the CMake docs recommend using `check_symbol_exists()`: https://cmake.org/cmake/help/v3.15/module/CheckFunctionExists.html Commit migrated from https://github.com/dotnet/corefx/commit/879127eb87346200b4ddf40a7fce96e79ec211fe
-
由 Jan Kotas 提交于
Commit migrated from https://github.com/dotnet/corefx/commit/ba6da4698caeda5e56d4b09b84f3be872eed470d
-
由 Eirik Tsarpalis 提交于
Commit migrated from https://github.com/dotnet/corefx/commit/8d5c5f548deafb7cd5e6428f12152c339c672228
-
Commit migrated from https://github.com/dotnet/corefx/commit/87cf12d7aa74843b7d0a7e710c5dc4845517b758
-
由 Dan Moseley 提交于
* Tests for absolute path in exceptions * Update src/System.Reflection/tests/AssemblyTests.cs Co-Authored-By: NStephen Toub <stoub@microsoft.com> * Update src/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs Co-Authored-By: NStephen Toub <stoub@microsoft.com> * Update src/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs Co-Authored-By: NStephen Toub <stoub@microsoft.com> * Update src/System.Runtime.Loader/tests/AssemblyLoadContextTest.cs Co-Authored-By: NStephen Toub <stoub@microsoft.com> * CR * fix tests * Update AssemblyTests.cs * Update AssemblyLoadContextTest.cs * Update AssemblyTests.cs * Update AssemblyLoadContextTest.cs Commit migrated from https://github.com/dotnet/corefx/commit/f3d8bfa584ed9a128dce869b1e66f3fc2fad0041
-
由 Jan Kotas 提交于
Contributes to dotnet/corefx#42378 Commit migrated from https://github.com/dotnet/corefx/commit/fd3aaa4986e9964b1feb627aeb986364102aa3be
-
由 Jeffrey Zhao 提交于
* Improve get/set performance in HashSet<T> Similar optimization in Dictionary<,> has been ported to HashSet<>. `_comparer` has been made nullable, and default by `null`. This makes us possible to check if it's null for faster branches, instead of comparing it to `EqualityComparer<T>.Default`. Since `_comparer` is `null` by default, the constructors and the `OnDeserialization` method have been modified accordingly to save `null` instead of the `EqualityComparer<T>.Default` if it's been passed/saved. Also, the places that use `_comparer` directly much do a null check and switch to `EqualityComparer<T>.Default` instead. The major optimization is under `Contains` and `AddIfNotPresent` methods. Basically the code was: `` // Code uses _comparer `` Now it becomes: ``` var comparer = _comparer; if (comparer == null) { if (default(T) != null) { // Code uses EqualityComparer<T>.Default for de-virtualizing. } else { var defaultComparer = EqualityComparer<T>.Default; // Code uses cached defaultComparer } } else { // Code uses comparer } ``` I've intentionally kept the origin implementation and comments as much as possible, and the optimized code is not exactly the same as in `Dictionary<T>`. Further micro-optimizations might be possible but I think it's cleaner to keep it that way in the first step. The `Remove` method hasn't been optimized since it's complicated, and not been done in `Dictionary` either. Some other methods like `AddOrGetLocation` or `InternalIndexOf` are not optimized since they're only used in less-common scenarios, and not in the scope of the current issue. The benchmark shows there're obvious improvements in get and set operations for all cases, especialy if the item is a value type. I was actually expecting to see some pull back for "slower" case, like if we use a custom comparer, but it turns out it's getting faster too, since we have cached the comparer instead of using `_comparer` directly in the loop. The benchmark also shows the optimized `HashSet` has close or better performance comparing to `Dictionary` in almost all cases, except for `HashSet<string>` with default comparer. The default comparer in `Dictionary<string>` is a "non-random" implementation that performs better. Unfortunately the comparer is internal to the CoreLib. The optimized `HashSet<string>` is still faster since it's using cached comparer of type `EqualityComparer<string>`, which uses virtual method dispatching instead of interface dispatching. It's just not as faster as `Dictionary<string, T>` yet. Fix dotnet/corefx#36448 * Use Equals() to check _comparer in deserialization After deserialization the `_comparer` will be set to a different instance of default comparer, so we need to use `Equals` to compare `_comparer` with `EqualityComparer<T>.Default` instead of reference comparison by `==`. * Remove unnecessary "default!" found in code review * Ignore resetting "_comparer" in OnDeserialization Previously we tried to reset `_comparer` in `OnDeserialization` if it's `EqualityComparer<T>.Default`. But after discussion in dotnet/corefx#40150 we decide to follow the same approach as in `Dictionary<,>` to make it simple. * Remove extra line according to code review. * Use _comparer?.GetHashCode(key) ?? key.GetHashCode() to leverage intrinsic. Same to the Equals calls. * Add "AggressiveInlining" to InternalGetHashCode/Equals methods Make methods like "Remove" faster. * Apply similar optimization to Remove and TryGetValue operations. * Remove trailing whitespaces. * Remove trailing whitespaces. * Manually inline InternalEquals() method Commit migrated from https://github.com/dotnet/corefx/commit/f9564cdbfa6590aa14b1be5fe1f6b20f51e94fcc
-
由 Roman Marusyk 提交于
Consolidate .netcoreapp.cs files because System.Security.Cryptography.* projects is no longer cross-compiled (dotnet/corefx#42394) Commit migrated from https://github.com/dotnet/corefx/commit/db4a737c66991a4d17f711b875616afd5cab4b5e
-
由 buyaa-n 提交于
* Annotate System.Runtime.Serialization.Formatters for nullable * Some update * Some more update * Applying feedback * Reverting back some changes * Little typo Commit migrated from https://github.com/dotnet/corefx/commit/14424c1980f1ed7d8b5c56010675c8de7dbd7450
-
由 Dan Moseley 提交于
* Fix some terms/typos * a/an * of Commit migrated from https://github.com/dotnet/corefx/commit/4043dc1f855e2d5314620cd69b9dafa19cfee884
-
由 buyaa-n 提交于
* Annotate System.Security.Cryptography.Primitives for nullable Commit migrated from https://github.com/dotnet/corefx/commit/7a517eef6b50bff71ae69d0882ee69cad90f6d1f
-
由 Eirik Tsarpalis 提交于
Commit migrated from https://github.com/dotnet/corefx/commit/45e82c542ede629ba770cfec767456863b03c406
-
- 05 11月, 2019 2 次提交
-
-
由 Eirik Tsarpalis 提交于
Commit migrated from https://github.com/dotnet/corefx/commit/0cd8e74d310fb62a861ba1bda19e5d8ba3b42e0d
-
* Update linux containers to match coreclr's and use latest toolchain * Use clang9 on alpine and update docs Commit migrated from https://github.com/dotnet/corefx/commit/ee038925bde85c1c45c52f235ab09ea03b9c126c
-