| 5520 |
char *emsg, emsg_tmp[1024]; // error message |
char *emsg, emsg_tmp[1024]; // error message |
| 5521 |
int ret, hashlen; |
int ret, hashlen; |
| 5522 |
Key *hostkey; // hostkey |
Key *hostkey; // hostkey |
| 5523 |
|
BOOL result = FALSE; |
| 5524 |
|
|
| 5525 |
logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_KEXDH_REPLY was received."); |
logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_KEXDH_REPLY was received."); |
| 5526 |
|
|
| 5706 |
SSH2_dispatch_add_message(SSH2_MSG_IGNORE); // XXX: Tru64 UNIX workaround (2005.3.5 yutaka) |
SSH2_dispatch_add_message(SSH2_MSG_IGNORE); // XXX: Tru64 UNIX workaround (2005.3.5 yutaka) |
| 5707 |
SSH2_dispatch_add_message(SSH2_MSG_DEBUG); |
SSH2_dispatch_add_message(SSH2_MSG_DEBUG); |
| 5708 |
|
|
| 5709 |
BN_free(dh_server_pub); |
result = TRUE; |
|
DH_free(pvar->kexdh); pvar->kexdh = NULL; |
|
|
key_free(hostkey); |
|
|
if (dh_buf != NULL) free(dh_buf); |
|
|
return TRUE; |
|
| 5710 |
|
|
| 5711 |
error: |
error: |
| 5712 |
BN_free(dh_server_pub); |
BN_free(dh_server_pub); |
| 5713 |
DH_free(pvar->kexdh); pvar->kexdh = NULL; |
DH_free(pvar->kexdh); pvar->kexdh = NULL; |
| 5714 |
key_free(hostkey); |
key_free(hostkey); |
| 5715 |
if (dh_buf != NULL) free(dh_buf); |
free(dh_buf); |
| 5716 |
BN_free(share_key); |
BN_free(share_key); |
| 5717 |
|
|
| 5718 |
notify_fatal_error(pvar, emsg, TRUE); |
if (result == FALSE) |
| 5719 |
|
notify_fatal_error(pvar, emsg, TRUE); |
| 5720 |
|
|
| 5721 |
return FALSE; |
return result; |
| 5722 |
} |
} |
| 5723 |
|
|
| 5724 |
|
|
| 5743 |
char *emsg, emsg_tmp[1024]; // error message |
char *emsg, emsg_tmp[1024]; // error message |
| 5744 |
int ret, hashlen; |
int ret, hashlen; |
| 5745 |
Key *hostkey = NULL; // hostkey |
Key *hostkey = NULL; // hostkey |
| 5746 |
|
BOOL result = FALSE; |
| 5747 |
|
|
| 5748 |
logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_KEX_DH_GEX_REPLY was received."); |
logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_KEX_DH_GEX_REPLY was received."); |
| 5749 |
|
|
| 5938 |
SSH2_dispatch_add_message(SSH2_MSG_IGNORE); // XXX: Tru64 UNIX workaround (2005.3.5 yutaka) |
SSH2_dispatch_add_message(SSH2_MSG_IGNORE); // XXX: Tru64 UNIX workaround (2005.3.5 yutaka) |
| 5939 |
SSH2_dispatch_add_message(SSH2_MSG_DEBUG); |
SSH2_dispatch_add_message(SSH2_MSG_DEBUG); |
| 5940 |
|
|
| 5941 |
BN_free(dh_server_pub); |
result = TRUE; |
|
DH_free(pvar->kexdh); pvar->kexdh = NULL; |
|
|
key_free(hostkey); |
|
|
if (dh_buf != NULL) free(dh_buf); |
|
|
return TRUE; |
|
| 5942 |
|
|
| 5943 |
error: |
error: |
| 5944 |
BN_free(dh_server_pub); |
BN_free(dh_server_pub); |
| 5945 |
DH_free(pvar->kexdh); pvar->kexdh = NULL; |
DH_free(pvar->kexdh); pvar->kexdh = NULL; |
| 5946 |
key_free(hostkey); |
key_free(hostkey); |
| 5947 |
if (dh_buf != NULL) free(dh_buf); |
free(dh_buf); |
| 5948 |
BN_free(share_key); |
BN_free(share_key); |
| 5949 |
|
|
| 5950 |
notify_fatal_error(pvar, emsg, TRUE); |
if (result == FALSE) |
| 5951 |
|
notify_fatal_error(pvar, emsg, TRUE); |
| 5952 |
|
|
| 5953 |
return FALSE; |
return result; |
| 5954 |
} |
} |
| 5955 |
|
|
| 5956 |
|
|
| 5974 |
char *emsg, emsg_tmp[1024]; // error message |
char *emsg, emsg_tmp[1024]; // error message |
| 5975 |
int ret, hashlen; |
int ret, hashlen; |
| 5976 |
Key *hostkey = NULL; // hostkey |
Key *hostkey = NULL; // hostkey |
| 5977 |
|
BOOL result = FALSE; |
| 5978 |
|
|
| 5979 |
logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_KEX_ECDH_REPLY was received."); |
logputs(LOG_LEVEL_VERBOSE, "SSH2_MSG_KEX_ECDH_REPLY was received."); |
| 5980 |
|
|
| 6182 |
SSH2_dispatch_add_message(SSH2_MSG_IGNORE); // XXX: Tru64 UNIX workaround (2005.3.5 yutaka) |
SSH2_dispatch_add_message(SSH2_MSG_IGNORE); // XXX: Tru64 UNIX workaround (2005.3.5 yutaka) |
| 6183 |
SSH2_dispatch_add_message(SSH2_MSG_DEBUG); |
SSH2_dispatch_add_message(SSH2_MSG_DEBUG); |
| 6184 |
|
|
| 6185 |
EC_KEY_free(pvar->ecdh_client_key); pvar->ecdh_client_key = NULL; |
result = TRUE; |
|
EC_POINT_clear_free(server_public); |
|
|
key_free(hostkey); |
|
|
if (ecdh_buf != NULL) free(ecdh_buf); |
|
|
return TRUE; |
|
| 6186 |
|
|
| 6187 |
error: |
error: |
|
EC_POINT_clear_free(server_public); |
|
| 6188 |
EC_KEY_free(pvar->ecdh_client_key); pvar->ecdh_client_key = NULL; |
EC_KEY_free(pvar->ecdh_client_key); pvar->ecdh_client_key = NULL; |
| 6189 |
|
EC_POINT_clear_free(server_public); |
| 6190 |
key_free(hostkey); |
key_free(hostkey); |
| 6191 |
if (ecdh_buf != NULL) free(ecdh_buf); |
free(ecdh_buf); |
| 6192 |
BN_free(share_key); |
BN_free(share_key); |
| 6193 |
|
|
| 6194 |
notify_fatal_error(pvar, emsg, TRUE); |
if (result == FALSE) |
| 6195 |
|
notify_fatal_error(pvar, emsg, TRUE); |
| 6196 |
|
|
| 6197 |
return FALSE; |
return result; |
| 6198 |
} |
} |
| 6199 |
|
|
| 6200 |
|
|