neosmart / SecureStore

A .NET implementation of the cross-platform SecureStore (symmetrically-encrypted secrets) protocol
MIT License
96 stars 15 forks source link

LoadKeyFromStream doesn't work #16

Closed ae-vivanov closed 8 months ago

ae-vivanov commented 8 months ago

Hey guys, I'm trying to load a secrets key file from stream, but it always fails with InvalidKeyFileException. I spend some time on debugging and found that when you copy the input stream in LoadKeyFromStream method, you don't reset the position and PemReader is the local memory stream. Do you guys accept pull requests, is there guidelines for your team or should I wait when you fix it yourself?

mqudsi commented 8 months ago

Sorry you ran into an issue with the library! This should definitely be included in the unit tests. I'm happy to take a PR from you if you can open one.

mqudsi commented 8 months ago

I just pushed out version 1.2.1 to nuget with your fix. Thank you very much! https://www.nuget.org/packages/SecureStore