summaryrefslogtreecommitdiffstats
path: root/sshkey.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-10-07 05:28:02 +0200
committerDarren Tucker <dtucker@dtucker.net>2021-10-07 05:28:02 +0200
commitef5916b8acd9b1d2f39fad4951dae03b00dbe390 (patch)
tree665d1c839f3a3d1d31fb2c70e849f0efca378c84 /sshkey.c
parentDisable security key on minix3. (diff)
downloadopenssh-ef5916b8acd9b1d2f39fad4951dae03b00dbe390.tar.xz
openssh-ef5916b8acd9b1d2f39fad4951dae03b00dbe390.zip
Only enable sk-* key types if ENABLE_SK is defined
Diffstat (limited to 'sshkey.c')
-rw-r--r--sshkey.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sshkey.c b/sshkey.c
index 0dbc0d873..1cd5e8807 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -107,10 +107,12 @@ static const struct keytype keytypes[] = {
{ "ssh-ed25519", "ED25519", NULL, KEY_ED25519, 0, 0, 0 },
{ "ssh-ed25519-cert-v01@openssh.com", "ED25519-CERT", NULL,
KEY_ED25519_CERT, 0, 1, 0 },
+#ifdef ENABLE_SK
{ "sk-ssh-ed25519@openssh.com", "ED25519-SK", NULL,
KEY_ED25519_SK, 0, 0, 0 },
{ "sk-ssh-ed25519-cert-v01@openssh.com", "ED25519-SK-CERT", NULL,
KEY_ED25519_SK_CERT, 0, 1, 0 },
+#endif
#ifdef WITH_XMSS
{ "ssh-xmss@openssh.com", "XMSS", NULL, KEY_XMSS, 0, 0, 0 },
{ "ssh-xmss-cert-v01@openssh.com", "XMSS-CERT", NULL,
@@ -130,10 +132,12 @@ static const struct keytype keytypes[] = {
{ "ecdsa-sha2-nistp521", "ECDSA", NULL,
KEY_ECDSA, NID_secp521r1, 0, 0 },
# endif /* OPENSSL_HAS_NISTP521 */
+# ifdef ENABLE_SK
{ "sk-ecdsa-sha2-nistp256@openssh.com", "ECDSA-SK", NULL,
KEY_ECDSA_SK, NID_X9_62_prime256v1, 0, 0 },
{ "webauthn-sk-ecdsa-sha2-nistp256@openssh.com", "ECDSA-SK", NULL,
KEY_ECDSA_SK, NID_X9_62_prime256v1, 0, 1 },
+# endif /* ENABLE_SK */
# endif /* OPENSSL_HAS_ECC */
{ "ssh-rsa-cert-v01@openssh.com", "RSA-CERT", NULL,
KEY_RSA_CERT, 0, 1, 0 },
@@ -152,8 +156,10 @@ static const struct keytype keytypes[] = {
{ "ecdsa-sha2-nistp521-cert-v01@openssh.com", "ECDSA-CERT", NULL,
KEY_ECDSA_CERT, NID_secp521r1, 1, 0 },
# endif /* OPENSSL_HAS_NISTP521 */
+# ifdef ENABLE_SK
{ "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com", "ECDSA-SK-CERT", NULL,
KEY_ECDSA_SK_CERT, NID_X9_62_prime256v1, 1, 0 },
+# endif /* ENABLE_SK */
# endif /* OPENSSL_HAS_ECC */
#endif /* WITH_OPENSSL */
{ NULL, NULL, NULL, -1, -1, 0, 0 }