cose 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05132ebf44cbd8025419363e4f7225a55e28896b9db9c61e490866bdf7ca7d1d
4
- data.tar.gz: 5656845e945fa562609f59c05a417a433c2d92f771395727634d7ea1ebc71838
3
+ metadata.gz: 421ef632c61005a43efc9b8c9fff3560d7b22386bd3ab8ff0a556ac57a338eba
4
+ data.tar.gz: '0912bd03e39ca678d6a46b6d1f7b046593a656b754235dd584b59242c9fe34d2'
5
5
  SHA512:
6
- metadata.gz: d8c048d5f991c86a246d2ab7384717be17f86edaddbcd4c1f4ce2dbd3b8b25d66b85831ce3b9c5d02f0ce033abeac84b457397d5bb1df540aebd3693b659ee60
7
- data.tar.gz: '01953ba4ed4d5734ad0044b3e8735dad85f95407663ad52c04a1d306094c8cdf6b01943c55813eb87ae56688098a6d8cef364c096e9d393b4f1ff2a7873bafd4'
6
+ metadata.gz: aaae536b461341f4b79960a66c261709510887ab8690083473b41ca45ec8952c19e1d298fc716abbbf8973790ca82d78ee967673a58332ea2998fbcfe771819f
7
+ data.tar.gz: 026774ddd5ea2fa6f23a6d7866e22f87a880aa802af380733b8bfdf62efbb0a808a4c07d287935b31fcda31544e6855a7686f6aee1b4640180cf0591abd780bd
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.4.1] - 2019-03-12
4
+
5
+ ### Fixed
6
+
7
+ - Fix `uninitialized constant COSE::Key::Base::LABEL_KTY` when requiring only particular key
8
+
3
9
  ## [v0.4.0] - 2019-03-12
4
10
 
5
11
  ### Added
@@ -39,6 +45,7 @@
39
45
  - EC2 key object
40
46
  - Works with ruby 2.5
41
47
 
48
+ [v0.4.1]: https://github.com/cedarcode/cose-ruby/compare/v0.4.0...v0.4.1/
42
49
  [v0.4.0]: https://github.com/cedarcode/cose-ruby/compare/v0.3.0...v0.4.0/
43
50
  [v0.3.0]: https://github.com/cedarcode/cose-ruby/compare/v0.2.0...v0.3.0/
44
51
  [v0.2.0]: https://github.com/cedarcode/cose-ruby/compare/v0.1.0...v0.2.0/
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # cose
2
2
 
3
- COSE ([RFC 8152](https://tools.ietf.org/html/rfc8152)) in ruby
3
+ CBOR Object Signing and Encryption (COSE) ruby library
4
4
 
5
5
  [![Gem](https://img.shields.io/gem/v/cose.svg?style=flat-square)](https://rubygems.org/gems/cose)
6
6
  [![Travis](https://img.shields.io/travis/cedarcode/cose-ruby.svg?style=flat-square)](https://travis-ci.org/cedarcode/cose-ruby)
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ["Gonzalo Rodriguez", "Braulio Martinez"]
11
11
  spec.email = ["gonzalo@cedarcode.com", "braulio@cedarcode.com"]
12
12
 
13
- spec.summary = "COSE (RFC 8152) ruby library"
13
+ spec.summary = "CBOR Object Signing and Encryption (COSE) ruby library"
14
14
  spec.homepage = "https://github.com/cedarcode/cose-ruby"
15
15
  spec.license = "MIT"
16
16
 
@@ -7,12 +7,10 @@ module COSE
7
7
  class UnknownKeyType < StandardError; end
8
8
 
9
9
  module Key
10
- LABEL_KTY = 1
11
-
12
10
  def self.deserialize(data)
13
11
  map = CBOR.decode(data)
14
12
 
15
- case map[LABEL_KTY]
13
+ case map[Base::LABEL_KTY]
16
14
  when COSE::Key::EC2::KTY_EC2
17
15
  COSE::Key::EC2.from_map(map)
18
16
  when COSE::Key::RSA::KTY_RSA
@@ -20,7 +18,7 @@ module COSE
20
18
  when COSE::Key::Symmetric::KTY_SYMMETRIC
21
19
  COSE::Key::Symmetric.from_map(map)
22
20
  else
23
- raise UnknownKeyType, "Unsupported or unknown key type #{map[LABEL_KTY]}"
21
+ raise UnknownKeyType, "Unsupported or unknown key type #{map[Base::LABEL_KTY]}"
24
22
  end
25
23
  end
26
24
  end
@@ -5,6 +5,8 @@ require "cbor"
5
5
  module COSE
6
6
  module Key
7
7
  class Base
8
+ LABEL_KTY = 1
9
+
8
10
  def self.deserialize(cbor)
9
11
  from_map(CBOR.decode(cbor))
10
12
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module COSE
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Rodriguez
@@ -162,5 +162,5 @@ requirements: []
162
162
  rubygems_version: 3.0.3
163
163
  signing_key:
164
164
  specification_version: 4
165
- summary: COSE (RFC 8152) ruby library
165
+ summary: CBOR Object Signing and Encryption (COSE) ruby library
166
166
  test_files: []