Skip to content

UWP support? #4

Closed
Closed

Description

@xied75

First of all, big welcome to migrate to GitHub!

The question is, how much effort would take to make a version for UWP? Is it in the team's pipe line?

Best wishes.

Activity

  1. drieseng commented on Mar 20, 2016

    @drieseng
    Member

    I'm active working on it.
    As a first step, I'm refactoring our cryptography classes into a separate assembly (and nuget).
    I'm almost done with this (locally).
    Once this is done, it should be relatively easy to get SSH.NET to compile as UWP/UAP library.

    To considered it done, I'd like to perform tests on Windows Mobile 10.
    Problem is that MS decided not to support the upgrade to Windows Mobile 10 for my device (Lumia 925) :(:(

  2. self-assigned this
    on Mar 20, 2016
  3. xied75 commented on Mar 21, 2016

    @xied75
    Author

    @drieseng As I understand there are two ways to make library for UWP:

    1, you create a UWP library project in VS 2015;
    2, you create a PCL project including support for UWP in VS 2015.

    Both way, you will see .NET api you can call is reduced a lot. But as long as you do as above, there is no need to test it on real hardware to be confident it is done.

    I got a 735 which will be upgraded to 10, so I can help testing it. :)

  4. xied75 commented on Apr 4, 2016

    @xied75
    Author

    @drieseng just to say I got Win 10 on my 735 over the weekend, so ready to do testing.

  5. drieseng commented on Apr 5, 2016

    @drieseng
    Member

    I'm using the new CoreFX libraries to bridge some of the gap between the UWP SDK and our specific needs. I have SSH.NET building just fine for UWP/UAP10.0, but CoreFX issue #7387 prevents me from testing it.

  6. codelabexpert commented on Apr 20, 2016

    @codelabexpert

    Hi,
    when UAP Support will be ready? I have problems to compile development branch... more than 35107 errors?

  7. drieseng commented on Apr 21, 2016

    @drieseng
    Member

    Sorry about that. I've started to move away from the (.NET Core) CoreFx libraries - as RC2 is still not available, and I still need to release a nuget for SshNet.Security.Cryptography. This is necessary because I moved some of our crypto stuff to a separate repo.

    Last week, I spent some time working on release automation. I'm sure to recover most of that time later, and at the same releasing new versions should become less of a burden.

    I'll make sure the development branch gets in a stable state this weekend.

  8. codelabexpert commented on Apr 23, 2016

    @codelabexpert

    @drieseng Thank you! I would be happy if I can compile the source.

  9. drieseng commented on Apr 24, 2016

    @drieseng
    Member

    I made a bad decision upgrading my dev machine to W10 build 14328.
    It broke virtualbox, and blue screens whenever I attempt to install the WP8 SDK.
    This means I cannot access my (Linux) VM to test SSH.NET, and I cannot use the VS 2012 solution.

    So I did not make as much progress as I hoped.
    The VS 2015 solution in the development branch should compile, but I can't guarantee more than that.

  10. codelabexpert commented on Apr 24, 2016

    @codelabexpert

    Hm, what I am doing wrong? I try to compile the Project in VS2015 Update 2 and get nearly 35000 Errors (Int32 not found, System not found and so on)...Do you have any ideas?

  11. drieseng commented on Apr 24, 2016

    @drieseng
    Member

    Can you check what version of the Microsoft ASP.NET and Web Tools you have installed ? I have version 14.1.20203.0.

    Also make sure you have at least version 3.4.0.798 of the NuGet Package Manager extension.

    Do you get any package restore errors ?

  12. codelabexpert commented on Apr 24, 2016

    @codelabexpert

    ssh_errors

    VS 2015 is up to date. I've attached a screenshot where you find all package restore errors.

  13. drieseng commented on Apr 25, 2016

    @drieseng
    Member

    I'll verify this later today, but I think I forgot to push my local changes :(

  14. codelabexpert commented on Apr 25, 2016

    @codelabexpert

    Ok! I am waiting... ;-)

  15. drieseng commented on Apr 25, 2016

    @drieseng
    Member

    I just pushed my changes, let me know if you have any issues building.
    Note that I'm 100% sure there are still issues actually using it.

  16. 3 remaining items

  17. drieseng commented on Apr 26, 2016

    @drieseng
    Member

    Yeah, just found out myself.
    Same lame bug exists in CanRead.
    I fixed both.
    This should get you at least a little bit further.

    Note that I still haven't been able to test with UWP.
    Hoping a new version of VirtualBox is available soon.

  18. codelabexpert commented on Apr 26, 2016

    @codelabexpert

    Ok, thank you.
    public BigInteger(byte[] value) needed a fix. Otherwise it runs in a IndexOutOfRangeException. Trying to connect to a server ends in "An established connection was aborted by the server.".

    Do you need VirtualBox? What about Hyper-V or Azure?

  19. drieseng commented on Apr 27, 2016

    @drieseng
    Member

    I don't necessarily need virtualbox, but that's what I chose to run my VM in.
    I could create a new one in Hyper-V or Azure, but I haven't yet had time to look into these.
    I have an Azure acount but never used it.

    As for the issue you ran into: I doubt it's a problem in BigInteger. I'm more inclined to think we did a partial read from a socket. Can you reproduce it using a public SSH server ?
    Can you also provide the full stack trace ?

  20. drieseng commented on Apr 27, 2016

    @drieseng
    Member

    Upgrading to a new W10 build and a daily build of VirtualBox fixed the VirtualBox issue.
    That should allow me to pick up speed.

    I've fixed the "BigInteger" problem - which was actually an issue in HashAlgorithmFactory.GenerateRandom(byte[]).
    I'll commit the fixed once I've added unit tests for this method.
    This should be tomorrow evening.

    If you can't wait that long, here's the fix:

    var buffer = Windows.Security.Cryptography.CryptographicBuffer.GenerateRandom((uint) data.Length);
    System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBufferExtensions.CopyTo(buffer, data);
  21. codelabexpert commented on Apr 27, 2016

    @codelabexpert

    You made my day! The fix did it. But what is the significant difference between
    System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBufferExtensions.CopyToand Windows.Security.Cryptography.CryptographicBuffer.CopyToByteArray?

  22. drieseng commented on Apr 28, 2016

    @drieseng
    Member

    We were not passing the data byte array by reference, and as such CopyToByteArray was not initializing the byte array that was passed to the GenerateRandom(byte[]) method.

    You'll find a much better explanation here.

  23. drieseng commented on Apr 28, 2016

    @drieseng
    Member

    I've now committed the fix, and corresponding unit tests.
    Haven't had time yet to do more fixing.
    Should have more time in the weekend.
    Let me know if ("when" is more approriate at this stage) you run into any issues.

  24. codelabexpert commented on May 4, 2016

    @codelabexpert

    I tested 6 days long and there where no issues. But there are a lot of features disabled. Some features need CoreFX RC 2+.

  25. drieseng commented on May 5, 2016

    @drieseng
    Member

    There are no SSH.NET features disabled at all for UWP.
    The FEATURE_* symbols that we use in our code are used to define the capabilities of each target framework. They do not define what features are available in SSH.NET.

    Example:
    For UWP applications, System.Threading.Thread.Sleep(int) is not available. Hence the FEATURE_THREAD_SLEEP symbol is not defined in our Renci.SshNet.UAP10 project.
    Instead we use System.Threading.Tasks.Task.Delay(millisecondsTimeout) for this purpose, as defined by the FEATURE_THREAD_TAP symbol.

    Does that make things more clear for you ?

  26. drieseng commented on Jun 19, 2016

    @drieseng
    Member

    I've just released SSH.NET 2016.0.0-beta1, which introduces support for UAP 10 / UWP.

  27. added this to the 2016.0.0-beta1 milestone on Jun 25, 2016
  28. Aerolyte commented on Jan 15, 2018

    @Aerolyte

    Hello i am having issue with SSH.net. I will really appreciate any advice:
    I get the following error: An attempt was made to access a socket in a way forbidden by its access permissions. I have looked online and there is no one actually dealing with this.The exact same code works in a standard Desktop App (WPF). What could be wrong, please?: (key = key.Replace("\r", "\n"); PrivateKeyFile(stringToStream(key)); client = new SshClient(ip, port, username, pkf); if (!client.IsConnected) { try { client.Connect(); connected = true; } catch (Exception ex) { exception = ex.Message.ToString(); connected = false; } })

  29. drieseng commented on Jan 15, 2018

    @drieseng
    Member

    Pretty sure this is a security issue. What capabilities is your application requesting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions