diff options
author | Darren Tucker <dtucker@dtucker.net> | 2019-05-17 10:54:51 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-05-17 10:54:51 +1000 |
commit | 97370f6c2c3b825f8c577b7e6c00b1a98d30a6cf (patch) | |
tree | 217d73211fcf07d34c96c7294a295bbe589d81fd /ssh-pkcs11.c | |
parent | 633703babf8d9a88da85f23b800e1b88dec7cdbd (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 'ssh-pkcs11.c')
-rw-r--r-- | ssh-pkcs11.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c index 24bbc5873..d9413bc4f 100644 --- a/ssh-pkcs11.c +++ b/ssh-pkcs11.c | |||
@@ -916,7 +916,9 @@ pkcs11_fetch_x509_pubkey(struct pkcs11_provider *p, CK_ULONG slotidx, | |||
916 | X509 *x509 = NULL; | 916 | X509 *x509 = NULL; |
917 | EVP_PKEY *evp; | 917 | EVP_PKEY *evp; |
918 | RSA *rsa = NULL; | 918 | RSA *rsa = NULL; |
919 | #ifdef OPENSSL_HAS_ECC | ||
919 | EC_KEY *ec = NULL; | 920 | EC_KEY *ec = NULL; |
921 | #endif | ||
920 | struct sshkey *key = NULL; | 922 | struct sshkey *key = NULL; |
921 | int i; | 923 | int i; |
922 | #ifdef HAVE_EC_KEY_METHOD_NEW | 924 | #ifdef HAVE_EC_KEY_METHOD_NEW |
@@ -1043,7 +1045,9 @@ fail: | |||
1043 | free(cert_attr[i].pValue); | 1045 | free(cert_attr[i].pValue); |
1044 | X509_free(x509); | 1046 | X509_free(x509); |
1045 | RSA_free(rsa); | 1047 | RSA_free(rsa); |
1048 | #ifdef OPENSSL_HAS_ECC | ||
1046 | EC_KEY_free(ec); | 1049 | EC_KEY_free(ec); |
1050 | #endif | ||
1047 | 1051 | ||
1048 | return (key); | 1052 | return (key); |
1049 | } | 1053 | } |