summaryrefslogtreecommitdiff
path: root/tests/unit/tls_test.ts
AgeCommit message (Collapse)Author
2024-09-27BREAKING(ext/net): improved error code accuracy (#25383)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-12test: remove `DENO_FUTURE` (#25587)Asher Gomez
2024-09-10BREAKING(net): remove ↵Asher Gomez
`Deno.ConnectTlsOptions.{certChain,certFile,privateKey}` and `Deno.ListenTlsOptions.certChain,certFile,keyFile}` (#25525) Towards #22079
2024-09-10feat(cli): use NotCapable error for permission errors (#25431)Luca Casonato
Closes #7394 --------- Co-authored-by: snek <snek@deno.com>
2024-09-06BREAKING(net): remove `Deno.{Conn,TlsConn,TcpConn,UnixConn}.prototype.rid` ↵Asher Gomez
(#25446) Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-05feat(check): turn on useUnknownInCatchVariables (#25465)David Sherret
Part of #25162 Closes #11826
2024-08-26Reland "test: run unit tests with DENO_FUTURE=1" (#25212)Bartek Iwańczuk
Reverted in https://github.com/denoland/deno/pull/25060
2024-08-15Revert "test: run unit tests with DENO_FUTURE=1 (#24400)" (#25060)Bartek Iwańczuk
This reverts commit 22a834ff5b4b312b8f91be8991f2b495d49fad2f. Appears this commit might have broken tests on `main`.
2024-08-14test: run unit tests with DENO_FUTURE=1 (#24400)Bartek Iwańczuk
This commit adds another test suite that runs all Deno unit tests with `DENO_FUTURE=1` flag to ensure all APIs are working as expected, once Deno 2 is released. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-07-25chore: update to `std@2024.07.19` (#24715)Asher Gomez
2024-04-18feat(ext/net): extract TLS key and certificate from interfaces (#23327)Bartek Iwańczuk
Relands #23325
2024-04-11Revert "refactor(ext/net): extract TLS key and certificate from inter… ↵Bartek Iwańczuk
(#23325) …faces (#23296)" This reverts commit e190acbfa8b41f92291e73c405735ba0d7b5b172. Reverting because it broke stable API type declarations. We will reland it for v1.43 with updated interfaces
2024-04-09refactor(ext/net): extract TLS key and certificate from interfaces (#23296)Matt Mastracci
Removes the certificate options from all the interfaces and replaces them with a new `TlsCertifiedKeyOptions`. This allows us to centralize the documentation for TLS key management for both client and server, and will allow us to add key object support in the future. Also adds an option `keyFormat` field to the cert/key that must be omitted or set to `pem`. This will allow us to load other format keys in the future `der`, `pfx`, etc. In a future PR, we will add a way to load a certified key object, and we will add another option to `TlsCertifiedKeyOptions` like so: ```ts export interface TlsCertifiedKeyOptions = | TlsCertifiedKeyPem | TlsCertifiedKeyFromFile | TlsCertifiedKeyConnectTls | { key: Deno.CertifiedKey } ```
2024-04-08feat(ext/net): Refactor TCP socket listeners for future clustering mode (#23037)Matt Mastracci
Changes: - Implements a TCP socket listener that will allow for round-robin load-balancing in-process. - Cleans up the raw networking code to make it easier to work with.
2024-04-08fix(ext/tls): add support EC private key (#23261)MAKS11060
Deno works with the `EC` key, but cannot recognize it. This code works correctly if the prefix 'EC' is removed. ```typescript const cert = `-----BEGIN CERTIFICATE----- MIICqjCCAZKgAwIBAgIULvZQk8us6eYdpKZraHVkW8YKL/IwDQYJKoZIhvcNAQEL BQAwJzELMAkGA1UEBhMCVVMxGDAWBgNVBAMMD0V4YW1wbGUtUm9vdC1DQTAgFw0y NDA0MDYwNzM4MDlaGA8yMTIzMDMxNDA3MzgwOVowbTELMAkGA1UEBhMCVVMxEjAQ BgNVBAgMCVlvdXJTdGF0ZTERMA8GA1UEBwwIWW91ckNpdHkxHTAbBgNVBAoMFEV4 YW1wbGUtQ2VydGlmaWNhdGVzMRgwFgYDVQQDDA9sb2NhbGhvc3QubG9jYWwwWTAT BgcqhkjOPQIBBggqhkjOPQMBBwNCAATWOALcgzz4LbNikhjVGpkOCUmR8NahjfFw 9pNBuyZnaTcjfeGfiPaV0iQqvTuQnmL+fTBw8PKxzlKGpzsodQaWo1EwTzAfBgNV HSMEGDAWgBTzut+pwwDfqmMYcI9KNWRDhxcIpTAJBgNVHRMEAjAAMAsGA1UdDwQE AwIE8DAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZIhvcNAQELBQADggEBABWp 5LsGj5mWGIy7XpksXb0k2e3fUh+CobNl4JbvE7em68nuyojm0+/vEs8Bpd9vJaUo tU1btyTO8xUlOGeyNa9Ddd2gj3oB8IGMjxhazWTSDseZ/WqBt6OudPMmnj+jPRQL 8Hb0vyXfmabZnWO9WH9/tcCoGdUdKo2KYN/7M2ojSeRq/4BIL08lC2SVX8DlBG40 8aj3FJo9xsUG59NI31iXVN1UPEN2pakKRJdSVdpbBjxDaEoLw/TB02gqfA43T1fU wKz+0UYxSCjeW0lOZ3wlaNN2KqiHLuQ6ePG5kqD8aRufmYWK/ImlO/ZiSX60GiPu K1cC6aWEohOhx+k424Y= -----END CERTIFICATE-----` const key = `-----BEGIN EC PRIVATE KEY----- MHcCAQEEILL8H0x2ZP/ZZ+CwmKLS/zRleO7k7NBgWH0P767zYvlVoAoGCCqGSM49 AwEHoUQDQgAE1jgC3IM8+C2zYpIY1RqZDglJkfDWoY3xcPaTQbsmZ2k3I33hn4j2 ldIkKr07kJ5i/n0wcPDysc5Shqc7KHUGlg== -----END EC PRIVATE KEY-----` const config: Deno.ServeTlsOptions = { cert, // key, // not working // error: Uncaught (in promise) InvalidData: No keys found in key file key: key.replaceAll(' EC', ''), // remove ' EC'. it works } Deno.serve(config, (r) => Response.json('ok')) ```
2024-04-03chore(tests): rewrite tls_test to avoid any hardcoded ports (#23191)Matt Mastracci
To avoid the risk of port collisions during tests, we listen on port 0 and use that for both ends of the connections (for any tests we run in this file).
2024-04-02chore: update `std` submodule to 0.221.0 (#23112)Asher Gomez
2024-02-18feat: `Deno.ConnectTlsOptions.{cert,key}` (#22274)Asher Gomez
Towards #22197
2024-02-13chore: use `@std` import instead of `@test_util/std` (#22398)Asher Gomez
This PR: 1. Replaces `@test_util/std`-prefixed imports with `@std`. 2. Adds `@std/` import map entries to a few `deno.json` files.
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.