mike-jumper commented on code in PR #538: URL: https://github.com/apache/guacamole-server/pull/538#discussion_r1732261409
########## src/protocols/ssh/ssh.c: ########## @@ -134,33 +134,34 @@ static guac_common_ssh_user* guac_ssh_get_user(guac_client* client) { guac_client_log(client, GUAC_LOG_INFO, "Auth key successfully imported."); - } /* end if key given */ + /* Import public key, if available. */ + if (settings->public_key_base64 != NULL) { - if (settings->public_key_base64 != NULL) { + guac_client_log(client, GUAC_LOG_DEBUG, + "Attempting public key import"); - guac_client_log(client, GUAC_LOG_DEBUG, - "Attempting public key import"); + /* Attempt to read public key */ + if (guac_common_ssh_user_import_public_key(user, + settings->public_key_base64)) { - /* Attempt to read public key */ - if (guac_common_ssh_user_import_public_key(user, - settings->public_key_base64)) { + /* If failing*/ + guac_client_abort(client, Review Comment: Indentation got skewed here, too. ########## src/protocols/vnc/vnc.c: ########## @@ -397,6 +397,33 @@ void* guac_vnc_client_thread(void* data) { return NULL; } + /* Import the public key, if that is specified. */ + if (settings->sftp_public_key != NULL) { + + guac_client_log(client, GUAC_LOG_DEBUG, + "Attempting public key import"); + + /* Attempt to read public key */ + if (guac_common_ssh_user_import_public_key(vnc_client->sftp_user, + settings->sftp_public_key)) { + + /* Public key import fails. */ + guac_client_abort(client, Review Comment: :upside_down_face: ########## src/protocols/rdp/rdp.c: ########## @@ -800,6 +800,33 @@ void* guac_rdp_client_thread(void* data) { return NULL; } + /* Import the public key, if that is specified. */ + if (settings->sftp_public_key != NULL) { + + guac_client_log(client, GUAC_LOG_DEBUG, + "Attempting public key import"); + + /* Attempt to read public key */ + if (guac_common_ssh_user_import_public_key(rdp_client->sftp_user, + settings->sftp_public_key)) { + + /* Public key import fails. */ + guac_client_abort(client, Review Comment: Indentation went slightly wonky here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org