Sha256: 25a0910397b9074a92940434eaf429ea41bc4396841cbe495c4d8ed85320064d

Contents?: true

Size: 620 Bytes

Versions: 40

Compression:

Stored size: 620 Bytes

Contents

require 'spec_helper'

describe Net::NTLM::ChannelBinding do
  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) }

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

  describe '#channel_binding_token' do

    it 'returns the correct hash' do
      expect(subject.channel_binding_token).to eq cert_hash
    end
  end
end

Version data entries

40 entries across 32 versions & 3 rubygems

Version Path
rubyntlm-0.6.5 spec/lib/net/ntlm/channel_binding_spec.rb
rubyntlm-0.6.4 spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/rubyntlm-0.6.3/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/rubyntlm-0.6.3/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/rubyntlm-0.6.3/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
rubyntlm-0.6.3 spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/rubyntlm-0.6.2/spec/lib/net/ntlm/channel_binding_spec.rb