Skip to contentSkip to conversation

OpenSSL 3.0 builds with --disable-management

Openvpn-devel Gert Doering 2 participants 2 messages Jul 26, 2022

lore
Share & tools
lore
#0 lore raw

Hi,

buildbot found something new :-) - ossl 3.0 builds fail if --disable-management is set:

gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../../src/compat -DPLUGIN_LIBDIR=\"/usr/local/lib/openvpn/plugins\" -Wall -Wno-stringop-truncation -g -O2 -std=c99 -MT xkey_helper.o -MD -MP -MF .deps/xkey_helper.Tpo -c -o xkey_helper.o xkey_helper.c
xkey_helper.c: In function `xkey_management_sign':
xkey_helper.c:178:26: error: management' undeclared (first use in this function); did you mean SN_Management'?

  178 |     unsigned int flags = management->settings.flags;
      |                          ^~~~~~~~~~
      |                          SN_Management
xkey_helper.c:178:26: note: each undeclared identifier is reported only once for each function it appears in
xkey_helper.c:182:52: error: `MF_EXTERNAL_KEY_DIGEST' undeclared (first use in this function)
  182 |     if (!strcmp(alg.op, "DigestSign") && !(flags & MF_EXTERNAL_KEY_DIGEST)
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~
xkey_helper.c:215:56: error: `MF_EXTERNAL_KEY_PKCS1PAD' undeclared (first use in this function)
  215 |     else if (!strcmp(alg.padmode, "pkcs1") && (flags & MF_EXTERNAL_KEY_PKCS1PAD))
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
xkey_helper.c:235:55: error: `MF_EXTERNAL_KEY_NOPADDING' undeclared (first use in this function)
  235 |     else if (!strcmp(alg.padmode, "none") && (flags & MF_EXTERNAL_KEY_NOPADDING)
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~
xkey_helper.c:240:54: error: `MF_EXTERNAL_KEY_PSSPAD' undeclared (first use in this function)
  240 |     else if (!strcmp(alg.padmode, "pss") && (flags & MF_EXTERNAL_KEY_PSSPAD))
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~
xkey_helper.c:267:19: warning: implicit declaration of function `management_query_pk_sig' [-Wimplicit-function-declaration]
  267 |         out_b64 = management_query_pk_sig(management, in_b64, alg_str);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~

make[3]: *** [Makefile:762: xkey_helper.o] Error 1
make[2]: *** [Makefile:437: all-recursive] Error 1
make[1]: *** [Makefile:614: all-recursive] Error 1
make: *** [Makefile:502: all] Error 2
make[3]: Leaving directory '/buildbot/ubuntu-2204-factory--disable-lzo--disable-management/build/src/openvpn'

... so it seems we're missing a few #ifdef ENABLE_MANAGEMENT here and there...

I'm just relaying what buildbot found, not suggesting a particular fix
- not very familiar with these new code paths (do we need xkey at all if management is disabled?).

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
#1 lore raw

Hi,

Quoted 5 lines · Gert Doering

I'm just relaying what buildbot found, not suggesting a particular fix
- not very familiar with these new code paths (do we need xkey at all if management is disabled?).

xkey handles all external keys including pkcs11 and cryptoapicert, so we need it even when management is disabled.

Selva