Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2019]
ruby: ['3.0', '3.1', '3.2', '3.3', 'head']
ruby: ['3.0', '3.1', '3.2', '3.3', '3.4', 'head']
include:
- os: ubuntu-latest
ruby: 'truffleruby'
- os: ubuntu-latest
ruby: '3.4'
ruby-opt: '--enable-frozen-string-literal --debug-frozen-string-literal'

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
- run: bundle exec rake RUBYOPT="${{ matrix.ruby-opt }}"
2 changes: 1 addition & 1 deletion lib/net/ntlm/channel_binding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def self.create(outer_channel)
# the outer TLS channel
def initialize(outer_channel)
@channel = outer_channel
@unique_prefix = 'tls-server-end-point'
@unique_prefix = 'tls-server-end-point'.dup
@initiator_addtype = 0
@initiator_address_length = 0
@acceptor_addrtype = 0
Expand Down
2 changes: 1 addition & 1 deletion lib/net/ntlm/md4.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def self.digest(string)
end

io = StringIO.new(string)
block = ""
block = "".dup

while io.read(64, block)
x = block.unpack("V16")
Expand Down
2 changes: 1 addition & 1 deletion lib/net/ntlm/target_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(av_pair_sequence)
attr_reader :av_pairs

def to_s
result = ''
result = ''.b
av_pairs.each do |k,v|
result << k
result << [v.length].pack('S')
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/net/ntlm/channel_binding_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
let(:certificates_path) { 'spec/support/certificates' }
let(:sha_256_path) { File.join(certificates_path, 'sha_256_hash.pem') }
let(:sha_256_cert) { OpenSSL::X509::Certificate.new(File.read(sha_256_path)) }
let(:cert_hash) { "\x04\x0E\x56\x28\xEC\x4A\x98\x29\x91\x70\x73\x62\x03\x7B\xB2\x3C".force_encoding(Encoding::ASCII_8BIT) }
let(:cert_hash) { "\x04\x0E\x56\x28\xEC\x4A\x98\x29\x91\x70\x73\x62\x03\x7B\xB2\x3C".b }

subject { Net::NTLM::ChannelBinding.create(sha_256_cert) }

Expand Down