Commit Graph
41 Commits
Author SHA1 Message Date
Jeremy Barton 34e48bdc05 Merge pull request dotnet/corefx#3678 from bartonjs/unix_sslstream_openstore
Implement EnsureStoreOpened for the Unix PAL

Commit migrated from https://github.com/dotnet/corefx/commit/bf803ccab28fd70a94a98f837bb15f12632fa8ef
2015-10-07 08:44:12 -07:00
bartonjs ef29a06944 Implement EnsureStoreOpened for the Unix PAL
Commit migrated from https://github.com/dotnet/corefx/commit/cf47694b707097d5fd0032a11f97b4f29a5a040a
2015-10-07 08:01:11 -07:00
Vijay Kota 11b5b17c1a Using SafeHandles instead of IntPtrs in Interop.libssl
- Also fixed an issue with handling of return code in Encrypt logic


Commit migrated from https://github.com/dotnet/corefx/commit/860c76acd11bbf123029ed270c594a874dc7a900
2015-10-07 18:32:02 +05:30
Pat Gavlin 490ac2340b Remove dead code from S.N.{Security,Sockets}.
Commit migrated from https://github.com/dotnet/corefx/commit/20720d890fe016a4934e7215d22cf35e7c1224b3
2015-10-06 14:48:44 -07:00
Stephen Toub 5dcc145481 Merge pull request dotnet/corefx#3638 from rajansingh10/NetFeature2
Fixed Renegotiate & sslV3 issue in System.Net.Security xplat. Made op…

Commit migrated from https://github.com/dotnet/corefx/commit/09a5343cfd6621669ad645bc786d0225ae8336c2
2015-10-06 17:15:22 -04:00
Rajan Singh 2e970dd7eb Fixed Renegotiate & sslV3 issue in System.Net.Security xplat. Made openSSL method initialization static.
Commit migrated from https://github.com/dotnet/corefx/commit/357db0467e6a635a1ddacab29925cf75a67c791d
2015-10-06 09:23:19 +05:30
dotnet-bot dfa25896ef Porting System.Net.NetworkInformation and System.Net.Utility to GitHub.
Completing dotnet/corefx#894


Commit migrated from https://github.com/dotnet/corefx/commit/5a67678925c2f2731fdb55eb3c88a287149e8db4
2015-10-05 17:24:18 -07:00
Stephen A. Imhoff 9f6e31a883 Remove custom error checking from System.Net.Security, per dotnet/corefx#516 .
- Remove .nuget.props for test project.


Commit migrated from https://github.com/dotnet/corefx/commit/9d7a7bdb5b56c33e48da1986be02e6b63c6360ee
2015-10-03 10:26:18 +09:00
Ian Hays 0f8197a86c Update CoreFX to xunit 2.1.0
Commit migrated from https://github.com/dotnet/corefx/commit/87b48c58936d66fcb201b3a8ad0961fa055f23b9
2015-10-01 19:56:49 -07:00
Stephen Toub aa9dffdb12 Merge pull request dotnet/corefx#3553 from bartonjs/sslstream_extrastore
Extract the whole cert chain during SSL handshake.

Commit migrated from https://github.com/dotnet/corefx/commit/94d289bb34834761be5480ee45f6e0199d5d7662
2015-10-01 08:45:12 -04:00
bartonjs a9d8f18565 Extract the whole cert chain during SSL handshake.
When the server sends the whole cert chain, extract the elements after the leaf/EE certificate to be passed into X509Chain.ChainPolicy.ExtraStore; this will prevent failures due to unknown intermediate CAs (and may also prevent the need to download that intermediate).


Commit migrated from https://github.com/dotnet/corefx/commit/69b872484086379160ea03bcfe8fa55fbeaec0db
2015-09-30 08:48:40 -07:00
Pallavi Taneja f2845b41f0 Update the lock files for the updated projects
Commit migrated from https://github.com/dotnet/corefx/commit/ebf752bf2c3fe7f6a04fbd3ef2db536700318e17
2015-09-29 17:18:49 -07:00
Pallavi Taneja 0185f7f683 Remove SecureString usages
Commit migrated from https://github.com/dotnet/corefx/commit/46db5bcbb484baf02f98320287d2fe0bd2e86599
2015-09-29 15:01:25 -07:00
Jeremy Barton 3c40a2a480 Merge pull request dotnet/corefx#3513 from bartonjs/update_package_refs
Update all CoreFx package references to 23328 build.

Commit migrated from https://github.com/dotnet/corefx/commit/1ee4f60145a851adbacbb16e7b0c65bec3ec0d02
2015-09-29 13:41:30 -07:00
bartonjs a52f41057c Update all CoreFx package references to 23328 build.
`build.cmd /p:LockDependencies=true` was the start of this change, but some errors with xunit build numbers led to all xunit upgrades being reset back to what they had in master.

project.json changes:
* System.Net.Security\src Switch off of explicit beta versioning, use the same baseline as everyone else.  The S.S.C.Algorithms explicit upgrade is no longer required.
* System.Net.Requests\tests didn't build.  Looking at the project.lock.json change, it appeared that a System.Net.Http reference was lost, restored it.
* System.Net.Http\tests didn't build. Looking at the project.lock.json change, it appeared that a System.IO.FileSystem reference was lost, restored it.
* System.Net.WebSockets.Client\src didn't build. Looking at the project.lock.json change, it appeared that a System.Collections (4.0.10) reference was lost, restored it.
* System.Diagnostics.TextWriterTraceListener\tests needed the runtime reference to load the correct System.Diagnostics.TraceSource binary.


Commit migrated from https://github.com/dotnet/corefx/commit/cec3a0f2db542bfa9d9c56bf988d966eacc35ad9
2015-09-29 11:40:37 -07:00
Jeremy Barton a403d99606 Merge pull request dotnet/corefx#3490 from rajansingh10/NetFeature2
Incorporated some comments - Net Secure Xplat Implementation

Commit migrated from https://github.com/dotnet/corefx/commit/85796c629cab4b49c05a584ba79895abf272ce8a
2015-09-28 22:13:05 -07:00
Rajan Singh d109307bff System.Net.Security - Fixed mutiple review comments, Added TODOs with issue number for all pending items
Commit migrated from https://github.com/dotnet/corefx/commit/d4a08f5df7d21764792b448cf0f4a3f7b39e6958
2015-09-29 09:32:50 +05:30
bartonjs eeecc11abd Restore the exception order in ValidateCreateContext.
During PAL refactoring the order that a null server certificate and no valid protocols were checked got flipped, resulting in a minor observable difference in exception flows.

This restores the order to what it was before.


Commit migrated from https://github.com/dotnet/corefx/commit/1fe3d77606061dcebe795e2fb9b3721f05ea3008
2015-09-25 14:37:29 -07:00
bartonjs 622ff622cc Merge remote-tracking branch 'dotnet/master' into dev-sslstream
Commit migrated from https://github.com/dotnet/corefx/commit/ed6c0849ecc0dfa22d930e20490c847b0bd186c2
2015-09-25 09:47:22 -07:00
bartonjs ee22e34157 Validate hostname when using SslStream as a client
Added a method in the crypto shim (CheckX509Hostname) which does the heavy lifting. It may end up making sense to push this up into managed for better flexibility when trying to add support for IDNA; but that would be greatly assisted by having good managed decoders for the subject name pieces and the SubjectAltNames extension.

Verified that it works against an explicit SAN entry and a wildcard SAN entry.


Commit migrated from https://github.com/dotnet/corefx/commit/c9407c8daa7498ebb4ae1e35c92995f62d8c3c38
2015-09-25 07:55:39 -07:00
Jeremy Barton 00771c2b33 Merge pull request dotnet/corefx#3409 from bartonjs/sslstream_bind_privkey
Bind the SSL certificate, when presented with one.

Commit migrated from https://github.com/dotnet/corefx/commit/0ce6be21666fb9273528da7ce32bc2e8e8b77897
2015-09-24 18:40:25 -07:00
bartonjs 80a4059c46 Change S.S.C.OpenSsl project reference to package reference
Commit migrated from https://github.com/dotnet/corefx/commit/ccbcc0120687e4c21719eb2a9983e753818b2e12
2015-09-24 16:48:02 -07:00
bartonjs 472f27695b Make Unix VerifyCertificateProperties validate the chain
Commit migrated from https://github.com/dotnet/corefx/commit/f14f03502bb8cc020c29eeb84d88baab6267dbc0
2015-09-24 10:05:21 -07:00
Vijay Kota e46ec3c159 Move more certificate verification logic into the PAL
Commit migrated from https://github.com/dotnet/corefx/commit/581753ae44f90379d3621277f2d45a73b7988c09
2015-09-24 09:41:07 -07:00
bartonjs 93db484d96 Bind the SSL certificate, when presented with one.
Commit migrated from https://github.com/dotnet/corefx/commit/140f52b426f928694e62dbb7bbc678a53bd67776
2015-09-24 09:03:00 -07:00
dotnet-bot 59f03d6341 Initial import of System.Net.Sockets.
Commit migrated from https://github.com/dotnet/corefx/commit/36c09c4802aebed9abfe4dd86fe9fbfd7b9c72cc
2015-09-23 21:06:21 -07:00
Stephen Toub 1bffa9f0a8 Merge pull request dotnet/corefx#3396 from vijaykota/SafeFreeCredFix
Fix handle leak in xplat SslStream.SafeFreeCredentials

Commit migrated from https://github.com/dotnet/corefx/commit/67874fd4bce3b1319d1f1679bc5312220d9e299c
2015-09-23 23:16:28 -04:00
Jeremy Barton 709aca3dd0 Merge pull request dotnet/corefx#3398 from vijaykota/EofFix
Fix handling of 0 returned by SSL_read or SSL_write

Commit migrated from https://github.com/dotnet/corefx/commit/bf85899bb229f6237b00dbf998525d24aa95aeb7
2015-09-23 12:30:27 -07:00
Vijay Kota ffc8d906b5 Fix handling of 0 returned by SSL_read or SSL_write
When EOF is received, SSL_read/SSL_write fail with SSL_ERROR_ZERO_RETURN.
This needs to be gracefully passed to caller which will map it to
SecurityStatus.ContextExpired.


Commit migrated from https://github.com/dotnet/corefx/commit/019d7dcfcf19b6f7e6f0d2af28fe7e7f45c0cd07
2015-09-23 18:14:50 +05:30
Vijay Kota 47a5dd5f7c Fix handle leak in xplat SslStream.SafeFreeCredentials
If a cert is used in SSL handshake, the certificate information needs
to persist for the SSL session. This is achieved by storing the cert
in a SafeFreeCredentials and bumping up its refcount. But we were
incorrectly doing this in AcquireCredentials instead of the first
invocation of InitializeSecurityContext/AcceptSecurityContext


Commit migrated from https://github.com/dotnet/corefx/commit/3c46b8ab60c2d5ff3ad0caa7398bc1e3aa1c9c20
2015-09-23 14:36:17 +05:30
bartonjs 4c4ef90fa6 Move s_syncObject to the Windows CertModule
It was only used by the certificate store opening code; it isn't needed in _SecureChannel.cs anymore.


Commit migrated from https://github.com/dotnet/corefx/commit/5f171d6cf3bdf48303f10b43569634b13e1ae466
2015-09-22 21:45:16 -07:00
Vijay Kota e0f059bfb0 Refactor EnsureStoreOpened logic into PAL-specific files
Commit migrated from https://github.com/dotnet/corefx/commit/96b3d0e09aee48aeb159e012045e60e75ed90e94
2015-09-22 21:45:05 -07:00
Vijay Kota db761bd0f6 Fix encryption logic for xplat SslStream
An in-place buffer is used in the Encrypt code path. The unencrypted
data is copied at an offset of headerSize but the code in Interop.
OpenSsl.cs was asssuming that data starts at offset 0. Due to this
incorrect data was received by the peer.


Commit migrated from https://github.com/dotnet/corefx/commit/9c38fd8efec765b60986707d6f15551bcc8e4e8f
2015-09-22 16:32:05 -07:00
bartonjs a64dbbc552 Remove all references to EvpPKey from System.Net.Security
Commit migrated from https://github.com/dotnet/corefx/commit/8a04097124aa8dbf566589f4d75e99253d6504e5
2015-09-22 11:18:04 -07:00
Jeremy Barton 906bfbf2fa Merge pull request dotnet/corefx#3345 from rajansingh10/Netfeature
Net Secure Xplat Implementation

Commit migrated from https://github.com/dotnet/corefx/commit/24c4c8f3864b3e2b685afa1a8208f6882cdc07ae
2015-09-22 09:11:26 -07:00
bartonjs d8c513071a Restrict the SSL handshake test to 3 seconds.
Commit migrated from https://github.com/dotnet/corefx/commit/86b244ba187d6dc34de242414f8e5aa547412b81
2015-09-21 15:36:23 -07:00
Rajan Singh 2756bf4119 Net Secure Xplat Implementation
Commit migrated from https://github.com/dotnet/corefx/commit/21485668d284cc9e0a5fcf2f0421b6d73eb8b060
2015-09-21 19:31:41 +05:30
dotnet-bot 779ca6dd2b Porting System.Net.Security
Commit migrated from https://github.com/dotnet/corefx/commit/c74b6f24070a11eb347a43d7ac6de3304a50e789
2015-09-16 11:17:12 -07:00
Alexander Köplinger 3e20a867b2 Update build to use DNX beta7 instead of beta5
The corefx build used an older beta5 version of DNX which hardcoded the path to bash in dnu, breaking the build on FreeBSD.
Updating DNX to the latest "stable" beta7 release fixes this.

After updating I noticed a few test projects didn't build anymore as they were missing some dependencies in project.json, added those.

Fixes dotnet/corefx#3173


Commit migrated from https://github.com/dotnet/corefx/commit/6df77fdbb6cf8e0d35a3074bb325f7810085daa3
2015-09-16 02:12:26 +02:00
Eric St. John d7a0ae297b Update corefx packages to latest
Commit migrated from https://github.com/dotnet/corefx/commit/23f0b695bd162e0f665427c95180dc21931e5c70
2015-08-14 15:43:23 -07:00
Eric St. John 77309d4821 Update the version of all assemblies
This change updates the assembly versions of all of the corefx assemblies
as needed after we shipped stable versions.  Assemblies with API differences
get a minor version bump.  Assemblies with only bugfixes get a build version
bump.

In order to facilitate this I had to update the reference assemblies, so I took
the opportunity to port them all to the open.

[tfs-changeset: 1514419]


Commit migrated from https://github.com/dotnet/corefx/commit/40723b795917f2e98b64d45c17effb2546dd0cae
2015-08-13 17:07:57 -07:00