1
1
returns error when no cryptographic context is available
Этот коммит содержится в:
Aris Adamantiadis 2010-08-28 23:35:59 +02:00
родитель 1fa9409554
Коммит c1efcd28f5

Просмотреть файл

@ -835,8 +835,11 @@ int ssh_get_pubkey_hash(ssh_session session, unsigned char **hash) {
if (session == NULL || hash == NULL) { if (session == NULL || hash == NULL) {
return -1; return -1;
} }
*hash = NULL; *hash = NULL;
if (session->current_crypto == NULL ||
session->current_crypto->server_pubkey == NULL){
ssh_set_error(session,SSH_FATAL,"No current cryptographic context");
}
h = malloc(sizeof(unsigned char *) * MD5_DIGEST_LEN); h = malloc(sizeof(unsigned char *) * MD5_DIGEST_LEN);
if (h == NULL) { if (h == NULL) {