Skip to content

httr::set_config(config(ssl_verifypeer = 0L, ssl_verifyhost = 0L)) is empty for old openssl backend #762

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

Open
ZheFrench opened this issue May 19, 2025 · 1 comment

Comments

@ZheFrench
Copy link

ZheFrench commented May 19, 2025

The problem is in the title. I believe it's related to the backend version.
The code works on other machines with more recent openssl version.

library(httr)
default_user_agent <- function() {
  versions <- c(
    httr = as.character(utils::packageVersion("httr")),
    `r-curl` = as.character(utils::packageVersion("curl")),
    libcurl = curl_system_version()
  )
  print(paste0(names(versions), "/", versions, collapse = " "))
}

curl_system_version <- function() curl::curl_version()$version

default_user_agent()
#> [1] "httr/1.4.7 r-curl/6.2.2 libcurl/7.81.0"
req <- httr::set_config(config(ssl_verifypeer = 0L, ssl_verifyhost = 0L))
str(req)
#> List of 7
#>  $ method    : NULL
#>  $ url       : NULL
#>  $ headers   : NULL
#>  $ fields    : NULL
#>  $ options   : list()
#>  $ auth_token: NULL
#>  $ output    : NULL
#>  - attr(*, "class")= chr "request"
system("openssl version")
#>  OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

sessionInfo()
#> R version 4.5.0 (2025-04-11)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 22.04.5 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0  LAPACK version 3.10.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=en_US.UTF-8    
#>  [5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: Europe/Paris
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] httr_1.4.7
#> 
#> loaded via a namespace (and not attached):
#>  [1] digest_0.6.37     R6_2.6.1          fastmap_1.2.0     xfun_0.52        
#>  [5] glue_1.8.0        knitr_1.50        htmltools_0.5.8.1 rmarkdown_2.29   
#>  [9] lifecycle_1.0.4   cli_3.6.5         reprex_2.1.1      withr_3.0.2      
#> [13] compiler_4.5.0    rstudioapi_0.17.1 tools_4.5.0       curl_6.2.2       
#> [17] evaluate_1.0.3    yaml_2.3.10       rlang_1.1.6       fs_1.6.6
@ZheFrench
Copy link
Author

ZheFrench commented May 22, 2025

Did anyone could reproduce the problem ?
This happens on Ubuntu 20 and 22 due to specific openssl release not upgradable to my knowledge.
UPDATE : More due to Curl version in fact...

Ubuntu 24.04 LTS
   openssl                         3.0.13-0ubuntu3.5
   cURL 8.5.0	 

Ubuntu 22.04 LTS
   openssl                         3.0.2-0ubuntu1.19
   cURL 7.81.0	

Ubuntu 20.04 LTS
   openssl                         1.1.1f-1ubuntu2.24
   cURL 7.68.0	

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

No branches or pull requests

1 participant