universa 3.11.4.1 → 3.11.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/bin/umi/bin/umi +1 -1
- data/bin/umi/bin/umi.bat +1 -1
- data/bin/umi/lib/{com.icodici.common_tools-3.11.4.jar → com.icodici.common_tools-3.11.4.2.jar} +0 -0
- data/bin/umi/lib/{com.icodici.crypto-3.11.4.jar → com.icodici.crypto-3.11.4.2.jar} +0 -0
- data/bin/umi/lib/{com.icodici.umi-0.8.53.jar → com.icodici.umi-0.8.57.jar} +0 -0
- data/bin/umi/lib/{com.icodici.universa_core-3.11.4.jar → com.icodici.universa_core-3.11.4.2.jar} +0 -0
- data/exe/unikeys +2 -0
- data/lib/universa/contract.rb +35 -3
- data/lib/universa/keytool/keytool.rb +0 -10
- data/lib/universa/service.rb +1 -1
- data/lib/universa/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dc48dd7a2c4439feca486ee1898f186005c383bb9887c47e91144064eeda405
|
4
|
+
data.tar.gz: 32f4cede12c7977effc924295b769d9274952c2b0d2edfd68a784f74e87ffbe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d23f3bcc176f4773f14073d82564ae23f68bd3d355c92425127a6ea883dbf079927d58d94ddbe4420d5365f655e6b1b1cd900de89341ff1d4338a5ef3c59f66e
|
7
|
+
data.tar.gz: 2f6c3c7c7a2ea0a95b3747f4d9222e836c52dcac32a3eb8b7bed11959ab0b8502c4cfff9792ef5c7e56ed595a9ddf392a3637c48d623e302344cbe01d837758f
|
data/.gitignore
CHANGED
data/bin/umi/bin/umi
CHANGED
@@ -344,7 +344,7 @@ declare -r lib_dir="$(realpath "${app_home}/../lib")"
|
|
344
344
|
declare -a app_mainclass=(com.icodici.farcallscala.Main)
|
345
345
|
|
346
346
|
declare -r script_conf_file="${app_home}/../conf/application.ini"
|
347
|
-
declare -r app_classpath="$lib_dir/com.icodici.umi-0.8.
|
347
|
+
declare -r app_classpath="$lib_dir/com.icodici.umi-0.8.57.jar:$lib_dir/org.scala-lang.scala-library-2.12.7.jar:$lib_dir/com.icodici.universa_core-3.11.4.2.jar:$lib_dir/org.yaml.snakeyaml-1.18.jar:$lib_dir/com.icodici.nanohttpd-2.1.0.jar:$lib_dir/com.icodici.common_tools-3.11.4.2.jar:$lib_dir/com.eclipsesource.minimal-json.minimal-json-0.9.4.jar:$lib_dir/net.java.dev.jna.jna-4.5.1.jar:$lib_dir/org.checkerframework.checker-qual-2.3.2.jar:$lib_dir/com.icodici.crypto-3.11.4.2.jar:$lib_dir/org.bouncycastle.bcprov-jdk15on-1.62.jar:$lib_dir/com.squareup.jnagmp.jnagmp-2.0.0.jar:$lib_dir/com.typesafe.play.play-json_2.12-2.6.10.jar:$lib_dir/com.typesafe.play.play-functional_2.12-2.6.10.jar:$lib_dir/org.scala-lang.scala-reflect-2.12.7.jar:$lib_dir/org.typelevel.macro-compat_2.12-1.1.1.jar:$lib_dir/joda-time.joda-time-2.9.9.jar:$lib_dir/com.fasterxml.jackson.core.jackson-core-2.8.11.jar:$lib_dir/com.fasterxml.jackson.core.jackson-annotations-2.8.11.jar:$lib_dir/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.8.11.jar:$lib_dir/com.fasterxml.jackson.core.jackson-databind-2.8.11.1.jar:$lib_dir/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.8.11.jar:$lib_dir/org.scala-sbt.ipcsocket.ipcsocket-1.0.0.jar:$lib_dir/net.java.dev.jna.jna-platform-4.5.0.jar:$lib_dir/net.sf.jopt-simple.jopt-simple-4.9.jar"
|
348
348
|
|
349
349
|
# java_cmd is overrode in process_args when -java-home is used
|
350
350
|
declare java_cmd=$(get_java_cmd)
|
data/bin/umi/bin/umi.bat
CHANGED
@@ -80,7 +80,7 @@ rem "-J" is stripped, "-D" is left as is, and everything is appended to JAVA_OPT
|
|
80
80
|
set _JAVA_PARAMS=
|
81
81
|
set _APP_ARGS=
|
82
82
|
|
83
|
-
set "APP_CLASSPATH=%APP_LIB_DIR%\com.icodici.umi-0.8.
|
83
|
+
set "APP_CLASSPATH=%APP_LIB_DIR%\com.icodici.umi-0.8.57.jar;%APP_LIB_DIR%\org.scala-lang.scala-library-2.12.7.jar;%APP_LIB_DIR%\com.icodici.universa_core-3.11.4.2.jar;%APP_LIB_DIR%\org.yaml.snakeyaml-1.18.jar;%APP_LIB_DIR%\com.icodici.nanohttpd-2.1.0.jar;%APP_LIB_DIR%\com.icodici.common_tools-3.11.4.2.jar;%APP_LIB_DIR%\com.eclipsesource.minimal-json.minimal-json-0.9.4.jar;%APP_LIB_DIR%\net.java.dev.jna.jna-4.5.1.jar;%APP_LIB_DIR%\org.checkerframework.checker-qual-2.3.2.jar;%APP_LIB_DIR%\com.icodici.crypto-3.11.4.2.jar;%APP_LIB_DIR%\org.bouncycastle.bcprov-jdk15on-1.62.jar;%APP_LIB_DIR%\com.squareup.jnagmp.jnagmp-2.0.0.jar;%APP_LIB_DIR%\com.typesafe.play.play-json_2.12-2.6.10.jar;%APP_LIB_DIR%\com.typesafe.play.play-functional_2.12-2.6.10.jar;%APP_LIB_DIR%\org.scala-lang.scala-reflect-2.12.7.jar;%APP_LIB_DIR%\org.typelevel.macro-compat_2.12-1.1.1.jar;%APP_LIB_DIR%\joda-time.joda-time-2.9.9.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-core-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-annotations-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.8.11.jar;%APP_LIB_DIR%\com.fasterxml.jackson.core.jackson-databind-2.8.11.1.jar;%APP_LIB_DIR%\com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.8.11.jar;%APP_LIB_DIR%\org.scala-sbt.ipcsocket.ipcsocket-1.0.0.jar;%APP_LIB_DIR%\net.java.dev.jna.jna-platform-4.5.0.jar;%APP_LIB_DIR%\net.sf.jopt-simple.jopt-simple-4.9.jar"
|
84
84
|
set "APP_MAIN_CLASS=com.icodici.farcallscala.Main"
|
85
85
|
set "SCRIPT_CONF_FILE=%APP_HOME%\conf\application.ini"
|
86
86
|
|
data/bin/umi/lib/{com.icodici.common_tools-3.11.4.jar → com.icodici.common_tools-3.11.4.2.jar}
RENAMED
Binary file
|
Binary file
|
Binary file
|
data/bin/umi/lib/{com.icodici.universa_core-3.11.4.jar → com.icodici.universa_core-3.11.4.2.jar}
RENAMED
Binary file
|
data/exe/unikeys
CHANGED
data/lib/universa/contract.rb
CHANGED
@@ -2,6 +2,38 @@ require 'bigdecimal'
|
|
2
2
|
|
3
3
|
module Universa
|
4
4
|
|
5
|
+
# Adapter for com.icodici.crypto
|
6
|
+
class KeyInfo < RemoteAdapter
|
7
|
+
remote_class "com.icodici.crypto.KeyInfo"
|
8
|
+
end
|
9
|
+
|
10
|
+
# Derive symmetric key from a password using PBKDF2 algorithm
|
11
|
+
def derive_key(password, salt, rounds: 50000, prf: "HMAC_SHA256", tag: "default_tag")
|
12
|
+
salt.is_a?(String) and salt = salt.force_encoding('binary')
|
13
|
+
tag && tag.is_a?(String) and tag = tag.force_encoding('binary')
|
14
|
+
ki = KeyInfo.new(prf, rounds, salt, tag)
|
15
|
+
ki.derivePassword(password)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Utiliy to generate keys of arbitrary length derived from passwords using PBKDF2 algorithm. Use
|
19
|
+
# {#derive} to produce keys from passwords in a realtively safe way (safety depends on the password strength)
|
20
|
+
class PBKDF2 < RemoteAdapter
|
21
|
+
remote_class "com.icodici.crypto.PBKDF2"
|
22
|
+
|
23
|
+
# Derive a binary key from the string password using PBKDF2 algorithm.
|
24
|
+
#
|
25
|
+
# @param [String] password to derive key from
|
26
|
+
# @param [String] salt
|
27
|
+
# @param [Integer] rounds using in the PNKDF2 generation
|
28
|
+
# @param [String] hash class name, should include packgae name. See Universa crypto Digest class
|
29
|
+
# @param [Integer] length of the derived key.
|
30
|
+
# @return [Binary] binary string with generated key
|
31
|
+
def self.derive(password, salt: "default_salt", rounds: 50000, hash: 'com.icodici.crypto.digest.Sha256', length: 32)
|
32
|
+
salt = salt.force_encoding('binary') if salt && salt.is_a?(String)
|
33
|
+
invoke_static :derive, hash, password, salt, rounds, length
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
5
37
|
# Adapter for Universa ChangeOwnerPermission
|
6
38
|
class ChangeOwnerPermission < RemoteAdapter
|
7
39
|
remote_class "com.icodici.universa.contract.permissions.ChangeOwnerPermission"
|
@@ -316,7 +348,7 @@ module Universa
|
|
316
348
|
# trace found errors (call it afer check()): the Java version will not be able to trace to the
|
317
349
|
# process stdout, so we reqrite it here
|
318
350
|
def trace_errors
|
319
|
-
getErrors.each {|e|
|
351
|
+
getErrors.each { |e|
|
320
352
|
puts "(#{e.object || ''}): #{e.error}"
|
321
353
|
}
|
322
354
|
end
|
@@ -325,7 +357,7 @@ module Universa
|
|
325
357
|
#
|
326
358
|
# @return [String] possibly empty ''
|
327
359
|
def errors_string
|
328
|
-
getErrors.map {|e| "(#{e.object || ''}): #{e.error}"}.join(', ').strip
|
360
|
+
getErrors.map { |e| "(#{e.object || ''}): #{e.error}" }.join(', ').strip
|
329
361
|
end
|
330
362
|
|
331
363
|
# Test that some set of keys could be used to perform some role.
|
@@ -333,7 +365,7 @@ module Universa
|
|
333
365
|
# @param [String] name of the role to check
|
334
366
|
# @param [PublicKey] keys instances to check against
|
335
367
|
def can_perform_role(name, *keys)
|
336
|
-
getRole(name.to_s).isAllowedForKeys(Set.new keys.map {|x|
|
368
|
+
getRole(name.to_s).isAllowedForKeys(Set.new keys.map { |x|
|
337
369
|
x.is_a?(PrivateKey) ? x.public_key : x
|
338
370
|
})
|
339
371
|
end
|
@@ -121,15 +121,6 @@ class KeyTool
|
|
121
121
|
opts.banner = ANSI.bold { "\nUniversa Key tool #{Universa::VERSION}" }
|
122
122
|
opts.separator ""
|
123
123
|
|
124
|
-
# opts.on("-k", "--key KEY_FILE",
|
125
|
-
# "load the access key from the specified file. By default, looks in", "#{options.key_path}") do |file_name|
|
126
|
-
# options.key_path = File.expand_path(file_name)
|
127
|
-
# end
|
128
|
-
#
|
129
|
-
# opts.on("-n", "--node name", "node to connect, without protocol, e.g. 'node-7-com.universa.io'") do |node|
|
130
|
-
# options.node = node
|
131
|
-
# end
|
132
|
-
#
|
133
124
|
opts.on("--no-password",
|
134
125
|
"create resources not protected by password. Not recommended.") { |x|
|
135
126
|
@require_password = x
|
@@ -241,7 +232,6 @@ See project home page at #{ANSI.underline { "https://github.com/sergeych/univers
|
|
241
232
|
end
|
242
233
|
}
|
243
234
|
|
244
|
-
## D_TIsYOfFQ2WejhG3
|
245
235
|
begin
|
246
236
|
opt_parser.order!
|
247
237
|
if @tasks.empty?
|
data/lib/universa/service.rb
CHANGED
@@ -27,7 +27,7 @@ module Universa
|
|
27
27
|
[Contract, PrivateKey, PublicKey, KeyAddress, HashId, Binder,
|
28
28
|
Role, SimpleRole, RoleLink, ListRole,
|
29
29
|
ChangeOwnerPermission, RevokePermission, ModifyDataPermission, SplitJoinPermission,
|
30
|
-
UmiClient, Duration, Compound].each {|klass| register_proxy klass}
|
30
|
+
UmiClient, Duration, Compound, KeyInfo, PBKDF2].each {|klass| register_proxy klass}
|
31
31
|
end
|
32
32
|
|
33
33
|
# Implementation of {Service.configure}
|
data/lib/universa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: universa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.11.4.
|
4
|
+
version: 3.11.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sergeych
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: farcall
|
@@ -151,11 +151,11 @@ files:
|
|
151
151
|
- bin/umi/lib/com.fasterxml.jackson.core.jackson-databind-2.8.11.1.jar
|
152
152
|
- bin/umi/lib/com.fasterxml.jackson.datatype.jackson-datatype-jdk8-2.8.11.jar
|
153
153
|
- bin/umi/lib/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.8.11.jar
|
154
|
-
- bin/umi/lib/com.icodici.common_tools-3.11.4.jar
|
155
|
-
- bin/umi/lib/com.icodici.crypto-3.11.4.jar
|
154
|
+
- bin/umi/lib/com.icodici.common_tools-3.11.4.2.jar
|
155
|
+
- bin/umi/lib/com.icodici.crypto-3.11.4.2.jar
|
156
156
|
- bin/umi/lib/com.icodici.nanohttpd-2.1.0.jar
|
157
|
-
- bin/umi/lib/com.icodici.umi-0.8.
|
158
|
-
- bin/umi/lib/com.icodici.universa_core-3.11.4.jar
|
157
|
+
- bin/umi/lib/com.icodici.umi-0.8.57.jar
|
158
|
+
- bin/umi/lib/com.icodici.universa_core-3.11.4.2.jar
|
159
159
|
- bin/umi/lib/com.squareup.jnagmp.jnagmp-2.0.0.jar
|
160
160
|
- bin/umi/lib/com.typesafe.play.play-functional_2.12-2.6.10.jar
|
161
161
|
- bin/umi/lib/com.typesafe.play.play-json_2.12-2.6.10.jar
|