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

ConfigFile: password encryption does not work on specific machine con… #1347

Merged
merged 3 commits into from
Jan 5, 2016

Conversation

haraldsteinlechner
Copy link
Contributor

This pull request solves issue #1346

Note that i did not change DataProtectionScopes for decryption. This is is the minimal change i know which works (i think decrpytion ignores this).
The docs do not say anything about this: e.g. https://msdn.microsoft.com/en-us/library/2fh8203k(v=vs.110).aspx

…figurations. This is the minimal fix to make password encryption work in our environment. seealso issue: fsprojects#1346
@forki
Copy link
Member

forki commented Jan 5, 2016

mhm this doesn't work on travis!?

@haraldsteinlechner
Copy link
Contributor Author

ah ok. awesome. no solution works on all configurations. We could do a simple probing - handle exception and try in local machine mode if user mode fails. what you think?

@forki
Copy link
Member

forki commented Jan 5, 2016

sounds good. whatever works to make it work for more people is fine

… user encryption scope and local machine if attempt fails)
@haraldsteinlechner
Copy link
Contributor Author

works now

try
ProtectedData.Protect(Encoding.UTF8.GetBytes password, salt, DataProtectionScope.CurrentUser)
with | :? CryptographicException as e ->
traceWarnfn "could not protect password: %s\n for current user" e.Message
Copy link
Member

Choose a reason for hiding this comment

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

i think a verbosefn might be enough here

forki added a commit that referenced this pull request Jan 5, 2016
ConfigFile: password encryption does not work on specific machine con…
@forki forki merged commit af7bb6f into fsprojects:master Jan 5, 2016
@forki
Copy link
Member

forki commented Jan 5, 2016

thanks a lot

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