electron/lib/browser
arno renevier 81bdba67ec
feat: Implement password delegate for NSS (#41205)
* feat: Implement password delegate for NSS (#41188)

Introduce an app event client-certificate-request-password. It allows
the user to display a UI to prompt for the password.

An alternative would have been to implement a class similar to
CryptoModulePasswordDialogView, to provide the UI. This might have been
simpler for the user, comparing to letting them implement the UI. But it
seems like electron does not have an i18n framework, so it's not
possible to provide a locale aware UI.

* fix lint:markdown error

* address review comments

* use a trampoline handler in JS. The api exposed is now app.setClientCertRequestPasswordHandler
* use properties on the Event object instead of positional parameters
* remove ChromeNSSCryptoModuleDelegate::OnPassword in favor of args->GetNext(&password_)

* address review comments second round

- backslash escape parametrized TypeScript
- rename hostName param to hostname
- use base::ScopedAllowBaseSyncPrimitivesForTesting
- and then, rename ChromeNSSCryptoModuleDelegate to ElectronNSSCryptoModuleDelegate

* Update docs/api/app.md

Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>

* Update docs/api/app.md

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: Arno Renevier <arnaud@switchboard.app>
Co-authored-by: Sam Maddock <samuel.maddock@gmail.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2024-07-17 09:48:03 -04:00
..
api feat: Implement password delegate for NSS (#41205) 2024-07-17 09:48:03 -04:00
.eslintrc.json chore: add missing .eslintrc.json files to limit imports properly (#35719) 2022-09-20 13:25:33 -05:00
default-menu.ts chore: update Discord invite links (#34730) 2022-07-05 11:55:15 -04:00
devtools.ts chore: re-enable node/no-deprecated-api linting (#38899) 2023-06-26 13:51:59 -04:00
guest-view-manager.ts feat: add net module to utility process (#40017) 2024-01-04 16:20:37 -05:00
guest-window-manager.ts feat: Allow creation of new window to be customizable. (#41432) 2024-02-29 10:15:01 -05:00
init.ts chore: bump node to v20.13.1 (main) (#42088) 2024-05-13 11:43:14 -04:00
ipc-main-impl.ts fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -04:00
ipc-main-internal-utils.ts chore: remove unused sendToAll + related APIs (#26771) 2020-12-03 15:55:50 +09:00
ipc-main-internal.ts feat: add WebContents.ipc (#34959) 2022-08-03 16:55:12 -07:00
message-port-main.ts fix: make sure classes in lib correctly implement Electron interfaces (#40291) 2023-10-25 14:02:15 -04:00
parse-features-string.ts refactor: replace .forEach() with for-of (#39691) 2023-08-31 23:36:43 +09:00
rpc-server.ts fix: make preload calculation identical between sandbox & non-sandboxed (#34531) 2022-06-15 13:22:28 -07:00
web-view-events.ts chore: remove deprecated crashed and renderer-process-crashed events (#40115) 2023-10-18 12:05:41 +02:00