ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Source reference: APPS/NET/TLS.CC

Source reference: APPS/NET/TLS.CC

Deterministic source record. The complete textual file is reproduced below; this page does not replace architectural interpretation in the authored chapters.

File identity

Field Value
Path APPS/NET/TLS.CC
Lines 26
Bytes 407
SHA-256 11c70f405c28e45f738016a2ae2c9a1e76f0100b9d1a45b268985007928fed90
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Detected syntactic dependencies

Line Include
— No preprocessor include detected.

Detected symbols

Line Symbol
1 main

Complete source

The following block is the complete textual file at the recorded revision. No lines are elided, abbreviated or paraphrased.

void main() {
  int s;
  int p;
  int o;
  int i;
  int fd;
  viewport(200, 80);
  text(8, 8, "tls", 0x00FFFFFF);
  s = malloc(32);
  p = malloc(32);
  o = malloc(32);
  storeb(p, 9);
  i = 1;
  while (i < 32) {
    storeb(p + i, 0);
    storeb(s + i, rng_u32());
    i = i + 1;
  }
  storeb(s, rng_u32());
  x25519(o, s, p);
  fd = sock_connect(167773186, 443);
  sock_send(fd, o, 32);
  while (1) {
  }
}

Role of this record

The atlas guarantees file-by-file traceability. Responsibility, invariants, ownership, concurrency, security, performance and subsystem interactions belong in authored chapters and must cite this file when applicable.

Document record ID: source-11c70f405c28e45f Reviewed source: da3df29cb397 Class: generated-source-reference