libcamera: pub_key: Support openssl as an alternative to gnutls

Support verify IPA signatures with openssl as an alternative to gnutls,
to offer more flexibility in the selection of dependencies. Use gnutls
by default, for no specific reason as both are equally well supported.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2022-08-07 01:26:41 +03:00
parent bedef55d95
commit 12f48aa65e
4 changed files with 57 additions and 10 deletions
+7 -3
View File
@@ -65,12 +65,16 @@ subdir('pipeline')
subdir('proxy')
libdl = cc.find_library('dl')
libgnutls = dependency('gnutls', required : true)
libudev = dependency('libudev', required : false)
libyaml = dependency('yaml-0.1', required : false)
if libgnutls.found()
# Use one of gnutls or libcrypto (provided by OpenSSL), trying gnutls first.
libcrypto = dependency('gnutls', required : false)
if libcrypto.found()
config_h.set('HAVE_GNUTLS', 1)
else
libcrypto = dependency('libcrypto', required : true)
config_h.set('HAVE_CRYPTO', 1)
endif
if liblttng.found()
@@ -135,8 +139,8 @@ libcamera_deps = [
libatomic,
libcamera_base,
libcamera_base_private,
libcrypto,
libdl,
libgnutls,
liblttng,
libudev,
libyaml,