Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Adding TLS Alerts#11489

Merged
CIPop merged 2 commits into
dotnet:masterfrom
CIPop:ssl
Oct 15, 2016
Merged

Adding TLS Alerts#11489
CIPop merged 2 commits into
dotnet:masterfrom
CIPop:ssl

Conversation

@CIPop
Copy link
Copy Markdown

@CIPop CIPop commented Sep 7, 2016

Adding TLS handshake and close_notify SslStream alert support.
New API needs review and is pending the investigation in #11265.

Fixes #8811
Addresses part of #3114.

@davidsh @bartonjs @stephentoub PTAL
/cc @weshaggard

@davidsh
Copy link
Copy Markdown
Contributor

davidsh commented Sep 7, 2016

@dshulman @bartonjs @stephentoub PTAL

@CIPop My GitHub handle is @davidsh and not @dshulman

@CIPop
Copy link
Copy Markdown
Author

CIPop commented Sep 7, 2016

@davidsh Thanks for catching that! Corrected above.

{
contextHandle = refContext._handle;
}
try
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Please put a blank line here; I automatically read this as an "else" to the if.

Copy link
Copy Markdown
Author

@CIPop CIPop Sep 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 (missed as the file was only renamed, probably with minimal changes)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, actually this is new code. Will correct.

}

[Fact]
[PlatformSpecific(PlatformID.Windows)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PlatformID has been renamed TestPlatforms. It would be good if it was updated here before merging. See #12284.

}

[Fact]
[PlatformSpecific(PlatformID.Windows)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PlatformID has been renamed TestPlatforms. It would be good if it was updated here before merging. See #12284.

}

[Fact]
[PlatformSpecific(PlatformID.Windows)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PlatformID has been renamed TestPlatforms. It would be good if it was updated here before merging. See #12284.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. Thanks @justinvp .

@davidsh
Copy link
Copy Markdown
Contributor

davidsh commented Oct 4, 2016

Test OuterLoop CentOS7.1 Debug Build and Test
Test OuterLoop OSX Debug Build and Test
Test OuterLoop Ubuntu14.04 Debug Build and Test
Test OuterLoop Windows_NT Debug Build and Test

Copy link
Copy Markdown
Contributor

@davidsh davidsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@CIPop CIPop force-pushed the ssl branch 2 times, most recently from 2c77d5d to 49b9eb8 Compare October 6, 2016 21:21
public override int Read(byte[] buffer, int offset, int count) { return default(int); }
public override long Seek(long offset, System.IO.SeekOrigin origin) { return default(long); }
public override void SetLength(long value) { }
public virtual System.Threading.Tasks.Task ShutdownAsync() { return default(System.Threading.Tasks.Task); }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API needs to be added as .NET Core specific instead of as being part of netstandard. See #12311 as an example.

@@ -31,29 +31,34 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Release|AnyCPU'" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slightly orthogonal: The NugetTargetMoniker looks a strange here. It is netstandard1.3 for everything but unix where it is netstandard16. @ericstj are there any issues with this approach?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused by this as well. This probably needs to be updated to netstandard1.7 anyway? (I see #11265 doing some of those changes.)

@Petermarcu
Copy link
Copy Markdown
Member

@CIPop , Is all thats left here to get it moved into netcoreapp1.2?

@CIPop
Copy link
Copy Markdown
Author

CIPop commented Oct 13, 2016

@Petermarcu Yes, I believe most of the build issues are because of this contract having the wrong TFM.

I need to read through the docs and figure out what needs to change to fix the following errors:

ClientAsyncAuthenticateTest.cs(135,13): error CS0246: The type or namespace name 'EncryptionPolicy' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
SslStreamStreamToStreamTest.cs(21,45): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
SslStreamStreamToStreamTest.cs(21,72): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
SslStreamStreamToStreamTest.cs(233,45): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
SslStreamStreamToStreamTest.cs(233,72): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
SslStreamStreamToStreamTest.cs(246,45): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
SslStreamStreamToStreamTest.cs(246,72): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
SslStreamStreamToStreamTest.cs(265,45): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
SslStreamStreamToStreamTest.cs(265,72): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
NegotiateStreamStreamToStreamTest.cs(20,59): error CS0246: The type or namespace name 'NegotiateStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
NegotiateStreamStreamToStreamTest.cs(21,59): error CS0246: The type or namespace name 'NegotiateStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
NegotiateStreamStreamToStreamTest.cs(267,59): error CS0246: The type or namespace name 'NegotiateStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
NegotiateStreamStreamToStreamTest.cs(270,59): error CS0246: The type or namespace name 'NegotiateStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
NegotiateStreamStreamToStreamTest.cs(276,59): error CS0246: The type or namespace name 'NegotiateStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
NegotiateStreamStreamToStreamTest.cs(279,59): error CS0246: The type or namespace name 'NegotiateStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
NegotiateStreamStreamToStreamTest.cs(285,59): error CS0246: The type or namespace name 'NegotiateStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
NegotiateStreamStreamToStreamTest.cs(288,59): error CS0246: The type or namespace name 'NegotiateStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
S:\c1\src\Common\tests\System\Net\SchSendAuxRecordTestServer.cs(111,51): error CS0246: The type or namespace name 'SslStream' could not be found (are you missing a using directive or an assembly reference?) [S:\c1\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]
S:\c1\Tools\Packaging.targets(602,5): error : File S:\c1\bin\Windows_NT.AnyCPU.Debug\System.Net.Security\net46\System.Net.Security.dll does not exist, ensure you have built libraries before building the package. [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(602,5): error : File S:\c1\bin\Windows_NT.AnyCPU.Debug\System.Net.Security\net46\System.Net.Security.dll does not exist, ensure you have built libraries before building the package. [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(602,5): error : File S:\c1\bin\Windows_NT.AnyCPU.Debug\System.Net.Security\net46\System.Net.Security.dll does not exist, ensure you have built libraries before building the package. [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(1148,5): error : Error when creating nuget lib package from S:\c1\bin\packages\Debug\specs\System.Net.Security.nuspec. System.IO.FileNotFoundException: File not found: 'S:\c1\bin\Windows_NT.AnyCPU.Debug\System.Net.Security\net46\System.Net.Security.dll'. [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(1148,5): error :    at NuGet.Packaging.PackageBuilder.AddFiles(String basePath, String source, String destination, String exclude) [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(1148,5): error :    at NuGet.Packaging.PackageBuilder.PopulateFiles(String basePath, IEnumerable`1 files) [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(1148,5): error :    at Microsoft.DotNet.Build.Tasks.Packaging.NuGetPack.Pack(String nuspecPath, Func`2 nuspecPropertyProvider, Boolean packSymbols) [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(1148,5): error : Error when creating nuget symbol package from S:\c1\bin\packages\Debug\specs\System.Net.Security.nuspec. System.IO.FileNotFoundException: File not found: 'S:\c1\bin\Windows_NT.AnyCPU.Debug\System.Net.Security\net46\System.Net.Security.dll'. [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(1148,5): error :    at NuGet.Packaging.PackageBuilder.AddFiles(String basePath, String source, String destination, String exclude) [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(1148,5): error :    at NuGet.Packaging.PackageBuilder.PopulateFiles(String basePath, IEnumerable`1 files) [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]
S:\c1\Tools\Packaging.targets(1148,5): error :    at Microsoft.DotNet.Build.Tasks.Packaging.NuGetPack.Pack(String nuspecPath, Func`2 nuspecPropertyProvider, Boolean packSymbols) [S:\c1\src\System.Net.Security\pkg\System.Net.Security.pkgproj]

@CIPop CIPop merged commit d9c476a into dotnet:master Oct 15, 2016
weshaggard added a commit to weshaggard/corefx that referenced this pull request Oct 17, 2016
After dotnet#11489

This error shows up after trying to consume the new packages.
 SslStreamAlertsTest.cs(81,30): error CS1061: 'SslStream' does not contain a definition for 'ShutdownAsync' and no extension method 'ShutdownAsync' accepting a first argument of type 'SslStream' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\55\s\corefx\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]

For now disabling these tests by conditioning them on netcoreapp1.1.
@CIPop CIPop deleted the ssl branch October 17, 2016 23:15
@karelz karelz modified the milestone: 1.2.0 Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
After dotnet/corefx#11489

This error shows up after trying to consume the new packages.
 SslStreamAlertsTest.cs(81,30): error CS1061: 'SslStream' does not contain a definition for 'ShutdownAsync' and no extension method 'ShutdownAsync' accepting a first argument of type 'SslStream' could be found (are you missing a using directive or an assembly reference?) [D:\A\_work\55\s\corefx\src\System.Net.Security\tests\FunctionalTests\System.Net.Security.Tests.csproj]

For now disabling these tests by conditioning them on netcoreapp1.1.


Commit migrated from dotnet/corefx@4f9f736
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SslStream should handle handshake and close_notify alerts

8 participants