summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2019-11-01 14:49:25 +1100
committerDamien Miller <djm@mindrot.org>2019-11-01 14:49:55 +1100
commit03f9205f0fb49ea2507eacc143737a8511ae5a4e (patch)
treebb65fc87c4148d9e00ff3839a8d5ebacb02254d7
parent5eb7b9563ff818e17de24231bf2d347d9db302c5 (diff)
conditionalise SK sign/verify on ENABLE_SK
Spotted by Darren and his faux-Vax
-rw-r--r--sshkey.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sshkey.c b/sshkey.c
index 4744dfbef..861d77689 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -2684,11 +2684,13 @@ sshkey_sign(struct sshkey *key,
2684 case KEY_ECDSA: 2684 case KEY_ECDSA:
2685 r = ssh_ecdsa_sign(key, sigp, lenp, data, datalen, compat); 2685 r = ssh_ecdsa_sign(key, sigp, lenp, data, datalen, compat);
2686 break; 2686 break;
2687# ifdef ENABLE_SK
2687 case KEY_ECDSA_SK_CERT: 2688 case KEY_ECDSA_SK_CERT:
2688 case KEY_ECDSA_SK: 2689 case KEY_ECDSA_SK:
2689 r = sshsk_ecdsa_sign(sk_provider, key, sigp, lenp, 2690 r = sshsk_ecdsa_sign(sk_provider, key, sigp, lenp,
2690 data, datalen, compat); 2691 data, datalen, compat);
2691 break; 2692 break;
2693# endif /* ENABLE_SK */
2692# endif /* OPENSSL_HAS_ECC */ 2694# endif /* OPENSSL_HAS_ECC */
2693 case KEY_RSA_CERT: 2695 case KEY_RSA_CERT:
2694 case KEY_RSA: 2696 case KEY_RSA:
@@ -2734,10 +2736,12 @@ sshkey_verify(const struct sshkey *key,
2734 case KEY_ECDSA_CERT: 2736 case KEY_ECDSA_CERT:
2735 case KEY_ECDSA: 2737 case KEY_ECDSA:
2736 return ssh_ecdsa_verify(key, sig, siglen, data, dlen, compat); 2738 return ssh_ecdsa_verify(key, sig, siglen, data, dlen, compat);
2739# ifdef ENABLE_SK
2737 case KEY_ECDSA_SK_CERT: 2740 case KEY_ECDSA_SK_CERT:
2738 case KEY_ECDSA_SK: 2741 case KEY_ECDSA_SK:
2739 return ssh_ecdsa_sk_verify(key, sig, siglen, data, dlen, 2742 return ssh_ecdsa_sk_verify(key, sig, siglen, data, dlen,
2740 compat); 2743 compat);
2744# endif /* ENABLE_SK */
2741# endif /* OPENSSL_HAS_ECC */ 2745# endif /* OPENSSL_HAS_ECC */
2742 case KEY_RSA_CERT: 2746 case KEY_RSA_CERT:
2743 case KEY_RSA: 2747 case KEY_RSA: