Remove unfinished OPENSSL_NO_SHA ifdef stuff, since SHA-1 is required for libssh2 to work.
This commit is contained in:
parent
8a2421bad1
commit
677005375b
@ -567,11 +567,9 @@ LIBSSH2_API const char *libssh2_hostkey_hash(LIBSSH2_SESSION *session, int hash_
|
|||||||
return (char *)session->server_hostkey_md5;
|
return (char *)session->server_hostkey_md5;
|
||||||
break;
|
break;
|
||||||
#endif /* ! OPENSSL_NO_MD5 */
|
#endif /* ! OPENSSL_NO_MD5 */
|
||||||
#ifndef OPENSSL_NO_SHA
|
|
||||||
case LIBSSH2_HOSTKEY_HASH_SHA1:
|
case LIBSSH2_HOSTKEY_HASH_SHA1:
|
||||||
return (char *)session->server_hostkey_sha1;
|
return (char *)session->server_hostkey_sha1;
|
||||||
break;
|
break;
|
||||||
#endif /* ! OPENSSL_NO_SHA */
|
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,6 @@ static int libssh2_kex_method_diffie_hellman_groupGP_sha1_key_exchange(LIBSSH2_S
|
|||||||
#endif /* LIBSSH2_DEBUG_KEX */
|
#endif /* LIBSSH2_DEBUG_KEX */
|
||||||
#endif /* ! OPENSSL_NO_MD5 */
|
#endif /* ! OPENSSL_NO_MD5 */
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_SHA
|
|
||||||
{
|
{
|
||||||
SHA_CTX fingerprint_ctx;
|
SHA_CTX fingerprint_ctx;
|
||||||
|
|
||||||
@ -197,7 +196,6 @@ static int libssh2_kex_method_diffie_hellman_groupGP_sha1_key_exchange(LIBSSH2_S
|
|||||||
_libssh2_debug(session, LIBSSH2_DBG_KEX, "Server's SHA1 Fingerprint: %s", fingerprint);
|
_libssh2_debug(session, LIBSSH2_DBG_KEX, "Server's SHA1 Fingerprint: %s", fingerprint);
|
||||||
}
|
}
|
||||||
#endif /* LIBSSH2_DEBUG_KEX */
|
#endif /* LIBSSH2_DEBUG_KEX */
|
||||||
#endif /* ! OPENSSL_NO_SHA */
|
|
||||||
|
|
||||||
if (session->hostkey->init(session, session->server_hostkey, session->server_hostkey_len, &session->server_hostkey_abstract)) {
|
if (session->hostkey->init(session, session->server_hostkey, session->server_hostkey_len, &session->server_hostkey_abstract)) {
|
||||||
libssh2_error(session, LIBSSH2_ERROR_HOSTKEY_INIT, "Unable to initialize hostkey importer", 0);
|
libssh2_error(session, LIBSSH2_ERROR_HOSTKEY_INIT, "Unable to initialize hostkey importer", 0);
|
||||||
|
@ -46,9 +46,7 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#ifndef OPENSSL_NO_SHA
|
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
#endif
|
|
||||||
#ifndef OPENSSL_NO_MD5
|
#ifndef OPENSSL_NO_MD5
|
||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
#endif
|
#endif
|
||||||
@ -212,9 +210,7 @@ struct _LIBSSH2_SESSION {
|
|||||||
#ifndef OPENSSL_NO_MD5
|
#ifndef OPENSSL_NO_MD5
|
||||||
unsigned char server_hostkey_md5[MD5_DIGEST_LENGTH];
|
unsigned char server_hostkey_md5[MD5_DIGEST_LENGTH];
|
||||||
#endif /* ! OPENSSL_NO_MD5 */
|
#endif /* ! OPENSSL_NO_MD5 */
|
||||||
#ifndef OPENSSL_NO_SHA
|
|
||||||
unsigned char server_hostkey_sha1[SHA_DIGEST_LENGTH];
|
unsigned char server_hostkey_sha1[SHA_DIGEST_LENGTH];
|
||||||
#endif
|
|
||||||
|
|
||||||
/* (remote as source of data -- packet_read ) */
|
/* (remote as source of data -- packet_read ) */
|
||||||
libssh2_endpoint_data remote;
|
libssh2_endpoint_data remote;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user