Skip to content

Improve error message on non-Windows when importing clixml with securestring - #7997

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:deserialize-securestring-error
Oct 12, 2018
Merged

Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:deserialize-securestring-error

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Oct 11, 2018 •

Copy link
Copy Markdown
Member

PR Summary

Currently, if you try to import clixml that contains a securestring, you get this error:

Import-Clixml : Unable to load shared library 'CRYPT32.dll' or one of its dependencies.

This dll is only available on Windows and causes confusion why it's not working. Change is to throw PlatformNotSupportedException on non-Windows.

PR Checklist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"Deserialization of SecureString is currently only supported on Windows." ?

@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the deserialize-securestring-error branch from cbb8ef4 to e0b5d1d Compare October 11, 2018 22:55
@TravisEz13
Travis Plunk (TravisEz13) merged commit b62e152 into PowerShell:master Oct 12, 2018
Aditya Patwardhan (adityapatwardhan) pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 9, 2019
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the deserialize-securestring-error branch March 10, 2020 21:01
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
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.

4 participants