Browse Source

library update (d4c8a3d) on Thu Jul 1 06:00:38 AM CEST 2021

master
Molly K. Thanas 4 years ago
committed by Brooke L. Rediker
parent
commit
8ed7e0f7f7
  1. 1
      .gitignore
  2. 0
      config0.yml
  3. BIN
      images/favicon.png
  4. BIN
      images/toychain.png
  5. 20
      init.sh
  6. 2
      lib
  7. 12
      local.key.asc
  8. 18
      nodes/cloneit.sh
  9. BIN
      secrets/keys.yml
  10. 25
      setidentity.pl

1
.gitignore

@ -1,2 +1 @@
*~1 *~1
.*cache

0
config.yml → config0.yml

BIN
images/favicon.png

After

Width: 60  |  Height: 64  |  Size: 7.0 KiB

BIN
images/toychain.png

After

Width: 164  |  Height: 174  |  Size: 28 KiB

20
init.sh

@ -0,0 +1,20 @@
#
i="$1"
top=$(git rev-parse --show-toplevel)
export SITE=$top
export PATH=$top/bin:$PATH
echo "node$i: port=$port"
sed -e "s/port: .*/port: $port/" config0.yml > config$i.yml
gpg --decrypt local.key.asc | git-crypt unlock -
cp -p secrets/keys0.yml secrets/keys.yml
echo "your name ?"
read name
perl setidentity.pl "$name"

2
lib

@ -1 +1 @@
Subproject commit 2fca6d50421029bb1ab7e9f6171b0e6606bcb567
Subproject commit d4c8a3dee208e00b768607978228d1b01979988c

12
local.key.asc

@ -1,9 +1,9 @@
-----BEGIN PGP MESSAGE----- -----BEGIN PGP MESSAGE-----
jA0ECQMCVkwyPsMJz+P/0r0ByU+jKa1N0W2+BrmVe0gl/9hwzVcCO57T8vCjxqfQ
k5xcM+sP4msnAMVGu5J/7O6GHKq6JUomUqVYGufgWKwobLJ8Ei7qPsN7mpmA56Qu
//puIC8UA/vhR80Iqm2cMBFh3q0DRNawuE6BwGqPFPtjnmccBJV5PW0RUjHWAQiS
/W2baUgJFAJMSOkSOPeMZ8Vf3eRo8TXp0iS+vyfNgov9FjZm7ygM4wGdTa46aVhH
KdatgQwrOJYXSvrw8M0=
=sj38
jA0ECQMCtQGWRv6q2ev/0r0BZwrm0qqGRKO0zaamIlSq7Gfc79/lqWU03pVaN9BR
AshC/X6GN/AWZJB1kNmhMT5RuArXJv0b9fsuHXfp3EKNWrH8f/IWxH6KS7ZUUnjW
D08JyPGi6wftkDqYqWwh7XXKW3zztSjdXWUkDSUI5L2RBI/nMAIKOlwY//HzLkdE
oAXNZazV7XILRIUCp2Mqb/PQjSd2iTbYfrCXjV6FGSBftdl+zJZmfMrqzlCPnr4+
lLsxfYFWlyJnruk9HPw=
=E+c2
-----END PGP MESSAGE----- -----END PGP MESSAGE-----

18
nodes/cloneit.sh

@ -0,0 +1,18 @@
#
i=1
while [ -e "node$i" ]; do
i=$(expr $i + 1)
done
echo create node$i
#git clone --recursive git@git.toptal.com:screening/Michel-Combes node$i
port=$(expr 8089 + 2 \* $i )
echo "node$i: port=$port"
sed -e "s/port: .*/port: $port/" $node$i/config0.yml > $node$i/config$i.yml
cd node$i
gpg --decrypt local.key.asc | git-crypt unlock -
exit $?;
true;

BIN
secrets/keys.yml

25
setidentity.pl

@ -0,0 +1,25 @@
#!/usr/bin/perl
BEGIN { if (-e $ENV{SITE}.'/lib') { use lib $ENV{SITE}.'/lib'; } }
use encode qw(mbase58);
use ECKeys qw($keys ecsign ecverif eckeygen saveKeys);
use YAML::Syck qw(Dump);
my $name = shift;
my $id = eckeygen('identity' => $name);
&saveKeys();
printf "keys: %s\n",Dump($keys);
my $msg = sprintf "this message is signed by %s",$keys->{identity}{name};
printf "msg: %s\n",$msg;
my $sig = &ecsign('identity',$msg);
my $valid = &ecverif($keys->{identity}{public},$sig,$msg);
if ($valid) { print "ok\n"; }
exit $?;
1;
Loading…
Cancel
Save