Commit Graph
131 Commits
Author SHA1 Message Date
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
Eric St. John cddddd29f5 Remove unused dependencies
Commit migrated from https://github.com/dotnet/corefx/commit/78fd45ec74afc507a40df519b4df650ac9bd4c42
2015-11-09 22:37:37 -08:00
Stephen Toub ac0ca101f1 Merge pull request dotnet/corefx#4369 from stephentoub/delete_test_code
Delete SslStreamAPMExtensions.cs from System.Net.Security tests

Commit migrated from https://github.com/dotnet/corefx/commit/db143451ee06709c9aee7e865fb685afda90c68d
2015-11-06 11:00:03 -08:00
Shruti Garg 0390074a73 Fixing System.Net.Security test failures in OS X
Commit migrated from https://github.com/dotnet/corefx/commit/15b2d692c05619da3350d5f0ed2a26002ea6c646
2015-11-06 17:39:48 +05:30
stephentoub bf69c04cca Delete SslStreamAPMExtensions.cs from System.Net.Security tests
After https://github.com/dotnet/corefx/pull/4331, it's now dead code.


Commit migrated from https://github.com/dotnet/corefx/commit/0a2c023520bb890c5de8cc16b4391515e8b99c3a
2015-11-05 21:58:31 -08:00
stephentoub 0bb85f778a Fix 43 of the 44 failing System.Net.Security tests on Linux
- System.Net.Sockets removed a bunch of APIs.  They're somehow still in the contracts, so compilation succeeds, but they're not implementation, so the tests fail when trying to use methods like TcpClient.Connect and various Begin/End methods.  I've changed these to use the appropriate Async methods.
- SslStream has a Debug.Fail which has been failing regularly, but it wasn't being noticed.  Now that Debug.Fail will throw an exception, the tests that were previously asserting are now failing.  I've temporarily commented out the Debug.Fail with a TODO comment.

One test is still failing:
```
System.Net.Security.Tests.ClientAsyncAuthenticateTest.ClientAsyncAuthenticate_MismatchProtocols_Ssl2_Fails_Linux(server: Ssl2, client: Tls11, expected: typeof(System.Security.Authentication.AuthenticationException)) [FAIL]
      Assert.Throws() Failure
      Expected: typeof(System.Security.Authentication.AuthenticationException)
      Actual:   typeof(System.InvalidOperationException): EndAuthenticate can only be called once for each asynchronous operation.
      Stack Trace:
            at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
            at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
```


Commit migrated from https://github.com/dotnet/corefx/commit/c0aab82ea70453324f5e7d51902a0e1bb40db365
2015-11-04 21:31:26 -08:00
stephentoub 9e759283de Disable System.Net.Security tests on Unix
Commit migrated from https://github.com/dotnet/corefx/commit/13011914b9c9a8db574bd8562c3dab1691f300bc
2015-11-04 16:38:49 -08:00
shrutigarg 501a733bc8 Merge pull request dotnet/corefx#4262 from shrutigarg/ssl_TODO
Remove obsolete TODOs from xplat SslStream code

Commit migrated from https://github.com/dotnet/corefx/commit/5760b84a25fe007a2360d936736de3e2fb68f32a
2015-11-04 17:19:02 +05:30
Shruti Garg 94e521f0e4 Remove obsolete TODOs from xplat SslStream code
Commit migrated from https://github.com/dotnet/corefx/commit/2dc86c42cf97db170408c2cbdc4bda24a9be9d42
2015-11-04 16:22:29 +05:30
Cristian Pop 850e94bf69 Merge pull request dotnet/corefx#4297 from shrutigarg/ssl_test3
Fix FakeNetworkStream to remove direct Fix DoNetworkRead() use

Commit migrated from https://github.com/dotnet/corefx/commit/1c534a2a53e5b14264a9faaf252c43f434ff186f
2015-11-03 10:01:01 -08:00
Shruti Garg 4df32ccf77 Fix FakeNetwrokStream to remove direct Fix DoNetworkRead() use
Commit migrated from https://github.com/dotnet/corefx/commit/f144876d84fbfee06f4ad174d0c88944eb70eb47
2015-11-03 18:43:23 +05:30
Shruti Garg a53e0f5f6d Enabling ChannelBinding testcase in Unix
Commit migrated from https://github.com/dotnet/corefx/commit/7e8517315ffd7138e4c645df110a311a0124d0bb
2015-11-03 12:57:52 +05:30
shrutigarg 59668f5440 Merge pull request dotnet/corefx#4263 from shrutigarg/ssl_test1
Enabling System.Net.Security tests in Linux

Commit migrated from https://github.com/dotnet/corefx/commit/2e518000a747b758cdae8c2f8d48eb0a823ebcb3
2015-11-03 12:42:33 +05:30
Shruti Garg 23247f146b Resolved review comments
Commit migrated from https://github.com/dotnet/corefx/commit/2503efd50ecff681887246f6f2de8a20c1e6469a
2015-11-02 14:42:35 +05:30
Rajan Singh 860aeeab26 Added Support for GetChannelBinding() in xplat
Commit migrated from https://github.com/dotnet/corefx/commit/157e83aa4cd6511889f7075dc8400818de008048
2015-11-02 09:29:46 +05:30
Shruti Garg 70d782ce24 Enabling System.Net.Security tests in Linux
Commit migrated from https://github.com/dotnet/corefx/commit/a450fde974f7ff4514505b5b953af6deadae51ff
2015-10-30 15:47:37 +05:30
Shruti Garg cdc621a851 Populate DataHash key size in SslConnectionInfo
Commit migrated from https://github.com/dotnet/corefx/commit/86dec922c45391762b29c1da1563633cfb02f05a
2015-10-29 12:06:16 +05:30
bartonjs f6d49e5b0c Extract SslCtx methods for better sharing
Commit migrated from https://github.com/dotnet/corefx/commit/f3197d731d66b14cf2c87ebb643dd2bde44220e5
2015-10-27 08:08:40 -07:00
bartonjs 3ba0c1f90b Extract X509Stack and X509StoreCtx methods for better sharing
Commit migrated from https://github.com/dotnet/corefx/commit/2d2324bd8179c3fe7e597eefc356836da35ed8bf
2015-10-27 08:08:38 -07:00
Cristian Pop 85b69993cc Increasing test timeout for System.Net.Security (SslStream).
Fix dotnet/corefx#3845


Commit migrated from https://github.com/dotnet/corefx/commit/9a5712441b9d7eea761a57f6159bd5c00dbf081d
2015-10-26 16:56:31 -07:00
Eric Erhardt ae2f4b323d Merge pull request dotnet/corefx#4088 from eerhardt/LibSsl
Add shims for the remaining libssl methods.

Commit migrated from https://github.com/dotnet/corefx/commit/60efb9cabdf1101506282d6bbc9f888859bbdd7f
2015-10-23 16:36:37 -05:00