|
OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
|
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} |
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).
| banlist.check | ( | path | ) |
| banlist.der_int | ( | der, | |
| i ) |
| banlist.der_to_rs | ( | der | ) |
| banlist.keygen | ( | out | ) |
| banlist.main | ( | argv | ) |
| banlist.openssl | ( | * | args, |
| data = None ) |
| 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.
| banlist.problems | ( | path | ) |
What keeps a server from taking the list, empty when nothing does.
| banlist.read | ( | path, | |
| mode = 'rb' ) |
| banlist.rs_to_der | ( | rs | ) |
| banlist.sign | ( | path, | |
| key ) |
| banlist.text_ok | ( | value, | |
| longest ) |
| banlist.valid_id | ( | text | ) |
| banlist.valid_time | ( | text | ) |
| banlist.verify | ( | path, | |
| pubhex ) |
| int banlist.MAX_BYTES = 4 * 1024 * 1024 |
| int banlist.MAX_ENTRIES = 100000 |
| banlist.SPKI_PREFIX = bytes.fromhex('3039301306072a8648ce3d020106082a8648ce3d030107032200') |
| dict banlist.TEXT = {'reason': 127, 'by': 63, 'evidence': 255} |