On 2/5/24 10:26, Daniel P. Berrangé wrote:
On Thu, May 02, 2024 at 10:22:02AM +0200, Philippe Mathieu-Daudé wrote:
On 2/5/24 10:11, Philippe Mathieu-Daudé wrote:
We only use Libtasn1 in unit tests. As noted in commit d47b83b118
("tests: add migration tests of TLS with x509 credentials"), having
GnuTLS without Libtasn1 is a valid configuration, so do not require
Libtasn1, to avoid:

    Dependency gnutls found: YES 3.7.1 (cached)
    Run-time dependency libtasn1 found: NO (tried pkgconfig)

    ../meson.build:1914:10: ERROR: Dependency "libtasn1" not found, tried 
pkgconfig

Restrict the unit test pkix_asn1_tab[] variable to CONFIG_TASN1.

Otherwise we get:

   In file included from tests/unit/crypto-tls-psk-helpers.c:23:
   tests/unit/crypto-tls-x509-helpers.h:26:10: fatal error:
   libtasn1.h: No such file or directory
      26 | #include <libtasn1.h>
         |          ^~~~~~~~~~~~
   compilation terminated.

I'd say that crypto-tls-psk-helpers.c shouldn't be including
crypto-tls-x509-helpers.h at all, as PSK auth does not depend
on X509 code

I agree, I tried the "less code churn" path first :)


Reply via email to