Skip to content
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

Consider changing calls from GetNonZeroBytes to GetBytes #4377

Closed
GrabYourPitchforks opened this issue Sep 25, 2020 · 3 comments
Closed

Consider changing calls from GetNonZeroBytes to GetBytes #4377

GrabYourPitchforks opened this issue Sep 25, 2020 · 3 comments
Milestone

Comments

@GrabYourPitchforks
Copy link
Member

The file https://github.com/dotnet/wcf/blob/master/src/System.Private.ServiceModel/src/System/ServiceModel/Security/WSTrust.cs contains two calls to RandomNumberGenerator.GetNonZeroBytes. Is it intentional that this code use GetNonZeroBytes over the preferred API RandomNumberGenerator.GetBytes? Using GetNonZeroBytes reduces entropy somewhat, so it should only be used when the caller absolutely needs to prevent any zero bytes from being included in the buffer.

@mconnew
Copy link
Member

mconnew commented Oct 2, 2020

This is actually dead code, this method was pulled in by mistake and is only used in NetFx by server side code. So the action here is to remove the the entire ProcessRstAndIssueKey method.

@HongGit HongGit added this to the 6.0 milestone Oct 15, 2020
@HongGit
Copy link
Contributor

HongGit commented Oct 15, 2020

@imcarolwang could try to submit a PR for this issue?

@mconnew
Copy link
Member

mconnew commented Oct 16, 2020

This is now fixed

@mconnew mconnew closed this as completed Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants