Sha256: 8f3f70c25ac0717689b3f652957aae6f60c17a72656a90cbaa751735dff2cef8

Contents?: true

Size: 637 Bytes

Versions: 11

Compression:

Stored size: 637 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

11 entries across 11 versions & 3 rubygems

Version Path
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rubyntlm-0.6.1/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/channel_binding_spec.rb
rubyntlm-0.6.1 spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/channel_binding_spec.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rubyntlm-0.6.0/spec/lib/net/ntlm/channel_binding_spec.rb
rubyntlm-0.6.0 spec/lib/net/ntlm/channel_binding_spec.rb