openssl-signature_algorithm 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -0
- data/lib/openssl/signature_algorithm/rsapss.rb +2 -6
- data/lib/openssl/signature_algorithm/version.rb +1 -1
- data/openssl-signature_algorithm.gemspec +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 973a01f83e137fb88da90dee332beee6e310b0b9e2e3e7a2b1e542483af0e6ef
|
4
|
+
data.tar.gz: 93e691f2283a6d1acbd0448a647ba90f73171fc56a39a4fc05be88aca5be23f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a91b04513d6ea59199bba52668fd76958ddea756012375db5b567dd67db86874c6ccb2aca08b7ad33480c33683266e417bb455ebeebc5f067de24fa648d3eb7b
|
7
|
+
data.tar.gz: 26458502e1b9c12acf6b9652ce79b35572e28175a105f0fe0dc35eb87584039a47208417d079a5d3a2442e7407cc8b2943d7adbb6bb539bd29d9895063f04140
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [v0.1.1] - 2020-01-29
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
- Fixed error in `OpenSSL::SignatureAlgorithm::RSAPSS#sign`
|
8
|
+
|
9
|
+
## [v0.1.0] - 2020-01-29
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- `OpenSSL::SignatureAlgorithm::ECDSA`
|
14
|
+
- `OpenSSL::SignatureAlgorithm::RSAPSS`
|
15
|
+
- `OpenSSL::SignatureAlgorithm::RSAPKCS1`
|
16
|
+
|
17
|
+
[v0.1.1]: https://github.com/cedarcode/openssl-signature_algorithm/compare/v0.1.0...v0.1.1/
|
18
|
+
[v0.1.0]: https://github.com/cedarcode/openssl-signature_algorithm/compare/41887c277dc7fa0c884ccf8924cf990ff76784d9...v0.1.0/
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,6 +4,9 @@ This tiny library introduces `OpenSSL::SignatureAlgorithm::ECDSA`, `OpenSSL::Sig
|
|
4
4
|
|
5
5
|
This provides a higher level of abstraction, on top of `openssl`'s gem `OpenSSL::PKey::EC`, `OpenSSL::PKey::EC::Point` and `OpenSSL::PKey::RSA`.
|
6
6
|
|
7
|
+
[![Gem](https://img.shields.io/gem/v/openssl-signature_algorithm.svg?style=flat-square)](https://rubygems.org/gems/openssl-signature_algorithm)
|
8
|
+
[![Travis](https://img.shields.io/travis/cedarcode/openssl-signature_algorithm.svg?style=flat-square)](https://travis-ci.org/cedarcode/openssl-signature_algorithm)
|
9
|
+
|
7
10
|
## Installation
|
8
11
|
|
9
12
|
Add this line to your application's Gemfile:
|
@@ -19,7 +19,7 @@ module OpenSSL
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def sign(data)
|
22
|
-
signing_key.sign_pss(hash_function, data, salt_length:
|
22
|
+
signing_key.sign_pss(hash_function, data, salt_length: :max, mgf1_hash: mgf1_hash_function)
|
23
23
|
end
|
24
24
|
|
25
25
|
def verify(signature, verification_data)
|
@@ -27,15 +27,11 @@ module OpenSSL
|
|
27
27
|
hash_function,
|
28
28
|
signature,
|
29
29
|
verification_data,
|
30
|
-
salt_length:
|
30
|
+
salt_length: :auto,
|
31
31
|
mgf1_hash: mgf1_hash_function
|
32
32
|
) || raise(OpenSSL::SignatureAlgorithm::Error, "Signature verification failed")
|
33
33
|
end
|
34
34
|
|
35
|
-
def salt_length
|
36
|
-
:auto
|
37
|
-
end
|
38
|
-
|
39
35
|
def mgf1_hash_function
|
40
36
|
hash_function
|
41
37
|
end
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["gonzalo@cedarcode.com"]
|
10
10
|
spec.license = "Apache-2.0"
|
11
11
|
|
12
|
-
spec.summary
|
12
|
+
spec.summary = "Signature Algorithm abstraction for openssl ruby gem"
|
13
13
|
spec.description = <<-DESC
|
14
14
|
This tiny library introduces `OpenSSL::SignatureAlgorithm::ECDSA`,
|
15
15
|
`OpenSSL::SignatureAlgorithm::RSAPSS` and `OpenSSL::SignatureAlgorithm::RSAPKCS1`,
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
verifying signatures―instead of keys.
|
18
18
|
DESC
|
19
19
|
|
20
|
-
spec.homepage
|
20
|
+
spec.homepage = "https://github.com/cedarcode/openssl-signature_algorithm"
|
21
21
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
22
22
|
|
23
23
|
spec.metadata["homepage_uri"] = spec.homepage
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openssl-signature_algorithm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo
|
@@ -25,6 +25,7 @@ files:
|
|
25
25
|
- ".rspec"
|
26
26
|
- ".rubocop.yml"
|
27
27
|
- ".travis.yml"
|
28
|
+
- CHANGELOG.md
|
28
29
|
- Gemfile
|
29
30
|
- Gemfile.lock
|
30
31
|
- LICENSE
|