fine: use keys from ames state instead of jael

This commit is contained in:
fang 2022-01-28 14:30:59 +01:00
parent 4c045a9c4f
commit 769d10fdd4
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -3373,29 +3373,27 @@
|= [=path mess=*]
(sign (shax (jam [our life path mess])))
::
++ life ~+ (jael ^life %life /(scot %p our))
++ ring ~+ (jael ^ring %vein /(scot %ud life))
++ sign sign:as:(nol:nu:crub:crypto ring)
::
++ jael
|* [=mold =desk =path]
!< mold
%- tail %- need %- need
(rof `[our ~ ~] [%jael %$] [our desk da+now] path)
++ life life.ames-state
++ sign sign:as:crypto-core.ames-state
::
::TODO for the unknown case, should use the alien-agenda
++ lyfe
|= who=ship
(jael (unit ^life) %lyfe /(scot %p our))
^- ^life
~| [%fine %unknown-peer who]
=/ ship-state (~(got by peers.ames-state) who)
?> ?=([%known *] ship-state)
life.ship-state
::
::TODO don't scry! subscribe & get from state instead
::TODO literally copy the ames code lol
::TODO the fact that we share pki and lane data with ames is... suspect
:: also the en/decoding etc
::TODO for the unknown case, should use the alien-agenda
++ pass
|= [who=ship lyf=^life]
::TODO but might fail need checks?
:: (jael * %deed )
!!
~| [%fine %unknown-peer who lyf]
=/ ship-state (~(got by peers.ames-state) who)
?> ?=([%known *] ship-state)
~| [%fine %life-mismatch who lyf]
?> =(lyf life.ship-state)
public-key.ship-state
--
::
++ get-lane