diff options
author | Darren Tucker <dtucker@dtucker.net> | 2020-01-25 13:05:42 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-01-25 13:05:42 +1100 |
commit | e16dfa94f86358033531c4a97dcb51508ef84d49 (patch) | |
tree | 9b324c80e74e0dcfb48ff5013aead448951f993e | |
parent | 94a2e5951b374e1a89761ceaff72e66eb1946807 (diff) |
Put EC key export inside OPENSSL_HAS_ECC.
Fixes link error when building against an OpenSSL that does not have
ECC.
-rw-r--r-- | ssh-keygen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 14d2357a7..d29f97bb3 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -406,10 +406,12 @@ do_convert_to_pem(struct sshkey *k) | |||
406 | if (!PEM_write_DSA_PUBKEY(stdout, k->dsa)) | 406 | if (!PEM_write_DSA_PUBKEY(stdout, k->dsa)) |
407 | fatal("PEM_write_DSA_PUBKEY failed"); | 407 | fatal("PEM_write_DSA_PUBKEY failed"); |
408 | break; | 408 | break; |
409 | #ifdef OPENSSL_HAS_ECC | ||
409 | case KEY_ECDSA: | 410 | case KEY_ECDSA: |
410 | if (!PEM_write_EC_PUBKEY(stdout, k->ecdsa)) | 411 | if (!PEM_write_EC_PUBKEY(stdout, k->ecdsa)) |
411 | fatal("PEM_write_EC_PUBKEY failed"); | 412 | fatal("PEM_write_EC_PUBKEY failed"); |
412 | break; | 413 | break; |
414 | #endif | ||
413 | default: | 415 | default: |
414 | fatal("%s: unsupported key type %s", __func__, sshkey_type(k)); | 416 | fatal("%s: unsupported key type %s", __func__, sshkey_type(k)); |
415 | } | 417 | } |