monotonerc.html 3.97 KiB
<code>
<pre>
-- This implements a list of trusted signers.
-- It is used on checkout and update.
-- It is not used for repo sync/push/pull.
-- If you do not include this function in ~/.monotone/monotonerc, the
-- default is to trust everybody, which is probably a bad thing
-- in an anonymous network.
-- Update the list below to reflect the signers YOU trust.
--
-- ref: http://www.monotone.ca/docs/Trust-Evaluation-Hooks.html
-- Modified to use key identities instead of key names, since
-- monotone allows duplicate key names, so any key-name-based
-- trust system is insecure.
--
-- Modified from intersection() to use key identities instead of key names, since
-- monotone allows duplicate key names.
--
-- a: table of ID structures (see above)
-- b: table of hex IDs
--
function keyintersection(a,b)
local s={}
local t={}
for k,v in pairs(a) do s[v.id] = 1 end
for k,v in pairs(b) do if s[v] ~= nil then table.insert(t,v) end end
return t
end
--
-- from mtn source project.hh and lua_hooks.cc:
-- signers is a table of integers (starting with 1) to the following ID structure:
-- struct ID
-- {
-- id: (key_id in key_identity_info) hex of revision id hash;
-- given_name: (given_name in key_identity_info) // name given when creating the key
-- name: (official_name in key_identity_info) // name returned by hooks or (once implented) policy
-- };
-- id: hex of revision id hash;
-- name: cert_name
-- val: cert_value
--
function get_revision_cert_trust(signers, id, name, val)
local trusted_signers = {
"5bc185cfd680eb512fdb9626b9fb4298e136215e", -- BlubMail@mail.i2p
"f6706ac205e6b5d7a7e3ea4244ab0ef497f0a099", -- cervantes@mail.i2p
"690f278ff6c6157cbaf23b0d602b6d6dcf368313", -- complication@mail.i2p
"eb4ac08d5ddbb2bd73889f86c1211424025a6f07", -- dev@robertfoss.se
"aae785027c240ebbb0a883fd8ebcf8d6ecee4104", -- dev@welterde.de
"86478595288d1b96b58f0c8cd8a8971bc430f8fd", -- dg2@mail.i2p
-- completed dev agreement 2013-07 but never checked in anything
--"5f75b8f0769770edc3267c21ddc9a00ddae31394", -- digit@mail.i2p
"4ebaace9973913416af92ee8d0fb93d64753df4c", -- dream@mail.i2p
"7e498ae94c9c322404adfc61b16bed388095906b", -- duck@mail.i2p
"6c728b0ffed3c2bf7fb0f3c583b30f966d9bacd5", -- echelon2@mail.i2p
"0e4e7ebebafbdf4cdacc45a47ba155b1215d8e8b", -- forget@mail.i2p
"f332b3d3b11b2efdae220cea75b9d5ba9ec3b52d", -- hamada@mail.i2p
"d681db14fd98da1efd6f8ceb2be6b91d784bdf5c", -- hankhill19580@gmail.com
"e246444b4fe69ba599e13403c4ab931066de902f", -- hiddenz@mail.i2p
"a61146ee69ddb9fcf3b82b19a62b8114b60d367e", -- HungryHobo@mail.i2p
"4844b1fd45f5a68744fa28d2f3e3b61a3cf83b95", -- kytv@mail.i2p
"6b2acfc9fe2f69b796631a514660fd7bdd237e2d", -- laziestgravy@mail.i2p
"c9b970f5e8917eada663d4c6b22096617021c95c", -- m1xxy@mail.i2p
"3be64909d6ab7c3d7afe16f20f24e672708b576b", -- magma@mail.i2p
"2977a6f4e11819a3f928783175caadc0071fc4de", -- mathiasdm@mail.i2p
"de9d196e8057e1629178edbfa1ed754c648d7340", -- meeh@mail.i2p
"2a0bba98558d7a9d7e4b1bd807789601252c0024", -- mkvore-commit@mail.i2p
"6ade4b7a9a6425194f482ab351950e4230dbbc85", -- neutron@mail.i2p
"bc74b49fd8a20513b2745a3d13414b7e9818dd18", -- Oldaris@mail.i2p
"3fb8d1ee1e82981a8076ddbcbf4d18f372b8bba7", -- privateer@mail.i2p
"e3815f0c985663182534fbd7d6a2bf93204a0bd0", -- russiansponsor@mail.i2p
"2ef1ae1e73a30e1afc0b4a7af89b4380b3dd46b7", -- slumlord@mail.i2p
"1092773c40f5813b9179d52a8ab7b499b9554da3", -- sponge@mail.i2p
"01265f0c817b24548478341fb75e672720a78b21", -- str4d@mail.i2p
"38fe2aa37e1eb9a300a2061ef153265c48031c6b", -- walking@mail.i2p
"a0eb78d437efad120dd9edcd776a327ec2c2adde", -- zab@mail.i2p
"2158706490e62a17c8140b6e9eabca965b681bc7", -- zab2@mail.i2p
"56810cd6434ab33593260e188b32bb83e4e9a139", -- z3r0fox@mail.i2p
"896e399990704373125f782ae2ee19b6611ac612" -- zzz@mail.i2p
}
local t = keyintersection(signers, trusted_signers)
if t == nil then return false end
if #t>= 1 then return true end
return false
end
</pre>
</code>