Improve make_optional_func_list and make renegotiation functions optional.#23
Improve make_optional_func_list and make renegotiation functions optional.#23haydenroche5 wants to merge 1 commit intowolfSSL:masterfrom
Conversation
…onal. `make_optional_func_list` will fall back to using `nm` to determine if a function is provided by libwolfssl if libwolfssl is a static library. This commit makes it so we first check if `nm` is available. If it's not available, the function will print a warning and assume all optional functions are available.
julek-wolfssl
left a comment
There was a problem hiding this comment.
Installing on a "fresh" PC I needed to run sudo apt-get install python3-dev (would be sudo apt-get install python-dev for python 2) for setup to succeed. Let's add that to the README.
- The error I sent you directly.
| @@ -43,12 +43,19 @@ def make_optional_func_list(libwolfssl_path, funcs): | |||
| except AttributeError as _: | |||
There was a problem hiding this comment.
I know this isn't part of the PR but can we just change this to except AttributeError:? The as _ isn't necessary if all we care about is exception type.
| print(("WARNING: Can't determine available libwolfssl functions." | ||
| " Assuming all optional functions are available.")) | ||
| defined = funcs |
There was a problem hiding this comment.
Perhaps it would be better to throw an exception here and allow the user to skip the exception (and assume all optional funcs are available) through a command line parameter? This would make error detection and debugging easier.
|
@haydenroche5 if you do loop back on this, can you think of a way of doing it without |
I think if there's no easy way to get the symbols reliably on Windows, then we'll just have to assume all the optional functions are available? |
That or we have to do a macro detection thing like in wolfcrypt-py (which I'm guessing will be much more work). Probably best to just assume all optional are available in Windows. |
make_optional_func_listwill fall back to usingnmto determine if afunction is provided by libwolfssl if libwolfssl is a static library. This
commit makes it so we first check if
nmis available. If it's not available,the function will print a warning and assume all optional functions are
available.