OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
Loading...
Searching...
No Matches
banlist Namespace Reference

Functions

 read (path, mode='rb')
 openssl (*args, data=None)
 der_int (der, i)
 der_to_rs (der)
 rs_to_der (rs)
 keygen (out)
 sign (path, key)
 verify (path, pubhex)
 valid_id (text)
 parse_time (text)
 valid_time (text)
 text_ok (value, longest)
 problems (path)
 check (path)
 main (argv)

Variables

int MAX_BYTES = 4 * 1024 * 1024
int MAX_ENTRIES = 100000
 SPKI_PREFIX = bytes.fromhex('3039301306072a8648ce3d020106082a8648ce3d030107032200')
dict TEXT = {'reason': 127, 'by': 63, 'evidence': 255}

Detailed Description

Shared Plus ID ban lists: the maintainer's tool (docs/architecture/plus-id.md).

    banlist.py keygen OUT          OUT.key (private PEM) and OUT.pub (hex, for sv_banLists)
    banlist.py sign LIST KEY       LIST.sig: ECDSA P-256 over SHA-256 of LIST, r||s in base64
    banlist.py verify LIST PUBHEX  exit 0 when LIST.sig is good for PUBHEX, else 1
    banlist.py check LIST          exit 0 when LIST has the format and limits servers take

Uses the openssl CLI. The checks are the server's (src/libcod/plusid_lists.cpp).

Function Documentation

◆ check()

banlist.check ( path)

◆ der_int()

banlist.der_int ( der,
i )

◆ der_to_rs()

banlist.der_to_rs ( der)

◆ keygen()

banlist.keygen ( out)

◆ main()

banlist.main ( argv)

◆ openssl()

banlist.openssl ( * args,
data = None )

◆ parse_time()

banlist.parse_time ( text)
PlusId_ParseTime: "YYYY-MM-DD" or "YYYY-MM-DDTHH:MM:SSZ", a real date
from 1970, as Unix seconds; None for anything else.

◆ problems()

banlist.problems ( path)
What keeps a server from taking the list, empty when nothing does.

◆ read()

banlist.read ( path,
mode = 'rb' )

◆ rs_to_der()

banlist.rs_to_der ( rs)

◆ sign()

banlist.sign ( path,
key )

◆ text_ok()

banlist.text_ok ( value,
longest )

◆ valid_id()

banlist.valid_id ( text)

◆ valid_time()

banlist.valid_time ( text)

◆ verify()

banlist.verify ( path,
pubhex )

Variable Documentation

◆ MAX_BYTES

int banlist.MAX_BYTES = 4 * 1024 * 1024

◆ MAX_ENTRIES

int banlist.MAX_ENTRIES = 100000

◆ SPKI_PREFIX

banlist.SPKI_PREFIX = bytes.fromhex('3039301306072a8648ce3d020106082a8648ce3d030107032200')

◆ TEXT

dict banlist.TEXT = {'reason': 127, 'by': 63, 'evidence': 255}