diff --git a/src/hostkey.c b/src/hostkey.c index 3d5bb9cd..07ad53a7 100644 --- a/src/hostkey.c +++ b/src/hostkey.c @@ -567,11 +567,9 @@ LIBSSH2_API const char *libssh2_hostkey_hash(LIBSSH2_SESSION *session, int hash_ return (char *)session->server_hostkey_md5; break; #endif /* ! OPENSSL_NO_MD5 */ -#ifndef OPENSSL_NO_SHA case LIBSSH2_HOSTKEY_HASH_SHA1: return (char *)session->server_hostkey_sha1; break; -#endif /* ! OPENSSL_NO_SHA */ default: return NULL; } diff --git a/src/kex.c b/src/kex.c index 9b3fd483..3eadf27c 100644 --- a/src/kex.c +++ b/src/kex.c @@ -178,7 +178,6 @@ static int libssh2_kex_method_diffie_hellman_groupGP_sha1_key_exchange(LIBSSH2_S #endif /* LIBSSH2_DEBUG_KEX */ #endif /* ! OPENSSL_NO_MD5 */ -#ifndef OPENSSL_NO_SHA { 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); } #endif /* LIBSSH2_DEBUG_KEX */ -#endif /* ! OPENSSL_NO_SHA */ 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); diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 9edc0751..adb49d4a 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -46,9 +46,7 @@ #include #endif #include -#ifndef OPENSSL_NO_SHA #include -#endif #ifndef OPENSSL_NO_MD5 #include #endif @@ -212,9 +210,7 @@ struct _LIBSSH2_SESSION { #ifndef OPENSSL_NO_MD5 unsigned char server_hostkey_md5[MD5_DIGEST_LENGTH]; #endif /* ! OPENSSL_NO_MD5 */ -#ifndef OPENSSL_NO_SHA unsigned char server_hostkey_sha1[SHA_DIGEST_LENGTH]; -#endif /* (remote as source of data -- packet_read ) */ libssh2_endpoint_data remote;