Skip to content

Add SHA-2 self-signed cert and use SecureString as password parameter #1656

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 2 commits into from
Jun 24, 2021

Conversation

ciaozhang
Copy link
Contributor

@ciaozhang ciaozhang commented Jun 23, 2021

Fix security bugs:

  1. Do not use weak crypt algorithm:
    Using SHA256 and create a new self-signed cert
  2. Do not use plain password in PKIs
    Using SecureString as password parameter

@SameerK-MSFT
Copy link

LGTM. I will leave it to someone in Wilson team to sign off.

"_justification": "File contains tokens that are used only for testing purposes."
}
]
"suppressions": [
Copy link
Member

Choose a reason for hiding this comment

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

nit: indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch.

private static SecureString ConvertToSecureString(string password)
{
if (password == null)
throw new ArgumentNullException("password");
Copy link
Member

@GeoK GeoK Jun 24, 2021

Choose a reason for hiding this comment

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

nit: can be replaced with nameof(password)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@ciaozhang ciaozhang merged commit b263ec3 into dev Jun 24, 2021
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

Successfully merging this pull request may close these issues.

None yet

5 participants