Skip to content

Commit 529ae5e

Browse files
committed
Remove every trace of rbnacl
1 parent 9621d8c commit 529ae5e

File tree

15 files changed

+4
-445
lines changed

15 files changed

+4
-445
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
- "3.4"
4242
gemfile:
4343
- gemfiles/standalone.gemfile
44-
- gemfiles/rbnacl.gemfile
45-
- gemfiles/rbnacl_pre_6.gemfile
4644
experimental: [false]
4745
include:
4846
- os: ubuntu-20.04
@@ -64,11 +62,6 @@ jobs:
6462
steps:
6563
- uses: actions/checkout@v4
6664

67-
- name: Install libsodium
68-
run: |
69-
sudo apt-get update -q
70-
sudo apt-get install libsodium-dev -y
71-
7265
- name: Set up Ruby
7366
uses: ruby/setup-ruby@v1
7467
with:
@@ -96,7 +89,7 @@ jobs:
9689
- uses: actions/checkout@v3
9790

9891
- name: Download coverage reports from the test job
99-
uses: actions/download-artifact@v3
92+
uses: actions/download-artifact@v4
10093
with:
10194
name: coverage-reports
10295

Appraisals

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,3 @@ appraise 'openssl' do
88
gem 'openssl', '~> 2.1'
99
remove_gem 'rubocop'
1010
end
11-
12-
appraise 'rbnacl' do
13-
gem 'rbnacl', '>= 6'
14-
remove_gem 'rubocop'
15-
end
16-
17-
appraise 'rbnacl_pre_6' do
18-
gem 'rbnacl', '< 6'
19-
remove_gem 'rubocop'
20-
end

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
**Breaking changes:**
88
- Require token signature to be verified before accessing payload [#648](https://github.com/jwt/ruby-jwt/pull/648) ([@anakinj](https://github.com/anakinj))
99
- Drop support for the HS512256 algorithm [#650](https://github.com/jwt/ruby-jwt/pull/650) ([@anakinj](https://github.com/anakinj))
10+
- Remove dependency to rbnacl [#655](https://github.com/jwt/ruby-jwt/pull/655) ([@anakinj](https://github.com/anakinj))
1011

1112
Take a look at the [upgrade guide](UPGRADING.md) for more details.
1213

gemfiles/rbnacl.gemfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

gemfiles/rbnacl_pre_6.gemfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

lib/jwt/jwa.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
require 'openssl'
44

5-
begin
6-
require 'rbnacl'
7-
rescue LoadError
8-
raise if defined?(RbNaCl)
9-
end
10-
115
require_relative 'jwa/compat'
126
require_relative 'jwa/signing_algorithm'
137
require_relative 'jwa/ecdsa'
@@ -18,8 +12,6 @@
1812
require_relative 'jwa/unsupported'
1913
require_relative 'jwa/wrapper'
2014

21-
require_relative 'jwa/eddsa' if JWT.rbnacl?
22-
2315
module JWT
2416
# The JWA module contains all supported algorithms.
2517
module JWA

lib/jwt/jwa/eddsa.rb

Lines changed: 0 additions & 35 deletions
This file was deleted.

lib/jwt/jwk.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,3 @@ def generate_mappings
5353
require_relative 'jwk/ec'
5454
require_relative 'jwk/rsa'
5555
require_relative 'jwk/hmac'
56-
require_relative 'jwk/okp_rbnacl' if JWT.rbnacl?

lib/jwt/jwk/okp_rbnacl.rb

Lines changed: 0 additions & 109 deletions
This file was deleted.

lib/jwt/version.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,6 @@ def self.openssl_3?
3232
true if 3 * 0x10000000 <= OpenSSL::OPENSSL_VERSION_NUMBER
3333
end
3434

35-
# Checks if the RbNaCl library is defined.
36-
#
37-
# @return [Boolean] true if RbNaCl is defined, false otherwise.
38-
# @api private
39-
def self.rbnacl?
40-
defined?(::RbNaCl)
41-
end
42-
43-
# Checks if the RbNaCl library version is 6.0.0 or greater.
44-
#
45-
# @return [Boolean] true if RbNaCl version is 6.0.0 or greater, false otherwise.
46-
# @api private
47-
def self.rbnacl_6_or_greater?
48-
rbnacl? && ::Gem::Version.new(::RbNaCl::VERSION) >= ::Gem::Version.new('6.0.0')
49-
end
50-
5135
# Checks if there is an OpenSSL 3 HMAC empty key regression.
5236
#
5337
# @return [Boolean] true if there is an OpenSSL 3 HMAC empty key regression, false otherwise.

0 commit comments

Comments
 (0)