From 96a138e8b9e603b4cc8c36c58c4a69694c0542cd Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 19 May 2020 10:51:44 +0800 Subject: [PATCH] add auth for jerryxiao --- entity/Icecat | 2 +- entity/James58899 | 2 +- entity/JerryXiao | 2 +- entity/LINE-NZ | 2 +- entity/Lan Tian | 2 +- entity/LibreHouse | 2 +- entity/Ndoskrnl | 2 +- entity/Neo_Chen | 2 +- entity/SUNNET | 2 +- entity/Septs | 2 +- entity/Staph | 2 +- entity/Yangfl | 2 +- entity/alanyhq | 2 +- entity/chenx97 | 2 +- entity/frank | 2 +- entity/licson | 2 +- entity/santost12 | 2 +- scripts/roa.py | 11 ++++++++++- 18 files changed, 27 insertions(+), 18 deletions(-) diff --git a/entity/Icecat b/entity/Icecat index e7ec9ed..f794757 100644 --- a/entity/Icecat +++ b/entity/Icecat @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/James58899 b/entity/James58899 index 7026cfc..7c6219c 100644 --- a/entity/James58899 +++ b/entity/James58899 @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/JerryXiao b/entity/JerryXiao index 9521a2b..45cb524 100644 --- a/entity/JerryXiao +++ b/entity/JerryXiao @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="PGP:186242204A2EC70438E9CE3B9D9CE43650FF2BAA" diff --git a/entity/LINE-NZ b/entity/LINE-NZ index 0cbb66c..26eae7b 100644 --- a/entity/LINE-NZ +++ b/entity/LINE-NZ @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "en" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/Lan Tian b/entity/Lan Tian index d32a110..690f116 100644 --- a/entity/Lan Tian +++ b/entity/Lan Tian @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/LibreHouse b/entity/LibreHouse index 76cb93e..ccbb13b 100644 --- a/entity/LibreHouse +++ b/entity/LibreHouse @@ -14,4 +14,4 @@ BABEL=( "en-2" "ja-0" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/Ndoskrnl b/entity/Ndoskrnl index 288fa69..d178abe 100644 --- a/entity/Ndoskrnl +++ b/entity/Ndoskrnl @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "zh|en-1" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/Neo_Chen b/entity/Neo_Chen index 518e662..ece7b4b 100644 --- a/entity/Neo_Chen +++ b/entity/Neo_Chen @@ -11,4 +11,4 @@ BABEL=( "zh-N" "en-2" ) -AUTH="PGP:D306BB628837043150CD1E42CA0957540FD996CD" +AUTH="" diff --git a/entity/SUNNET b/entity/SUNNET index 845ae22..df0d2d7 100644 --- a/entity/SUNNET +++ b/entity/SUNNET @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/Septs b/entity/Septs index 1fb3bfa..fa76f99 100644 --- a/entity/Septs +++ b/entity/Septs @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/Staph b/entity/Staph index ec8fed9..5ef685a 100644 --- a/entity/Staph +++ b/entity/Staph @@ -14,4 +14,4 @@ BABEL=( "es-1" "fr-1" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/Yangfl b/entity/Yangfl index 0ef69b8..7d29678 100644 --- a/entity/Yangfl +++ b/entity/Yangfl @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/alanyhq b/entity/alanyhq index f7acc82..ca1bf27 100644 --- a/entity/alanyhq +++ b/entity/alanyhq @@ -11,4 +11,4 @@ BABEL=( "zh-N" "en-2" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/chenx97 b/entity/chenx97 index ed1fce1..e05de6d 100644 --- a/entity/chenx97 +++ b/entity/chenx97 @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/frank b/entity/frank index 4758fc3..64d8408 100644 --- a/entity/frank +++ b/entity/frank @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/licson b/entity/licson index 255acb8..4d0806d 100644 --- a/entity/licson +++ b/entity/licson @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/entity/santost12 b/entity/santost12 index 2e3126c..e0a429a 100644 --- a/entity/santost12 +++ b/entity/santost12 @@ -10,4 +10,4 @@ CONTACT=( BABEL=( "" ) -AUTH="PGP:" +AUTH="" diff --git a/scripts/roa.py b/scripts/roa.py index 42d8bdb..31e681f 100755 --- a/scripts/roa.py +++ b/scripts/roa.py @@ -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