summary refs log tree commit diff stats
path: root/lib/pure
Commit message (Collapse)AuthorAgeFilesLines
* net: also set TLSv1.3 cipher suitesLeorize2020-06-061-0/+7
|
* net: revert compatibility changes for WindowsLeorize2020-06-061-5/+2
| | | | | This reverts commit d53a6355f3ad4401731142d8fc66b95ecfdfb321 and 688b1f250ed058ecc49737dc75fd089206fa25b9.
* 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-061-1/+1
| | | | | And the fun thing is that currently we use a super old OpenSSL on Windows.
* net: enable automatic EC curve selection for OpenSSL 1.0.2Leorize2020-06-061-0/+7
| | | | | 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.
* 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-061-2/+0
| | | | 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-062-10/+21
| | | | | | 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.
* Disable unused warnings for error await template too (#14531)Danil Yarantsev2020-06-011-1/+1
|
* 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
* 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.
* make get for options use lent T (#14442)cooldome2020-05-251-2/+2
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* Fix #14057 - moveFile should overwrite on Windows (#14433)genotrance2020-05-231-2/+2
|
* The whole options module should be inline (#14417) [backport:1.2]Mamy Ratsimbazafy2020-05-211-15/+14
| | | | | | | * The whole options module should be inline * Use inline per proc and tag `lent` where appropriate * Remove lent annotation (failing at compiletime)
* fix #14404 foldr had the classic multiple evaluation bug (#14413)Timothee Cour2020-05-211-7/+7
|
* asyncdispatch, asyncnet: add inheritance control (#14362)alaviss2020-05-202-25/+90
| | | | | * asyncdispatch, asyncnet: add inheritance control * asyncnet, asyncdispatch: cleanup
* Fix #14394 (#14395)Clyybber2020-05-181-1/+1
|
* Emscripten: disable epoll (#14361)Dominik Picheta2020-05-161-2/+2
| | | Epoll is not supported by epoll.
* Remove the uses of {.procvar.} pragma (#14359)Kaushal Modi2020-05-155-49/+48
| | | | | | | This pragma did nothing. Ref: - https://github.com/nim-lang/Nim/issues/2172#issuecomment-383276469 - https://github.com/nim-lang/Nim/issues/12975
* fixes #14331Araq2020-05-131-0/+28
|
* `osproc.execCmdEx` now takes an optional `input` for stdin, `env`, ↵Timothee Cour2020-05-131-12/+31
| | | | | | | workingDir (#14211) * `osproc.execCmdEx` now takes an optional `input` for stdin * execCmdEx now also takes an optional ``workingDir` and `env`
* properly fixes #13758 so that `import std/macros` stays legal (#14291)Timothee Cour2020-05-121-2/+1
| | | | | * properly fix https://github.com/nim-lang/Nim/issues/12389 * use --lib:lib in koch.nim.cfg instead * third time is the charm
* Fix #14289 (#14304) [backport]slangmgh2020-05-111-1/+2
|
* fixes #13946 (#14302)Andreas Rumpf2020-05-112-11/+5
|
* fix a critical bug in windows.osproc leading to resource leaks and blocking ↵Timothee Cour2020-05-111-1/+5
| | | | IO [backport] (#14296)
* nativesockets: add missing inheritable pass-throughLeorize2020-05-071-1/+1
|
* net: remove more erroneous set constructions (#14252) [backport]alaviss2020-05-071-3/+8
| | | Refs #13764
* Fix runnable examples for bitops (#14247)awr12020-05-061-3/+3
|
* Added bitslice operations for bitops (#14016)awr12020-05-061-21/+206
| | | | | | | | | | | | | | | | | | | | * added bit operations based on bit slices, clarified documentation, made non-mutating versions of mask ops * Added since annotations, some runnable examples * Added mask()/masked() functions, changed internal workings of mask ops to use new bit* funcs * Changelog updated for new bitops improvements * Reorganization, added runnable examples * Documentation adjustments * Add incltrl for since annotation * Fix masked() impl * Fix mask() return type * Don't call toUnsigned on already unsigned types * Remove improper `var T` for flipMasked() * Fix return types for flipMasked() * Slight syntactic cleanup for *masked ops * Added tests for bitslice operations, new mask() operation, non-mutating mask ops * Fix setmasked() var T issue * More comprehensive tests * Fix runnable example for bitsliced() * Fix runnable example for mask()
* Make the fields of `times.DateTime` private (#14197)Oscar Nihlgård2020-05-061-76/+180
| | | | | * Make the fields of `times.DateTime` private * PR fixes
* Clarify JS cstring len (#14184)hlaaftana2020-05-051-2/+2
|
* Fixes net.recvFrom to work correctly with IPv6 (#14131)rockcavera2020-05-041-10/+22
| | | | | | | * added high level sendTo and recvFrom to std/asyncnet; tests were also added. * add .since annotation, a changelog entry and fixed to standard library style guide. * fixes net.recvFrom to work correctly with IPv6 * raise if domain is not AF_INET or AF_INET6 * renamed template to adaptRecvFromToDomain()
* sequtils refactoring: prefer typeof over type (#14212)Andreas Rumpf2020-05-041-15/+15
|
* => supports pragmas & names (+ changed behavior) (#14200)hlaaftana2020-05-034-39/+65
| | | | | | | | | | * => supports pragmas & names (+ changed behavior) (x, y: int) is now parsed as (x: int, y: int) instead of (x: auto, y: int) inside => and ->. * fix pragma check * fixes, use since & LHS of -> supports pragmas
* fix #14203 (#14204)slangmgh2020-05-031-1/+4
|
* Fix #14201 (#14202)slangmgh2020-05-031-1/+1
|
* move since from inclrtl to std/private/since (#14188)hlaaftana2020-05-0219-31/+27
| | | | * move since from inclrtl to std/private/since * move since import in system below for HCR
* change 'iff' to 'if' to stop "corrections" once and for all (#14182)Miran2020-05-016-20/+20
|
* discardable async procs are now an error (#14176)hlaaftana2020-05-011-8/+14
| | | | * add discard warning in manual
* fix sendTo and recvFrom in asyncnet (#14154)rockcavera2020-04-301-76/+40
| | | | | | | | | | | | | * added high level sendTo and recvFrom to std/asyncnet; tests were also added. * add .since annotation, a changelog entry and fixed to standard library style guide. * Improved asserts msgs and added notes for use with UDP sockets * pointers removed in parameters and fixes * added .since annotation * minor fixes
* fixes the regression #12860 caused; hotfixAraq2020-04-301-1/+1
|
* JS unittest stacktrace fix, cleanup js repr and inclrtl includes (#14168)hlaaftana2020-04-303-12/+9
|