2013-08-30 16:09:44 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# libssh2
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2019-08-17 21:30:50 +02:00
|
|
|
LIBSSH2_VERSION = 1.9.0
|
2019-08-19 22:36:45 +02:00
|
|
|
LIBSSH2_SITE = https://www.libssh2.org/download
|
2013-08-30 16:09:44 +02:00
|
|
|
LIBSSH2_LICENSE = BSD
|
|
|
|
LIBSSH2_LICENSE_FILES = COPYING
|
2021-01-14 23:34:30 +01:00
|
|
|
LIBSSH2_CPE_ID_VENDOR = libssh2
|
2013-08-30 16:09:44 +02:00
|
|
|
LIBSSH2_INSTALL_STAGING = YES
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBSSH2_CONF_OPTS = --disable-examples-build
|
2013-08-30 16:09:44 +02:00
|
|
|
|
2020-02-29 12:31:32 +01:00
|
|
|
# 0003-packet-c-improve-message-parsing.patch
|
|
|
|
LIBSSH2_IGNORE_CVES += CVE-2019-17498
|
|
|
|
|
2020-05-16 18:11:40 +02:00
|
|
|
# patch touching configure.ac and acinclude.m4
|
2017-10-31 18:56:30 +01:00
|
|
|
LIBSSH2_AUTORECONF = YES
|
|
|
|
|
package/libssh2: Add selectable crypto libraries
Currently, the selection of the backend is based on a priority order,
which is not always desirable: not all features are available for all
backends, as reported upstream:
https://github.com/libssh2/libssh2/issues/213
In that particular case, the problem is that libgcrypt is unable to
read encrypted certificates created with openssl, but it is likely
that other incompatibilities exist as well.
As such, allow a user to select the backend most appropriate to their
use-case.
Note that this changes the defaults: previously, if openssl was already
selected and we additionally select libssh2, openssl would be used as
a backend. Now, mbedtls is the default so if the user doesn't change
it, mbedtls will be used.
Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
[Arnout: remove now-unneeded comment in .mk file]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-11-01 17:22:56 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBSSH2_MBEDTLS),y)
|
2017-07-10 19:35:54 +02:00
|
|
|
LIBSSH2_DEPENDENCIES += mbedtls
|
2017-10-31 18:56:30 +01:00
|
|
|
LIBSSH2_CONF_OPTS += --with-libmbedcrypto-prefix=$(STAGING_DIR)/usr \
|
|
|
|
--with-crypto=mbedtls
|
package/libssh2: Add selectable crypto libraries
Currently, the selection of the backend is based on a priority order,
which is not always desirable: not all features are available for all
backends, as reported upstream:
https://github.com/libssh2/libssh2/issues/213
In that particular case, the problem is that libgcrypt is unable to
read encrypted certificates created with openssl, but it is likely
that other incompatibilities exist as well.
As such, allow a user to select the backend most appropriate to their
use-case.
Note that this changes the defaults: previously, if openssl was already
selected and we additionally select libssh2, openssl would be used as
a backend. Now, mbedtls is the default so if the user doesn't change
it, mbedtls will be used.
Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
[Arnout: remove now-unneeded comment in .mk file]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-11-01 17:22:56 +01:00
|
|
|
else ifeq ($(BR2_PACKAGE_LIBSSH2_LIBGCRYPT),y)
|
2013-08-30 16:09:44 +02:00
|
|
|
LIBSSH2_DEPENDENCIES += libgcrypt
|
2017-10-31 18:56:30 +01:00
|
|
|
LIBSSH2_CONF_OPTS += --with-libgcrypt-prefix=$(STAGING_DIR)/usr \
|
|
|
|
--with-crypto=libgcrypt
|
2014-11-18 15:31:33 +01:00
|
|
|
# configure.ac forgets to link to dependent libraries of gcrypt breaking static
|
|
|
|
# linking
|
2015-07-12 16:35:26 +02:00
|
|
|
LIBSSH2_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`"
|
package/libssh2: Add selectable crypto libraries
Currently, the selection of the backend is based on a priority order,
which is not always desirable: not all features are available for all
backends, as reported upstream:
https://github.com/libssh2/libssh2/issues/213
In that particular case, the problem is that libgcrypt is unable to
read encrypted certificates created with openssl, but it is likely
that other incompatibilities exist as well.
As such, allow a user to select the backend most appropriate to their
use-case.
Note that this changes the defaults: previously, if openssl was already
selected and we additionally select libssh2, openssl would be used as
a backend. Now, mbedtls is the default so if the user doesn't change
it, mbedtls will be used.
Signed-off-by: Sam Voss <sam.voss@rockwellcollins.com>
[Arnout: remove now-unneeded comment in .mk file]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-11-01 17:22:56 +01:00
|
|
|
else ifeq ($(BR2_PACKAGE_LIBSSH2_OPENSSL),y)
|
2019-05-18 11:53:23 +02:00
|
|
|
LIBSSH2_DEPENDENCIES += host-pkgconf openssl
|
2017-10-31 18:56:30 +01:00
|
|
|
LIBSSH2_CONF_OPTS += --with-libssl-prefix=$(STAGING_DIR)/usr \
|
|
|
|
--with-crypto=openssl
|
2019-05-18 11:53:23 +02:00
|
|
|
# configure.ac forgets to link to dependent libraries of openssl breaking static
|
|
|
|
# linking
|
|
|
|
LIBSSH2_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
|
2013-08-30 16:09:44 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Add zlib support if enabled
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
LIBSSH2_DEPENDENCIES += zlib
|
2015-02-14 18:38:28 +01:00
|
|
|
LIBSSH2_CONF_OPTS += --with-libz \
|
|
|
|
--with-libz-prefix=$(STAGING_DIR)/usr
|
2013-08-30 16:09:44 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
LIBSSH2_CONF_OPTS += --without-libz
|
2013-08-30 16:09:44 +02:00
|
|
|
endif
|
|
|
|
|
2018-02-04 19:07:44 +01:00
|
|
|
HOST_LIBSSH2_DEPENDENCIES += host-openssl
|
|
|
|
HOST_LIBSSH2_CONF_OPTS += --with-openssl \
|
2018-09-24 00:04:59 +02:00
|
|
|
--with-libssl-prefix=$(HOST_DIR) \
|
2018-02-04 19:07:44 +01:00
|
|
|
--without-libgcrypt
|
|
|
|
|
2013-08-30 16:09:44 +02:00
|
|
|
$(eval $(autotools-package))
|
2018-02-04 19:07:44 +01:00
|
|
|
$(eval $(host-autotools-package))
|