12,967
回編集
741行目: | 741行目: | ||
int rc = 0; | int rc = 0; | ||
do { | do { | ||
rc = libssh2_session_handshake( | rc = libssh2_session_handshake(m_Session, m_Socket->socketDescriptor()); | ||
} while (rc == LIBSSH2_ERROR_EAGAIN); | } while (rc == LIBSSH2_ERROR_EAGAIN); | ||
764行目: | 764行目: | ||
rc = libssh2_userauth_publickey_fromfile(m_Session, | rc = libssh2_userauth_publickey_fromfile(m_Session, | ||
m_User.toUtf8().constData(), | m_User.toUtf8().constData(), | ||
"", // クライアントPCに秘密鍵があり、 | |||
// リモートPC側に公開鍵が設置されている場合 | |||
m_PrivateKey.toUtf8().constData(), | m_PrivateKey.toUtf8().constData(), | ||
m_Passphrase.toUtf8().constData()); | m_Passphrase.isEmpty() ? nullptr : m_Passphrase.toUtf8().constData()); | ||
} while (rc == LIBSSH2_ERROR_EAGAIN); | } while (rc == LIBSSH2_ERROR_EAGAIN); | ||