aliquot-pay 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aliquot-pay.rb +2 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35dfff1ebd40162ee529331539e3e84c3cd9d4584aa8c5cbcd512ad4f1bddbcd
|
4
|
+
data.tar.gz: 06405dd759121d55be37e9488f0a21b50bf710613b5d00cc9d91cbdd6bc1a6a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eab0cb24c340f738da984ec910f134836cd04deee6baca6ee2946e9fdcedc0253f8aba93c71e3c9f98b36f086ae7b003fb1a3eeb5964f9a67a1b189cede7132c
|
7
|
+
data.tar.gz: 8ec410a4184ba33fd932694d77ac37978e2da7af1851c5a97ff6640aad82a8690a14114e48607cd3df1dfdbb5a71ea0525a588895574cbfe1b6dbfcf34611999
|
data/lib/aliquot-pay.rb
CHANGED
@@ -34,7 +34,7 @@ class AliquotPay
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def extract_root_signing_keys
|
37
|
-
key = Base64.strict_encode64(
|
37
|
+
key = Base64.strict_encode64(ensure_root_key.to_der)
|
38
38
|
{
|
39
39
|
'keys' => [
|
40
40
|
'protocolVersion' => @protocol_version,
|
@@ -43,19 +43,6 @@ class AliquotPay
|
|
43
43
|
}.to_json
|
44
44
|
end
|
45
45
|
|
46
|
-
if OpenSSL::VERSION >= '3'
|
47
|
-
# pkeys are immutable on OpenSSL >=3.0
|
48
|
-
def eckey_to_public(key)
|
49
|
-
key.public_to_der
|
50
|
-
end
|
51
|
-
else
|
52
|
-
def eckey_to_public(key)
|
53
|
-
k = OpenSSL::PKey::EC.new(EC_CURVE)
|
54
|
-
k.public_key = key.public_key
|
55
|
-
k.to_der
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
46
|
def sign(key, message)
|
60
47
|
d = OpenSSL::Digest::SHA256.new
|
61
48
|
def key.private?; private_key?; end
|
@@ -159,7 +146,7 @@ class AliquotPay
|
|
159
146
|
fail 'Intermediate key must be public and private key'
|
160
147
|
end
|
161
148
|
|
162
|
-
default_key_value = Base64.strict_encode64(
|
149
|
+
default_key_value = Base64.strict_encode64(@intermediate_key.to_der)
|
163
150
|
default_key_expiration = "#{Time.now.to_i + 3600}000"
|
164
151
|
|
165
152
|
@signed_key = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aliquot-pay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clearhaus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hkdf
|