tonglian-ruby-sdk 0.3.0 → 0.3.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 +4 -4
- data/lib/tonglian-ruby-sdk.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34e702fea8cfb17cedcc44ca1c3cef1c047b43c35d96904b3e1dd07c5e8ada72
|
4
|
+
data.tar.gz: b432d9015bf5dba98ef5921f42b7e742d2440c42487d4919cce2d7cec24c67f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2e90a848ff85e07a0689df84c5eb07a6cf01426b7a6b23d4414cd51011306afc509b39557f1d321726a569abeb4453af05035e14ca0f99dfc6d85c58499d069
|
7
|
+
data.tar.gz: 520cc51c2a2a1933d377e16ec83cdbae62e756a2dc33d7defa744c244b0d061acfd7f3645e88fd2351c694cb3cbe38be0a448abe6254b2ec9aef0cc17ff75993
|
data/lib/tonglian-ruby-sdk.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# to avoid error when loading PKCS12 private key file
|
2
|
-
|
2
|
+
current_dir = File.dirname(__FILE__)
|
3
|
+
provider_conf = File.join(current_dir, 'add-openssl-provider.conf')
|
4
|
+
ENV['OPENSSL_CONF'] = provider_conf
|
3
5
|
|
4
6
|
require 'openssl'
|
5
7
|
require 'cgi'
|
@@ -84,7 +86,6 @@ module TonglianRubySdk
|
|
84
86
|
|
85
87
|
def private_key
|
86
88
|
return @private_key if @private_key
|
87
|
-
|
88
89
|
private_file = File.open(@private_path)
|
89
90
|
@private_key = OpenSSL::PKCS12.new(private_file, @private_passwd).key.export
|
90
91
|
end
|