Skip to content

Commit

Permalink
empty tls config (#132) (#133)
Browse files Browse the repository at this point in the history
(cherry picked from commit e5980f8)

Co-authored-by: cool-developer <[email protected]>
  • Loading branch information
mergify[bot] and cool-develope authored Sep 17, 2024
1 parent db99bf7 commit 2a9702b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
12 changes: 6 additions & 6 deletions config_signer.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ GRPCPort = "--- Signer GRPC Server PORT like 9091 ---"
Type = "local"
[ProviderConfigs.LocalConfig]
AccountID = "--- Account ID like operator_bls_key ---"
KeyType = "--- Key Type like `BN254` or `ECDSA` ---"
PrivateKeyPath = "--- Path to Private Key ---"
PasswordKeyPath = "--- Path to Keystore Password ---"
KeyType = "--- Key Type like BN254 ---"
PrivateKeyPath = "--- Path to BLS Private Key ---"
PasswordKeyPath = "--- Path to BLS Keystore Password ---"

[[ProviderConfigs]]
Type = "local"
[ProviderConfigs.LocalConfig]
AccountID = "--- Account ID like signer_ecdsa_key ---"
KeyType = "--- Key Type like `BN254` or `ECDSA` ---"
PrivateKeyPath = "--- Path to Private Key ---"
PasswordKeyPath = "--- Path to Keystore Password ---"
KeyType = "--- Key Type like ECDSA ---"
PrivateKeyPath = "--- Path to ECDSA Private Key ---"
PasswordKeyPath = "--- Path to ECDSA Keystore Password ---"
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module github.com/Lagrange-Labs/client-cli

require (
github.com/Lagrange-Labs/lagrange-node/core v0.1.0
github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240821130114-bf15bfc9b2d3
github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240917211506-ed56fb34350e
github.com/consensys/gnark-crypto v0.12.1
github.com/ethereum/go-ethereum v1.13.15
github.com/mitchellh/mapstructure v1.5.0
Expand Down Expand Up @@ -87,4 +87,4 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/Lagrange-Labs/lagrange-node/core v0.1.0 => github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240821130114-bf15bfc9b2d3
replace github.com/Lagrange-Labs/lagrange-node/core v0.1.0 => github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240917211506-ed56fb34350e
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8=
github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240821130114-bf15bfc9b2d3 h1:HEeE10Jy8gbVppowiwY/qIzpJLGt43vgCsyFQ0sqKxI=
github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240821130114-bf15bfc9b2d3/go.mod h1:UPxFEPhGMt5i7oJbgrr81rlcWu/LBiVg4fxuhVX2dwc=
github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240821130114-bf15bfc9b2d3 h1:kqrAW3rFXQT7t6aLZptI4Mw0Fee0+jYyAdBCDa8ulgM=
github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240821130114-bf15bfc9b2d3/go.mod h1:bXMD4bnx1kyM+pP0NWkOEZ3fchqdkBi26hrl0rOHaXQ=
github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240917211506-ed56fb34350e h1:6zAT3rh7rcZGs2eJTtuML1pMnP/F80SPn6owXouHmYw=
github.com/Lagrange-Labs/lagrange-node/core v0.0.0-20240917211506-ed56fb34350e/go.mod h1:UPxFEPhGMt5i7oJbgrr81rlcWu/LBiVg4fxuhVX2dwc=
github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240917211506-ed56fb34350e h1:qDVgIWXJdJdyIwtHj+e4bd2iYMqZMA5qdrquiRJi890=
github.com/Lagrange-Labs/lagrange-node/signer v0.0.0-20240917211506-ed56fb34350e/go.mod h1:bXMD4bnx1kyM+pP0NWkOEZ3fchqdkBi26hrl0rOHaXQ=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40=
Expand Down
20 changes: 11 additions & 9 deletions utils/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,17 @@ func GenerateSignerConfigFile(cfg *signer.Config, imageName string) (string, err
}

signerConfig.CertPaths = map[string]string{}
certPath := "/app/config/ca-crt.pem"
serverKeyPath := "/app/config/server-key.pem"
serverCertPath := "/app/config/server-crt.pem"
signerConfig.CertPaths[cfg.TLSConfig.CACertPath] = certPath
signerConfig.CertPaths[cfg.TLSConfig.NodeKeyPath] = serverKeyPath
signerConfig.CertPaths[cfg.TLSConfig.NodeCertPath] = serverCertPath
cfg.TLSConfig.CACertPath = certPath
cfg.TLSConfig.NodeKeyPath = serverKeyPath
cfg.TLSConfig.NodeCertPath = serverCertPath
if cfg.TLSConfig != nil && len(cfg.TLSConfig.CACertPath) > 0 {
certPath := "/app/config/ca-crt.pem"
serverKeyPath := "/app/config/server-key.pem"
serverCertPath := "/app/config/server-crt.pem"
signerConfig.CertPaths[cfg.TLSConfig.CACertPath] = certPath
signerConfig.CertPaths[cfg.TLSConfig.NodeKeyPath] = serverKeyPath
signerConfig.CertPaths[cfg.TLSConfig.NodeCertPath] = serverCertPath
cfg.TLSConfig.CACertPath = certPath
cfg.TLSConfig.NodeKeyPath = serverKeyPath
cfg.TLSConfig.NodeCertPath = serverCertPath
}

signerConfigFilePath := filepath.Join(workDir, "config/config_signer.toml")
signerConfig.ConfigFilePath = signerConfigFilePath
Expand Down

0 comments on commit 2a9702b

Please sign in to comment.