ソースを参照

Disabling code for OpenSSH certificate host verification

Source commit: 6bcc426ae8a347c2142cf004e1c082b8b0e01603
Martin Prikryl 2 年 前
コミット
2507a7df83

+ 2 - 0
source/putty/crypto/openssh-certs.c

@@ -1,3 +1,4 @@
+#ifndef WINSCP
 /*
  * Public key type for OpenSSH certificates.
  */
@@ -1222,3 +1223,4 @@ static void opensshcert_sign(ssh_key *key, ptrlen data, unsigned flags,
     opensshcert_key *ck = container_of(key, opensshcert_key, sshk);
     ssh_key_sign(ck->basekey, data, flags, bs);
 }
+#endif

+ 9 - 8
source/putty/ssh/transport2.h

@@ -59,15 +59,16 @@ struct kexinit_algorithm_list {
     X(HK_RSA, ssh_rsa_sha512)                                   \
     X(HK_RSA, ssh_rsa_sha256)                                   \
     X(HK_RSA, ssh_rsa)                                          \
-    X(HK_ED25519, opensshcert_ssh_ecdsa_ed25519)                \
+    /* WINSCP */ \
+    /*X(HK_ED25519, opensshcert_ssh_ecdsa_ed25519)*/                \
     /* OpenSSH defines no certified version of Ed448 */         \
-    X(HK_ECDSA, opensshcert_ssh_ecdsa_nistp256)                 \
-    X(HK_ECDSA, opensshcert_ssh_ecdsa_nistp384)                 \
-    X(HK_ECDSA, opensshcert_ssh_ecdsa_nistp521)                 \
-    X(HK_DSA, opensshcert_ssh_dsa)                              \
-    X(HK_RSA, opensshcert_ssh_rsa_sha512)                       \
-    X(HK_RSA, opensshcert_ssh_rsa_sha256)                       \
-    X(HK_RSA, opensshcert_ssh_rsa)                              \
+    /*X(HK_ECDSA, opensshcert_ssh_ecdsa_nistp256)*/                 \
+    /*X(HK_ECDSA, opensshcert_ssh_ecdsa_nistp384)*/                 \
+    /*X(HK_ECDSA, opensshcert_ssh_ecdsa_nistp521)*/                 \
+    /*X(HK_DSA, opensshcert_ssh_dsa)*/                              \
+    /*X(HK_RSA, opensshcert_ssh_rsa_sha512)*/                       \
+    /*X(HK_RSA, opensshcert_ssh_rsa_sha256)*/                       \
+    /*X(HK_RSA, opensshcert_ssh_rsa)*/                              \
     /* end of list */
 #define COUNT_HOSTKEY_ALGORITHM(type, alg) +1
 #define N_HOSTKEY_ALGORITHMS (0 HOSTKEY_ALGORITHMS(COUNT_HOSTKEY_ALGORITHM))

+ 2 - 0
source/putty/sshpubk.c

@@ -618,6 +618,7 @@ const ssh_keyalg *const all_keyalgs[] = {
     &ssh_ecdsa_nistp521,
     &ssh_ecdsa_ed25519,
     &ssh_ecdsa_ed448,
+#ifndef WINSCP
     &opensshcert_ssh_dsa,
     &opensshcert_ssh_rsa,
     &opensshcert_ssh_rsa_sha256,
@@ -626,6 +627,7 @@ const ssh_keyalg *const all_keyalgs[] = {
     &opensshcert_ssh_ecdsa_nistp256,
     &opensshcert_ssh_ecdsa_nistp384,
     &opensshcert_ssh_ecdsa_nistp521,
+#endif
 };
 const size_t n_keyalgs = lenof(all_keyalgs);