Commit 3433acd9 by Miguel Arroz

Wrap newer hostkeys in #ifdefs

This allows the library to be built using a pre-1.9.0 version of libssh2.
parent ed7b20e7
...@@ -580,6 +580,8 @@ post_extract: ...@@ -580,6 +580,8 @@ post_extract:
case LIBSSH2_HOSTKEY_TYPE_DSS: case LIBSSH2_HOSTKEY_TYPE_DSS:
cert.raw_type = GIT_CERT_SSH_RAW_TYPE_DSS; cert.raw_type = GIT_CERT_SSH_RAW_TYPE_DSS;
break; break;
#ifdef LIBSSH2_HOSTKEY_TYPE_ECDSA_256
case LIBSSH2_HOSTKEY_TYPE_ECDSA_256: case LIBSSH2_HOSTKEY_TYPE_ECDSA_256:
cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_256; cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_256;
break; break;
...@@ -589,9 +591,13 @@ post_extract: ...@@ -589,9 +591,13 @@ post_extract:
case LIBSSH2_KNOWNHOST_KEY_ECDSA_521: case LIBSSH2_KNOWNHOST_KEY_ECDSA_521:
cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_521; cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ECDSA_521;
break; break;
#endif
#ifdef LIBSSH2_HOSTKEY_TYPE_ED25519
case LIBSSH2_HOSTKEY_TYPE_ED25519: case LIBSSH2_HOSTKEY_TYPE_ED25519:
cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ED25519; cert.raw_type = GIT_CERT_SSH_RAW_TYPE_KEY_ED25519;
break; break;
#endif
default: default:
cert.raw_type = GIT_CERT_SSH_RAW_TYPE_UNKNOWN; cert.raw_type = GIT_CERT_SSH_RAW_TYPE_UNKNOWN;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment