-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV-92 - Add missing option tlsCAFile (#281)
* Add tlsCAFile option * Put tests in separate files * Trust certificate * Verify certificate format and add more tests * Remove aliases, improve tests and add scripts - Remove connectivity settings alias - Change type of TlsCaFile - Add custom exception - Cleanup tests - Add gencert script for Windows, MacOS and WSL - Add handler in ChannelFactory * Combine wsl and linux and other things * Combine wsl and linux and other things * Refactor * Adjust gencert script for macOS --------- Co-authored-by: Joseph Cummings <[email protected]> Co-authored-by: Joseph Cummings <[email protected]>
- Loading branch information
1 parent
1173149
commit e65f330
Showing
9 changed files
with
231 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Write-Host ">> Generating certificate..." | ||
|
||
# Create directory if it doesn't exist | ||
New-Item -ItemType Directory -Path .\certs -Force | ||
|
||
# Set permissions for the directory | ||
icacls .\certs /grant:r "$($env:UserName):(OI)(CI)RX" | ||
|
||
# Pull the Docker image | ||
docker pull eventstore/es-gencert-cli:1.0.2 | ||
|
||
# Create CA certificate | ||
docker run --rm --volume ${PWD}\certs:/tmp --user (Get-Process -Id $PID).SessionId eventstore/es-gencert-cli:1.0.2 create-ca -out /tmp/ca | ||
|
||
# Create node certificate | ||
docker run --rm --volume ${PWD}\certs:/tmp --user (Get-Process -Id $PID).SessionId eventstore/es-gencert-cli:1.0.2 create-node -ca-certificate /tmp/ca/ca.crt -ca-key /tmp/ca/ca.key -out /tmp/node -ip-addresses 127.0.0.1 -dns-names localhost | ||
|
||
# Set permissions recursively for the directory | ||
icacls .\certs /grant:r "$($env:UserName):(OI)(CI)RX" | ||
|
||
Import-Certificate -FilePath ".\certs\ca\ca.crt" -CertStoreLocation Cert:\CurrentUser\Root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.