asherah 0.4.1-x86_64-linux → 0.4.2-x86_64-linux

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: 2a704c6b2c1e05d118d6da011e17a53015fa9c8ece70fa290dded51fc6c9c65c
4
- data.tar.gz: '08d739c16f5770e102dd84ae925ca117bea47607d11de82fd72cb442a4b671bc'
3
+ metadata.gz: 62bfb024529e4e36f27690f83dc7ddcd0a1cde72cc719a883ca3c5490cae1041
4
+ data.tar.gz: 998521233edd5cbcab1c585702948d52f7697bcdecbbe986e670e52735bd008c
5
5
  SHA512:
6
- metadata.gz: 4997cae223dad817dc66df8f77292a425ea543a8ad2788f9596a6e94602d8b3ce72172c1477cb9d15bc2bea1c32597661f3d715823ed5c2212bb53b050096188
7
- data.tar.gz: f728691609a5e381e7f8511457e56f68b16d8191c054c6cd233090f48e7ad4560110f16a7ff14331353b253d4305e0e7c8c9ea6a46ff368990c785f93bd9c8e1
6
+ metadata.gz: b0e72a6bdb8550d1bdebac4e9f369cb11a0c8974c39236e87eaf9b12158d42eb8c6e8bbc716e59331e603449ad5d43c3c6f57038df2846bfcfb1f79f4738bca9
7
+ data.tar.gz: 46cf04e73527f941ded98404bbc9a8a2934cb34ff8bb61623d3c1491347d33697f9988192a0e3ad1745932016cccf0ff9040604c0ec141275932f962591698b3
data/.rubocop.yml CHANGED
@@ -32,3 +32,6 @@ Metrics/AbcSize:
32
32
 
33
33
  Style/GuardClause:
34
34
  Enabled: false
35
+
36
+ Naming/AccessorMethodName:
37
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.4.2] - 2022-07-25
4
+
5
+ - Upgrade to use asherah-cobhan v0.4.15
6
+ - Add `set_env` method to set environment variables for Asherah
7
+
3
8
  ## [0.4.1] - 2022-03-25
4
9
 
5
10
  - Build and release platform gems
@@ -1,5 +1,5 @@
1
- version: v0.4.11
2
- libasherah-arm64.so: bc044b74453fc8fceca564fb127c9f2748aeac107791bd24c680ced1fcb7b816
3
- libasherah-x64.so: 82f10505ef11fba2c8e027668d9b5c89584f73eb1e53a9f5ff21d5705ecffb3a
4
- libasherah-arm64.dylib: 0b843d002212722c442c990d84e6ceac73c78e1663260be8c3f759a9a283b14a
5
- libasherah-x64.dylib: fd0592ed4cdfbc7b3a2534b540c22301a9669c6c37dfb3d28f600ccc9ba975f8
1
+ version: v0.4.15
2
+ libasherah-arm64.so: 43122390d0f851ac67bb197d688dd040832292e79675e4a9c9268d4ef5d3aef7
3
+ libasherah-x64.so: 3d29f32f6560858c54dc3cc87fa59347f2981a0e206849f0f3ab9a905de02242
4
+ libasherah-arm64.dylib: e7d64c2857c120b065c1761445d797f6fd5f6696c26676857ce327a772d6c025
5
+ libasherah-x64.dylib: 331ea09b160de80a3e40aeeb737779da3c043e2476f7cbfe4b83cf55fccdf0c7
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Asherah
4
- VERSION = '0.4.1'
4
+ VERSION = '0.4.2'
5
5
  end
data/lib/asherah.rb CHANGED
@@ -11,6 +11,7 @@ module Asherah
11
11
 
12
12
  LIB_ROOT_PATH = File.expand_path('asherah/native', __dir__)
13
13
  load_library(LIB_ROOT_PATH, 'libasherah', [
14
+ [:SetEnv, [:pointer], :int32],
14
15
  [:SetupJson, [:pointer], :int32],
15
16
  [:EncryptToJson, [:pointer, :pointer, :pointer], :int32],
16
17
  [:DecryptFromJson, [:pointer, :pointer, :pointer], :int32],
@@ -22,6 +23,22 @@ module Asherah
22
23
  BASE64_OVERHEAD = 1.34
23
24
 
24
25
  class << self
26
+ # Set environment variables needed by Asherah dependencies for when
27
+ # Go os.Getenv() doesn't see variables set by C.setenv().
28
+ # References:
29
+ # https://github.com/golang/go/wiki/cgo#environmental-variables
30
+ # https://github.com/golang/go/issues/44108
31
+ #
32
+ # @yield [Config]
33
+ # @param env [Hash], Key-value pairs to set Asherah ENV
34
+ # @return [void]
35
+ def set_env(env = {})
36
+ env_buffer = string_to_cbuffer(env.to_json)
37
+
38
+ result = SetEnv(env_buffer)
39
+ Error.check_result!(result, 'SetEnv failed')
40
+ end
41
+
25
42
  # Configures Asherah
26
43
  #
27
44
  # @yield [Config]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asherah
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - GoDaddy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-25 00:00:00.000000000 Z
11
+ date: 2022-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cobhan