safedb 0.02.0001 → 0.02.0002
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/interprete.rb +8 -0
- data/lib/keytools/key.api.rb +4 -3
- data/lib/keytools/key.ident.rb +0 -23
- data/lib/version.rb +1 -1
- 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: f2789f4fe147969da757418eb73bd50653dcf6bd86f6d625bfa1aed0cd582c2b
|
|
4
|
+
data.tar.gz: 0cf675d926675540564dbaee58f884e00e7f20b780351af639000a50751df93f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e4b3c3844e801c76e76033b872a46b9b1742458b3f81423201cbc8e93c6a0ce703f12ba5cd5fdf57058d2fb53deec5d211b937f0f3cc3bc0925d4c5b1ebeccb
|
|
7
|
+
data.tar.gz: 05ba81b9c3c0578300150d81ca353af488a6b2834dd3df97a5f3dcf827a7ebe9106c5ee5858cd12e5aa97d2bea53ca8dd953c51e155455c937eea69c41bcfc9c
|
data/lib/interprete.rb
CHANGED
|
@@ -43,14 +43,22 @@ class Interprete < Thor
|
|
|
43
43
|
# of the --debug switch.
|
|
44
44
|
class_option :debug, :type => :boolean
|
|
45
45
|
|
|
46
|
+
|
|
46
47
|
# The script class option is implemented in the parent {SafeDb::UseCase}
|
|
47
48
|
# use case enabling behaviour alteration based on the presence and state of
|
|
48
49
|
# the --script flag.
|
|
49
50
|
class_option :script, :type => :boolean
|
|
50
51
|
|
|
52
|
+
|
|
51
53
|
# Any use case can modify its behaviour if this <tt>--to-dir</tt> class
|
|
52
54
|
# option is present. For example the file write (eject) use case can place
|
|
53
55
|
# files in the directory specified by this switch.
|
|
56
|
+
#
|
|
57
|
+
# <tt>class_option :to_dir, :default => Dir.pwd, :aliases => '-t'</tt>
|
|
58
|
+
#
|
|
59
|
+
# @todo - adding "default" prevents many many conditionals downstream
|
|
60
|
+
# <tt>eject.rb</tt> has FOUR (4) conditionals (already) dedicated to this
|
|
61
|
+
# single field (at the time of writing).
|
|
54
62
|
class_option :to_dir, :aliases => '-t'
|
|
55
63
|
|
|
56
64
|
|
data/lib/keytools/key.api.rb
CHANGED
|
@@ -479,7 +479,7 @@ module SafeDb
|
|
|
479
479
|
# -- Regenerate intra-session key from the session token.
|
|
480
480
|
# -- Encrypt power key for intra (in) session retrieval.
|
|
481
481
|
# --
|
|
482
|
-
intra_key = KeyLocal.regenerate_shell_key( to_token() )
|
|
482
|
+
intra_key = KeyLocal.regenerate_shell_key( to_token(), true )
|
|
483
483
|
intra_txt = intra_key.do_encrypt_key( power_key )
|
|
484
484
|
|
|
485
485
|
# --
|
|
@@ -758,7 +758,8 @@ module SafeDb
|
|
|
758
758
|
# --
|
|
759
759
|
# -- Regenerate intra-session key from the session token.
|
|
760
760
|
# --
|
|
761
|
-
intra_key = KeyLocal.regenerate_shell_key( to_token(), use_grandparent_pid )
|
|
761
|
+
############ intra_key = KeyLocal.regenerate_shell_key( to_token(), use_grandparent_pid )
|
|
762
|
+
intra_key = KeyLocal.regenerate_shell_key( to_token(), true )
|
|
762
763
|
|
|
763
764
|
# --
|
|
764
765
|
# -- Decrypt and acquire the content enryption key that was created
|
|
@@ -833,7 +834,7 @@ module SafeDb
|
|
|
833
834
|
# --
|
|
834
835
|
# -- Regenerate intra-session key from the session token.
|
|
835
836
|
# --
|
|
836
|
-
intra_key = KeyLocal.regenerate_shell_key( to_token() )
|
|
837
|
+
intra_key = KeyLocal.regenerate_shell_key( to_token(), true )
|
|
837
838
|
|
|
838
839
|
# --
|
|
839
840
|
# -- Decrypt and acquire the content enryption key that was created
|
data/lib/keytools/key.ident.rb
CHANGED
|
@@ -214,29 +214,6 @@ module SafeDb
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
|
|
217
|
-
# If the system was rebooted on April 23rd, 2018 at 22:00:16 we
|
|
218
|
-
# expect this method not to return <b>2018-04-23 22:00:16</b>, but
|
|
219
|
-
# to return the <b>8 least significant digits</b> bootup time
|
|
220
|
-
# digits which in this case are <b>23220016</b>.
|
|
221
|
-
#
|
|
222
|
-
# Investigate all Linux flavours to understand whether this command
|
|
223
|
-
# works (or is it just Ubuntu). Also does Docker return a sensible
|
|
224
|
-
# value here?
|
|
225
|
-
#
|
|
226
|
-
# This method is not production ready. Not only is the time within
|
|
227
|
-
# a small range, also the most significant digit can fluctuate up
|
|
228
|
-
# or down randomly (in a non-deterministic manner.
|
|
229
|
-
#
|
|
230
|
-
# @return [String] the time when the system was booted.
|
|
231
|
-
def self.get_bootup_time_digits
|
|
232
|
-
|
|
233
|
-
boot_time_cmd = "uptime -s"
|
|
234
|
-
uptime_string = %x[ #{boot_time_cmd} ]
|
|
235
|
-
return uptime_string.chomp.to_alphanumeric[ 6 .. -1 ]
|
|
236
|
-
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
|
|
240
217
|
end
|
|
241
218
|
|
|
242
219
|
|
data/lib/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: safedb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.02.
|
|
4
|
+
version: 0.02.0002
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Apollo Akora
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: inifile
|