Skip to content

Commit bd9e699

Browse files
committed
fixup! crypto: support OpenSSL STORE private keys
1 parent cfbd876 commit bd9e699

2 files changed

Lines changed: 40 additions & 22 deletions

File tree

doc/api/cli.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,28 @@ This behavior also applies to `child_process.spawn()`, but in that case, the
191191
flags are propagated via the `NODE_OPTIONS` environment variable rather than
192192
directly through the process arguments.
193193

194+
### `--allow-crypto-store`
195+
196+
<!-- YAML
197+
added: REPLACEME
198+
-->
199+
200+
> Stability: 1.1 - Active development
201+
202+
When using the [Permission Model][], the process will not be able to load
203+
private keys from OpenSSL STORE provider URLs by default. Attempts to do so
204+
will throw an `ERR_ACCESS_DENIED` unless the user explicitly passes the
205+
`--allow-crypto-store` flag when starting Node.js.
206+
207+
This permission only applies to OpenSSL STORE provider URLs accepted by
208+
[`crypto.createPrivateKey()`][]. It does not grant access to Node.js file
209+
system or network APIs. Configured OpenSSL providers may still perform their
210+
own I/O, credential handling, hardware access, or daemon communication outside
211+
of Node.js `fs` and `net` permission scopes.
212+
213+
Node.js does not pass URL input to OpenSSL's built-in `default` or `base` STORE
214+
loaders, so local file STORE loading is not exposed through this API.
215+
194216
### `--allow-ffi`
195217

196218
<!-- YAML
@@ -329,28 +351,6 @@ Error: connect ERR_ACCESS_DENIED Access to this API has been restricted. Use --a
329351
}
330352
```
331353

332-
### `--allow-crypto-store`
333-
334-
<!-- YAML
335-
added: REPLACEME
336-
-->
337-
338-
> Stability: 1.1 - Active development
339-
340-
When using the [Permission Model][], the process will not be able to load
341-
private keys from OpenSSL STORE provider URLs by default. Attempts to do so
342-
will throw an `ERR_ACCESS_DENIED` unless the user explicitly passes the
343-
`--allow-crypto-store` flag when starting Node.js.
344-
345-
This permission only applies to OpenSSL STORE provider URLs accepted by
346-
[`crypto.createPrivateKey()`][]. It does not grant access to Node.js file
347-
system or network APIs. Configured OpenSSL providers may still perform their
348-
own I/O, credential handling, hardware access, or daemon communication outside
349-
of Node.js `fs` and `net` permission scopes.
350-
351-
Node.js does not pass URL input to OpenSSL's built-in `default` or `base` STORE
352-
loaders, so local file STORE loading is not exposed through this API.
353-
354354
### `--allow-net`
355355

356356
<!-- YAML

doc/node.1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,20 @@ This behavior also applies to \fBchild_process.spawn()\fR, but in that case, the
135135
flags are propagated via the \fBNODE_OPTIONS\fR environment variable rather than
136136
directly through the process arguments.
137137
.
138+
.It Fl -allow-crypto-store
139+
When using the Permission Model, the process will not be able to load private
140+
keys from OpenSSL STORE provider URLs by default.
141+
Attempts to do so will throw an \fBERR_ACCESS_DENIED\fR unless the user
142+
explicitly passes the \fB--allow-crypto-store\fR flag when starting Node.js.
143+
This permission only applies to OpenSSL STORE provider URLs accepted by
144+
\fBcrypto.createPrivateKey()\fR. It does not grant access to Node.js file system
145+
or network APIs. Configured OpenSSL providers may still perform their own I/O,
146+
credential handling, hardware access, or daemon communication outside of
147+
Node.js \fBfs\fR and \fBnet\fR permission scopes.
148+
Node.js does not pass URL input to OpenSSL's built-in \fBdefault\fR or
149+
\fBbase\fR STORE loaders, so local file STORE loading is not exposed through
150+
this API.
151+
.
138152
.It Fl -allow-ffi
139153
When using the Permission Model, the process will not be able to use
140154
\fBnode:ffi\fR by default.
@@ -1152,6 +1166,8 @@ File System - manageable through
11521166
.It
11531167
Network - manageable through \fB--allow-net\fR flag
11541168
.It
1169+
OpenSSL STORE - manageable through \fB--allow-crypto-store\fR flag
1170+
.It
11551171
Child Process - manageable through \fB--allow-child-process\fR flag
11561172
.It
11571173
Worker Threads - manageable through \fB--allow-worker\fR flag
@@ -1875,6 +1891,8 @@ one is included in the list below.
18751891
.It
18761892
\fB--allow-child-process\fR
18771893
.It
1894+
\fB--allow-crypto-store\fR
1895+
.It
18781896
\fB--allow-ffi\fR
18791897
.It
18801898
\fB--allow-fs-read\fR

0 commit comments

Comments
 (0)