-
Notifications
You must be signed in to change notification settings - Fork 526
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
SFTP failed with the error -41 working with Openssl #1356
Comments
Changed the following lines:
to :
This error went away. |
Can you provide your sftp demo? |
I have built libssh2 in conjunction with CURL, I can reproduce it with the curl command like "curl -k -v -u user:pswd sftp://localhost:22" |
I have exactly the same issue now. Really appreciate your help and suggestions. Symptoms: However, for API call libssh2_session_handshake() My code is same as this example: My libssh2 1.11.0 Windows build log:
|
I am too working in an application that is using the LIBSSH2 for providing the SFTP functionality. Having the same issue on Windows. |
@depenghu what is the value of |
@willco007 |
@dfandrich Any ideas on this one? |
Does anyone know the ETA of the official fix? Is there any workaround for the issue? I need these information in my project. Thanks. |
I have built libssh2-1.11.0 with Openssl3, the SFTP server is SSHD, the default algorithm is aes-256-gcm, the crypt method is "aes256-gcm@openssh.com".
In the _libssh2_cipher_crypt() function in openssl. c, the value of the "algo" parameter should be EVP_aes_256_gcm, so "is_aesgcm" should be 1, but in fact "algo" is not EVP_aes_256_gcm or EVP_aes_128_gcm, so "is_aesgcm" here is 0 and the decrypted data is incorrect, and the p->packet_length in _libssh2_transport_read() is a randomly large number and returns the error LIBSSH2_ERROR_OUT_OF_BOUNDARY.
I'm not sure why the function address of EVP_aes_256_gcm is different between compilation and runtime, when I call the "algo" function the return value seems to be correct, the nid is 901(NID_aes_256_gcm).
This only happens on Windows (VS2013).
Is this something to do with the build options?
The text was updated successfully, but these errors were encountered: