summaryrefslogtreecommitdiffstats
path: root/sms-service/src/quorumclient
diff options
context:
space:
mode:
Diffstat (limited to 'sms-service/src/quorumclient')
-rw-r--r--sms-service/src/quorumclient/config.json2
-rw-r--r--sms-service/src/quorumclient/quorumclient.go24
2 files changed, 14 insertions, 12 deletions
diff --git a/sms-service/src/quorumclient/config.json b/sms-service/src/quorumclient/config.json
index a096968..53cbf41 100644
--- a/sms-service/src/quorumclient/config.json
+++ b/sms-service/src/quorumclient/config.json
@@ -1,6 +1,6 @@
{
"url":"https://aaf-sms:10443",
- "cafile": "auth/selfsignedca.pem",
+ "cafile": "cert/aaf_root_ca.cer",
"clientcert":"client.cert",
"clientkey":"client.key",
"timeout":"10s"
diff --git a/sms-service/src/quorumclient/quorumclient.go b/sms-service/src/quorumclient/quorumclient.go
index 51dfc9c..9db6da8 100644
--- a/sms-service/src/quorumclient/quorumclient.go
+++ b/sms-service/src/quorumclient/quorumclient.go
@@ -64,14 +64,14 @@ func loadPGPKeys(prKeyPath string, pbKeyPath string) (string, string, error) {
//calls necessary initialization endpoints on the
//SMS webservice
func main() {
- folderName := os.Getenv("HOSTNAME")
+ folderName := filepath.Join("auth", os.Getenv("HOSTNAME"))
//Make sure to create the folder. It is not guaranteed to exist
os.MkdirAll(folderName, 0700)
- idFilePath := filepath.Join("auth", folderName, "id")
- pbKeyPath := filepath.Join("auth", folderName, "pbkey")
- prKeyPath := filepath.Join("auth", folderName, "prkey")
- shardPath := filepath.Join("auth", folderName, "shard")
+ idFilePath := filepath.Join(folderName, "id")
+ pbKeyPath := filepath.Join(folderName, "pbkey")
+ prKeyPath := filepath.Join(folderName, "prkey")
+ shardPath := filepath.Join(folderName, "shard")
smslogger.Init("quorum.log")
smslogger.WriteInfo("Starting Log for Quorum Client")
@@ -138,11 +138,14 @@ func main() {
caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)
- // Load the client certificate files
- //cert, err := tls.LoadX509KeyPair(cfg.ClientCert, cfg.ClientKey)
- //if err != nil {
- // log.Fatalf("Error while loading key pair %v ", err)
- //}
+ /*
+ Support Client certificates once we have auto generated certs
+ Load the client certificate files
+ cert, err := tls.LoadX509KeyPair(cfg.ClientCert, cfg.ClientKey)
+ if err != nil {
+ log.Fatalf("Error while loading key pair %v ", err)
+ }
+ */
transport.TLSClientConfig = &tls.Config{
MinVersion: tls.VersionTLS12,
@@ -171,7 +174,6 @@ func main() {
Seal bool `json:"sealstatus"`
}
err = json.NewDecoder(response.Body).Decode(&data)
-
sealed := data.Seal
// Unseal the vault if sealed