summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* openssl: use explicit result for SSL_in_init (#14597)alaviss2020-06-081-2/+2
| | | | | | | Sometimes the analysis might get funky and decide that the if-expression below is not an if-expression. Details of how this can happen is largely unknown, but it's easy to prevent so we will just go forward with that. Fix #14591
* wrappers/openssl: defer loading SSL_CTX_set_ciphersuitesLeorize2020-06-061-1/+3
|
* net: also set TLSv1.3 cipher suitesLeorize2020-06-062-0/+12
|
* wrappers/openssl: mark casts as gcsafeLeorize2020-06-061-17/+13
| | | | Nim will pretend that these proc are not gcsafe if they are not marked.
* wrappers/openssl: enable SSL_CTX_set_ecdh_auto for LibreSSLLeorize2020-06-061-1/+1
| | | | | | This procedure is not no-op for older LibreSSL, and the ABI is kept for newer versions, so there's no harm in enabling it unconditionally for all LibreSSL versions.
* net: revert compatibility changes for WindowsLeorize2020-06-061-5/+2
| | | | | This reverts commit d53a6355f3ad4401731142d8fc66b95ecfdfb321 and 688b1f250ed058ecc49737dc75fd089206fa25b9.
* wrappers/openssl: the version number comes from the utility libraryLeorize2020-06-061-9/+20
| | | | | Previously we loaded the SSL library for this, but that's not where the symbol resides.
* net: use CiphersOld list for WindowsLeorize2020-06-061-1/+4
| | | | | | | The default DLLs shipped are too old, switch to CiphersOld list to ensure compatibility. This commit should be reverted before any future release.
* net: don't call set_ecdh_auto for super old OpenSSLLeorize2020-06-062-6/+4
| | | | | And the fun thing is that currently we use a super old OpenSSL on Windows.
* wrappers/openssl: fix SSL_CTX_set_modeLeorize2020-06-061-1/+1
| | | | Follow up of 794042080b270d9da8d64bb4285ce83787bdec7e
* wrappers/openssl: getOpenSSLVersion is gcsafeLeorize2020-06-061-3/+4
| | | | Yet another weird {.gcsafe.} triggering when it shouldn't.
* net: enable automatic EC curve selection for OpenSSL 1.0.2Leorize2020-06-062-0/+23
| | | | | This setting is required for servers running OpenSSL < 1.1.0 to support EC-based secure ciphers that is now part of the default cipher list.
* wrappers/openssl: fix SSL_CTX_ctrl signatureLeorize2020-06-061-1/+1
|
* asyncnet: clear SSL error queue before performing I/OLeorize2020-06-061-0/+1
| | | | Follow up of 476be6cc278d58232e2c6cd3515eb24eca7e2d38
* net: use a secure cipher list by defaultLeorize2020-06-062-1/+53
| | | | | | | | | | | Previously, the `net` module use the blanket "ALL" as the default cipher list. This list may contain security ciphers that are weak and/or outdated according to the current standard. This commit introduces a new module `ssl_config` that contains the latest OpenSSL configurations as recommended by Mozilla OpSec, and make the `net` module use the cipher list targeting `intermediate` compatibility level as the default.
* asyncnet, net: clear openssl error queue before performing I/OLeorize2020-06-062-0/+8
| | | | | | | | | | | | Per SSL_get_error(3): The current thread's error queue must be empty before the TLS/SSL I/O operation is attempted, or SSL_get_error() will not work reliably. There has been records of not clearing the error queue causing weird SSL errors when there shouldn't be any, see: https://github.com/openssl/openssl/issues/11889
* openssl: fix erroneous function signaturesLeorize2020-06-062-5/+3
| | | | Now matches the declaration in openssl/err.h
* net: don't clear error queue unless shutdown() will be performedLeorize2020-06-061-1/+1
|
* Revert "net: don't clear all errors on close"Leorize2020-06-061-0/+1
| | | | | | | You're supposed to clear the error queue before any I/O operations. Per SSL_get_error(3) man page. This reverts commit ee3ed37300743addb1344e39bc46d3cd2b89a718.
* net: don't clear all errors on closeLeorize2020-06-061-1/+0
| | | | | | | Closing a socket clears the error queue of the entire thread, which seems to be a bit too invasive. Also I don't find any reason in the PR that added this.
* asyncnet, net: call SSL_shutdown only when connection establishedLeorize2020-06-063-10/+49
| | | | | | This commit prevents "SSL_shutdown while in init" errors from happening. See https://github.com/openssl/openssl/issues/710#issuecomment-253897666
* Fix asynchttpserver newline breaking content-length (#14565) [backport]Zed2020-06-061-2/+3
|
* remove isMainModule from json,os,sequtils (#14572)Timothee Cour2020-06-063-757/+2
| | | | | * move json.isMainModule => tjson * move isMainModule => tos,tsequtils
* Improve JSON serialisation of strtabs (#14549)PMunch2020-06-052-7/+30
| | | | This creates a more compact serialisation of strtabs that is more in line with the normal tables.
* io: correct signature for some win32 apis (#14551)alaviss2020-06-031-5/+5
| | | See https://github.com/nim-lang/Nim/pull/14550#issuecomment-637937649
* fix https://github.com/timotheecour/Nim/issues/266 retry on failure to avoid ↵Timothee Cour2020-06-021-0/+32
| | | | common 503 github errors (#14547)
* walkDirRecFilter, update doc CI filter, compiler/index.nim for docs + ↵Timothee Cour2020-06-011-0/+54
| | | | | | | | | | | various other fixes (#14501) * update doc CI filter to include the files mostly likely to require doc rebuild * remove code duplication in ./config/nimdoc.cfg; show link to compiler docs, various fixes * walkDirRecFilter, factor nativeToUnixPath workaround * glob for getRst2html * docslocal: 40s to build all docs * revert code dedup in github actions which did not work alas... * fixups
* Disable unused warnings for error await template too (#14531)Danil Yarantsev2020-06-011-1/+1
|
* fix CI doc windows: style error in lib/std/time_t.nim (#14523)Timothee Cour2020-05-311-2/+2
|
* Disable unused warnings for await in async macro (#14517)Danil Yarantsev2020-05-311-2/+2
| | | | | * Disable unused warnings for await in async macro * Remove used for the error template
* fix #14421 items uses lent T (#14447)Timothee Cour2020-05-291-3/+28
| | | | | * fix #14421 items uses lent T for seq + openArray * add -d:nimWorkaround14447 * fix test
* hotfix doc comments for procs without body (#14494)Timothee Cour2020-05-291-5/+0
|
* more checking for --gc:arc, no need for valgrind (#14467)Andreas Rumpf2020-05-298-69/+145
| | | | * sigmatch: removed dead code
* close #14284 document semantics for start for re,nre; improve examples (#14483)Timothee Cour2020-05-282-196/+67
|
* Propagate the outDir to rstgen to fix hrefs for modules in subdirs (#14479)Kaushal Modi2020-05-281-3/+13
|
* Add thiscall calling convention, mostly for hooking purpose (#14466)Huy Doan2020-05-271-0/+2
| | | | * Add thiscall calling convention, mostly for hooking purpose * add changelog and documentation
* Change `UnpackError` with `UnpackDefect` (#14457)Ivan Bobev2020-05-272-9/+10
| | | | | | | | | | | | | | | | | | * Change `UnpackError` with `UnpackDefect` The deprecation warning for `UnpackError` exception raised by some `inline` procedures in the Nim standard library propagates to the user code. If the user code has a requirement for building without warnings this is a problem for the successful execution of the tests. In order to resolve this, all occurrences of `UnpackError` in the Nim code base are changed to `UnpackDefect`. Only the type alias is retained to not break other people's user code since `UnpackError` is exported type. * Remove the catching of `UnpackDefect` Defect exceptions should not be cached, because they indicate problem in the API usage. The code in `nimblesocket.nim` is rewritten to first check whether there is a value set into the `knownDomain` variable from the `Option` type before usage.
* docgen: mangling using _. instead of @@ to avoid issue (#14454)Timothee Cour2020-05-261-2/+2
|
* add bindParams to db_sqlite (#14408)Bung2020-05-261-41/+159
| | | | | | | | | | | | | | | | | | | | | * add bindParams to db_sqlite * no need typeinfo * remove extro spaces * reduce bindParams to two branches,raise DbError * Update lib/impure/db_sqlite.nim * change bindParams to macro,accept varargs[untyped] as params * change bind blob val to openArray[byte] * remove unused err type * explicitly using i32 param * using import std/private/since * SQLITE_OK to right hand * bindParam val int using bindParam overload * copy data by default * change exec to template * remove SqlPrepared procs unused varargs * fix setupquery for prepared,reset first for exec prepared,add bindNull for literal nil Co-authored-by: alaviss <leorize+oss@disroot.org>
* docgen: fix #14448 show @@ as .. in href text (#14451)Timothee Cour2020-05-251-1/+6
|
* make get for options use lent T (#14442)cooldome2020-05-251-2/+2
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* Add support for mktemps (#14347)Max Grender-Jones2020-05-252-8/+24
|
* Add clipPath to dom.nim. (#14435)treeform2020-05-241-1/+2
| | | Just adds a single new css atribute, see: https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path .
* fix repr(char) example assert (#14437)hlaaftana2020-05-231-1/+1
|
* Fix #14057 - moveFile should overwrite on Windows (#14433)genotrance2020-05-231-2/+2
|
* add insert,tryInsert unify for postgres that need pk name (#14416)Bung2020-05-224-0/+67
| | | | | | | | | | | * add insert,tryInsert unify for postgres that need pk name * add ReadDbEffect to new procs * add .since and changelog * change since to 1.3 * Update lib/impure/db_postgres.nim Co-authored-by: bung87 <crc32@qq.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: alaviss <leorize+oss@disroot.org>
* Add missing attributes and methods to JavaScript DOM (#14428)Mildred Ki'Lya2020-05-221-0/+14
| | | | | | | | | | | | | | | | | - content attribute to access HTML template element: https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement/content - ownerDocument to access the owning document from a DOM Node: https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument - outerHTML to get/set the outer HTML representation of a Node: https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument - createComment() to create comment Nodes: https://developer.mozilla.org/en-US/docs/Web/API/Document/createComment - querySelector() and querySelectorAll() on Nodes: https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelector https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelectorAll
* make malloc.nim consistent in style (#14427)Andreas Rumpf2020-05-221-9/+9
|
* ARC/ORC: optimize s.setLen(0) to match the old runtime's behaviour (#14423)Andreas Rumpf2020-05-211-2/+1
|
* fixes a bug reported in https://forum.nim-lang.org/t/6361 (#14422)Andreas Rumpf2020-05-211-31/+31
|