xmlenc 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +10 -0
- data/README.md +4 -0
- data/Rakefile +16 -1
- data/lib/xmlenc/builder/retrieval_method.rb +3 -0
- data/lib/xmlenc/version.rb +1 -1
- data/spec/fixtures/encrypted_document.xml +1 -0
- data/spec/lib/xmlenc/builder/key_info_spec.rb +1 -1
- data/spec/lib/xmlenc/builder/retrieval_method_spec.rb +21 -2
- data/spec/spec_helper.rb +3 -0
- data/xmlenc.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1cd8be205f4d884ef3f5e43dc22d200ec6980be
|
4
|
+
data.tar.gz: 19155cd49f925eeed4c443a77023e766175a6c5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffe48439bb5b226859055c8cf469382213e71a314a2f0aa0b1e242ad986517b0e8ca5ee40808dd0a70fdfbb04508649b9057cc26f626fe79f36897e79145fc60
|
7
|
+
data.tar.gz: a361d62f33feeb06db5765a5c319a61f7163116396b6f8c03df6ddec68af692f7d3f828a76d784df84ea1da387ee8773b2540cee0ecded33c6ee2ecb71415ca6
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
[](https://travis-ci.org/digidentity/xmlenc)
|
2
|
+
[](https://coveralls.io/github/digidentity/xmlenc?branch=master)
|
3
|
+
[](https://codeclimate.com/github/digidentity/xmlenc)
|
4
|
+
|
1
5
|
# Xmlenc
|
2
6
|
|
3
7
|
This gem is a (partial) implementation of the XMLEncryption specification (http://www.w3.org/TR/xmlenc-core/)
|
data/Rakefile
CHANGED
@@ -1 +1,16 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
|
8
|
+
require "rspec/core/rake_task"
|
9
|
+
|
10
|
+
RSpec::Core::RakeTask.new(:core) do |spec|
|
11
|
+
spec.rspec_opts = ['--backtrace']
|
12
|
+
end
|
13
|
+
|
14
|
+
task :default => [:core]
|
15
|
+
|
16
|
+
Bundler::GemHelper.install_tasks
|
data/lib/xmlenc/version.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
<EncryptedData Id="ED" Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
|
5
5
|
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
|
6
6
|
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
|
7
|
+
<ds:RetrievalMethod URI="#_EK"/>
|
7
8
|
<EncryptedKey Id="EK" xmlns="http://www.w3.org/2001/04/xmlenc#">
|
8
9
|
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
|
9
10
|
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
|
@@ -2,8 +2,13 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe Xmlenc::Builder::RetrievalMethod do
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
it 'has a tag' do
|
6
|
+
expect(described_class.tag_name).to eq 'RetrievalMethod'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'has a namespace' do
|
10
|
+
expect(described_class.namespace).to eq 'ds'
|
11
|
+
end
|
7
12
|
|
8
13
|
describe "optional fields" do
|
9
14
|
subject { described_class.new }
|
@@ -19,4 +24,18 @@ describe Xmlenc::Builder::RetrievalMethod do
|
|
19
24
|
end
|
20
25
|
end
|
21
26
|
end
|
27
|
+
|
28
|
+
describe '#parse' do
|
29
|
+
let(:xml) { File.read File.join('spec', 'fixtures', 'encrypted_document.xml') }
|
30
|
+
subject { described_class.parse(xml, :single => true) }
|
31
|
+
|
32
|
+
it 'should parse' do
|
33
|
+
expect(subject).to be_a described_class
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should parse the URI' do
|
37
|
+
expect(subject.uri).to eq '#_EK'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
22
41
|
end
|
data/spec/spec_helper.rb
CHANGED
data/xmlenc.gemspec
CHANGED
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.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
description: A (partial)implementation of the XMLENC specificiation
|
112
126
|
email:
|
113
127
|
- bclaassen@digidentity.eu
|
@@ -117,6 +131,7 @@ extra_rdoc_files: []
|
|
117
131
|
files:
|
118
132
|
- ".gitignore"
|
119
133
|
- ".rspec"
|
134
|
+
- ".travis.yml"
|
120
135
|
- Gemfile
|
121
136
|
- LICENSE.txt
|
122
137
|
- README.md
|