don't pass self to pub key methods
This commit is contained in:
Родитель
2497d17903
Коммит
f9842f995a
|
@ -8,7 +8,7 @@ Darrrr.icon_152px = "#{Darrrr.authority}/icon.png"
|
|||
Darrrr::AccountProvider.configure do |config|
|
||||
config.signing_private_key = ENV["ACCOUNT_PROVIDER_PRIVATE_KEY"]
|
||||
config.symmetric_key = ENV["TOKEN_DATA_AES_KEY"]
|
||||
config.tokensign_pubkeys_secp256r1 = lambda do |account_provider, context|
|
||||
config.tokensign_pubkeys_secp256r1 = lambda do |context|
|
||||
[ENV["ACCOUNT_PROVIDER_PUBLIC_KEY"]]
|
||||
end
|
||||
config.save_token_return = "#{Darrrr.authority}/account-provider/save-token-return"
|
||||
|
@ -17,7 +17,7 @@ end
|
|||
|
||||
Darrrr::RecoveryProvider.configure do |config|
|
||||
config.signing_private_key = ENV["RECOVERY_PROVIDER_PRIVATE_KEY"]
|
||||
config.countersign_pubkeys_secp256r1 = lambda do |recovery_provider, context|
|
||||
config.countersign_pubkeys_secp256r1 = lambda do |context|
|
||||
[ENV["RECOVERY_PROVIDER_PUBLIC_KEY"]]
|
||||
end
|
||||
config.token_max_size = 8192
|
||||
|
|
|
@ -30,7 +30,7 @@ module Darrrr
|
|||
# passing `self` as the first argument.
|
||||
def unseal_keys(context = nil)
|
||||
if @tokensign_pubkeys_secp256r1.respond_to?(:call)
|
||||
@tokensign_pubkeys_secp256r1.call(self, context)
|
||||
@tokensign_pubkeys_secp256r1.call(context)
|
||||
else
|
||||
@tokensign_pubkeys_secp256r1
|
||||
end
|
||||
|
|
|
@ -44,7 +44,7 @@ module Darrrr
|
|||
# passing `self` as the first argument.
|
||||
def unseal_keys(context = nil)
|
||||
if @countersign_pubkeys_secp256r1.respond_to?(:call)
|
||||
@countersign_pubkeys_secp256r1.call(self, context)
|
||||
@countersign_pubkeys_secp256r1.call(context)
|
||||
else
|
||||
@countersign_pubkeys_secp256r1
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче