xmlenc 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b8a23492d87e17692532f16fbcb8e222521d8b0
4
- data.tar.gz: cc8f4b74ba9f5e60adbe95b4f7096b6da5294f3b
3
+ metadata.gz: 2815f1f21d7851a421f2c2117699298905cfe3eb
4
+ data.tar.gz: 6280eea3934ec684584dc92cff5807d1e10ef091
5
5
  SHA512:
6
- metadata.gz: 8da26208ed9a9aef8464a102c4e71e72105a9e92ca0341bb8befd2806ba8192ef8560590ed74d5fa7dd6981d320fcd0f19a403c6c6be203b20149f14fae2914e
7
- data.tar.gz: f0c94f4d55b82048c30ff2bea0911497bbc825028755b372e5b603770c8f3ea3efd70f72096e8929157dc052da6cf595081da5097ea9ade87ac03305bd0f4134
6
+ metadata.gz: f5f0c0b054e639bd09508b5866ae19051cf5e7878f1d04cddf61e8b6bb7b9b30ab7d508f286734070e4a7e5880fe79737913137abf02193ed47892fc87834b49
7
+ data.tar.gz: 183c8bd9a63191b8560e08a8c2efdc9be620a239dd34a6551a2d87c6bc23964125ada353b36479ce11767316effc171bb4c3af019d1c1a2c083685a9cfca77cc
@@ -14,10 +14,10 @@ module Xmlenc
14
14
  attribute :id, String, tag: 'Id'
15
15
  attribute :recipient, String, tag: 'Recipient'
16
16
 
17
- element :carried_key_name, String, tag: 'CarriedKeyName', namespace: 'xenc'
18
-
19
17
  has_one :reference_list, Xmlenc::Builder::ReferenceList, :xpath => "./"
20
18
 
19
+ element :carried_key_name, String, tag: 'CarriedKeyName', namespace: 'xenc'
20
+
21
21
  attr_accessor :data
22
22
 
23
23
  def encrypt(key, data = nil)
@@ -1,3 +1,3 @@
1
1
  module Xmlenc
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
@@ -9,7 +9,7 @@ describe Xmlenc::Algorithms::AESCBC do
9
9
 
10
10
  describe 'encrypt' do
11
11
  it 'encrypts the data' do
12
- subject.stub(:iv).and_return(iv)
12
+ allow(subject).to receive(:iv).and_return(iv)
13
13
  expect(subject.encrypt(data)).to be == cipher_value
14
14
  end
15
15
  end
@@ -9,7 +9,7 @@ describe Xmlenc::Algorithms::DES3CBC do
9
9
 
10
10
  describe 'encrypt' do
11
11
  it 'encrypts the data' do
12
- subject.stub(:iv).and_return(iv)
12
+ allow(subject).to receive(:iv).and_return(iv)
13
13
  expect(subject.encrypt(data)).to be == cipher_value
14
14
  end
15
15
  end
@@ -9,7 +9,7 @@ end
9
9
  describe BaseDummy do
10
10
  describe "parse override" do
11
11
  it "sets the from_xml flag" do
12
- BaseDummy.parse("<tag></tag>", :single => true).from_xml?.should be_truthy
12
+ expect(BaseDummy.parse("<tag></tag>", :single => true).from_xml?).to be_truthy
13
13
  end
14
14
 
15
15
  it "raises an error if the message cannot be parsed" do
@@ -50,7 +50,7 @@ describe Xmlenc::EncryptedData do
50
50
  <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" xmlns="http://www.w3.org/2001/04/xmlenc#"></EncryptionMethod>
51
51
  XML
52
52
  encrypted_data_node.at_xpath('./xenc:EncryptionMethod', Xmlenc::NAMESPACES).replace(Nokogiri::XML::DocumentFragment.parse(fragment))
53
- subject.stub(:cipher_value) { 'DpNYC0Np5hHaQAUyHWpM3MQ99wkDFtGRc7TywqxmhI4sJKDXM5SRjVlKf6st5wOz' }
53
+ allow(subject).to receive(:cipher_value) { 'DpNYC0Np5hHaQAUyHWpM3MQ99wkDFtGRc7TywqxmhI4sJKDXM5SRjVlKf6st5wOz' }
54
54
  key = %w(b0621c35317af207b92e3a6b317a122a93772a7261e3f13a4297eb64a91af10a).pack('H*')
55
55
 
56
56
  expect(subject.decrypt(key)).to be == '4019 2445 0277 5567'
@@ -64,7 +64,7 @@ describe Xmlenc::EncryptedData do
64
64
  XML
65
65
 
66
66
  encrypted_data_node.at_xpath('./xenc:EncryptionMethod', Xmlenc::NAMESPACES).replace(Nokogiri::XML::DocumentFragment.parse(fragment))
67
- subject.stub(:cipher_value) { 'kY6scZxpyRXQbaDZp+LbuvSFYgmI3pQrfsrCVt3/9sZzpeUTPXJEatQ5KPOXYpJC
67
+ allow(subject).to receive(:cipher_value) { 'kY6scZxpyRXQbaDZp+LbuvSFYgmI3pQrfsrCVt3/9sZzpeUTPXJEatQ5KPOXYpJC
68
68
  Gid01h/T8PIezic0Ooz/jU+r3kYMKesMYiXin4CXTZYcGhd0TjmOd4kg1vlhE8kt
69
69
  WLC7JDzFLPAqXbOug3ghmWunFiUETbGJaF5V4AHIoZrYP+RS3DTLgJcATuDeWyOd
70
70
  ueqnLefXiCDNqgSTsK4OyNlX0fpUJgKbL+Mhf5vsqxyIqDsS/p6cRA==' }
@@ -20,7 +20,7 @@ describe Xmlenc::EncryptedDocument do
20
20
  EOXML
21
21
  expect {
22
22
  described_class.new(badly_formed).document
23
- }.to raise_error
23
+ }.to raise_error Nokogiri::XML::SyntaxError
24
24
  end
25
25
  end
26
26
 
@@ -59,7 +59,7 @@ describe Xmlenc::EncryptedKey do
59
59
 
60
60
  describe 'with rsa oaep' do
61
61
  before :each do
62
- subject.stub(:cipher_value).and_return <<-CV.gsub(/[\n\s]/, '')
62
+ allow(subject).to receive(:cipher_value).and_return <<-CV.gsub(/[\n\s]/, '')
63
63
  ZF0JPSfv75/8M+O2O/xi+8N1b9KT94a4l1D1Q65hnX6F00t+wAWZSkcDUoD/
64
64
  y2/ERKGUyuQwsG6l58e4MwYpmDI4RhHrUYLCQBacAehqVZhwNxv99L7ANsqr
65
65
  ZJoT7N0kER9MbmuIZGb4qisLDfZtzIGKKUUiA3ARfQny4MUxFovSmVUF2Ojq
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmlenc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-31 00:00:00.000000000 Z
11
+ date: 2017-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport