async_postgres/pg_der

Search:
Group by:

Minimal DER reading for the few X.509 / PKCS#8 fields the library inspects. Dependency-free and not re-exported by async_postgres.

Consts

oidRsaPss = [42'u, 0x00000086, 0x00000048, 0x00000086, 0x000000F7, 0x0000000D,
             0x00000001, 0x00000001, 0x0000000A]
id-RSASSA-PSS content bytes, shared by the signature and key checks.

Procs

proc derElement(data: openArray[byte]; pos: var int; tag: byte; limit: int): int {.
    ...raises: [], tags: [], forbids: [].}
Body length of the tag element at pos, advancing pos past its header; -1 when the tag differs or the element overruns limit or data.
proc oidText(oid: openArray[byte]): string {....raises: [], tags: [], forbids: [].}
Dotted form of OID content bytes, for messages; "" when malformed.
proc oidValid(oid: openArray[byte]): bool {....raises: [], tags: [], forbids: [].}
Whether OID content bytes are well formed: non-empty, the last subidentifier terminated, and every arc within uint64.