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 +4 -4
- data/lib/xmlenc/builder/encrypted_key.rb +2 -2
- data/lib/xmlenc/version.rb +1 -1
- data/spec/lib/xmlenc/algorithms/aes_cbc_spec.rb +1 -1
- data/spec/lib/xmlenc/algorithms/des3_cbc_spec.rb +1 -1
- data/spec/lib/xmlenc/builder/base_spec.rb +1 -1
- data/spec/lib/xmlenc/encrypted_data_spec.rb +2 -2
- data/spec/lib/xmlenc/encrypted_document_spec.rb +1 -1
- data/spec/lib/xmlenc/encrypted_key_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2815f1f21d7851a421f2c2117699298905cfe3eb
|
4
|
+
data.tar.gz: 6280eea3934ec684584dc92cff5807d1e10ef091
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/xmlenc/version.rb
CHANGED
@@ -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
|
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.
|
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.
|
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==' }
|
@@ -59,7 +59,7 @@ describe Xmlenc::EncryptedKey do
|
|
59
59
|
|
60
60
|
describe 'with rsa oaep' do
|
61
61
|
before :each do
|
62
|
-
subject.
|
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.
|
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:
|
11
|
+
date: 2017-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|