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
declaring arc4random_buf arc4random arc4random_stir arc4random_uniform #109
Comments
|
I don't think we intend to declare arc4random_buf as a library function in the headers from LibreSSL. It is a compatibility function added to work around this function being missing from the Linux C library. We still need to export the symbol though, since it is used in libcrypto, libssl, libtls, openssl(1), etc. but these use LibreSSL's internal shim headers. Alternative solutions would be for your C library to support arc4random, or openssh-portable could include the definition in its own compat headers if it is not found in stdlib.h. |
|
I think this should probably be redirected toward the openssh-portable project. The problem is that the configure script is not checking if the system headers are defining these files, which is certainly doable. See the recent discussion about this here #120 |
|
I was unable to find the corresponding bug in the openssh portable bug tracker, so I made one. Thanks for the report: |
These functions are exported by libcrypto from libressl, due to its similar OpenBSD compatibility layer, but they are not present in any header files. Thus, while we can use the existing compiled function, and do not need to provide our own, we do need to provide the prototype for it. This avoids implicit function declarations and the resulting crashes due to pointer truncation. The patch is based on an equivalent patch for OpenSSH from https://bugzilla.mindrot.org/show_bug.cgi?id=2465 Also see libressl/portable#109 Fixes OpenSMTPD#691
These functions are not declared in the installed headers.
When compiling openssh-portable on Linux:
because AC_CHECK_FUNCS does not care about implicit declaration..
The text was updated successfully, but these errors were encountered: