summaryrefslogtreecommitdiff
path: root/kexecdh.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2019-05-17 10:54:51 +1000
committerDarren Tucker <dtucker@dtucker.net>2019-05-17 10:54:51 +1000
commit97370f6c2c3b825f8c577b7e6c00b1a98d30a6cf (patch)
tree217d73211fcf07d34c96c7294a295bbe589d81fd /kexecdh.c
parent633703babf8d9a88da85f23b800e1b88dec7cdbd (diff)
Fix building w/out ECC.
Ifdef out ECC specific code so that that it'll build against an OpenSSL configured w/out ECC. With & ok djm@
Diffstat (limited to 'kexecdh.c')
-rw-r--r--kexecdh.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/kexecdh.c b/kexecdh.c
index 0aeab2e9b..9a3bb81b8 100644
--- a/kexecdh.c
+++ b/kexecdh.c
@@ -208,4 +208,30 @@ kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob,
208 kex->ec_client_key = NULL; 208 kex->ec_client_key = NULL;
209 return r; 209 return r;
210} 210}
211
212#else
213
214#include "sshkey.h"
215#include "kex.h"
216#include "ssherr.h"
217
218int
219kex_ecdh_keypair(struct kex *kex)
220{
221 return SSH_ERR_SIGN_ALG_UNSUPPORTED;
222}
223
224int
225kex_ecdh_enc(struct kex *kex, const struct sshbuf *client_blob,
226 struct sshbuf **server_blobp, struct sshbuf **shared_secretp)
227{
228 return SSH_ERR_SIGN_ALG_UNSUPPORTED;
229}
230
231int
232kex_ecdh_dec(struct kex *kex, const struct sshbuf *server_blob,
233 struct sshbuf **shared_secretp)
234{
235 return SSH_ERR_SIGN_ALG_UNSUPPORTED;
236}
211#endif /* defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC) */ 237#endif /* defined(WITH_OPENSSL) && defined(OPENSSL_HAS_ECC) */