Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling ProFTPD 1.3.8a mod_sftp, mod_tls using libressl 3.7.3 fails #1735

Closed
terefang opened this issue Oct 11, 2023 · 5 comments
Closed
Assignees

Comments

@terefang
Copy link

What I Did

proftpd 1.3.8a building against libressl 3.7.3 with --with-modules=mod_ldap:mod_sftp:mod_exec:mod_rewrite

 x86_64-linux-musl-gcc --static  -DHAVE_CONFIG_H  -DLINUX  -I. -I../.. -I../../include -I./../../include  -g2 --static  -Wall -fno-omit-frame-pointer -fno-strict-aliasing -c mac.c
 mac.c: In function ‘switch_read_mac’:
 mac.c:114:5: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
  114 |     HMAC_CTX_cleanup(hmac_read_ctxs[read_mac_idx]);
     |     ^~~~~~~~~~~~~~~~
mac.c: In function ‘init_mac’:
mac.c:189:3: warning: implicit declaration of function ‘HMAC_CTX_init’; did you mean ‘HMAC_CTX_new’? [-Wimplicit-function-declaration]
  189 |   HMAC_CTX_init(hmac_ctx);
      |   ^~~~~~~~~~~~~
      |   HMAC_CTX_new
mac.c: In function ‘set_mac_key’:
mac.c:435:14: error: storage size of ‘ctx’ isn’t known
  435 |   EVP_MD_CTX ctx;
      |              ^~~
mac.c:435:14: warning: unused variable ‘ctx’ [-Wunused-variable]
mac.c: At top level:
mac.c:1048:17: error: storage size of ‘read_ctx1’ isn’t known
 1048 | static HMAC_CTX read_ctx1, read_ctx2;
      |                 ^~~~~~~~~
mac.c:1048:28: error: storage size of ‘read_ctx2’ isn’t known
 1048 | static HMAC_CTX read_ctx1, read_ctx2;
      |                            ^~~~~~~~~
mac.c:1049:17: error: storage size of ‘write_ctx1’ isn’t known
 1049 | static HMAC_CTX write_ctx1, write_ctx2;
       |                 ^~~~~~~~~~
mac.c:1049:29: error: storage size of ‘write_ctx2’ isn’t known
  1049 | static HMAC_CTX write_ctx1, write_ctx2;
       |                             ^~~~~~~~~~
make[2]: *** [mac.o] Error 1
make[1]: *** [static] Error 2
make: *** [modules] Error 2
Makefile:43: recipe for target 'mac.o' failed
make[2]: Leaving directory '/u/fredo/IdeaProjects/make-root/muslsys/proftpd/target/proftpd/proftpd-1.3.8a/contrib/mod_sftp'
Makefile:47: recipe for target 'static' failed
make[1]: Leaving directory '/u/fredo/IdeaProjects/make-root/muslsys/proftpd/target/proftpd/proftpd-1.3.8a/modules'
Makefile:57: recipe for target 'modules' failed
Result: 2
@Castaglia Castaglia changed the title proftpd 1.3.8a buiölding against libressl 3.7.3 fails proftpd 1.3.8a building against libressl 3.7.3 fails Oct 11, 2023
@Castaglia Castaglia self-assigned this Oct 11, 2023
@terefang
Copy link
Author

i do see

$ fgrep HMAC_CTX_ -r ..../toolchain/include/
..../toolchain/include/openssl/hmac.h:#define HMAC_size(e)    (EVP_MD_size(HMAC_CTX_get_md((e))))
..../toolchain/include/openssl/hmac.h:HMAC_CTX *HMAC_CTX_new(void);
..../toolchain/include/openssl/hmac.h:void HMAC_CTX_free(HMAC_CTX *ctx);
..../toolchain/include/openssl/hmac.h:int HMAC_CTX_reset(HMAC_CTX *ctx);
..../toolchain/include/openssl/hmac.h:int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
..../toolchain/include/openssl/hmac.h:void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
..../toolchain/include/openssl/hmac.h:const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx);

@Castaglia
Copy link
Member

I'm able to reproduce this locally. Interestingly, I do not see the same build error if compiling 1.3.9rc1. That should help make it easy to determine which changes needs to be backported to the 1.3.8 branch.

@Castaglia
Copy link
Member

Looks like e32ea0a is the relevant commit; it only exists on the master branch, and wasn't backported to the 1.3.8 branch.

@Castaglia Castaglia changed the title proftpd 1.3.8a building against libressl 3.7.3 fails Compiling ProFTPD 1.3.8a mod_sftp, mod_tls using libressl 3.7.3 fails Oct 12, 2023
@Castaglia
Copy link
Member

This should now be fixed in the 1.3.8 branch. Thanks!

@terefang
Copy link
Author

wow that was fast ... many thanks ... keep up the good work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants