1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-01 13:43:23 +01:00
bitwarden-server/dev/create_certificates_mac.sh
Justin Baur 8d36dfa5d3
Make development easier (#3504)
* Remove Certificate Steps from Setup

* Add Helpers to VSCode Tasks

* Force Ephermal Key in Integration Tests

* Add Property to Interface
2023-12-08 15:14:49 -05:00

15 lines
603 B
Bash
Executable File

#!/usr/bin/env bash
openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout identity_server_dev.key -out identity_server_dev.crt \
-subj "/CN=Bitwarden Identity Server Dev" -days 3650
openssl pkcs12 -export -legacy -out identity_server_dev.pfx -inkey identity_server_dev.key -in identity_server_dev.crt \
-certfile identity_server_dev.crt
security import ./identity_server_dev.pfx -k ~/Library/Keychains/Login.keychain
identity=($(openssl x509 -in identity_server_dev.crt -outform der | shasum -a 1 | tr a-z A-Z));
echo "Certificate fingerprints:"
echo "Identity Server Dev: ${identity}"