1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-12 15:41:16 +03:00

cleanup: use ssh_ prefix in the dh (non-static) functions

Having "ssh_" prefix in the functions' name will avoid possible clashes
when compiling libssh statically.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Fabiano Fidêncio
2015-09-17 10:26:05 +02:00
parent 501faacf8e
commit c487f5db5b
7 changed files with 50 additions and 50 deletions

View File

@@ -160,7 +160,7 @@ static int ssh_server_kexdh_init(ssh_session session, ssh_buffer packet){
ssh_set_error(session, SSH_FATAL, "No e number in client request");
return -1;
}
if (dh_import_e(session, e) < 0) {
if (ssh_dh_import_e(session, e) < 0) {
ssh_set_error(session, SSH_FATAL, "Cannot import e number");
session->session_state=SSH_SESSION_STATE_ERROR;
} else {
@@ -258,7 +258,7 @@ int ssh_get_key_params(ssh_session session, ssh_key *privkey){
return -1;
}
dh_import_pubkey(session, pubkey_blob);
ssh_dh_import_pubkey(session, pubkey_blob);
return SSH_OK;
}
@@ -268,16 +268,16 @@ static int dh_handshake_server(ssh_session session) {
ssh_string f;
int rc;
if (dh_generate_y(session) < 0) {
if (ssh_dh_generate_y(session) < 0) {
ssh_set_error(session, SSH_FATAL, "Could not create y number");
return -1;
}
if (dh_generate_f(session) < 0) {
if (ssh_dh_generate_f(session) < 0) {
ssh_set_error(session, SSH_FATAL, "Could not create f number");
return -1;
}
f = dh_get_f(session);
f = ssh_dh_get_f(session);
if (f == NULL) {
ssh_set_error(session, SSH_FATAL, "Could not get the f number");
return -1;
@@ -288,13 +288,13 @@ static int dh_handshake_server(ssh_session session) {
return -1;
}
if (dh_build_k(session) < 0) {
if (ssh_dh_build_k(session) < 0) {
ssh_set_error(session, SSH_FATAL, "Could not import the public key");
ssh_string_free(f);
return -1;
}
if (make_sessionid(session) != SSH_OK) {
if (ssh_make_sessionid(session) != SSH_OK) {
ssh_set_error(session, SSH_FATAL, "Could not create a session id");
ssh_string_free(f);
return -1;
@@ -432,7 +432,7 @@ static void ssh_server_connection_callback(ssh_session session){
break;
case SSH_SESSION_STATE_DH:
if(session->dh_handshake_state==DH_STATE_FINISHED){
if (generate_session_keys(session) < 0) {
if (ssh_generate_session_keys(session) < 0) {
goto error;
}