Commit Graph
12 Commits
Author SHA1 Message Date
David Shulman 9449dda9a7 Enhance LoopbackServer to return received data
Modified the test LoopbackServer so that it can return the received data in the helper methods. This allows more use of the
simple ReadRequestAndSendResponseAsync() method instead of having to use the more complex methods.

Modified a few HttpClient tests to take advantage of this. More tests will be simplified in future PRs.


Commit migrated from https://github.com/dotnet/corefx/commit/14c8ddd89be1fac31a472efdcaee184ba9d62e58
2016-08-26 12:11:43 -07:00
Cristian Pop 7a3d76b180 Adding multi-machine scripts and unifying configuration.
Commit migrated from https://github.com/dotnet/corefx/commit/c354b2d44f6988a20a9f7be4a1b996ef7fbc873a
2016-06-28 12:38:07 -07:00
Stephen Toub f9fc17df13 Remove innerloop dependencies on www.ssllabs.com
We have several innerloop tests that make HTTP calls during System.Net.Http.Functional.Tests out to www.ssllabs.com, which has SSL endpoints for different SSL protocols.  This commit avoids using that server during innerloop tests.  The tests are moved to outerloop, and some replacements using a localhost are added to innerloop.


Commit migrated from https://github.com/dotnet/corefx/commit/8a9402b33d46166d1a3129a7c2cae0334b00c4b6
2016-05-31 17:05:10 -04:00
bartonjs e2af1bb6c4 Clear the libcrypto error queue before doing SSL/TLS operations.
If an SSL operation fails, we call SSL_get_error to determine how to proceed.
SSL_get_error's logic is, essentially
  libcrypto_error ?? WANT_READ ?? WANT_WRITE ?? WANT_X509 ?? panic

This means that if a previous call into libcrypto on the same thread had left
something in the error queue when the operation goes into the WANT_READ state (etc)
SSL_get_error will report that the request must have failed due to something in
libcrypto.

There are two different fixes being done here:
1) PKCS12_parse is a known contributor to this problem, clear out the queue on a
successful exit.
2) Before any SSL stream operation (handshake, read, write, shutdown) clear the
queue, in case there are other functions which are leaving dangling errors.

With those mitigations in place, the intermittent errors seen during SslStream
usage should hopefully be a thing of the past.


Commit migrated from https://github.com/dotnet/corefx/commit/80a53ed415ece115d15bcf519e81e600362fd3dc
2016-05-17 09:09:53 -07:00
David Shulman c04a0f68e8 Change some System.Net.Requests tests to use LoopbackServer
Changed HttpWebResponse test to use LoopbackServer.

More tests will be changed to use this server as part of
increasing test reliability and simplifying the requirements for the Azure test server.


Commit migrated from https://github.com/dotnet/corefx/commit/3aaaf19bd94bfcac533787ed45e1c3218168b7fa
2016-05-15 20:58:50 -07:00
stephentoub f44781c5fd Add test verifying HttpClient negotiates Tls12 when None specified
Commit migrated from https://github.com/dotnet/corefx/commit/22e060a3d7735a2b64bf4f409bee91d675866d39
2016-05-15 16:31:36 -04:00
David Shulman 354c2e5b9c System.Net.Http 4.1 contract implementation
As per approved dotnet/corefx#7623, add remaining properties to HttpClientHandler for
all platforms.

Move pre-existing Unix-only Http tests to run for all platforms.

Ensure that "credentials" related properties are secure by default and have
an initial (default) value of null.


Commit migrated from https://github.com/dotnet/corefx/commit/361b66146506a58f7d2c27224cc02f9583cd0639
2016-05-14 17:07:27 -07:00
stephentoub c43ac8a969 Change CurlHandler.SslProtocols default
Same change as https://github.com/dotnet/corefx/pull/8518, but for CurlHandler.


Commit migrated from https://github.com/dotnet/corefx/commit/3b8756c8b966f93afbe01f24e50794587ef465c9
2016-05-13 19:55:32 -04:00
stephentoub 31eddcd4ce Add HttpClient test with IPv6 Uris
Adds support to the loopback server for binding to IPv6 local addresses, then adds a test that uses both ::1 and a link-local address for the current machine.


Commit migrated from https://github.com/dotnet/corefx/commit/a00e71b22fecbf9e2da3205e2e56bdb46773cbc2
2016-05-12 06:11:28 -04:00
stephentoub ac19b4db8b Disable two recently added tests
These were both added in the last few days and have both failed in CI at least once.


Commit migrated from https://github.com/dotnet/corefx/commit/e3f64a9c8f3869f3db1bdc7bac496e56b89334a6
2016-05-10 22:55:55 -04:00
stephentoub b8970ee51b Add SSL support to LoopbackServer in HTTP tests
We currently make a lot of calls off-box in our unit tests.  By adding SSL support to the loopback server, we should be able to convert many more tests to avoid needing to actually hit the network.  This adds such basic support, and converts a few tests to use it.

Also, since I was moving the certificate configuration code to a central location, I fixed an issue related to cleanup.


Commit migrated from https://github.com/dotnet/corefx/commit/b90795e1d5d7e8d8c68b9ca23d53b1ba0e392f46
2016-05-10 13:55:40 -04:00
Stephen Toub ba8bf6c2cd Add CurlHandlers.SslProtocols option
Add CurlHandlers.SslProtocols option

With libcurl on the OpenSSL backend (the recommended configuration), we can provide full-fidelity for this option.  With libcurl on another SSL backend, we can allow choosing all three TLS protcols or just one TLS protocol, but we can't support selecting two of the three.

Commit migrated from https://github.com/dotnet/corefx/commit/bd79e80f25923e0f2e29e07aba60b03070596bb4
2016-04-04 17:27:18 -04:00