Commit graph

4737 commits

Author SHA1 Message Date
cinap_lenrek f7703d6971 merge 2016-05-04 00:25:03 +02:00
cinap_lenrek 14685d6595 ape: return plan9 error strings from strerror()
when _syserrno() fails to map a plan9 error string to
a unix error number, we copy the plan9 error string
to the per process error buffer "plan9err" and set
errno = EPLAN9.

when strerror() is called with EPLAN9, it returns
a pointer to the plan9err buffer.
2016-05-04 00:23:48 +02:00
spew 0695e04ada correct reference to srv(3) in shr(3) 2016-05-03 12:37:46 -05:00
spew 01986adbbf document example for shr(3) 2016-05-03 12:35:19 -05:00
spew 479ccd0aa1 add "snake" tracing effect to mole 2016-05-03 09:29:39 -05:00
spew 7657312dcf fix e2 production to match regexp(6) and do it right this time 2016-05-02 15:11:48 -05:00
cinap_lenrek de5cabceaf libregexp: reverting this shit. this is clearly broken. 2016-05-02 21:16:04 +02:00
stanley lieber 9c01b9a958 libregexp/regcomp.c: fix parser for e2 production (thanks, spew) 2016-05-02 14:48:11 -04:00
spew 9ccbf1dcb1 just use wait in "system" call for awk, get rid of unix dependent status code divisor 2016-05-01 20:54:46 -05:00
spew ee68dedf53 null terminate await buffer for proper tokenize call 2016-05-01 20:34:07 -05:00
ben a141f4c53a use rc in awk, remove awk from APEDIRS in cmd mkfile 2016-05-01 20:22:35 -05:00
cinap_lenrek 6e1592c94e /lib/ndb/common: update ip addresses for [BCHL].ROOT-SERVERS.NET 2016-05-02 01:46:19 +02:00
cinap_lenrek 49cbee690f awk: dont require sed to build awk 2016-05-02 00:35:52 +02:00
cinap_lenrek 42a7fcabb0 awk: bring back ENVIRON[] support 2016-05-02 00:34:23 +02:00
cinap_lenrek 79fbfbff48 acid: don't get fooled by spaces in convflt() 2016-05-01 21:52:34 +02:00
cinap_lenrek 5aa224c153 pc: use fpsave() instead of fpenv() to capture fp exception context 2016-05-01 21:51:15 +02:00
cinap_lenrek e880549da6 libregex: fix sed regression (thans spew)
I introduced a regression in sed that currently has screwed up
/sys/lib/man/secindex.

The issue is that sed 's/$/ foo/g' will actually replace the newline
character with foo instead of just appending at the end of the line.
This only makes a difference when sed is operating on a multiple line
record. The effect is a record like:

foo
bar
baz

becomes:

foo foobar foo baz foo

instead of

foo foo
bar foo
baz foo
2016-05-01 03:03:12 +02:00
stanley lieber 77d23bae0f upas/bayes/dump.c: regcomp.h is now located in this directory. 2016-04-30 18:39:05 -04:00
cinap_lenrek 974c4fc768 awk: temporarily fix for NaN() exceptions on 386
problem is NaN() produces a SNaN, not a QNaN... and on the 387,
storing 80 bit SNaN in register to a 64-bit memory destination
traps.

SNaN/QNaN encoding is machine specific. mips has the qiet/signaling
bit inverted.

disabling fp exception in main() now, but that sucks.

i think the best solution would be to not even call strtod() in
is_number() but just write a regex or a little state machine that
will only accept numbers without nan and ±inf.

that might even make it faster and is more robust than relying on
the os's strtod() details.
2016-04-30 05:12:20 +02:00
cinap_lenrek ce1edc3436 ape/libsec: fix nuke target to remove /$objtype/lib/ape/libsec.a instead of /$objtype/lib/libsec.a 2016-04-29 20:18:28 +02:00
aiju 46008ac6b7 handle NaN in awk (thanks spew) 2016-04-29 18:11:29 +02:00
stanley lieber 415b5dfe9b awk: fix mkfile for cross-compiles (thanks, spew) 2016-04-28 23:59:59 -04:00
cinap_lenrek cb3049652d remove ape/regexp.h, remove leftover #pragma lib oldlibregexp.$O from upas/bayes/regexp.h 2016-04-28 21:22:26 +02:00
cinap_lenrek eb16892484 closed spew branch 2016-04-28 20:52:36 +02:00
ben 4d5fb6c357 fix printing a char from an empty string 2016-04-28 12:07:24 -05:00
ben 6886164e34 fix printing a char from a string that starts with a rune 2016-04-28 11:20:38 -05:00
ben 7420dc6ada fix unsigned printing for awk 2016-04-28 11:07:43 -05:00
ben 58a6b6d6ff merge default 2016-04-28 08:26:57 -05:00
ben 006fa02a5e get rid of size printing 2016-04-28 08:05:42 -05:00
ben 0da525ae9a check program size 2016-04-27 19:56:39 -05:00
cinap_lenrek ca5b491753 rune(2): add Runeerror reencoding considerations in BUGS section (thanks aiju) 2016-04-28 01:53:09 +02:00
ben 3bf6ef0196 better memory management of threads (thanks knuth) 2016-04-27 17:36:43 -05:00
ben 86e0099835 merge in master 2016-04-27 08:20:54 -05:00
ben b8986a889d use Beof for awk port 2016-04-27 08:09:16 -05:00
ben 85824350b5 remove ape regexp library, add utility for awk native port 2016-04-27 07:52:41 -05:00
cinap_lenrek d8d47f14b5 libjson: add slack space to literal string buffer to handle bad runes (thanks mischief)
if the input string contains invalid utf-8, runetochar() produces
unicode replacement characters that can overflow the literal buffer.
as the overflow check is done after runetochar(), add UTFmax bytes
of slack space avoiding the issue.
2016-04-27 12:59:06 +02:00
ben 0f8168038a remove old libregexp files; add headers for upas/bayes 2016-04-26 22:26:03 -05:00
ben 0a460e1722 New libregexp and APE ported to native 2016-04-26 22:23:44 -05:00
cinap_lenrek 651d6c2bc6 abaco(1): remove readweb 2016-04-26 00:10:47 +02:00
Matthew Veety 6d2635d5ba made abaco's gui respect $font and made readweb respect most installations 2016-04-25 17:49:31 -04:00
cinap_lenrek 1cf3c46669 rsa: rename getkey() to getrsakey(), document rsa2csr in rsa(8) 2016-04-22 03:41:06 +02:00
cinap_lenrek 17a67eeb65 libsec: implement server side SCSV preventing silly client fallbacks
silly clients (web*) reconnect when the handshake failed with a lower
protocol version, which allows downgrade attacks (POODLE). but instead
of stopping this madness, they invented a new magic TLSID to indicate
to the server that this connection attempt is a retry, and rely on the
server to notice and stop them from sabotaging themselfs.
2016-04-22 02:33:29 +02:00
cinap_lenrek 7b3334775e libsec: order tlshand cipher suits by: keyexchange>=cipher>=hash, ignore client preference
client preference is usualy crazy, so just ignore it.
we always want the diffie hellman suits before static
rsa and prefer chacha over aes-gcm.
2016-04-21 23:29:59 +02:00
cinap_lenrek 0d6a188dde rsagen: increase default key size to 2048 bits 2016-04-21 21:25:33 +02:00
cinap_lenrek 42c4cc75a6 libsec: remove affine coordinate point operations from ecc
we now just do point addtion in jacobian coordinate system, and
convert the result to affine when s->z == nil.
2016-04-21 20:41:19 +02:00
cinap_lenrek 2fa4c8ef66 libsec: implement elliptic curve group operations in jacobian coordinate system 2016-04-20 20:09:59 +02:00
cinap_lenrek ff47cbd464 libsec: implement server side ECDHE key exchange with secp256r1, move DH state in TlsSec structure, simplify
implement ECDHE key exchange with secp256r1 on the server side, providing
perfect forward secrecy (tho slowly).

it is easier to just keep the ECDH/DH state in the TlsSec structure,
which fits better with the grouping of the functions. we do the cleanup
in tlsConnectionFree() now, so a lot of error handling logic could go
away.

reinvestigated some error paths and removed the ones that cannot error.

move functions to fit the logical grouping.

combine the code for signing handshake hashes (for client certs) and
DH parameters. provide digestDHparams() function to be shared between
server and client code.
2016-04-18 19:24:57 +02:00
cinap_lenrek 9ba04fd030 webfs: fix memory leak of serverName in tlswrap() 2016-04-18 19:07:02 +02:00
cinap_lenrek 93a86cea66 rsa(8): provide example for converting OpenSSL generated PEM file to factotum 2016-04-17 07:33:35 +02:00
cinap_lenrek ad6b99359d libsec: massive cleanup of tlshand.c
don't pass or generate sessionID's. this was never used nor
actually implemented and leaks the process pid.

get rid of version and random field duplications, move TlsSec
structure into TlsConnection.

make msgRecv() clear the message first, get rid of unneccesary
msgClear() calls.
2016-04-17 07:20:54 +02:00