Skip to contentSkip to conversation

Move keying material exporter check from syshead.h to configure.ac

PATCH Lev Stipakov 1 participant 2 messages Jan 20, 2020 2 messages not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi,

+ have_export_keying_material="yes"

Review

Quoted 6 lines
(quoted diff) +5 -0
+       AC_CHECK_FUNCS(
+               [SSL_export_keying_material],
+               ,
+               [have_export_keying_material="no"; break]
+       )

Just wondering why not AC_CHECK_FUNC? In this case we could get rid of "break".

_FUNCS also defines HAVE_function macro, which we don't use in this particular case.

Noticed that we have similar code above:

    have_crypto_aead_modes="yes"
    AC_CHECK_FUNCS(
        [EVP_aes_256_gcm],
        ,
        [have_crypto_aead_modes="no"; break]
    )

so maybe that's why.

-Lev

author Acked-by
#3 lore raw
In reply to a message not in the archive

While I am not quite convinced we should use _FUNCS and not _FUNC, the rest of code looks reasonable. It also changes EKM to a more meaningful name.

I gave it full travis run, all configuration succeeded (
https://travis-ci.org/lstipakov/openvpn/builds/639461944).

ma 20. tammik. 2020 klo 16.00 Steffan Karger ([email protected]...) kirjoitti:

Quoted 33 lines · Lev Stipakov
Quoted 16 lines

+ have_export_keying_material="yes"
+ AC_CHECK_FUNCS(
+ [SSL_export_keying_material],
+ ,
+ [have_export_keying_material="no"; break]
+ )

Just wondering why not AC_CHECK_FUNC? In this case we could get rid of "break".

_FUNCS also defines HAVE_function macro, which we don't use in this particular case.

Noticed that we have similar code above:

Quoted 8 lines
    have_crypto_aead_modes="yes"
    AC_CHECK_FUNCS(
        [EVP_aes_256_gcm],
        ,
        [have_crypto_aead_modes="no"; break]
    )

so maybe that's why.

This. It's too long ago that I fully remember, but I recall we changed to FUNCS for some reason in the past. Autoconf is full of surprises. So if we have something that works, and I want something similar, let's do it in the exact same way.

-Steffan

Signature · 1 line
-Lev