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

Only change TLS settings if required #31

Merged
merged 2 commits into from
Dec 11, 2018

Conversation

PaulWalkerUK
Copy link
Contributor

During module initialisation, calls are made to Get-SXApi to see if it works without manually enabling TLS v1.2. If it does work - fine, carry on as normal. If it doesn't work, and TLS v1.2 needs to be manually set, then this is done only at the start of each API call, then is reset again immediately afterwards, thus not making any lasting changes to the PowerShell session. (Fixes #21 - again, but this time better in I think 😉)

To facilitate this, the calls to the API have been extracted to a new private function Get-SXData - fixes #2

During module initialisation, calls are made to Get-SXApi to see if
it works without manually enabling TLS v1.2. If it does work - fine,
carry on as normal. If it doesn't work, and TLS v1.2 needs to be
manually set, then this is done only at the start of each API call, then
is reset again immediately afterwards, thus not making any lasting
changes to the PowerShell session.

To facilitate this, the calls to the API have been extracted to a new
private function `Get-SXData`.
Copy link
Owner

@lazywinadmin lazywinadmin left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@lazywinadmin lazywinadmin merged commit 89b40bd into lazywinadmin:dev Dec 11, 2018
@PaulWalkerUK PaulWalkerUK deleted the issue-21-v2 branch December 11, 2018 22:02
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.

2 participants