mirror of
https://github.com/libssh2/libssh2.git
synced 2026-01-06 14:21:57 +03:00
fix a couple of small regressions (#1004)
- openssl: fix potentially missing `ERR_*` constants by including `openssl/err.h`. This could happen with recent version of Xcode or when building against OpenSSL built with the `OPENSSL_NO_ENGINE` option. Regression from097c8f0dae(#789) - channel: fix an issue that would corrupt the data stream when attempting to initialize the agent in non-blocking mode, as it is necessary to propagate the `EAGAIN` signal upstream when the transport returns `EAGAIN`. Regression frombc4e619e76(#752) - packet: the current code does not set the state machine upon reaching this point which means that if the code is suspended due to the transport returning an `EAGAIN`, this will re-initialize the structure every time. The issue is that this keeps assigning a new channel-id downstream, which does not match the initial channel-id that is initially generated, causing a lookup later to fail as there is no matching channel. Regression frombc4e619e76(#752)
This commit is contained in:
@@ -1165,6 +1165,7 @@ static int channel_request_auth_agent(LIBSSH2_CHANNEL *channel,
|
||||
if(rc == LIBSSH2_ERROR_EAGAIN) {
|
||||
_libssh2_error(session, rc,
|
||||
"Would block sending auth-agent request");
|
||||
return rc;
|
||||
}
|
||||
else if(rc) {
|
||||
channel->req_auth_agent_state = libssh2_NB_state_idle;
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
#ifndef OPENSSL_NO_MD5
|
||||
#include <openssl/md5.h>
|
||||
#endif
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/bn.h>
|
||||
|
||||
@@ -1208,6 +1208,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data,
|
||||
sizeof(session->packAdd_authagent_state));
|
||||
|
||||
libssh2_packet_add_jump_authagent:
|
||||
session->packAdd_state = libssh2_NB_state_jumpauthagent;
|
||||
rc = packet_authagent_open(session, data, datalen,
|
||||
&session->packAdd_authagent_state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user