summaryrefslogtreecommitdiff
path: root/myproposal.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2019-11-18 22:22:04 +1100
committerDamien Miller <djm@mindrot.org>2019-11-18 22:23:05 +1100
commit6a7ef310da100f876a257b7367e3b0766dac3994 (patch)
tree1947d7210c4d0f16d1a9a8a403df2847978dff03 /myproposal.h
parent64f56f1d1af3947a71a4c391f2c08747d19ee591 (diff)
filter PUBKEY_DEFAULT_PK_ALG for ECC algorithms
Remove ECC algorithms from the PUBKEY_DEFAULT_PK_ALG list when compiling without ECC support in libcrypto.
Diffstat (limited to 'myproposal.h')
-rw-r--r--myproposal.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/myproposal.h b/myproposal.h
index 90bb67bb3..1d4aa297a 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -31,35 +31,41 @@
31/* conditional algorithm support */ 31/* conditional algorithm support */
32 32
33#ifdef OPENSSL_HAS_ECC 33#ifdef OPENSSL_HAS_ECC
34#ifdef OPENSSL_HAS_NISTP521 34# ifdef OPENSSL_HAS_NISTP521
35# define KEX_ECDH_METHODS \ 35# define KEX_ECDH_METHODS \
36 "ecdh-sha2-nistp256," \ 36 "ecdh-sha2-nistp256," \
37 "ecdh-sha2-nistp384," \ 37 "ecdh-sha2-nistp384," \
38 "ecdh-sha2-nistp521," 38 "ecdh-sha2-nistp521,"
39# define HOSTKEY_ECDSA_CERT_METHODS \ 39# define HOSTKEY_ECDSA_CERT_METHODS \
40 "ecdsa-sha2-nistp256-cert-v01@openssh.com," \ 40 "ecdsa-sha2-nistp256-cert-v01@openssh.com," \
41 "ecdsa-sha2-nistp384-cert-v01@openssh.com," \ 41 "ecdsa-sha2-nistp384-cert-v01@openssh.com," \
42 "ecdsa-sha2-nistp521-cert-v01@openssh.com," 42 "ecdsa-sha2-nistp521-cert-v01@openssh.com,"
43# define HOSTKEY_ECDSA_METHODS \ 43# define HOSTKEY_ECDSA_METHODS \
44 "ecdsa-sha2-nistp256," \ 44 "ecdsa-sha2-nistp256," \
45 "ecdsa-sha2-nistp384," \ 45 "ecdsa-sha2-nistp384," \
46 "ecdsa-sha2-nistp521," 46 "ecdsa-sha2-nistp521,"
47#else 47# else /* OPENSSL_HAS_NISTP521 */
48# define KEX_ECDH_METHODS \ 48# define KEX_ECDH_METHODS \
49 "ecdh-sha2-nistp256," \ 49 "ecdh-sha2-nistp256," \
50 "ecdh-sha2-nistp384," 50 "ecdh-sha2-nistp384,"
51# define HOSTKEY_ECDSA_CERT_METHODS \ 51# define HOSTKEY_ECDSA_CERT_METHODS \
52 "ecdsa-sha2-nistp256-cert-v01@openssh.com," \ 52 "ecdsa-sha2-nistp256-cert-v01@openssh.com," \
53 "ecdsa-sha2-nistp384-cert-v01@openssh.com," 53 "ecdsa-sha2-nistp384-cert-v01@openssh.com,"
54# define HOSTKEY_ECDSA_METHODS \ 54# define HOSTKEY_ECDSA_METHODS \
55 "ecdsa-sha2-nistp256," \ 55 "ecdsa-sha2-nistp256," \
56 "ecdsa-sha2-nistp384," 56 "ecdsa-sha2-nistp384,"
57#endif 57# endif /* OPENSSL_HAS_NISTP521 */
58#else 58# define USERKEY_ECDSA_SK_CERT_METHODS \
59 "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,"
60# define USERKEY_ECDSA_SK_METHODS \
61 "sk-ecdsa-sha2-nistp256@openssh.com,"
62#else /* OPENSSL_HAS_ECC */
59# define KEX_ECDH_METHODS 63# define KEX_ECDH_METHODS
60# define HOSTKEY_ECDSA_CERT_METHODS 64# define HOSTKEY_ECDSA_CERT_METHODS
61# define HOSTKEY_ECDSA_METHODS 65# define HOSTKEY_ECDSA_METHODS
62#endif 66# define USERKEY_ECDSA_SK_CERT_METHODS
67# define USERKEY_ECDSA_SK_METHODS
68#endif /* OPENSSL_HAS_ECC */
63 69
64#ifdef OPENSSL_HAVE_EVPGCM 70#ifdef OPENSSL_HAVE_EVPGCM
65# define AESGCM_CIPHER_MODES \ 71# define AESGCM_CIPHER_MODES \
@@ -145,7 +151,7 @@
145 "ssh-rsa" 151 "ssh-rsa"
146 152
147#define PUBKEY_DEFAULT_PK_ALG \ 153#define PUBKEY_DEFAULT_PK_ALG \
148 "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com," \ 154 USERKEY_ECDSA_SK_CERT_METHODS \
149 "ecdsa-sha2-nistp256-cert-v01@openssh.com," \ 155 "ecdsa-sha2-nistp256-cert-v01@openssh.com," \
150 "ecdsa-sha2-nistp384-cert-v01@openssh.com," \ 156 "ecdsa-sha2-nistp384-cert-v01@openssh.com," \
151 "ecdsa-sha2-nistp521-cert-v01@openssh.com," \ 157 "ecdsa-sha2-nistp521-cert-v01@openssh.com," \
@@ -154,7 +160,7 @@
154 "rsa-sha2-512-cert-v01@openssh.com," \ 160 "rsa-sha2-512-cert-v01@openssh.com," \
155 "rsa-sha2-256-cert-v01@openssh.com," \ 161 "rsa-sha2-256-cert-v01@openssh.com," \
156 "ssh-rsa-cert-v01@openssh.com," \ 162 "ssh-rsa-cert-v01@openssh.com," \
157 "sk-ecdsa-sha2-nistp256@openssh.com," \ 163 USERKEY_ECDSA_SK_METHODS \
158 "ecdsa-sha2-nistp256," \ 164 "ecdsa-sha2-nistp256," \
159 "ecdsa-sha2-nistp384," \ 165 "ecdsa-sha2-nistp384," \
160 "ecdsa-sha2-nistp521," \ 166 "ecdsa-sha2-nistp521," \