Commit Graph
151 Commits
Author SHA1 Message Date
stephentoub b349e58bc4 Add Debug.Fail calls at GlobalLog.Assert* call sites
Commit migrated from https://github.com/dotnet/corefx/commit/da4bf9a9a55b093614f645b2cd429146644f4d3c
2016-01-14 16:20:01 -05:00
stephentoub 2b6159d669 Replace globalLogEnabled caching with GlobalLog.IsEnabled
Per previous feedback.


Commit migrated from https://github.com/dotnet/corefx/commit/a2b956429fb10b771b2c9d5778b478d7e4b54904
2016-01-14 16:19:55 -05:00
Ian Hays e3311742d9 Bump ExpectedPrerelease version to latest (rc2-23712)
Commit migrated from https://github.com/dotnet/corefx/commit/01c61f62988e8abf39aecc64b0a97ea4e384de3f
2016-01-14 10:36:27 -08:00
Stephen Toub 2f43a6cb34 Merge pull request dotnet/corefx#5285 from stephentoub/more_net_logging
Mop up more System.Net logging guards

Commit migrated from https://github.com/dotnet/corefx/commit/4fc64ecb9046d15db4579a309bcef937f9ba889e
2016-01-13 21:08:15 -05:00
Stephen Toub ada5517874 Merge pull request dotnet/corefx#5388 from stephentoub/disable_net_test
Disable two more NegotiateStream tests

Commit migrated from https://github.com/dotnet/corefx/commit/700229d41764faa853679ef658636e01b59345e7
2016-01-13 18:38:29 -05:00
Stephen Toub 7e7598c93f Merge pull request dotnet/corefx#5350 from dagood/fix-project-dependencies-nugetexe
Fix project.json dependencies: xunit DNXCore incompatibility + invalid package dependencies

Commit migrated from https://github.com/dotnet/corefx/commit/d591a687578f01ead8421ee4898b7bf42e7d95d6
2016-01-13 16:06:59 -05:00
stephentoub eecb1c4983 Mop up more System.Net logging guards
Some more GlobalLog.IsEnabled guards. I noticed a few while doing some other profiling, and so did another set of searches across the whole codebase. Many of these came from the System.Net.Security PRs that were in-progress at the same time I was doing the previous logging changes.


Commit migrated from https://github.com/dotnet/corefx/commit/a04c9898b9bc6d06cd42e1dfd93a63633da4dd30
2016-01-13 16:01:18 -05:00
stephentoub 630172d362 Disable two more NegotiateStream tests
These have also been taking out multiple builds.


Commit migrated from https://github.com/dotnet/corefx/commit/0261628c6da0b09944e00b9ae82a064157188605
2016-01-13 15:34:05 -05:00
stephentoub 57fb36329d Disable failing NegotiateStream test
Commit migrated from https://github.com/dotnet/corefx/commit/6800636d5ff50601bc8fd84bab5c7fcc1d0ca379
2016-01-13 10:40:56 -05:00
dagood df455922aa Fix references to nonexistent packages by replacing with stable version where possible, otherwise the upgraded prerelease.
Commit migrated from https://github.com/dotnet/corefx/commit/063c9926f8b27cc987668deb4d75f18295506f17
2016-01-12 15:14:27 -06:00
dagood e401efd6af Add portable-net45+win8 import to tests.
Specifically, add the import to dnxcore50 frameworks entries where "xunit" is mentioned in the project.json.
This fixes `xunit.abstractions 2.0.0 is not compatible with DNXCore,Version=v5.0.`


Commit migrated from https://github.com/dotnet/corefx/commit/da2e8eb34efcaf70069223bc431d80909a2fc91d
2016-01-12 14:04:32 -06:00
Guillermo Rangel 54f514187f Deleting Logging.cs file
Substituting Logging calls to EventSource calls, or calls to
LoggingHash.

Formatting Changes

Fixing Aligment, and casing.

Changing Dump methods log the hash of the object calling it instead of the method

After some discussion, it was decided that it is more useful to log the
object where the dump happens, than the method. Doing the necessary
changes for it.

Changing usage of "this" to [CallerMemberName]

Instead of using this to know who called the logging method, using
[CallerMemberName] as an attribute to the parameter to fill that
information.

Adding a TODO item.

Making a note to not change NetEventSource or it can break.

Missing Underscore

Adding missing underscore in _wsaBuffer


Commit migrated from https://github.com/dotnet/corefx/commit/f39502ef910c90ba1e67d787df98b627d39ba6cc
2016-01-12 10:27:16 -08:00
Stephen Toub 1d5abed128 Merge pull request dotnet/corefx#5304 from stephentoub/switch_test_servers
Switch System.Net.Security test to use shared HttpTestServers

Commit migrated from https://github.com/dotnet/corefx/commit/4cdd4d9ab943546777dc67a0f30ed13d2eaa44bc
2016-01-11 13:50:28 -05:00
Stephen Toub b65f87769b Merge pull request dotnet/corefx#5301 from stephentoub/sockets_tests
Disable several System.Net tests that have been failing

Commit migrated from https://github.com/dotnet/corefx/commit/ac5dcc3ad4ebd93371ad82178cdccb55cc5eedff
2016-01-11 12:24:20 -05:00
stephentoub d66ba56618 Switch System.Net.Security test to use shared HttpTestServers
Commit migrated from https://github.com/dotnet/corefx/commit/d03c243c3676fc322f567e242ec47ee63ce096f6
2016-01-11 11:19:30 -05:00
stephentoub 6318ec9d57 Disable several System.Net tests that have been failing
Commit migrated from https://github.com/dotnet/corefx/commit/3456760d2e9fd755b4433b5516e656ce99607657
2016-01-11 09:08:31 -05:00
stephentoub 00e5ac2839 Fix URL used in System.Net.Security tests
An incorrect URL was causing the CertificateValidationRemoteServer_EndToEnd_Ok test to fail.


Commit migrated from https://github.com/dotnet/corefx/commit/3802cd82257433a3208f0ed20874e867af97a283
2016-01-11 09:07:04 -05:00
Cristian Pop 170be2da87 Merge pull request dotnet/corefx#5257 from stephentoub/socket_alloc
Remove ExecutionContext-related allocations from System.Net.Sockets

Commit migrated from https://github.com/dotnet/corefx/commit/17ddda61de3066c46107564435930a86daffcd61
2016-01-08 19:22:53 -08:00
dotnet-bot 8f7e954343 Porting NegotiateStream.
Commit migrated from https://github.com/dotnet/corefx/commit/9a414b0af4230b59a06dd9e255a36400582f482e
2016-01-08 16:51:31 -08:00
stephentoub 9a70801670 Remove ExecutionContext shim from System.Net
In profiling a client/server scenario where the client launches a bunch of async operations against the server, close to 15% of all allocated instances on the client are for System.Threading.ExecutionContext (~9% of the allocated space).  This didn't make sense, because on CoreCLR ExecutionContext is immutable and neither ExecutionContext.Capture() nor ExecutionContext.CreateCopy() should be allocating.

It turns out that some of the System.Net libraries had a custom System.Threading.ExecutionContext shim object with a comment in the file "Important: This is temporary code". Ugh.

I've removed it.  No more ExecutionContext allocations. And using the right ExecutionContext object from CoreCLR.

This also shrinks the size of SocketAsyncEventArgs by another field, as a separate ExecutionContext copy no longer need be maintained, due to ExecutionContext immutability on platforms other than the full framework.


Commit migrated from https://github.com/dotnet/corefx/commit/241eb27504a4e7bc774e202acc5447b09bb4a2d6
2016-01-08 15:39:37 -05:00
stephentoub 37bbb6330d Additional cleanup
- Remove dead Assert overloads that include a Boolean conditional
- Fix up several missed call sites.  Missed primarily due to code being conditionally included based on different build flavors (e.g. Windows vs Unix)
- Fix up GlobalLog fakes to include IsEnabled


Commit migrated from https://github.com/dotnet/corefx/commit/cc8a5d162d36efc8bd56ba406efea71ee3a8af6f
2016-01-08 12:26:18 -05:00
stephentoub 6683df773f Improve performance around logging code in System.Net.Security
Same treatment as in https://github.com/dotnet/corefx/pull/5238, but for System.Net.Security.  The call sites to GlobalLog methods often do a lot of allocation and other work, even in release builds and even when logging is disabled; this commit guards those call sites behind checks for whether logging is enabled.


Commit migrated from https://github.com/dotnet/corefx/commit/ba002b1f94c43e8616b457536c29244eabc79093
2016-01-08 11:13:02 -05:00
Wes Haggard a3e67fdf73 Update .builds files to include OSGroups
This these .builds files were updated and generated from a script
based on the configurations defined in the matching csproj files.

This updates the builds files to specify OSGroup and TargetGroup
as metadata instead of using AdditionalProperties and also sorts them by
TargetGroup followed by OSGroup.


Commit migrated from https://github.com/dotnet/corefx/commit/95efe37475916016a5fc6ee6f0ba584d990c4196
2016-01-02 23:50:23 -08:00
Wes Haggard f27c7dc024 Update project files adding default configurations
This add a default configuration before the Import of dirs.props
for any projects that don't have Debug as the default configuration.

Removed Configuration and Platform properties set after dirs.props
as they would have no affect and just cause confusion.

Removed OutputType=Library property as it isn't necessary.


Commit migrated from https://github.com/dotnet/corefx/commit/9e1da13cf6d5ff4b37b1867beb3411a2fe61da6a
2016-01-02 23:50:21 -08:00
Jeremy Barton 2c01aeaa10 Merge pull request dotnet/corefx#5139 from bartonjs/sslstream_use_x509certificate2
Make SslStream::RemoteCertificate return an X509Certificate2 object.

Commit migrated from https://github.com/dotnet/corefx/commit/cd5b2b79e62a66bc961d45cc589b4ee9801f2c3d
2015-12-29 14:22:55 -08:00
Guillermo Rangel 1a62aca39f System.Net EventSource Logging
Adding EventSources to substitute the previous logging model using
TraceSources.

In this PR 4 event sources are added:

-NetEventSource
-SocketsEventSource
-HttpEventSource
-SecurityEventSource

Event methods for NetEventSource, SocketsEventSource and HttpEventSource
are
fully added. SecurityEventSource has only a few of
the new event methods implemented.
Changes in production code are done to match this new implementation.
(Only changes for
events in Sockets and Http are done in this iteration).

Adding missing reference to LoggingHash

Missing Reference in Security csproj

Missing reference in NetworkInformation

Adding a reference and adding a missing new line.

Adding references and readonly modifier.

Adding another missing reference.
Adding some missing blank lines and making readonly the s_log in the
EventSources.

Completing SecurityEventSource

Adding missing all the security events that will substitute PrintInfo
calls.

Doing changes in code to reflect this.

Transforming SecurityEventSource into a Partial class

Some of the events were Windows specific, because of the enums they were
using. Those events are now in a partial class that is included when
those enums are defined.

Moving events to partial SecurityEventSource class

Some more events using Interop.SecurityStatus are moved into the partial
windows specific class.

Also, a missed non event header is added for Associate method in
HttpEventSource.

Deleting Logging reference to instead use LoggingHash

Addressing some of the PR feedback

Adding the Issue number to TODO for localization, and using BlockCopy
instead of a Loop to copy array. Also, correctly passing partialBuffer
instead of Buffer to the DumpArrayAsync method.


Commit migrated from https://github.com/dotnet/corefx/commit/1cd8bf635d4b9a6d8a7d1e25cd320814c993f38b
2015-12-29 12:14:39 -08:00
bartonjs 666e473744 Make SslStream::RemoteCertificate return an X509Certificate2 object.
This is the only place in all of corefx (outside of the X509Certificates tests) that instantiates an X509Certificate object (instead of an X509Certificate2).

Since the property still return an X509Certificate(1), the callers would have to cast it to use the X509Certificate2-only properties, but now an `as` will suffice, whereas before it required an up-converting operation.


Commit migrated from https://github.com/dotnet/corefx/commit/4db0e714272a195fc29d6f904ad6bb3422e94e43
2015-12-29 11:34:08 -08:00
Pallavi Taneja 95a3b67166 Expose Assembly.GetEntryAssembly and TypeInfo.IsEquivalentTo()
Expose Assembly.GetEntryAssembly and TypeInfo.IsEquivalentTo() in System.Reflection.
Fixes issues dotnet/corefx#4146 , dotnet/corefx#2101


Commit migrated from https://github.com/dotnet/corefx/commit/e28fdbd9dd98810a81207c665fdc4e6b40b24e64
2015-12-21 14:56:26 -08:00
Pallavi Taneja 90c2d27bf1 Update Corefx Repo to depend on newer package versions
Disable failing tests with the tracking active issue


Commit migrated from https://github.com/dotnet/corefx/commit/98fdc29624cd791bba42ec1e0cd5c256f331adfe
2015-12-21 11:48:15 -08:00
Shruti Garg 3ef249a8fa Fixing System.Net.Security.Unit.Tests failure
Commit migrated from https://github.com/dotnet/corefx/commit/584399101e2248b5197b9ba389c7e4fc6c953333
2015-12-18 18:40:37 +05:30
Cristian Pop 635b48f8a9 Disabling tests failing on *NIX. Fix dotnet/corefx#5037
Commit migrated from https://github.com/dotnet/corefx/commit/93395f04a1db3040a4b40e85df7d166b23076e92
2015-12-17 13:10:58 -08:00
Joel Hendrix 42d8d1a581 Use build tools task CopySupplementalTest data for copying test data.
The task for copying test data has been consolidated into build tools (see
build tools PRdotnet/corefx#363) and first appeared in build tools build 133. Update
projects that copy test data to use the new task.


Commit migrated from https://github.com/dotnet/corefx/commit/f1a4b51ffee958304d44b56296ec7f7e73e55549
2015-12-11 13:16:09 -08:00
stephentoub 77c4183d17 Update package validation to rc2-23610
Commit migrated from https://github.com/dotnet/corefx/commit/6f6303f0356be4d2dd4ac117373f1e37f8752248
2015-12-11 10:53:47 -05:00
Eric Mellino b8670dea2f Add facade projects for all supported platforms
These facade project files were generated using a porting tool I wrote,
which examined some information from our internal build and created
appropriate project files. I have also re-generated all of the .builds
files so that they import the facade projects in the correct manner.


Commit migrated from https://github.com/dotnet/corefx/commit/58e2f6e862060039e1ebad727d75c87703fdb2f2
2015-12-10 10:29:09 -08:00
dagood fbfb82cc8c Change all project.json files to validate. Remove lockfiles from source control and add to gitignore.
A few new references to pick up changes that happened over time.


Commit migrated from https://github.com/dotnet/corefx/commit/0d881222d8c3269157639e2e67056e5a83aad834
2015-12-09 16:25:26 -06:00
David Shulman 0f4cf1f242 Remove sync APIs from SslStream and NegotiateStream
As per the System.Net.* API review dotnet/apireviewsdotnet/corefx#21 removing
the sync versions of the AuthenticateAsClient, AuthenticateAsServer
methods from the SslStream and NegotiateStream classes.

Part of dotnet/corefx#4732


Commit migrated from https://github.com/dotnet/corefx/commit/36270c6ea4741054b48b33be06dafee3438f07b3
2015-12-07 13:13:06 -08:00
Cristian Pop cd257fee43 Disabling intermittently failing tests (timeout) from System.Net.Security.
Commit migrated from https://github.com/dotnet/corefx/commit/9ed672456b9ce6a47727f6d8d9c3e3fd16a10bbb
2015-12-03 23:17:19 -08:00
Deepak Shankargouda f5284f6fcc Created initial set of .builds files
Commit migrated from https://github.com/dotnet/corefx/commit/a20fd22b1e44d13e437c235a957a47a2af52838d
2015-12-02 14:38:03 -08:00
Cristian Pop 086583dcad Updating and locking project.lock.json for Security UnitTests.
Commit migrated from https://github.com/dotnet/corefx/commit/570536ed5ae5c6b136b9a100ba6983eceaf17320
2015-12-01 11:54:28 -08:00
Hemanth Kapila 56a3abf10b Use libcurl+openssl to support TLS client certs
Make curlHandler support Client Certificates when the linked libcurl's
ssl backend is compatible with openssl. CurlHandler is also updated to
support ChannelBindingToken


Commit migrated from https://github.com/dotnet/corefx/commit/d3be6bbe9aee8f748f2688fb7bb00c577ac4b11e
2015-11-19 22:31:20 +05:30
Stephen Toub c90af416d3 Merge pull request dotnet/corefx#4495 from bartonjs/unix_sslstream_idna
Support IDNA host matching on Unix SslStream

Commit migrated from https://github.com/dotnet/corefx/commit/dc25e27e1349afaff2d5bf39c8f9f0d56cb16529
2015-11-16 18:28:43 -05:00
Cristian Pop 40dcf58810 Removing SSLv2 and SSLv3 support from System.Net.Security.
APIs will throw NotSupportedException if SSLv2 or v3 is used. This
behavior is different from .NET Desktop.
Tests have been changed to pin this new behavior.
Increased passing-test timeouts to 15s.

Fix dotnet/corefx#3114 (partial), dotnet/corefx#4467


Commit migrated from https://github.com/dotnet/corefx/commit/1f4deea8946d2e54dfd3c88e64c85bc3c3d9805c
2015-11-16 11:26:00 -08:00
stephentoub ab1f4c8fe8 Disable three System.Net.Security tests that repeatedly timeout
Commit migrated from https://github.com/dotnet/corefx/commit/59c9f299fba30a2ac3ca328d3013c70ca28bb1f5
2015-11-15 19:26:25 -05:00
Page-Not-Found 13eab7cbdf PR Comments changes.
Commit migrated from https://github.com/dotnet/corefx/commit/ab8fb5531134b4018b09d45040f334d2dcfdda54
2015-11-13 21:09:49 -05:00
bartonjs a23c5b7312 Support IDNA host matching on Unix SslStream
* Split the Unix and Windows project.json files for System.Net.Security since they have different dependencies at the implementation level.
* Use the managed IdnMapping to do the IDNA rules application
* Update comments in the native half of the match logic

This was verified against a private domain which uses a mix of ASCII and non-ASCII characters.
* Lowercase punycode form: Success before, success after
* Mixed-case punycode form: Failed before, success after
* Unicode form: Failed before, success after.


Commit migrated from https://github.com/dotnet/corefx/commit/d573223a0d99d41daf8ed26fa89647894a9770da
2015-11-13 08:24:20 -08:00
Page-Not-Found 9a903bf94a System.Net.Security File Renames
System.Net.Security File Renames


Commit migrated from https://github.com/dotnet/corefx/commit/db3748dd3f24b30f4d869c42886bb12e6bdac3a6
2015-11-11 16:00:34 -05:00
Page-Not-Found 835ffb1436 Commonfolder rename and __Error, __HResult
Commonfolder rename and __Error, __HResult


Commit migrated from https://github.com/dotnet/corefx/commit/0a1a2a024797091a645ea42561441fcd8586525c
2015-11-11 15:45:12 -05:00
Cristian Pop a0e0cfd64f Fixing code and removing the X509Store shim. Adding new tests and
changing the certificate used to allow end to end tests with valid
certificate chains.


Commit migrated from https://github.com/dotnet/corefx/commit/d2d810a2971fc56b55fc192e64038e8b4fa0c568
2015-11-10 17:16:41 -08:00
Eric St. John 692d33d3ce Add back more missing dependencies
Build on the CI is complaining about missing base types for many
reference assemblies (where we only pass the compiler direct
references, trimming transitive dependencies).

Additionally I removed the test data packages from some tests
because, of course, they were not directly referenced :).


Commit migrated from https://github.com/dotnet/corefx/commit/3348234db28a1c186f0bab9b0437bc48a81d0ad2
2015-11-10 08:04:44 -08:00
Eric St. John 65210efd31 Update project.lock.json to latest and lock
Commit migrated from https://github.com/dotnet/corefx/commit/6aeea5eabf2aff3baf15f501cabd156dfc5b3f8f
2015-11-09 22:38:10 -08:00