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

update ssl submodule for Mbed TLS 3.0.0 compat #27

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

gstrauss
Copy link
Contributor

github: #26

@gstrauss
Copy link
Contributor Author

@zhaojh329 ping. Please review and then create a new release in #26. Thank you.

@Neustradamus
Copy link

@gstrauss: Good job!

Copy link
Owner

@zhaojh329 zhaojh329 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/home/zjh/libuhttpd/src/connection.c: In function ‘ssl_negotiated’:
/home/zjh/libuhttpd/src/connection.c:835:16: error: ‘SSL_PENDING’ undeclared (first use in this function); did you mean ‘P_FD_PENDING’?
  835 |     if (ret == SSL_PENDING)
      |                ^~~~~~~~~~~
      |                P_FD_PENDING
/home/zjh/libuhttpd/src/connection.c:835:16: note: each undeclared identifier is reported only once for each function it appears in
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c:839:66: error: passing argument 1 of ‘ssl_last_error_string’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  839 |         log_err("ssl connect error: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                                                  ^~~~~~~
      |                                                                  |
      |                                                                  char *
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:839:9: note: in expansion of macro ‘log_err’
  839 |         log_err("ssl connect error: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |         ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:47: note: expected ‘struct ssl *’ but argument is of type ‘char *’
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |                                   ~~~~~~~~~~~~^~~
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c:839:75: error: passing argument 2 of ‘ssl_last_error_string’ makes pointer from integer without a cast [-Werror=int-conversion]
  839 |         log_err("ssl connect error: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                                                           ^~~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           long unsigned int
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:839:9: note: in expansion of macro ‘log_err’
  839 |         log_err("ssl connect error: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |         ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:58: note: expected ‘char *’ but argument is of type ‘long unsigned int’
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |                                                    ~~~~~~^~~
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c:839:44: error: too few arguments to function ‘ssl_last_error_string’
  839 |         log_err("ssl connect error: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                            ^~~~~~~~~~~~~~~~~~~~~
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:839:9: note: in expansion of macro ‘log_err’
  839 |         log_err("ssl connect error: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |         ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:13: note: declared here
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |             ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c: In function ‘conn_ssl_read’:
/home/zjh/libuhttpd/src/connection.c:856:57: error: passing argument 1 of ‘ssl_last_error_string’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  856 |         log_err("ssl_read: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                                         ^~~~~~~
      |                                                         |
      |                                                         char *
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:856:9: note: in expansion of macro ‘log_err’
  856 |         log_err("ssl_read: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |         ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:47: note: expected ‘struct ssl *’ but argument is of type ‘char *’
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |                                   ~~~~~~~~~~~~^~~
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c:856:66: error: passing argument 2 of ‘ssl_last_error_string’ makes pointer from integer without a cast [-Werror=int-conversion]
  856 |         log_err("ssl_read: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                                                  ^~~~~~~~~~~~~~~
      |                                                                  |
      |                                                                  long unsigned int
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:856:9: note: in expansion of macro ‘log_err’
  856 |         log_err("ssl_read: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |         ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:58: note: expected ‘char *’ but argument is of type ‘long unsigned int’
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |                                                    ~~~~~~^~~
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c:856:35: error: too few arguments to function ‘ssl_last_error_string’
  856 |         log_err("ssl_read: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                   ^~~~~~~~~~~~~~~~~~~~~
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:856:9: note: in expansion of macro ‘log_err’
  856 |         log_err("ssl_read: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |         ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:13: note: declared here
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |             ^~~~~~~~~~~~~~~~~~~~~
/home/zjh/libuhttpd/src/connection.c:860:16: error: ‘SSL_PENDING’ undeclared (first use in this function); did you mean ‘P_FD_PENDING’?
  860 |     if (ret == SSL_PENDING)
      |                ^~~~~~~~~~~
      |                P_FD_PENDING
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c: In function ‘conn_write_cb’:
/home/zjh/libuhttpd/src/connection.c:887:62: error: passing argument 1 of ‘ssl_last_error_string’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  887 |             log_err("ssl_write: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                                              ^~~~~~~
      |                                                              |
      |                                                              char *
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:887:13: note: in expansion of macro ‘log_err’
  887 |             log_err("ssl_write: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |             ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:47: note: expected ‘struct ssl *’ but argument is of type ‘char *’
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |                                   ~~~~~~~~~~~~^~~
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c:887:71: error: passing argument 2 of ‘ssl_last_error_string’ makes pointer from integer without a cast [-Werror=int-conversion]
  887 |             log_err("ssl_write: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                                                       ^~~~~~~~~~~~~~~
      |                                                                       |
      |                                                                       long unsigned int
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:887:13: note: in expansion of macro ‘log_err’
  887 |             log_err("ssl_write: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |             ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:58: note: expected ‘char *’ but argument is of type ‘long unsigned int’
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |                                                    ~~~~~~^~~
In file included from /home/zjh/libuhttpd/src/uhttpd.h:36,
                 from /home/zjh/libuhttpd/src/uhttpd_internal.h:30,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/connection.c:887:40: error: too few arguments to function ‘ssl_last_error_string’
  887 |             log_err("ssl_write: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |                                        ^~~~~~~~~~~~~~~~~~~~~
/home/zjh/libuhttpd/src/log/log.h:43:49: note: in definition of macro ‘log’
   43 |             ___log(__FILENAME__, __LINE__, pri, fmt);  \
      |                                                 ^~~
/home/zjh/libuhttpd/src/connection.c:887:13: note: in expansion of macro ‘log_err’
  887 |             log_err("ssl_write: %s\n", ssl_last_error_string(err_buf, sizeof(err_buf)));
      |             ^~~~~~~
In file included from /home/zjh/libuhttpd/src/uhttpd_internal.h:34,
                 from /home/zjh/libuhttpd/src/connection.c:33:
/home/zjh/libuhttpd/src/ssl/ssl.h:25:13: note: declared here
   25 | const char *ssl_last_error_string(struct ssl *ssl, char *buf, int len);
      |             ^~~~~~~~~~~~~~~~~~~~~
/home/zjh/libuhttpd/src/connection.c:891:20: error: ‘SSL_PENDING’ undeclared (first use in this function); did you mean ‘P_FD_PENDING’?
  891 |         if (ret == SSL_PENDING)
      |                    ^~~~~~~~~~~
      |                    P_FD_PENDING
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/uhttpd.dir/build.make:90: src/CMakeFiles/uhttpd.dir/connection.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:166: src/CMakeFiles/uhttpd.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

@gstrauss
Copy link
Contributor Author

@zhaojh329 looks like you changed the interfaces in your ssl submodule almost two years ago in zhaojh329/ssl@7be969c and zhaojh329/ssl@856def8

@zhaojh329 zhaojh329 merged commit a0c64db into zhaojh329:master Oct 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants