cose 0.7.0 → 0.8.0

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: aceb3ea289c6adab5874f31854aebcf18cd5eed0777852858a4fb3a94ac74f54
4
- data.tar.gz: a7e16463701f8901a3384cac76b76585927a074c98ec6418ebadf032d2454617
3
+ metadata.gz: 3f2e83dd45585da762903b90f50376dcc75f175acf5ebbc3804763a963dfedfc
4
+ data.tar.gz: 6f83ee059a2b00539f20b932c9b6382df837aef0dbb42e201be344b055a51dbf
5
5
  SHA512:
6
- metadata.gz: 8dbcd246e8a1ab365800f802e3b36433a083d7993c769dc35ab6480657550ff34ff4b68cff867ad2e232d06687c97104074b3994030f6d081c3bfca80087ba8b
7
- data.tar.gz: 10b37822696c206a21e682c706dc2457af5edc49209f1939ae49835ba99c4d62d02e5f62ef0c7149aa78efe28390b91e769521cb65cd31f5608c0f69df9bc34d
6
+ metadata.gz: 536b1620403cf8f2a6d54ffd8c7918fc0196e3fbb14b0c8ccf99ad85620184463cc92140b6ad1e810d06afeb84c4b9ce03d17c926a316270df2a3eb77f922f10
7
+ data.tar.gz: 230af044b097a08fd714bb180ce41e3df194c6c880f046d7628acb984d954c0f7308a5e9a89c52705c0e9341f2404f24753a4cc5e47da89784d21a7b32734a23
@@ -1,6 +1,15 @@
1
+ require:
2
+ - rubocop-performance
3
+
4
+ inherit_mode:
5
+ merge:
6
+ - Exclude
7
+
1
8
  AllCops:
2
9
  TargetRubyVersion: 2.2
3
10
  DisabledByDefault: true
11
+ Exclude:
12
+ - "gemfiles/**/*"
4
13
 
5
14
  Bundler:
6
15
  Enabled: true
@@ -30,5 +39,8 @@ Security:
30
39
  Style/FrozenStringLiteralComment:
31
40
  Enabled: true
32
41
 
42
+ Style/HashSyntax:
43
+ Enabled: true
44
+
33
45
  Style/RedundantFreeze:
34
46
  Enabled: true
@@ -1,17 +1,20 @@
1
1
  sudo: false
2
2
  language: ruby
3
+ cache: bundler
3
4
 
4
5
  rvm:
5
6
  - ruby-head
6
- - 2.6.2
7
+ - 2.7.0-preview1
8
+ - 2.6.3
7
9
  - 2.5.5
8
10
  - 2.4.6
9
11
  - 2.3.8
10
12
  - 2.2.10
11
13
 
12
14
  gemfile:
13
- - gemfiles/openssl_2_0.gemfile
15
+ - gemfiles/openssl_head.gemfile
14
16
  - gemfiles/openssl_2_1.gemfile
17
+ - gemfiles/openssl_2_0.gemfile
15
18
  - gemfiles/openssl_default.gemfile
16
19
 
17
20
  before_install: gem install bundler -v '~> 1.17'
@@ -20,9 +23,13 @@ matrix:
20
23
  fast_finish: true
21
24
  allow_failures:
22
25
  - rvm: ruby-head
26
+ - rvm: 2.7.0-preview1
23
27
  - rvm: 2.2.10
28
+ - gemfile: gemfiles/openssl_head.gemfile
24
29
  exclude:
25
30
  - rvm: 2.2.10
26
- gemfile: gemfiles/openssl_2_0.gemfile
31
+ gemfile: gemfiles/openssl_head.gemfile
27
32
  - rvm: 2.2.10
28
33
  gemfile: gemfiles/openssl_2_1.gemfile
34
+ - rvm: 2.2.10
35
+ gemfile: gemfiles/openssl_2_0.gemfile
data/Appraisals CHANGED
@@ -1,10 +1,14 @@
1
- appraise "openssl_2_0" do
2
- gem "openssl", "~> 2.0.0"
1
+ appraise "openssl_head" do
2
+ gem "openssl", git: "https://github.com/ruby/openssl"
3
3
  end
4
4
 
5
5
  appraise "openssl_2_1" do
6
6
  gem "openssl", "~> 2.1.0"
7
7
  end
8
8
 
9
+ appraise "openssl_2_0" do
10
+ gem "openssl", "~> 2.0.0"
11
+ end
12
+
9
13
  appraise "openssl_default" do
10
14
  end
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.8.0] - 2019-08-17
4
+
5
+ ### Added
6
+
7
+ - Support `COSE::Key` instantiation based on an `OpenSSL::PKey` object with `COSE::Key.from_pkey`
8
+ - Provide writer methods for `COSE::Key` Common Parameters (`#base_iv=`, `#key_ops=`, `#alg=` and `#kid=`)
9
+
3
10
  ## [v0.7.0] - 2019-05-02
4
11
 
5
12
  ### Fixed
@@ -79,6 +86,7 @@
79
86
  - EC2 key object
80
87
  - Works with ruby 2.5
81
88
 
89
+ [v0.8.0]: https://github.com/cedarcode/cose-ruby/compare/v0.7.0...v0.8.0/
82
90
  [v0.7.0]: https://github.com/cedarcode/cose-ruby/compare/v0.6.1...v0.7.0/
83
91
  [v0.6.1]: https://github.com/cedarcode/cose-ruby/compare/v0.6.0...v0.6.1/
84
92
  [v0.6.0]: https://github.com/cedarcode/cose-ruby/compare/v0.5.0...v0.6.0/
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # cose
2
2
 
3
- CBOR Object Signing and Encryption (COSE) ruby library
3
+ Ruby implementation of RFC 8152 CBOR Object Signing and Encryption (COSE)
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)
data/Rakefile CHANGED
@@ -7,4 +7,4 @@ require "rubocop/rake_task"
7
7
  RSpec::Core::RakeTask.new(:spec)
8
8
  RuboCop::RakeTask.new
9
9
 
10
- task :default => [:rubocop, :spec]
10
+ task default: [:rubocop, :spec]
@@ -0,0 +1,16 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 0.8.z | :white_check_mark: |
8
+ | 0.7.z | :white_check_mark: |
9
+ | < 0.7 | :x: |
10
+
11
+ ## Reporting a Vulnerability
12
+
13
+ If you have discovered a security bug, please send an email to security@cedarcode.com
14
+ instead of posting to the GitHub issue tracker.
15
+
16
+ Thank you!
@@ -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 = "CBOR Object Signing and Encryption (COSE) ruby library"
13
+ spec.summary = "Ruby implementation of RFC 8152 CBOR Object Signing and Encryption (COSE)"
14
14
  spec.homepage = "https://github.com/cedarcode/cose-ruby"
15
15
  spec.license = "MIT"
16
16
 
@@ -38,5 +38,6 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency "byebug", ">= 10.0"
39
39
  spec.add_development_dependency "rake", "~> 12.3"
40
40
  spec.add_development_dependency "rspec", "~> 3.8"
41
- spec.add_development_dependency "rubocop", "0.66.0"
41
+ spec.add_development_dependency "rubocop", "0.68.0"
42
+ spec.add_development_dependency "rubocop-performance", "~> 1.3"
42
43
  end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "openssl", git: "https://github.com/ruby/openssl"
6
+
7
+ gemspec path: "../"
@@ -10,13 +10,17 @@ module COSE
10
10
 
11
11
  module Key
12
12
  def self.serialize(pkey)
13
+ from_pkey(pkey).serialize
14
+ end
15
+
16
+ def self.from_pkey(pkey)
13
17
  case pkey
14
18
  when OpenSSL::PKey::EC, OpenSSL::PKey::EC::Point
15
- COSE::Key::EC2.from_pkey(pkey).serialize
19
+ COSE::Key::EC2.from_pkey(pkey)
16
20
  when OpenSSL::PKey::RSA
17
- COSE::Key::RSA.from_pkey(pkey).serialize
21
+ COSE::Key::RSA.from_pkey(pkey)
18
22
  else
19
- raise "Unsupported serialization of #{pkey.class} object"
23
+ raise "Unsupported #{pkey.class} object"
20
24
  end
21
25
  end
22
26
 
@@ -27,7 +27,7 @@ module COSE
27
27
  )
28
28
  end
29
29
 
30
- attr_reader :kid, :alg, :key_ops, :base_iv
30
+ attr_accessor :kid, :alg, :key_ops, :base_iv
31
31
 
32
32
  def initialize(kid: nil, alg: nil, key_ops: nil, base_iv: nil)
33
33
  @kid = kid
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module COSE
4
- VERSION = "0.7.0"
4
+ VERSION = "0.8.0"
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.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Rodriguez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-05-02 00:00:00.000000000 Z
12
+ date: 2019-08-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cbor
@@ -107,14 +107,28 @@ dependencies:
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.66.0
110
+ version: 0.68.0
111
111
  type: :development
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.66.0
117
+ version: 0.68.0
118
+ - !ruby/object:Gem::Dependency
119
+ name: rubocop-performance
120
+ requirement: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.3'
125
+ type: :development
126
+ prerelease: false
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.3'
118
132
  description:
119
133
  email:
120
134
  - gonzalo@cedarcode.com
@@ -133,12 +147,14 @@ files:
133
147
  - LICENSE.txt
134
148
  - README.md
135
149
  - Rakefile
150
+ - SECURITY.md
136
151
  - bin/console
137
152
  - bin/setup
138
153
  - cose.gemspec
139
154
  - gemfiles/openssl_2_0.gemfile
140
155
  - gemfiles/openssl_2_1.gemfile
141
156
  - gemfiles/openssl_default.gemfile
157
+ - gemfiles/openssl_head.gemfile
142
158
  - lib/cose.rb
143
159
  - lib/cose/encrypt.rb
144
160
  - lib/cose/encrypt0.rb
@@ -180,8 +196,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
196
  - !ruby/object:Gem::Version
181
197
  version: '0'
182
198
  requirements: []
183
- rubygems_version: 3.0.3
199
+ rubygems_version: 3.0.6
184
200
  signing_key:
185
201
  specification_version: 4
186
- summary: CBOR Object Signing and Encryption (COSE) ruby library
202
+ summary: Ruby implementation of RFC 8152 CBOR Object Signing and Encryption (COSE)
187
203
  test_files: []