Fix net-wireless/crda for openssl 1.1 |
|
Issue descriptioncrda: https://wireless.wiki.kernel.org/en/developers/regulatory/crda Currently, crda uses dev-python/m2crypto and a python script to generate some C code that uses some OpenSSL APIs. Even once m2crypto is fixed to work with OpenSSL 1.1 (issue 734499), crda itself also must be updated to fix the following build errors: One worrying thing about this is that there doesn't seem to be any attempt upstream to fix this. In fact, it looks like there hasn't been a new commit to the upstream crda since Dec 2014: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/ This is especially worrying since upstream gentoo is carrying 5 patches on top of the upstream 3.18-r1 ebuild... all from vapier...: https://gitweb.gentoo.org/repo/gentoo.git/tree/net-wireless/crda/crda-3.18-r1.ebuild#n36 One easy way to work-around this issue is to use gcrypt instead of OpenSSL: USE="gcrypt" emerge crda This bypasses issues introduced by OpenSSL 1.1. |
|
►
Sign in to add a comment |
|
Comment 1 by djkurtz@chromium.org
, Jun 22 2017The build errors, for posterity: x86_64-cros-linux-gnu-gcc -O2 -pipe -O2 -pipe -march=corei7 -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fpic -std=gnu99 -Wall -pedantic -DUSE_OPENSSL -DPUBKEY_DIR=\"/etc/wireless-regdb/pubkeys\" `/build/soraka/build/bin/pkg-config --cflags openssl` -DCONFIG_LIBNL30 `/build/soraka/build/bin/pkg-config --cflags libnl-3.0` -o libreg.so -shared -Wl,-soname,libreg.so regdb.h reglib.h reglib.c keys-ssl.c -lm `/build/soraka/build/bin/pkg-config --libs openssl` In file included from reglib.c:34:0: keys-ssl.c:57:19: error: field 'e' has incomplete type struct bignum_st e, n; ^ keys-ssl.c:57:22: error: field 'n' has incomplete type struct bignum_st e, n; ^ keys-ssl.c:68:2: error: field name not in record or union initializer KEYS(e_0, n_0), ^ keys-ssl.c:68:2: error: (near initialization for 'keys[0].e') keys-ssl.c:68:2: error: field name not in record or union initializer keys-ssl.c:68:2: error: (near initialization for 'keys[0].e') keys-ssl.c:68:2: error: field name not in record or union initializer keys-ssl.c:68:2: error: (near initialization for 'keys[0].n') keys-ssl.c:68:2: error: field name not in record or union initializer keys-ssl.c:68:2: error: (near initialization for 'keys[0].n') keys-ssl.c:69:2: error: field name not in record or union initializer KEYS(e_1, n_1), ^ keys-ssl.c:69:2: error: (near initialization for 'keys[1].e') keys-ssl.c:69:2: error: field name not in record or union initializer keys-ssl.c:69:2: error: (near initialization for 'keys[1].e') keys-ssl.c:69:2: error: field name not in record or union initializer keys-ssl.c:69:2: error: (near initialization for 'keys[1].n') keys-ssl.c:69:2: error: field name not in record or union initializer keys-ssl.c:69:2: error: (near initialization for 'keys[1].n') reglib.c: In function 'reglib_verify_db_signature': reglib.c:98:31: warning: division by zero [-Wdiv-by-zero] for (i = 0; (i < sizeof(keys)/sizeof(keys[0])) && (!ok); i++) { ^ reglib.c:105:6: error: dereferencing pointer to incomplete type rsa->e = &keys[i].e; ^ reglib.c:105:6: error: request for member 'e' in something not a structure or union reglib.c:105:3: warning: statement with no effect [-Wunused-value] rsa->e = &keys[i].e; ^ reglib.c:106:6: error: dereferencing pointer to incomplete type rsa->n = &keys[i].n; ^ reglib.c:106:6: error: request for member 'n' in something not a structure or union reglib.c:106:3: warning: statement with no effect [-Wunused-value] rsa->n = &keys[i].n; ^ reglib.c:111:6: error: dereferencing pointer to incomplete type rsa->e = NULL; ^ reglib.c:111:6: error: request for member 'e' in something not a structure or union reglib.c:111:3: warning: statement with no effect [-Wunused-value] rsa->e = NULL; ^ reglib.c:112:6: error: dereferencing pointer to incomplete type rsa->n = NULL; ^ reglib.c:112:6: error: request for member 'n' in something not a structure or union reglib.c:112:3: warning: statement with no effect [-Wunused-value] rsa->n = NULL; ^ keys-ssl.c:57:19: error: field 'e' has incomplete type struct bignum_st e, n; ^ keys-ssl.c:57:22: error: field 'n' has incomplete type struct bignum_st e, n; ^ keys-ssl.c:68:2: error: field name not in record or union initializer KEYS(e_0, n_0), ^ keys-ssl.c:68:2: error: (near initialization for 'keys[0].e') keys-ssl.c:68:2: error: field name not in record or union initializer keys-ssl.c:68:2: error: (near initialization for 'keys[0].e') keys-ssl.c:68:2: error: field name not in record or union initializer keys-ssl.c:68:2: error: (near initialization for 'keys[0].n') keys-ssl.c:68:2: error: field name not in record or union initializer keys-ssl.c:68:2: error: (near initialization for 'keys[0].n') keys-ssl.c:69:2: error: field name not in record or union initializer KEYS(e_1, n_1), ^ keys-ssl.c:69:2: error: (near initialization for 'keys[1].e') keys-ssl.c:69:2: error: field name not in record or union initializer keys-ssl.c:69:2: error: (near initialization for 'keys[1].e') keys-ssl.c:69:2: error: field name not in record or union initializer keys-ssl.c:69:2: error: (near initialization for 'keys[1].n') keys-ssl.c:69:2: error: field name not in record or union initializer keys-ssl.c:69:2: error: (near initialization for 'keys[1].n') keys-ssl.c:67:22: warning: 'keys' defined but not used [-Wunused-variable] static struct pubkey keys[] = { ^ make: *** [Makefile:120: libreg.so] Error 1