xml-kit 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: 672d735085855f16805b7406db39b904cca1e04be940d8a9bb0512ddb441c94d
4
- data.tar.gz: 6dd14f85bde17fae00b6b2fb3c0a70d32db6bdf8d9534053eddebcea2afa3b09
3
+ metadata.gz: 7d54b8425fbadc4a5fc87ab86cb916a436126b1c0d396e79bf7d9610d0000aa2
4
+ data.tar.gz: '096cf9d2ff95c8201044eb808a55a856a99f3f98f0b36f237e1eb9c07392aed8'
5
5
  SHA512:
6
- metadata.gz: 91479a0d7f9dd674d0b509e332c5d4de11ec9d6dc5e4a53ba5abf1b0724ffd30effd04ea4986e68d0a8d5db7de5169f72cc24dccea472dc7cf4df8cf1b57e366
7
- data.tar.gz: 2a516669b6c6fcaa56a8a216f701da707547876aaee04df7efbfdb06da0a32b80dc3d1055b5d933aff022b423b9992cf3f4bc4fc95c5060f9a4200983d00cbf6
6
+ metadata.gz: 4fb9ab21dab02c64219b6a65de104a759e2b603210362ff9a58c01147a32aa9c914d97018d405febc845604e3f727b9079d794b81dd955d600dcc71ea0f64b0b
7
+ data.tar.gz: 8fe641c1031dbd7cc8d35786ff2baba1d33096c0fa4f2fb32430a62931eabe3cdc93668455cc9004ea86d0e4513451a201f79cc1867fbd904d99cfe0a11b08c1
@@ -1,10 +1,11 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.9
5
- - 2.3.6
6
- - 2.4.3
7
- - 2.5.3
4
+ - 2.2.10
5
+ - 2.3.8
6
+ - 2.4.6
7
+ - 2.5.5
8
+ - 2.6.2
8
9
  script:
9
10
  - bin/cibuild
10
11
  - bin/lint
@@ -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
- symmetric_cipher:,
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)
@@ -17,7 +17,7 @@ module Xml
17
17
  def initialize(
18
18
  id: Id.generate,
19
19
  asymmetric_cipher:,
20
- symmetric_cipher:,
20
+ symmetric_cipher: Xml::Kit::Crypto::SymmetricCipher.new,
21
21
  key_info: nil
22
22
  )
23
23
  @id = id
@@ -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: "#{::Xml::Kit::Namespaces::XMLDSIG}enveloped-signature"
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Xml
4
4
  module Kit
5
- VERSION = '0.3.0'.freeze
5
+ VERSION = '0.3.1'.freeze
6
6
  end
7
7
  end
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.0
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-29 00:00:00.000000000 Z
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