set_dhparams: pass BIO_new_file() "r" for the file mode, not O_RDONLY.
Unlike BIO_new_fp(), BIO_new_file() takes an fopen-style mode string.
This commit is contained in:
@@ -233,7 +233,7 @@ set_dhparams(SSL_CTX *ctx, const char *dhparam_file)
|
||||
bool ret = false;
|
||||
debug_decl(set_dhparams, SUDO_DEBUG_UTIL);
|
||||
|
||||
bio = BIO_new_file(dhparam_file, O_RDONLY);
|
||||
bio = BIO_new_file(dhparam_file, "r");
|
||||
if (bio != NULL) {
|
||||
if (set_dhparams_bio(ctx, bio)) {
|
||||
sudo_debug_printf(SUDO_DEBUG_INFO|SUDO_DEBUG_LINENO,
|
||||
|
Reference in New Issue
Block a user