1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-11-22 12:00:40 +08:00

add auth for jerryxiao

This commit is contained in:
JerryXiao 2020-05-19 10:51:44 +08:00
parent 5a7de19081
commit 96a138e8b9
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA
18 changed files with 27 additions and 18 deletions

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH="PGP:186242204A2EC70438E9CE3B9D9CE43650FF2BAA"

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
"en"
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -14,4 +14,4 @@ BABEL=(
"en-2"
"ja-0"
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
"zh|en-1"
)
AUTH="PGP:"
AUTH=""

View file

@ -11,4 +11,4 @@ BABEL=(
"zh-N"
"en-2"
)
AUTH="PGP:D306BB628837043150CD1E42CA0957540FD996CD"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -14,4 +14,4 @@ BABEL=(
"es-1"
"fr-1"
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -11,4 +11,4 @@ BABEL=(
"zh-N"
"en-2"
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -10,4 +10,4 @@ CONTACT=(
BABEL=(
""
)
AUTH="PGP:"
AUTH=""

View file

@ -77,7 +77,7 @@ def neoneo_get_people():
if not f.is_file():
continue
fc = shell2dict(f.read_text())
present_keys = ('name', 'desc', 'contact', 'babel')
present_keys = ('name', 'desc', 'contact', 'babel', 'auth')
assert f.name
people[f.name] = {k: fc.get(k) for k in present_keys}
nic_hdl = name2nichdl(f.name)
@ -86,6 +86,15 @@ def neoneo_get_people():
people[f.name]['nic_hdl'] = nic_hdl
for v in people[f.name].values():
assert v is not None
auth = people[f.name]['auth']
if auth:
method, data = auth.split(':')
assert method in ('PGP', 'SSH')
if method == 'PGP':
assert len(data) == 40 # invaild pgp fingerprint
elif method == 'SSH':
assert data.startswith('ssh-') # invalid ssh pubkey
people[f.name]['auth'] = f"{'pgp-fingerprint ' if method == 'PGP' else ''}{data.strip()}"
except Exception:
print("[!] Error while processing file", f)
raise