Skip to content

Commit 84832be

Browse files
committed
[GR-38028] Update openssl gem to support libssl 3.0.0
PullRequest: truffleruby/3375
2 parents a4e867a + dd0612d commit 84832be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+5322
-4552
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
New features:
44

55
* Add support for `darwin-aarch64` (macOS M1) (#2181, @lewurm, @chrisseaton, @eregon).
6+
* Add support for OpenSSL 3.0.0 by updating the openssl gem (@aardvark179, @eregon).
67

78
Bug fixes:
89

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,10 @@ Runtime configurations are further detailed in [Deploying TruffleRuby](doc/user/
8686

8787
TruffleRuby is actively tested on the following systems:
8888

89-
* Oracle Linux 7
90-
* Ubuntu 18.04 LTS
91-
* Ubuntu 16.04 LTS
92-
* Fedora 28
93-
* macOS 10.14 (Mojave)
94-
* macOS 10.15 (Catalina)
89+
* Oracle Linux 7, 8
90+
* Ubuntu 16.04, 18.04, 20.04, 22.04 (all LTS)
91+
* Fedora 35, 36
92+
* macOS 10.14 (Mojave), 12 (Monterey)
9593

9694
Architectures:
9795

ci.jsonnet

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ local part_definitions = {
6969
# Fail if any command part of the pipe fails
7070
["set", "-o", "pipefail"],
7171
["ruby", "--version"],
72+
["openssl", "version"],
7273
],
7374

7475
logs+: [
@@ -269,6 +270,10 @@ local part_definitions = {
269270
normal_machine: ["linux", "amd64"],
270271
bench_machine: ["x52"] + self.normal_machine + ["no_frequency_scaling"],
271272
},
273+
docker: {
274+
image: "phx.ocir.io/oraclelabs2/c_graal/buildslave:buildslave_ol7",
275+
mount_modules: true,
276+
},
272277
},
273278
linux_aarch64: linux_deps + {
274279
platform_name:: "LinuxAArch64",
@@ -336,6 +341,7 @@ local part_definitions = {
336341
test_specs_mri: {
337342
environment+: {
338343
"CHECK_LEAKS": "true",
344+
"RUBY_SPEC_TEST_ZLIB_CRC_TABLE": "false", # CRuby was built on OL6 and is used on OL7
339345
},
340346
run+: jt(["-u", mri_path(mri_version), "mspec", "spec/ruby"]) +
341347
jt(["-u", mri_path("2.7.2"), "mspec", "spec/ruby"]),

doc/user/installing-libssl.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ permalink: /reference-manual/ruby/Installinglibssl/
66
---
77
# Installing `libssl`
88

9-
TruffleRuby provides the `openssl` module but not the native `libssl` system library that the module uses.
10-
TruffleRuby supports libssl versions 1.0.2 and 1.1.0 (not 3.0.0 currently).
9+
TruffleRuby provides the `openssl` gem but not the native `libssl` system library that the gem uses.
10+
TruffleRuby supports libssl versions 1.0.2, 1.1.0 and 3.0.0.
1111

12-
If you experience `openssl`-related errors, it might help to recompile the `openssl` module by running `lib/truffle/post_install_hook.sh`.
12+
If you experience `openssl`-related errors, it might help to recompile the `openssl` gem by running `lib/truffle/post_install_hook.sh`.
1313
This is done automatically by Ruby managers, and mentioned in the post-install message when installing TruffleRuby via `gu install` in GraalVM.
1414

1515
To compile TruffleRuby against a non-system `libssl`, set `OPENSSL_PREFIX` while installing TruffleRuby:
@@ -19,8 +19,6 @@ export OPENSSL_PREFIX=/path/to/my/openssl-1.1.0
1919

2020
### RedHat-based: Fedora, Oracle Linux, etc
2121

22-
On Fedora 36, use `openssl1.1-devel` instead.
23-
2422
```bash
2523
sudo dnf install openssl-devel
2624
```

lib/cext/ABI_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6
1+
7

lib/cext/include/truffleruby/config_linux_amd64.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@
238238
#define HAVE_ATAN2L 1
239239
#define HAVE_ATAN2F 1
240240
#define HAVE_CHROOT 1
241+
#define HAVE_CLOCK_GETTIME 1
241242
#define HAVE_COSH 1
242243
#define HAVE_CRYPT_R 1
243244
#define HAVE_DIRFD 1
@@ -370,8 +371,6 @@
370371
#define HAVE_BUILTIN___BUILTIN_TRAP 1
371372
#define HAVE_GNU_QSORT_R 1
372373
#define ATAN2_INF_C99 1
373-
#define HAVE_LIBRT 1
374-
#define HAVE_CLOCK_GETTIME 1
375374
#define HAVE_CLOCK_GETRES 1
376375
#define HAVE_LIBRT 1
377376
#define HAVE_LIBRT 1

lib/mri/openssl.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
require_relative 'openssl/bn'
1616
require_relative 'openssl/pkey'
1717
require_relative 'openssl/cipher'
18-
require_relative 'openssl/config'
1918
require_relative 'openssl/digest'
2019
require_relative 'openssl/hmac'
2120
require_relative 'openssl/x509'

lib/mri/openssl/buffering.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ def consume_rbuff(size=nil)
101101

102102
public
103103

104+
# call-seq:
105+
# ssl.getbyte => 81
106+
#
107+
# Get the next 8bit byte from `ssl`. Returns `nil` on EOF
108+
def getbyte
109+
byte = read(1)
110+
byte && byte.unpack1("C")
111+
end
112+
104113
##
105114
# Reads _size_ bytes from the stream. If _buf_ is provided it must
106115
# reference a string which will receive the data.

0 commit comments

Comments
 (0)