xml-kit 0.3.0 → 0.3.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 +5 -4
- data/CHANGELOG.md +46 -0
- data/lib/xml/kit/encrypted_data.rb +4 -1
- data/lib/xml/kit/encrypted_key.rb +1 -1
- data/lib/xml/kit/templates/signature.builder +1 -1
- data/lib/xml/kit/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7d54b8425fbadc4a5fc87ab86cb916a436126b1c0d396e79bf7d9610d0000aa2
|
|
4
|
+
data.tar.gz: '096cf9d2ff95c8201044eb808a55a856a99f3f98f0b36f237e1eb9c07392aed8'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4fb9ab21dab02c64219b6a65de104a759e2b603210362ff9a58c01147a32aa9c914d97018d405febc845604e3f727b9079d794b81dd955d600dcc71ea0f64b0b
|
|
7
|
+
data.tar.gz: 8fe641c1031dbd7cc8d35786ff2baba1d33096c0fa4f2fb32430a62931eabe3cdc93668455cc9004ea86d0e4513451a201f79cc1867fbd904d99cfe0a11b08c1
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Version 0.3.1
|
|
2
|
+
# Changelog
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
### Changed
|
|
10
|
+
- nil
|
|
11
|
+
|
|
12
|
+
## [0.3.1] - 2019-04-01
|
|
13
|
+
### Changed
|
|
14
|
+
- provide default symmetric cipher for `EncryptedData` element.
|
|
15
|
+
- use `ENVELOPED_SIG` constant
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- allow specifying id for `EncryptedData` element.
|
|
19
|
+
|
|
20
|
+
## [0.3.0] - 2019-01-XX
|
|
21
|
+
### Added
|
|
22
|
+
- Default logger
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- \_assign does not coerce values by default.
|
|
26
|
+
- errors are merged together instead of overwritten during attribute validation.
|
|
27
|
+
|
|
28
|
+
[Unreleased]: https://github.com/saml-kit/xml-kit/compare/v0.3.1...HEAD
|
|
29
|
+
[0.3.1]: https://github.com/saml-kit/xml-kit/compare/v0.3.0...v0.3.1
|
|
30
|
+
[0.3.0]: https://github.com/saml-kit/xml-kit/compare/v0.2.0...v0.3.0
|
|
31
|
+
[0.2.0]: https://github.com/saml-kit/xml-kit/compare/v0.1.14...v0.2.0
|
|
32
|
+
[0.1.14]: https://github.com/saml-kit/xml-kit/compare/v0.1.13...v0.1.14
|
|
33
|
+
[0.1.13]: https://github.com/saml-kit/xml-kit/compare/v0.1.12...v0.1.13
|
|
34
|
+
[0.1.12]: https://github.com/saml-kit/xml-kit/compare/v0.1.11...v0.1.12
|
|
35
|
+
[0.1.11]: https://github.com/saml-kit/xml-kit/compare/v0.1.10...v0.1.11
|
|
36
|
+
[0.1.10]: https://github.com/saml-kit/xml-kit/compare/v0.1.9...v0.1.10
|
|
37
|
+
[0.1.9]: https://github.com/saml-kit/xml-kit/compare/v0.1.8...v0.1.9
|
|
38
|
+
[0.1.8]: https://github.com/saml-kit/xml-kit/compare/v0.1.7...v0.1.8
|
|
39
|
+
[0.1.7]: https://github.com/saml-kit/xml-kit/compare/v0.1.6...v0.1.7
|
|
40
|
+
[0.1.6]: https://github.com/saml-kit/xml-kit/compare/v0.1.5...v0.1.6
|
|
41
|
+
[0.1.5]: https://github.com/saml-kit/xml-kit/compare/v0.1.4...v0.1.5
|
|
42
|
+
[0.1.4]: https://github.com/saml-kit/xml-kit/compare/v0.1.3...v0.1.4
|
|
43
|
+
[0.1.3]: https://github.com/saml-kit/xml-kit/compare/v0.1.1...v0.1.3
|
|
44
|
+
[0.1.1]: https://github.com/saml-kit/xml-kit/compare/v0.1.1...v0.1.1
|
|
45
|
+
[0.1.1]: https://github.com/saml-kit/xml-kit/compare/v0.1.0...v0.1.1
|
|
46
|
+
[0.1.0]: https://github.com/saml-kit/xml-kit/compare/v0.1.0...v0.1.0
|
|
@@ -7,16 +7,19 @@ module Xml
|
|
|
7
7
|
#
|
|
8
8
|
# @since 0.3.0
|
|
9
9
|
class EncryptedData
|
|
10
|
+
attr_reader :id
|
|
10
11
|
attr_reader :key_info
|
|
11
12
|
attr_reader :symmetric_cipher
|
|
12
13
|
attr_reader :symmetric_cipher_value
|
|
13
14
|
|
|
14
15
|
def initialize(
|
|
15
16
|
raw_xml,
|
|
16
|
-
|
|
17
|
+
id: Id.generate,
|
|
18
|
+
symmetric_cipher: Xml::Kit::Crypto::SymmetricCipher.new,
|
|
17
19
|
asymmetric_cipher:,
|
|
18
20
|
key_info: nil
|
|
19
21
|
)
|
|
22
|
+
@id = id
|
|
20
23
|
@symmetric_cipher = symmetric_cipher
|
|
21
24
|
@symmetric_cipher_value = Base64.strict_encode64(
|
|
22
25
|
symmetric_cipher.encrypt(raw_xml)
|
|
@@ -6,7 +6,7 @@ xml.Signature 'xmlns' => ::Xml::Kit::Namespaces::XMLDSIG do
|
|
|
6
6
|
xml.SignatureMethod Algorithm: signature_method
|
|
7
7
|
xml.Reference URI: "##{reference_id}" do
|
|
8
8
|
xml.Transforms do
|
|
9
|
-
xml.Transform Algorithm:
|
|
9
|
+
xml.Transform Algorithm: ::Xml::Kit::Namespaces::ENVELOPED_SIG
|
|
10
10
|
xml.Transform Algorithm: ::Xml::Kit::Namespaces::CANONICALIZATION
|
|
11
11
|
end
|
|
12
12
|
xml.DigestMethod Algorithm: digest_method
|
data/lib/xml/kit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xml-kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mo khan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-01
|
|
11
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -190,6 +190,7 @@ files:
|
|
|
190
190
|
- ".rspec"
|
|
191
191
|
- ".rubocop.yml"
|
|
192
192
|
- ".travis.yml"
|
|
193
|
+
- CHANGELOG.md
|
|
193
194
|
- Gemfile
|
|
194
195
|
- LICENSE.txt
|
|
195
196
|
- README.md
|