CipherSuitePolicy implementation (dotnet/corefx#36775)
authorKrzysztof Wicher <mordotymoja@gmail.com>
Sat, 13 Apr 2019 01:23:31 +0000 (18:23 -0700)
committerGitHub <noreply@github.com>
Sat, 13 Apr 2019 01:23:31 +0000 (18:23 -0700)
commitae8f7a0ee7d5be0f9002cf6b04d52ac8cab2f8b7
treec6fa7ff5349164071542790067ad111c213fdfa9
parentf9fe8bbd27ed2ca713bdd8a265e97094bd0e73cc
CipherSuitePolicy implementation (dotnet/corefx#36775)

* CipherSuitePolicy implementation (Linux)

* SSL_CIPHER_find

* do not call TLS1.3 APIs on platforms which don't support it

* Non-TLS1.3 specific tests are skipped when not enough cipher suites is enabled

* clean ups

* attempt to fix OSX

* another attempt to fix OSX

* missing define

* address some feedback, try to fix test failures

* portable build fix

* do not call old set ciphers API when only TLS 1.3 is requested

* apply feedback

* add OSX implementation

* fixes to OSX

* explicit convert

* use explicit SSLCipherSuite instead of uint16_t

* random change to trigger CI

* s/unsafe/fixed

* fixes

* random change to trigger CI

* client ordering does not have to win

* tests: AllowedCipherSuites, new CipherSuitesPolicy(null)

* run AllowedCipherSuites tests only when CSP is supported

* add summary on CipherSuitesPolicy

* address feedback

* move OS specific files to CipherSuitesPolicyPal

* FALLBACK->LIGHTUP and remove local_

* do not call 1.1.1 function on non-portable build when lower openssl version is installed

* get rid of warning that arg is unused

* make CipherSuitesPolicyPal public members internal

Commit migrated from https://github.com/dotnet/corefx/commit/07f443b6c9f27dd050ffb5eb3afa126a2b1bdddd
22 files changed:
src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSsl.cs
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs
src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.SslCtxOptions.cs
src/libraries/Native/Unix/System.Security.Cryptography.Native.Apple/pal_ssl.c
src/libraries/Native/Unix/System.Security.Cryptography.Native.Apple/pal_ssl.h
src/libraries/Native/Unix/System.Security.Cryptography.Native/opensslshim.h
src/libraries/Native/Unix/System.Security.Cryptography.Native/pal_ssl.c
src/libraries/Native/Unix/System.Security.Cryptography.Native/pal_ssl.h
src/libraries/System.Net.Security/ref/System.Net.Security.cs
src/libraries/System.Net.Security/src/Resources/Strings.resx
src/libraries/System.Net.Security/src/System.Net.Security.csproj
src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicy.cs [new file with mode: 0644]
src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicyPal.Linux.cs [new file with mode: 0644]
src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicyPal.OSX.cs [new file with mode: 0644]
src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicyPal.Windows.cs [new file with mode: 0644]
src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs
src/libraries/System.Net.Security/src/System/Net/Security/SslAuthenticationOptions.cs
src/libraries/System.Net.Security/src/System/Net/Security/SslClientAuthenticationOptions.cs
src/libraries/System.Net.Security/src/System/Net/Security/SslServerAuthenticationOptions.cs
src/libraries/System.Net.Security/src/System/Net/Security/TlsCipherSuiteNameParser.ttinclude
src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamNegotiatedCipherSuiteTest.cs