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

Is this library supported on Android? #42

Closed
HubKing opened this issue Apr 2, 2017 · 6 comments
Closed

Is this library supported on Android? #42

HubKing opened this issue Apr 2, 2017 · 6 comments

Comments

@HubKing
Copy link

HubKing commented Apr 2, 2017

I could not find any example, so I just guessed how it would work, and wrote the following code.

SMBClient client = new SMBClient();
Log.d(TAG, "Trying to connect");
Connection conn = client.connect(ServerIP);
AuthenticationContext auth = new AuthenticationContext(ID, Password.toCharArray(), null);
Log.d(TAG, "Trying to authenticate");
Session ses = conn.authenticate(auth);

But authenticate() threw an exception.

com.hierynomus.ntlm.NtlmException: java.security.NoSuchAlgorithmException: no such algorithm: MD4 for provider BC

Did I do something wrong, or is this library not supported on Android?

@hierynomus
Copy link
Owner

hierynomus commented Apr 2, 2017 via email

@zuoshui
Copy link

zuoshui commented Apr 5, 2017

Hi hierynomus,
I use this demo to list, it return NT Status: STATUS_ACCESS_DENIED (0xc0000022)

32 7.305456 192.168.1.110 192.168.1.10 SMB2 156 Find Request File: SMB2_FIND_ID_BOTH_DIRECTORY_INFO Pattern: *

33 7.308874 192.168.1.10 192.168.1.110 SMB2 131 Find Response, Error: STATUS_ACCESS_DENIED

what the reason? @hierynomus

@hierynomus
Copy link
Owner

It most probably got to do with signatures being not sent. Can you give it a try with the current master?

@hierynomus
Copy link
Owner

@HubKing This should be fixed with the next release with the introduction of our own abstraction over SecurityProvider (b01ac77). You could try building the latest master in order to verify whether this fixes it.

@hierynomus
Copy link
Owner

@HubKing Have you tried building a recent master version to check whether it works on Android?

@hierynomus
Copy link
Owner

Released 0.1.0 which contains these fixes, closing the issue

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

No branches or pull requests

3 participants