Commit graph

311 commits

Author SHA1 Message Date
Filip Skokan 9d58c896dc
fix(ext/crypto): remove EdDSA alg key checks and export (#20331)
As per https://github.com/WICG/webcrypto-secure-curves/pull/24 this
removes the check for Ed25519 JWK `alg` during importKey and removes the
`alg` for Ed25519 keys during JWK exportKey.
2023-08-31 18:26:26 +05:30
denobot 3a2d284c96
chore: forward v1.36.3 release commit to main (#20270)
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-08-24 17:53:01 +00:00
Matt Mastracci b1ce2e4167
fix(ext/web): add stream tests to detect v8slice split bug (#20253)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-08-23 17:03:05 -06:00
Divy Srivastava 94d664535b
chore: forward v1.36.1 to main (#20119)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-08-10 16:44:41 +03:00
denobot 6ba245fe25
1.36.0 (#20036)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2023-08-03 18:26:25 +02:00
Divy Srivastava bddf5acf89
chore: remove unused dependencies (#19962) 2023-07-28 15:10:13 +05:30
denobot 89ba3f820c
1.35.3 (#19947)
Bumped versions for 1.35.3
Co-authored-by: mmastrac <mmastrac@users.noreply.github.com>
2023-07-26 10:18:02 -04:00
denobot 0c3bbf7acd
chore: forward v1.35.2 release commit to main (#19887)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-20 05:11:50 +02:00
David Sherret 2f4b73410a
chore: forward 1.35.1 back to main (#19814) 2023-07-12 21:36:42 -04:00
denobot 1ac5fddf54
1.35.0 (#19717)
Bumped versions for 1.35.0

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-05 01:58:01 +02:00
ud2 d632cce129
fix(dts): make globals available on globalThis (#19438)
This PR changes Web IDL interfaces to be declared with `var` instead of
`class`, so that accessing them via `globalThis` does not raise type
errors.

Closes #13390.
2023-07-03 14:36:55 -04:00
Martin Fischer 801b9ec62d
chore: fix typos (#19572) 2023-06-26 09:10:27 -04:00
Divy Srivastava f81027ae9f
fix(serde_v8): Do not coerce values in serde_v8 (#19569)
Fixes #19568 

Values are not coerced to the desired type during deserialisation. This
makes serde_v8 stricter.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-23 12:52:48 +02:00
Bartek Iwańczuk dda0f1c343
refactor(serde_v8): split ZeroCopyBuf into JsBuffer and ToJsBuffer (#19566)
`ZeroCopyBuf` was convenient to use, but sometimes it did hide details
that some copies were necessary in certain cases. Also it made it way to easy
for the caller to pass around and convert into different values. This commit
splits `ZeroCopyBuf` into `JsBuffer` (an array buffer coming from V8) and
`ToJsBuffer` (a Rust buffer that will be converted into a V8 array buffer).

As a result some magical conversions were removed (they were never used)
limiting the API surface and preparing for changes in #19534.
2023-06-22 23:37:56 +02:00
Santhanam 52da60ed53
fix(deno/ext): Fix WebCrypto API's deriveKey (#19545)
Fixes a bug I noticed when deriving a key based from `ECDH`. Similar
issue is also mentioned in #14693, where they derive a key using
`PBKDF2`

- In the WebCrypto API, `deriveKey()` is equivalent to `deriveBits()`
followed by `importKey()`
- But, `deriveKey()` requires just `deriveKey` in the `usages` of the
`baseKey` parameter. The `deriveBits` usage is not required to be
allowed. This is the uniform behaviour in Node, Chrome and Firefox.
- The impl currently has userland-accessible `SubtleCrypto.deriveKey()`
and `SubtleCrypto.deriveBits()`, as well as an internal `deriveBits()`
(this is the one that accesses the ffi).
- Also, `SubtleCrypto.deriveKey()` checks if `deriveKey` is an allowed
usage and `SubtleCrypto.deriveBits()` checks if `deriveBits` is an
allowed usage, as required.
- However, the impl currently calls the userland accessible
`SubtleCrypto.deriveBits()` in `SubtleCrypto.deriveKey()`, leading to an
error being thrown if the `deriveBits` usage isn't present.
- Fixed this by making it call the internal `deriveBits()`
instead.
2023-06-19 13:26:58 +05:30
denobot 239dc5e681
chore: forward v1.34.3 release commit to main (#19526)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-16 01:55:31 +02:00
denobot 1b26f3c726
chore: forward v1.34.2 release commit to main (#19434)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-09 02:17:03 +00:00
Levente Kurusa 11dd5a0ae7
fix(ext/crypto): fix JWK import of Ed25519 (#19279)
Fixes: #18049

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-05 14:52:02 +02:00
Bartek Iwańczuk acc6cdc0b1
chore: forward v1.34.1 to main (#19312)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2023-05-29 20:26:03 -06:00
denobot 935071dd0e
1.34.0 (#19246)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-24 23:38:01 +00:00
denobot 877b38b370
chore: forward v1.33.4 release commit to main (#19181)
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**

This is the release commit being forwarded back to main for 1.33.4

Please ensure:
- [x] Everything looks ok in the PR
- [ ] The release has been published

To make edits to this PR:
```shell
git fetch upstream forward_v1.33.4 && git checkout -b forward_v1.33.4 upstream/forward_v1.33.4
```

Don't need this PR? Close it.

cc @levex

Co-authored-by: levex <levex@users.noreply.github.com>
Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-05-18 20:44:10 +02:00
Matt Mastracci 9845361153
refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056)
Partially supersedes #19016.

This migrates `spawn` and `spawn_blocking` to `deno_core`, and removes
the requirement for `spawn` tasks to be `Send` given our single-threaded
executor.

While we don't need to technically do anything w/`spawn_blocking`, this
allows us to have a single `JoinHandle` type that works for both cases,
and allows us to more easily experiment with alternative
`spawn_blocking` implementations that do not require tokio (ie: rayon).

Async ops (+~35%):

Before: 

```
time 1310 ms rate 763358
time 1267 ms rate 789265
time 1259 ms rate 794281
time 1266 ms rate 789889
```

After:

```
time 956 ms rate 1046025
time 954 ms rate 1048218
time 924 ms rate 1082251
time 920 ms rate 1086956
```

HTTP serve (+~4.4%):

Before:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    68.78us   19.77us   1.43ms   86.84%
    Req/Sec    68.78k     5.00k   73.84k    91.58%
  1381833 requests in 10.10s, 167.36MB read
Requests/sec: 136823.29
Transfer/sec:     16.57MB
```

After:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    63.12us   17.43us   1.11ms   85.13%
    Req/Sec    71.82k     3.71k   77.02k    79.21%
  1443195 requests in 10.10s, 174.79MB read
Requests/sec: 142921.99
Transfer/sec:     17.31MB
```

Suggested-By: alice@ryhl.io
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-14 15:40:01 -06:00
denobot 7476ee34fa
chore: forward v1.33.3 release commit to main (#19111)
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**

This is the release commit being forwarded back to main for 1.33.3

Please ensure:
- [x] Everything looks ok in the PR
- [x] The release has been published

To make edits to this PR:
```shell
git fetch upstream forward_v1.33.3 && git checkout -b forward_v1.33.3 upstream/forward_v1.33.3
```

Don't need this PR? Close it.

cc @levex

Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-05-12 14:47:27 +00:00
Luca Casonato f34fcd16ea
fix(core): let V8 drive extension ESM loads (#18997)
This now allows circular imports across extensions.

Instead of load + eval of all ESM files in declaration order, all files
are only loaded. Eval is done recursively by V8, only evaluating
files that are listed in `Extension::esm_entry_point` fields.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-09 12:37:13 +02:00
Luca Casonato 1f9d47b174
refactor: prefix ops w/ crate they are defined in (#19044)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-08 23:07:45 +02:00
denobot 4b645676d6
chore: forward v1.33.2 release commit to main (#18990)
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**

This is the release commit being forwarded back to main for 1.33.2

Please ensure:
- [x] Everything looks ok in the PR
- [x] The release has been published

To make edits to this PR:
```shell
git fetch upstream forward_v1.33.2 && git checkout -b forward_v1.33.2 upstream/forward_v1.33.2
```

Don't need this PR? Close it.

cc @levex

Co-authored-by: levex <levex@users.noreply.github.com>
Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-05-04 19:19:35 +02:00
Bartek Iwańczuk 97147faf89
chore: release extension crates, unpin tokio (#18954) 2023-05-02 11:30:11 +00:00
Kenta Moriuchi 49eb887cc6
refactor(core): Use ObjectHasOwn instead of ObjectPrototypeHasOwnProperty (#18952)
ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it.
2023-05-02 12:15:45 +02:00
Kenta Moriuchi 6728ad4203
fix(core): Use primordials for methods (#18839)
I would like to get this change into Deno before merging
https://github.com/denoland/deno_lint/pull/1152
2023-05-01 15:30:02 +02:00
Leo Kettmeir b31cf9fde6
refactor(webidl): move prefix & context out of converters options bag (#18931) 2023-05-01 10:47:13 +00:00
denobot 6369098ad7
chore: forward v1.33.1 release commit to main (#18897)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-28 21:14:26 +02:00
denobot 39ece1fe0d
1.33.0 (#18879)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-28 01:18:57 +02:00
denobot 4e5d370b56
chore: forward v1.32.5 release commit to main (#18758)
Co-authored-by: levex <levex@users.noreply.github.com>
Co-authored-by: Levente Kurusa <lkurusa@kernelstuff.org>
2023-04-18 22:20:49 +02:00
Kenta Moriuchi f086ec57b4
fix(core): Use safe primordials wrappers (#18687) 2023-04-14 22:23:28 +02:00
Bartek Iwańczuk a3c5193a2e
refactor(ext/webidl): remove object from 'requiredArguments' (#18674)
This should produce a little less garbage and using an object here
wasn't really required.

---------

Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2023-04-12 19:58:57 +00:00
denobot 05c393b99b
chore: forward v1.32.4 release commit to main (#18669)
Co-authored-by: levex <levex@users.noreply.github.com>
2023-04-12 13:03:27 -04:00
Kenta Moriuchi 03edd48edd
chore: Turn back on dlintPreferPrimordials (#17715)
Closes #17709
2023-04-02 19:41:41 +02:00
denobot ad8d0c90d1
chore: forward v1.32.3 release commit to main (#18561)
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-04-01 20:27:53 -04:00
denobot f465123fdc
chore: forward v1.32.2 release commit to main (#18539)
This is the release commit being forwarded back to main for 1.32.2
2023-04-01 00:10:13 +00:00
Yoshiya Hinosawa 4358ab2d84
fix(ext/node): implement crypto.Sign (RSA/PEM/SHA{224,256,384,512}) (#18471) 2023-03-28 21:46:48 +09:00
denobot e8348231df
chore: forward v1.32.1 release commit to main (#18399)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-23 22:55:23 +01:00
denobot 25b564bf86
1.32.0 (#18367)
Bumped versions for 1.32.0

---------

Co-authored-by: mmastrac <mmastrac@users.noreply.github.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-03-22 22:22:24 +00:00
Matt Mastracci 3487fde236
perf(core) Reduce copying and cloning in extension initialization (#18252)
Follow-up to #18210:

* we are passing the generated `cfg` object into the state function
rather than passing individual config fields
 * reduce cloning dramatically by making the state_fn `FnOnce`
 * `take` for `ExtensionBuilder` to avoid more unnecessary copies
 * renamed `config` to `options`
2023-03-17 22:15:27 +00:00
Matt Mastracci e55b448730
feat(core) deno_core::extension! macro to simplify extension registration (#18210)
This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements:

* `deno_core::ops!` registers a block of `#[op]`s, optionally with type
parameters, useful for places where we share lists of ops
* `deno_core::extension!` is used to register an extension, and creates
two methods that can be used at runtime/snapshot generation time:
`init_ops` and `init_ops_and_esm`.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17 18:22:15 +00:00
denobot 33b85a2b8e
chore: forward v1.31.3 release commit to main (#18222)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2023-03-16 17:09:26 +09:00
Yoshiya Hinosawa e80cc17dc4
fix(ext/node): add crypto.createCipheriv (#18091) 2023-03-14 15:59:23 +09:00
denobot 857393d934
chore: forward v1.31.2 release commit to main (#18114)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-03-10 17:39:29 +09:00
Bartek Iwańczuk 8f207c0f3f
refactor: Split extension registration for runtime and snapshotting (#18095)
This commit splits "<ext_name>::init" functions into "init_ops" and
"init_ops_and_esm". That way we don't have to construct list of
ESM sources on each startup if we're running with a snapshot.

In a follow up commit "deno_core" will be changed to not have a split
between "extensions" and "extensions_with_js" - it will be embedders'
responsibility to pass appropriately configured extensions.

Prerequisite for https://github.com/denoland/deno/pull/18080
2023-03-09 14:56:19 +00:00
Bartek Iwańczuk c3cba7f22c
refactor(core): Extension::builder_with_deps (#18093)
Prerequisite for https://github.com/denoland/deno/pull/18080
2023-03-09 12:10:54 +00:00
Bartek Iwańczuk 72fe9bb470
refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme for snapshotted modules (#18041)
This commit renames "deno_core::InternalModuleLoader" to
"ExtModuleLoader" and changes the specifiers used by the 
modules loaded from this loader to "ext:".

"internal:" scheme was really ambiguous and it's more characters than
"ext:", which should result in slightly smaller snapshot size.

Closes https://github.com/denoland/deno/issues/18020
2023-03-08 12:44:54 +01:00
Bartek Iwańczuk b32a6f8ad2
refactor(core): don't use Result in ExtensionBuilder::state (#18066)
There's no point for this API to expect result. If something fails it should
result in a panic during build time to signal to embedder that setup is
wrong.
2023-03-07 22:37:37 +01:00
Filip Skokan 7d13d65468
fix(ext/crypto): correctly limit ECDSA and hash algorithms (#18030)
Closes #18029
2023-03-05 12:34:07 +00:00
denobot 3cd24fa8d0
chore: forward v1.31.1 release commit to main (#17939)
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-24 22:37:46 -05:00
denobot c26fbe38d5
1.31.0 (#17906)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-24 00:16:04 +01:00
Divy Srivastava ea7ca00c89
perf: use ops for node:crypto ciphers (#17819)
Towards #17809
2023-02-20 22:22:28 +05:30
Leo Kettmeir 49af1ab18d
refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
Leo Kettmeir b4aa153097
refactor: Use ES modules for internal runtime code (#17648)
This PR refactors all internal js files (except core) to be written as
ES modules.
`__bootstrap`has been mostly replaced with static imports in form in
`internal:[path to file from repo root]`.
To specify if files are ESM, an `esm` method has been added to
`Extension`, similar to the `js` method.
A new ModuleLoader called `InternalModuleLoader` has been added to
enable the loading of internal specifiers, which is used in all
situations except when a snapshot is only loaded, and not a new one is
created from it.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-07 20:22:46 +01:00
denobot a4988d00da
chore: forward v1.30.3 release commit to main (#17677)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-07 04:15:38 +00:00
Leo Kettmeir 84a96110cd
refactor: rename deno specifiers to internal (#17655) 2023-02-05 17:49:20 +01:00
denobot f8ecd236fb
chore: forward v1.30.2 release commit to main (#17641)
This is the release commit being forwarded back to main for 1.30.2

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-02-03 16:26:43 +00:00
denobot 65755a115a
chore: forward v1.30.1 release commit to main (#17623)
This is the release commit being forwarded back to main for 1.30.1
2023-02-02 16:28:40 +00:00
denobot a6f915c22f
1.30.0 (#17532)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-26 00:15:08 +01:00
Kyle Willmon 84e9794970
chore(ext/crypto): Update rsa to 0.7.0 (#16327)
Bump the rsa crate to 0.7.0

The API for the `rsa` crate has changed significantly, but I have
verified that tests continue to pass throughout this update.
2023-01-18 15:18:41 +00:00
denobot f2a5f6d7f0
chore: forward v1.29.4 release commit to main (#17453)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-17 00:30:33 +01:00
David Sherret 377f593273
chore: forward 1.29.3 release back to main (#17401) 2023-01-13 13:36:51 -05:00
Yiyu Lin a00e432297
chore: add copyright_checker tool and add the missing copyright (#17285) 2023-01-13 16:51:32 +09:00
Leo Kettmeir c41d4ff90e
feat(core): allow specifying name and dependencies of an Extension (#17301) 2023-01-08 23:48:46 +01:00
denobot fa271b70db
chore: forward v1.29.2 release commit to main (#17277)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-05 16:48:19 +01:00
David Sherret 10e4b2e140
chore: update copyright year to 2023 (#17247)
Yearly tradition of creating extra noise in git.
2023-01-02 21:00:42 +00:00
Kenta Moriuchi 156fef9cea
fix(ext): Add checks for owning properties in for-in loops (#17139)
In the for-in loops, there were a few places where we forgot to check if
objects owned some properties, so I added them.
2022-12-22 02:54:38 +01:00
Kenta Moriuchi 948f85216a
chore: Update dlint (#17031)
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
2022-12-20 03:37:50 +01:00
denobot b9527f5020
chore: forward v1.29.1 release commit to main (#17067)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2022-12-15 13:30:55 -05:00
denobot 0d4e4af7ac
1.29.0 (#17052)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-12-15 00:22:54 +01:00
denobot 98d062e3dc
chore: forward v1.28.3 release commit to main (#16884)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-12-01 22:46:27 +09:00
denobot 72dd7ad807
chore: forward v1.28.2 release commit to main (#16796)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-24 23:59:42 +01:00
Leo Kettmeir 13e3acf71d
chore: workspace inheritance (#16343) 2022-11-22 21:07:35 +01:00
Aaron O'Mullan 238590aa9f
chore: use Rust 1.65.0 (#16688) 2022-11-18 02:59:10 +01:00
denobot 483c10c94b
chore: forward v1.28.1 release commit to main (#16678)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-11-17 02:17:19 +01:00
denobot 916598f8a7
1.28.0 (#16620)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-11-13 15:31:36 -05:00
denobot c08fcd96c1
chore: forward v1.27.2 release commit to main (#16572)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-11-09 00:27:51 +01:00
denobot 61fbfabe44
chore: forward v1.27.1 release commit to main (#16533)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-11-04 00:40:23 +01:00
Filip Skokan ec09134d8a
fix(ext/crypto): fix HMAC jwk import "use" check (#16465) 2022-10-28 19:50:38 +05:30
denobot b0fb8fa9dc
1.27.0 (#16442)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-27 17:13:26 +02:00
Bartek Iwańczuk 204c46dcc1
chore: forward v1.26.2 to main (#16331)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>

<!--
Before submitting a PR, please read http://deno.land/manual/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
-->

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-10-17 23:11:16 +02:00
Filip Skokan 225d516466
fix(ext/crypto): correct HMAC get key length op (#16201)
fixes #16180

`HMAC`'s `get key length` `op` uses the hash function's block size, not
output size.

refs
https://github.com/cloudflare/workerd/issues/68#issuecomment-1271189657
2022-10-15 10:53:35 +05:30
Divy Srivastava a622c5df27
perf(ext/crypto): optimize getRandomValues (#16212) 2022-10-09 15:38:38 +05:30
denobot afeacb8328
chore: forward v1.26.1 release commit to main (#16178)
This is the release commit being forwarded back to main for 1.26.1

Please ensure:
- [x] Everything looks ok in the PR
- [x] The release has been published

To make edits to this PR:
```shell
git fetch upstream forward_v1.26.1 && git checkout -b forward_v1.26.1 upstream/forward_v1.26.1
```

Don't need this PR? Close it.

cc @cjihrig

Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-10-06 16:49:40 -04:00
Filip Skokan 0d042d8e54
fix(ext/crypto): interoperable import/export (#16153)
This PR updates RSA key import/export to a state which is interoperable
with other implementations.

For RSA the only OID in and out is `rsaEncryption`.
For EC the only OID in and out is `id-ecpublickey` (fixed in #16152).

see https://github.com/w3c/webcrypto/issues/307#issuecomment-995813032
see https://github.com/w3c/webcrypto/issues/307
see https://github.com/w3c/webcrypto/pull/305
see https://github.com/nodejs/node/pull/42816
2022-10-04 17:37:59 +05:30
Filip Skokan aa710aac98
fix(ext/crypto): ecdh spki key import/export roundtrip (#16152) 2022-10-04 17:09:41 +05:30
Filip Skokan fd08b13dff
fix(ext/crypto): ECDH and X25519 non byte length and 0 length fixes (#16146) 2022-10-04 16:54:05 +05:30
Aurélien Bertron 8d20784f7a
fix(ext/crypto): deriveBits for ECDH not taking length into account (#16128)
Fixes #16047
2022-10-03 23:10:34 -07:00
Filip Skokan 7742ad77fa
fix(ext/crypto): curve25519 import export (#16140) 2022-10-03 23:06:25 -07:00
李瑞丰 b3444e0d3b
fix(ext/crypto): fix importKey error when leading zeroes (#16009)
Co-authored-by: Jason <m.jason.liu@outlook.com>
2022-10-03 09:37:25 +05:30
Colin Ihrig 636b448f3c
fix(ext/crypto): use correct handle for public keys (#16099)
When storing public and private keys in the key store, use a different
handle for each key so that they can be looked up in the future.

Refs: https://github.com/denoland/deno/pull/14119
Refs: https://github.com/denoland/deno_std/issues/2631
2022-09-30 09:18:30 -04:00
denobot d8827514ff
1.26.0
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-29 00:10:44 +02:00
Divy Srivastava f02f2425d5
feat(ext/crypto): add x25519 and Ed25519 CFRG curves (#14119) 2022-09-27 17:43:42 +05:30
Ikko Ashimine 9a9dd12253
chore(ext/crypto): fix typo in import_key.rs (#16012)
eliptic -> elliptic
2022-09-24 11:46:52 +05:30
David Sherret 1b04ff0782
chore: forward v1.25.4 release commit to main (#16001) 2022-09-22 15:58:43 -04:00
Ben Noordhuis b1b418b81a
chore: fix clippy warnings (#15944)
Stop allowing clippy::derive-partial-eq-without-eq and fix warnings
about deriving PartialEq without also deriving Eq.

In one case I removed the PartialEq because it a) wasn't necessary,
and b) sketchy because it was comparing floating point numbers.

IMO, that's a good argument for enforcing the lint rule, because it
would most likely have been caught during review if it had been enabled.
2022-09-19 10:25:03 +02:00
Ryan Dahl 684841a18c
upgrade deps (#15914) 2022-09-16 19:11:30 -04:00