New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[System]: Epic: Client Certificate Support - Part Two. #8758
Merged
marek-safar
merged 3 commits into
mono:master
from
baulig:epic-client-certificates-part-two
May 25, 2018
Merged
[System]: Epic: Client Certificate Support - Part Two. #8758
marek-safar
merged 3 commits into
mono:master
from
baulig:epic-client-certificates-part-two
May 25, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
baulig
force-pushed
the
epic-client-certificates-part-two
branch
from
May 24, 2018 19:19
6b660c6
to
c51774a
Compare
@monojenkins build deb with monolite |
This is the second and final part to bring Client Certificate support. It needs to be landed on top of mono#8753 and mono#8756. * `Mono.Security.Interface.IMonoSslStream`: Add `CanRenegotiate` and `RenegotiateAsync()`. * `Mono.Security.Interface.MonoTlsSettings`: Add `DisallowUnauthenticatedCertificateRequest`. * `AppleTlsContext`: fully support renegotiation. - we may now receive `SslStatus.PeerAuthCompleted` and `SslStatus.PeerClientCertRequested` during `Read()`. It should in theory not happen during `Write()`, but I added it there as well just to be on the safe side. - `SetSessionOption()` may only be called before the initial handshake. * `MobileAuthenticatedStream`: this is the major part of the work and the most complex one. - added a new `Operation` enum to keep track of what is going on and detect invalid state. - a renegotion may only be triggered while we're idle - that is no handshake, read or write operation is currently active. - `InternalWrite()` may now be called from `SSLRead()`, the new `Operation` tells us what is currently happening. - `ProcessHandshake()` now takes a `bool renegotiate` argument. - added sanity checks to `ProcessRead()` and `ProcessWrite()`. * `MobileTlsContext.SelectClientCertificate()`: check for `MonoTlsSettings.DisallowUnauthenticatedCertificateRequest` * `MonoTlsProviderFactory.InternalVersion`: bump the internal version number. Tests have already been added to `web-tests/master`, they will auto-enable themselves when using a Mono runtime that contains this code.
baulig
force-pushed
the
epic-client-certificates-part-two
branch
from
May 24, 2018 19:24
c51774a
to
0a43e1c
Compare
@monojenkins build deb with monolite |
build |
@monojenkins commit apidiff |
marek-safar
approved these changes
May 25, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[System]: Epic: Client Certificate Support - Part Two.
This is the second and final part to bring Client Certificate support. It needs to be landed on top of #8753 and #8756.
Mono.Security.Interface.IMonoSslStream
: AddCanRenegotiate
andRenegotiateAsync()
.Mono.Security.Interface.MonoTlsSettings
: AddDisallowUnauthenticatedCertificateRequest
.AppleTlsContext
: fully support renegotiation.SslStatus.PeerAuthCompleted
andSslStatus.PeerClientCertRequested
during
Read()
. It should in theory not happen duringWrite()
, but I added it thereas well just to be on the safe side.
SetSessionOption()
may only be called before the initial handshake.MobileAuthenticatedStream
: this is the major part of the work and the most complex one.Operation
enum to keep track of what is going on and detect invalid state.operation is currently active.
InternalWrite()
may now be called fromSSLRead()
, the newOperation
tells us whatis currently happening.
ProcessHandshake()
now takes abool renegotiate
argument.ProcessRead()
andProcessWrite()
.MobileTlsContext.SelectClientCertificate()
: check forMonoTlsSettings.DisallowUnauthenticatedCertificateRequest
Tests have already been added to xamarin/web-tests@869370e, they will auto-enable themselves when using a Mono runtime that contains this code.
Implements #7075
Fixes #6498