Skip to content

net.openssl: replace SSL_get1_peer_certificate by SSL_get_peer_certificate for OpenBSD#24556

Merged
spytheman merged 1 commit into
vlang:masterfrom
lcheylus:openbsd-openssl
May 23, 2025
Merged

net.openssl: replace SSL_get1_peer_certificate by SSL_get_peer_certificate for OpenBSD#24556
spytheman merged 1 commit into
vlang:masterfrom
lcheylus:openbsd-openssl

Conversation

@lcheylus

@lcheylus lcheylus commented May 23, 2025

Copy link
Copy Markdown
Contributor

OpenBSD uses LibreSSL (OpenSSL fork) by default for libssl/libcrypto. SSL_get1_peer_certificate is not supported by LibreSSL, replace it by SSL_get_peer_certificate.

Fix #24547


Tests OK on OpenBSD current/amd64

$ ./v -stats -W -d use_openssl test vlib/net/http/http_test.v
---- Testing... ----
        V  source  code size:      42212 lines,     193393 tokens,    1164711 bytes,   474 types,    33 modules,   221 files
generated  target  code size:      21296 lines,     793237 bytes
compilation took: 1099.270 ms, compilation speed: 38400 vlines/s, cgen threads: 3
running tests in: /home/fox/dev/vlang.git/vlib/net/http/http_test.v
      OK    [1/4]     0.005 ms    NO asserts | main.test_http_get()
      OK    [2/4]     0.005 ms    NO asserts | main.test_http_get_from_vlang_utc_now()
      OK    [3/4]     0.005 ms    NO asserts | main.test_public_servers()
      OK    [4/4]     0.000 ms    NO asserts | main.test_relative_redirects()
     Summary for running V tests in "http_test.v": 0 total. Elapsed time: 0 ms.

 OK    1197.922 ms vlib/net/http/http_test.v
----
Summary for all V _test.v files: 1 passed, 1 total. Elapsed time: 1201 ms, on 1 job. Comptime: 0 ms. Runtime: 1197 ms.

…icate for OpenBSD

OpenBSD uses LibreSSL (OpenSSL fork) by default for libssl/libcrypto.
SSL_get1_peer_certificate is not supported by LibreSSL, replace it by
SSL_get_peer_certificate.
@huly-for-github

Copy link
Copy Markdown

Connected to Huly®: V_0.6-22922

@lcheylus lcheylus changed the title net.openssl: replace SSL_get1_peer_certificate by SSL_get_peer_certiicate for OpenBSD net.openssl: replace SSL_get1_peer_certificate by SSL_get_peer_certificate for OpenBSD May 23, 2025
@spytheman spytheman merged commit a8aeae2 into vlang:master May 23, 2025
64 checks passed
@spytheman

Copy link
Copy Markdown
Contributor

Excellent work.

@lcheylus lcheylus deleted the openbsd-openssl branch May 23, 2025 14:29
ctkjose pushed a commit to ctkjose/vlang that referenced this pull request May 27, 2025
…icate for OpenBSD (vlang#24556)

OpenBSD uses LibreSSL (OpenSSL fork) by default for libssl/libcrypto.
SSL_get1_peer_certificate is not supported by LibreSSL, replace it by
SSL_get_peer_certificate.
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.

Unable to compile with OpenSSL on OpenBSD

2 participants