Skip to content

add WebSocket server certificate validation for net452 #231

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

Merged
merged 3 commits into from
Jan 24, 2019
Merged

add WebSocket server certificate validation for net452 #231

merged 3 commits into from
Jan 24, 2019

Conversation

xinyanmsft
Copy link
Contributor

For WebSocket, the server certificate validation does not work with net452. This is due to WebSocketOptions.RemoteCertificateValidationCallback not available to net452.

This change hooks up the global System.Net.ServicePointManager.ServerCertificateValidationCallback when on net452 to handle server certificate validation.

when multiple call to GetStream happens around the same time, on the
same inputIndex, a race condition will cause this.buffers.Add() to throw
exception.
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 24, 2019
@tg123
Copy link
Member

tg123 commented Jan 24, 2019

/LGTM

seems have to use global ServerCertificateValidationCallback
the nuget package is only targeting netstandard1.4;netcoreapp2.1

I am working azure pipeline to add net452 target

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2019
@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, xinyanmsft

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 24, 2019
@k8s-ci-robot k8s-ci-robot merged commit 29b0662 into kubernetes-client:master Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants