summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEneas U de Queiroz <cote2004-github@yahoo.com>2018-10-09 16:17:42 -0300
committerDamien Miller <djm@mindrot.org>2018-11-09 14:19:24 +1100
commit624d19ac2d56fa86a22417c35536caceb3be346f (patch)
tree151568ee6e6277be2e00cdb8eda657bb6f92076a
parent1801cd11d99d05a66ab5248c0555f55909a355ce (diff)
fix compilation with openssl built without ECC
ECDSA code in openssh-compat.h and libressl-api-compat.c needs to be guarded by OPENSSL_HAS_ECC Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
-rw-r--r--openbsd-compat/libressl-api-compat.c4
-rw-r--r--openbsd-compat/openssl-compat.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/openbsd-compat/libressl-api-compat.c b/openbsd-compat/libressl-api-compat.c
index de3e64a63..ae00ff593 100644
--- a/openbsd-compat/libressl-api-compat.c
+++ b/openbsd-compat/libressl-api-compat.c
@@ -152,7 +152,9 @@
152#include <openssl/dsa.h> 152#include <openssl/dsa.h>
153#include <openssl/rsa.h> 153#include <openssl/rsa.h>
154#include <openssl/evp.h> 154#include <openssl/evp.h>
155#ifdef OPENSSL_HAS_ECC
155#include <openssl/ecdsa.h> 156#include <openssl/ecdsa.h>
157#endif
156#include <openssl/dh.h> 158#include <openssl/dh.h>
157 159
158#ifndef HAVE_DSA_GET0_PQG 160#ifndef HAVE_DSA_GET0_PQG
@@ -417,6 +419,7 @@ DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s)
417} 419}
418#endif /* HAVE_DSA_SIG_SET0 */ 420#endif /* HAVE_DSA_SIG_SET0 */
419 421
422#ifdef OPENSSL_HAS_ECC
420#ifndef HAVE_ECDSA_SIG_GET0 423#ifndef HAVE_ECDSA_SIG_GET0
421void 424void
422ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) 425ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
@@ -442,6 +445,7 @@ ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)
442 return 1; 445 return 1;
443} 446}
444#endif /* HAVE_ECDSA_SIG_SET0 */ 447#endif /* HAVE_ECDSA_SIG_SET0 */
448#endif /* OPENSSL_HAS_ECC */
445 449
446#ifndef HAVE_DH_GET0_PQG 450#ifndef HAVE_DH_GET0_PQG
447void 451void
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index 94c750b7f..1ae0fce29 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -25,7 +25,9 @@
25#include <openssl/evp.h> 25#include <openssl/evp.h>
26#include <openssl/rsa.h> 26#include <openssl/rsa.h>
27#include <openssl/dsa.h> 27#include <openssl/dsa.h>
28#ifdef OPENSSL_HAS_ECC
28#include <openssl/ecdsa.h> 29#include <openssl/ecdsa.h>
30#endif
29#include <openssl/dh.h> 31#include <openssl/dh.h>
30 32
31int ssh_compatible_openssl(long, long); 33int ssh_compatible_openssl(long, long);
@@ -174,6 +176,7 @@ void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
174int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); 176int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
175#endif /* DSA_SIG_SET0 */ 177#endif /* DSA_SIG_SET0 */
176 178
179#ifdef OPENSSL_HAS_ECC
177#ifndef HAVE_ECDSA_SIG_GET0 180#ifndef HAVE_ECDSA_SIG_GET0
178void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); 181void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
179#endif /* HAVE_ECDSA_SIG_GET0 */ 182#endif /* HAVE_ECDSA_SIG_GET0 */
@@ -181,6 +184,7 @@ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
181#ifndef HAVE_ECDSA_SIG_SET0 184#ifndef HAVE_ECDSA_SIG_SET0
182int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s); 185int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
183#endif /* HAVE_ECDSA_SIG_SET0 */ 186#endif /* HAVE_ECDSA_SIG_SET0 */
187#endif /* OPENSSL_HAS_ECC */
184 188
185#ifndef HAVE_DH_GET0_PQG 189#ifndef HAVE_DH_GET0_PQG
186void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, 190void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q,