Differences From
Artifact [9b6251fcb3]:
162 162 end
163 163 -- TODO validate fully
164 164 return true
165 165 end
166 166
167 167 terra m.actor.methods.mk(kbuf: &uint8)
168 168 var newkp = lib.crypt.genkp()
169 - var privsz = lib.crypt.der(false,&newkp,kbuf)
169 + var derkey = lib.crypt.der(false,&newkp,kbuf)
170 170 return m.actor {
171 171 id = 0; nym = nil; handle = nil;
172 172 origin = 0; bio = nil; avatar = nil;
173 173 knownsince = lib.osclock.time(nil);
174 174 rights = m.rights_default();
175 175 avatarid = 0;
176 - epithet = nil, key = [lib.mem.ptr(uint8)] {
177 - ptr = &kbuf[0], ct = privsz
178 - };
176 + epithet = nil, key = derkey;
179 177 }
180 178 end
181 179
182 180 struct m.actor_stats {
183 181 posts: intptr
184 182 follows: intptr
185 183 followers: intptr
................................................................................
384 382 -> {uint64, uint64, pstr}
385 383 actor_auth_pw: {&m.source, m.inet, lib.mem.ptr(int8), lib.mem.ptr(int8) }
386 384 -> {uint64, uint64, pstr}
387 385 -- handles password-based logins against hashed passwords
388 386 -- origin: inet
389 387 -- handle: rawstring
390 388 -- token: rawstring
389 + actor_auth_challenge: {&m.source, m.inet, pstr, lib.mem.ptr(uint8), pstr }
390 + -> {uint64, uint64, pstr}
391 + -- origin: inet
392 + -- handle: rawstring
393 + -- response: rawstring
394 + -- challenge token: pstring
391 395 actor_auth_tls: {&m.source, m.inet, rawstring}
392 396 -> {uint64, uint64, pstr}
393 397 -- handles implicit authentication performed as part of an TLS connection
394 398 -- origin: inet
395 399 -- fingerprint: rawstring
396 400 actor_auth_api: {&m.source, m.inet, rawstring, rawstring} -> uint64
397 401 -> {uint64, uint64, pstr}
................................................................................
416 420 actor_rel_create: {&m.source, uint16, uint64, uint64} -> {}
417 421 actor_rel_destroy: {&m.source, uint16, uint64, uint64} -> {}
418 422 actor_rel_calc: {&m.source, uint64, uint64} -> m.relationship
419 423
420 424 auth_enum_uid: {&m.source, uint64} -> lib.mem.lstptr(m.auth)
421 425 auth_enum_handle: {&m.source, rawstring} -> lib.mem.lstptr(m.auth)
422 426 auth_attach_pw: {&m.source, uint64, bool, pstr, pstr} -> uint64
423 - auth_attach_key: {&m.source, uint64, bool, pstr, pstr} -> {}
427 + auth_attach_rsa: {&m.source, uint64, bool, lib.mem.ptr(uint8), pstr} -> uint64
424 428 -- uid: uint64
425 429 -- reset: bool (delete other passwords?)
426 430 -- pw: pstring
427 431 -- comment: pstring
428 432 auth_privs_set: {&m.source, uint64, m.privset} -> {}
429 433 auth_purge_pw: {&m.source, uint64, rawstring} -> {}
430 434 auth_purge_otp: {&m.source, uint64, rawstring} -> {}