From 1e9d9abc359db2817f4600b976aef5a05e650307 Mon Sep 17 00:00:00 2001
From: Eric Hoffman <eric@dgraph.io>
Date: Thu, 24 May 2018 14:56:10 -0700
Subject: [PATCH] WIP: change server path to allow tls certs  to be pushed
 through zero http to all the current and future alphas

---
 dgraph/cmd/server/run.go     |   62 +-
 dgraph/cmd/zero/http.go      |   10 +
 dgraph/cmd/zero/raft.go      |    6 +-
 dgraph/cmd/zero/run.go       |    1 +
 dgraph/cmd/zero/zero.go      |    6 +
 protos/intern/internal.pb.go | 1395 +++++++++++++++++-----------------
 protos/internal.proto        |    4 +-
 worker/groups.go             |   12 +-
 x/tls_helper.go              |  195 +++--
 9 files changed, 884 insertions(+), 807 deletions(-)

diff --git a/dgraph/cmd/server/run.go b/dgraph/cmd/server/run.go
index da9bfcca..326e592e 100644
--- a/dgraph/cmd/server/run.go
+++ b/dgraph/cmd/server/run.go
@@ -110,10 +110,6 @@ func init() {
 		"Limit for the maximum number of edges that can be returned in a query."+
 			" This is only useful for shortest path queries.")
 
-	// TLS configurations
-	x.RegisterTLSFlags(flag)
-	flag.String("tls_client_auth", "", "Enable TLS client authentication")
-	flag.String("tls_ca_certs", "", "CA Certs file path.")
 	tlsConf.ConfigType = x.TLSServerConfig
 
 	//Custom plugins.
@@ -161,31 +157,22 @@ func storeStatsHandler(w http.ResponseWriter, r *http.Request) {
 	w.Write([]byte("</pre>"))
 }
 
-func setupListener(addr string, port int) (listener net.Listener, err error) {
-	var reload func()
+// really not lambda
+func setupListener(addr string, port int) (listener net.Listener, reload func([]byte), err error) {
+	var r func([]byte)
 	laddr := fmt.Sprintf("%s:%d", addr, port)
 	if !tlsConf.CertRequired {
 		listener, err = net.Listen("tcp", laddr)
 	} else {
 		var tlsCfg *tls.Config
-		tlsCfg, reload, err = x.GenerateTLSConfig(tlsConf)
+        // this just closes over nothing, seems wrong  
+		tlsCfg, r, err = x.GenerateTLSConfigServer(tlsConf)
 		if err != nil {
-			return nil, err
+			return nil, nil, err
 		}
 		listener, err = tls.Listen("tcp", laddr, tlsCfg)
 	}
-	go func() {
-		sigChan := make(chan os.Signal, 1)
-		signal.Notify(sigChan, syscall.SIGHUP)
-		for range sigChan {
-			log.Println("SIGHUP signal received")
-			if reload != nil {
-				reload()
-				log.Println("TLS certificates and CAs reloaded")
-			}
-		}
-	}()
-	return listener, err
+	return listener, r, err
 }
 
 func serveGRPC(l net.Listener, wg *sync.WaitGroup) {
@@ -218,7 +205,7 @@ func serveHTTP(l net.Listener, wg *sync.WaitGroup) {
 	}
 }
 
-func setupServer() {
+func setupServer(kchan chan []byte) {
 	go worker.RunServer(bindall) // For intern.communication.
 
 	laddr := "localhost"
@@ -226,16 +213,28 @@ func setupServer() {
 		laddr = "0.0.0.0"
 	}
 
-	httpListener, err := setupListener(laddr, httpPort())
+	httpListener, reloadKeysHttp, err := setupListener(laddr, httpPort())
 	if err != nil {
 		log.Fatal(err)
 	}
 
-	grpcListener, err := setupListener(laddr, grpcPort())
+	grpcListener, reloadKeysGRPC, err := setupListener(laddr, grpcPort())
 	if err != nil {
 		log.Fatal(err)
 	}
 
+    go func() {
+        for {
+            kinfo := <- kchan
+            if reloadKeysHttp != nil {
+                reloadKeysHttp(kinfo)
+            }
+            if reloadKeysGRPC != nil {
+                reloadKeysGRPC(kinfo)
+            }
+        }
+    } ()
+    
 	http.HandleFunc("/query", queryHandler)
 	http.HandleFunc("/query/", queryHandler)
 	http.HandleFunc("/mutate", mutationHandler)
@@ -253,7 +252,7 @@ func setupServer() {
 	http.HandleFunc("/", homeHandler)
 	http.HandleFunc("/ui/keywords", keywordHandler)
 
-	// Initilize the servers.
+	// Initialize the servers.
 	var wg sync.WaitGroup
 	wg.Add(3)
 	go serveGRPC(grpcListener, &wg)
@@ -295,10 +294,9 @@ func run() {
 
 	x.Config.PortOffset = Server.Conf.GetInt("port_offset")
 	bindall = Server.Conf.GetBool("bindall")
-	x.LoadTLSConfig(&tlsConf, Server.Conf)
-	tlsConf.ClientAuth = Server.Conf.GetString("tls_client_auth")
-	tlsConf.ClientCACerts = Server.Conf.GetString("tls_ca_certs")
-
+    // configure 
+    tlsConf.CertRequired = true;
+    
 	edgraph.SetConfiguration(config)
 	setupCustomTokenizers()
 	x.Init(edgraph.Config.DebugMode)
@@ -351,8 +349,12 @@ func run() {
 	}()
 	_ = numShutDownSig
 
+    keyupdate := make(chan []byte);
+
 	// Setup external communication.
-	go worker.StartRaftNodes(edgraph.State.WALstore, bindall)
-	setupServer()
+	go worker.StartRaftNodes(edgraph.State.WALstore, bindall, keyupdate)
+    
+    setupServer(keyupdate)
+    // setup server doesn't actually return here
 	worker.BlockingStop()
 }
diff --git a/dgraph/cmd/zero/http.go b/dgraph/cmd/zero/http.go
index 3cc8686a..78e9542b 100644
--- a/dgraph/cmd/zero/http.go
+++ b/dgraph/cmd/zero/http.go
@@ -12,6 +12,7 @@ import (
 	"fmt"
 	"log"
 	"net"
+    "io/ioutil"
 	"net/http"
 	"strconv"
 	"sync"
@@ -151,6 +152,15 @@ func (st *state) getState(w http.ResponseWriter, r *http.Request) {
 	}
 }
 
+func (st *state) reKey(w http.ResponseWriter, r *http.Request) {
+    // verify that this is a post method, handle error on body read
+    jsonKeyContents, _ := ioutil.ReadAll(r.Body)
+    // what do we use the context here for?
+    st.zero.setKeys(context.Background(), jsonKeyContents)
+    // better status here?
+    w.Write([]byte{})
+}
+
 func (st *state) serveHTTP(l net.Listener, wg *sync.WaitGroup) {
 	srv := &http.Server{
 		ReadTimeout:  10 * time.Second,
diff --git a/dgraph/cmd/zero/raft.go b/dgraph/cmd/zero/raft.go
index 9a07f921..e2a9ce37 100644
--- a/dgraph/cmd/zero/raft.go
+++ b/dgraph/cmd/zero/raft.go
@@ -366,7 +366,11 @@ func (n *node) applyProposal(e raftpb.Entry) (uint32, error) {
 	if p.Txn != nil {
 		n.server.orc.updateCommitStatus(e.Index, p.Txn)
 	}
-
+	if p.Tls != "" {
+        // lock?
+        n.server.state.TlsInfo = []byte(p.Tls)
+    }
+    
 	return p.Id, nil
 }
 
diff --git a/dgraph/cmd/zero/run.go b/dgraph/cmd/zero/run.go
index 83dfec35..6c2f1248 100644
--- a/dgraph/cmd/zero/run.go
+++ b/dgraph/cmd/zero/run.go
@@ -170,6 +170,7 @@ func run() {
 	http.HandleFunc("/state", st.getState)
 	http.HandleFunc("/removeNode", st.removeNode)
 	http.HandleFunc("/moveTablet", st.moveTablet)
+	http.HandleFunc("/rekey", st.reKey)    
 
 	// Open raft write-ahead log and initialize raft node.
 	x.Checkf(os.MkdirAll(opts.w, 0700), "Error while creating WAL dir.")
diff --git a/dgraph/cmd/zero/zero.go b/dgraph/cmd/zero/zero.go
index 4407796a..a574ff26 100644
--- a/dgraph/cmd/zero/zero.go
+++ b/dgraph/cmd/zero/zero.go
@@ -311,6 +311,12 @@ func (s *Server) createProposals(dst *intern.Group) ([]*intern.ZeroProposal, err
 	return res, nil
 }
 
+func (s *Server) setKeys(ctx context.Context, keyInfo []byte) error {
+    zp := &intern.ZeroProposal{}
+	zp.Tls = string(keyInfo)
+    return s.Node.proposeAndWait(ctx, zp)
+}
+
 // Its users responsibility to ensure that node doesn't come back again before calling the api.
 func (s *Server) removeNode(ctx context.Context, nodeId uint64, groupId uint32) error {
 	if groupId == 0 {
diff --git a/protos/intern/internal.pb.go b/protos/intern/internal.pb.go
index ff282f57..f1a97194 100644
--- a/protos/intern/internal.pb.go
+++ b/protos/intern/internal.pb.go
@@ -1,6 +1,5 @@
-// Code generated by protoc-gen-gogo.
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
 // source: internal.proto
-// DO NOT EDIT!
 
 /*
 	Package intern is a generated protocol buffer package.
@@ -59,10 +58,10 @@ import fmt "fmt"
 import math "math"
 import api "github.com/dgraph-io/dgo/protos/api"
 
-import (
-	context "golang.org/x/net/context"
-	grpc "google.golang.org/grpc"
-)
+import context "golang.org/x/net/context"
+import grpc "google.golang.org/grpc"
+
+import binary "encoding/binary"
 
 import io "io"
 
@@ -760,6 +759,7 @@ type ZeroProposal struct {
 	MaxTxnTs   uint64          `protobuf:"varint,5,opt,name=maxTxnTs,proto3" json:"maxTxnTs,omitempty"`
 	MaxRaftId  uint64          `protobuf:"varint,6,opt,name=maxRaftId,proto3" json:"maxRaftId,omitempty"`
 	Txn        *api.TxnContext `protobuf:"bytes,7,opt,name=txn" json:"txn,omitempty"`
+	Tls        string          `protobuf:"bytes,8,opt,name=tls,proto3" json:"tls,omitempty"`
 }
 
 func (m *ZeroProposal) Reset()                    { *m = ZeroProposal{} }
@@ -816,6 +816,13 @@ func (m *ZeroProposal) GetTxn() *api.TxnContext {
 	return nil
 }
 
+func (m *ZeroProposal) GetTls() string {
+	if m != nil {
+		return m.Tls
+	}
+	return ""
+}
+
 // MembershipState is used to pack together the current membership state of all the nodes
 // in the caller server; and the membership updates recorded by the callee server since
 // the provided lastUpdate.
@@ -827,6 +834,7 @@ type MembershipState struct {
 	MaxTxnTs   uint64             `protobuf:"varint,5,opt,name=maxTxnTs,proto3" json:"maxTxnTs,omitempty"`
 	MaxRaftId  uint64             `protobuf:"varint,6,opt,name=maxRaftId,proto3" json:"maxRaftId,omitempty"`
 	Removed    []*Member          `protobuf:"bytes,7,rep,name=removed" json:"removed,omitempty"`
+	TlsInfo    []byte             `protobuf:"bytes,8,opt,name=tlsInfo,proto3" json:"tlsInfo,omitempty"`
 }
 
 func (m *MembershipState) Reset()                    { *m = MembershipState{} }
@@ -883,6 +891,13 @@ func (m *MembershipState) GetRemoved() []*Member {
 	return nil
 }
 
+func (m *MembershipState) GetTlsInfo() []byte {
+	if m != nil {
+		return m.TlsInfo
+	}
+	return nil
+}
+
 type ConnectionState struct {
 	Member     *Member          `protobuf:"bytes,1,opt,name=member" json:"member,omitempty"`
 	State      *MembershipState `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"`
@@ -2849,22 +2864,8 @@ func (m *List) MarshalTo(dAtA []byte) (int, error) {
 		i++
 		i = encodeVarintInternal(dAtA, i, uint64(len(m.Uids)*8))
 		for _, num := range m.Uids {
-			dAtA[i] = uint8(num)
-			i++
-			dAtA[i] = uint8(num >> 8)
-			i++
-			dAtA[i] = uint8(num >> 16)
-			i++
-			dAtA[i] = uint8(num >> 24)
-			i++
-			dAtA[i] = uint8(num >> 32)
-			i++
-			dAtA[i] = uint8(num >> 40)
-			i++
-			dAtA[i] = uint8(num >> 48)
-			i++
-			dAtA[i] = uint8(num >> 56)
-			i++
+			binary.LittleEndian.PutUint64(dAtA[i:], uint64(num))
+			i += 8
 		}
 	}
 	return i, nil
@@ -2987,7 +2988,8 @@ func (m *Query) MarshalTo(dAtA []byte) (int, error) {
 	if m.AfterUid != 0 {
 		dAtA[i] = 0x19
 		i++
-		i = encodeFixed64Internal(dAtA, i, uint64(m.AfterUid))
+		binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.AfterUid))
+		i += 8
 	}
 	if m.DoCount {
 		dAtA[i] = 0x20
@@ -3427,7 +3429,8 @@ func (m *RaftContext) MarshalTo(dAtA []byte) (int, error) {
 	if m.Id != 0 {
 		dAtA[i] = 0x9
 		i++
-		i = encodeFixed64Internal(dAtA, i, uint64(m.Id))
+		binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Id))
+		i += 8
 	}
 	if m.Group != 0 {
 		dAtA[i] = 0x10
@@ -3466,7 +3469,8 @@ func (m *Member) MarshalTo(dAtA []byte) (int, error) {
 	if m.Id != 0 {
 		dAtA[i] = 0x9
 		i++
-		i = encodeFixed64Internal(dAtA, i, uint64(m.Id))
+		binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Id))
+		i += 8
 	}
 	if m.GroupId != 0 {
 		dAtA[i] = 0x10
@@ -3655,6 +3659,12 @@ func (m *ZeroProposal) MarshalTo(dAtA []byte) (int, error) {
 		}
 		i += n15
 	}
+	if len(m.Tls) > 0 {
+		dAtA[i] = 0x42
+		i++
+		i = encodeVarintInternal(dAtA, i, uint64(len(m.Tls)))
+		i += copy(dAtA[i:], m.Tls)
+	}
 	return i, nil
 }
 
@@ -3759,6 +3769,12 @@ func (m *MembershipState) MarshalTo(dAtA []byte) (int, error) {
 			i += n
 		}
 	}
+	if len(m.TlsInfo) > 0 {
+		dAtA[i] = 0x42
+		i++
+		i = encodeVarintInternal(dAtA, i, uint64(len(m.TlsInfo)))
+		i += copy(dAtA[i:], m.TlsInfo)
+	}
 	return i, nil
 }
 
@@ -3887,7 +3903,8 @@ func (m *DirectedEdge) MarshalTo(dAtA []byte) (int, error) {
 	if m.Entity != 0 {
 		dAtA[i] = 0x9
 		i++
-		i = encodeFixed64Internal(dAtA, i, uint64(m.Entity))
+		binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Entity))
+		i += 8
 	}
 	if len(m.Attr) > 0 {
 		dAtA[i] = 0x12
@@ -3909,7 +3926,8 @@ func (m *DirectedEdge) MarshalTo(dAtA []byte) (int, error) {
 	if m.ValueId != 0 {
 		dAtA[i] = 0x29
 		i++
-		i = encodeFixed64Internal(dAtA, i, uint64(m.ValueId))
+		binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.ValueId))
+		i += 8
 	}
 	if len(m.Label) > 0 {
 		dAtA[i] = 0x32
@@ -4211,7 +4229,8 @@ func (m *Posting) MarshalTo(dAtA []byte) (int, error) {
 	if m.Uid != 0 {
 		dAtA[i] = 0x9
 		i++
-		i = encodeFixed64Internal(dAtA, i, uint64(m.Uid))
+		binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Uid))
+		i += 8
 	}
 	if len(m.Value) > 0 {
 		dAtA[i] = 0x12
@@ -4735,7 +4754,8 @@ func (m *MapEntry) MarshalTo(dAtA []byte) (int, error) {
 	if m.Uid != 0 {
 		dAtA[i] = 0x11
 		i++
-		i = encodeFixed64Internal(dAtA, i, uint64(m.Uid))
+		binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Uid))
+		i += 8
 	}
 	if m.Posting != nil {
 		dAtA[i] = 0x1a
@@ -5001,24 +5021,6 @@ func (m *SnapshotMeta) MarshalTo(dAtA []byte) (int, error) {
 	return i, nil
 }
 
-func encodeFixed64Internal(dAtA []byte, offset int, v uint64) int {
-	dAtA[offset] = uint8(v)
-	dAtA[offset+1] = uint8(v >> 8)
-	dAtA[offset+2] = uint8(v >> 16)
-	dAtA[offset+3] = uint8(v >> 24)
-	dAtA[offset+4] = uint8(v >> 32)
-	dAtA[offset+5] = uint8(v >> 40)
-	dAtA[offset+6] = uint8(v >> 48)
-	dAtA[offset+7] = uint8(v >> 56)
-	return offset + 8
-}
-func encodeFixed32Internal(dAtA []byte, offset int, v uint32) int {
-	dAtA[offset] = uint8(v)
-	dAtA[offset+1] = uint8(v >> 8)
-	dAtA[offset+2] = uint8(v >> 16)
-	dAtA[offset+3] = uint8(v >> 24)
-	return offset + 4
-}
 func encodeVarintInternal(dAtA []byte, offset int, v uint64) int {
 	for v >= 1<<7 {
 		dAtA[offset] = uint8(v&0x7f | 0x80)
@@ -5363,6 +5365,10 @@ func (m *ZeroProposal) Size() (n int) {
 		l = m.Txn.Size()
 		n += 1 + l + sovInternal(uint64(l))
 	}
+	l = len(m.Tls)
+	if l > 0 {
+		n += 1 + l + sovInternal(uint64(l))
+	}
 	return n
 }
 
@@ -5413,6 +5419,10 @@ func (m *MembershipState) Size() (n int) {
 			n += 1 + l + sovInternal(uint64(l))
 		}
 	}
+	l = len(m.TlsInfo)
+	if l > 0 {
+		n += 1 + l + sovInternal(uint64(l))
+	}
 	return n
 }
 
@@ -5998,7 +6008,15 @@ func (m *List) Unmarshal(dAtA []byte) error {
 		}
 		switch fieldNum {
 		case 1:
-			if wireType == 2 {
+			if wireType == 1 {
+				var v uint64
+				if (iNdEx + 8) > l {
+					return io.ErrUnexpectedEOF
+				}
+				v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
+				iNdEx += 8
+				m.Uids = append(m.Uids, v)
+			} else if wireType == 2 {
 				var packedLen int
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
@@ -6026,32 +6044,10 @@ func (m *List) Unmarshal(dAtA []byte) error {
 					if (iNdEx + 8) > l {
 						return io.ErrUnexpectedEOF
 					}
+					v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
 					iNdEx += 8
-					v = uint64(dAtA[iNdEx-8])
-					v |= uint64(dAtA[iNdEx-7]) << 8
-					v |= uint64(dAtA[iNdEx-6]) << 16
-					v |= uint64(dAtA[iNdEx-5]) << 24
-					v |= uint64(dAtA[iNdEx-4]) << 32
-					v |= uint64(dAtA[iNdEx-3]) << 40
-					v |= uint64(dAtA[iNdEx-2]) << 48
-					v |= uint64(dAtA[iNdEx-1]) << 56
 					m.Uids = append(m.Uids, v)
 				}
-			} else if wireType == 1 {
-				var v uint64
-				if (iNdEx + 8) > l {
-					return io.ErrUnexpectedEOF
-				}
-				iNdEx += 8
-				v = uint64(dAtA[iNdEx-8])
-				v |= uint64(dAtA[iNdEx-7]) << 8
-				v |= uint64(dAtA[iNdEx-6]) << 16
-				v |= uint64(dAtA[iNdEx-5]) << 24
-				v |= uint64(dAtA[iNdEx-4]) << 32
-				v |= uint64(dAtA[iNdEx-3]) << 40
-				v |= uint64(dAtA[iNdEx-2]) << 48
-				v |= uint64(dAtA[iNdEx-1]) << 56
-				m.Uids = append(m.Uids, v)
 			} else {
 				return fmt.Errorf("proto: wrong wireType = %d for field Uids", wireType)
 			}
@@ -6399,15 +6395,8 @@ func (m *Query) Unmarshal(dAtA []byte) error {
 			if (iNdEx + 8) > l {
 				return io.ErrUnexpectedEOF
 			}
+			m.AfterUid = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
 			iNdEx += 8
-			m.AfterUid = uint64(dAtA[iNdEx-8])
-			m.AfterUid |= uint64(dAtA[iNdEx-7]) << 8
-			m.AfterUid |= uint64(dAtA[iNdEx-6]) << 16
-			m.AfterUid |= uint64(dAtA[iNdEx-5]) << 24
-			m.AfterUid |= uint64(dAtA[iNdEx-4]) << 32
-			m.AfterUid |= uint64(dAtA[iNdEx-3]) << 40
-			m.AfterUid |= uint64(dAtA[iNdEx-2]) << 48
-			m.AfterUid |= uint64(dAtA[iNdEx-1]) << 56
 		case 4:
 			if wireType != 0 {
 				return fmt.Errorf("proto: wrong wireType = %d for field DoCount", wireType)
@@ -6925,7 +6914,24 @@ func (m *Result) Unmarshal(dAtA []byte) error {
 			}
 			iNdEx = postIndex
 		case 3:
-			if wireType == 2 {
+			if wireType == 0 {
+				var v uint32
+				for shift := uint(0); ; shift += 7 {
+					if shift >= 64 {
+						return ErrIntOverflowInternal
+					}
+					if iNdEx >= l {
+						return io.ErrUnexpectedEOF
+					}
+					b := dAtA[iNdEx]
+					iNdEx++
+					v |= (uint32(b) & 0x7F) << shift
+					if b < 0x80 {
+						break
+					}
+				}
+				m.Counts = append(m.Counts, v)
+			} else if wireType == 2 {
 				var packedLen int
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
@@ -6966,23 +6972,6 @@ func (m *Result) Unmarshal(dAtA []byte) error {
 					}
 					m.Counts = append(m.Counts, v)
 				}
-			} else if wireType == 0 {
-				var v uint32
-				for shift := uint(0); ; shift += 7 {
-					if shift >= 64 {
-						return ErrIntOverflowInternal
-					}
-					if iNdEx >= l {
-						return io.ErrUnexpectedEOF
-					}
-					b := dAtA[iNdEx]
-					iNdEx++
-					v |= (uint32(b) & 0x7F) << shift
-					if b < 0x80 {
-						break
-					}
-				}
-				m.Counts = append(m.Counts, v)
 			} else {
 				return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType)
 			}
@@ -7623,15 +7612,8 @@ func (m *RaftContext) Unmarshal(dAtA []byte) error {
 			if (iNdEx + 8) > l {
 				return io.ErrUnexpectedEOF
 			}
+			m.Id = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
 			iNdEx += 8
-			m.Id = uint64(dAtA[iNdEx-8])
-			m.Id |= uint64(dAtA[iNdEx-7]) << 8
-			m.Id |= uint64(dAtA[iNdEx-6]) << 16
-			m.Id |= uint64(dAtA[iNdEx-5]) << 24
-			m.Id |= uint64(dAtA[iNdEx-4]) << 32
-			m.Id |= uint64(dAtA[iNdEx-3]) << 40
-			m.Id |= uint64(dAtA[iNdEx-2]) << 48
-			m.Id |= uint64(dAtA[iNdEx-1]) << 56
 		case 2:
 			if wireType != 0 {
 				return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
@@ -7757,15 +7739,8 @@ func (m *Member) Unmarshal(dAtA []byte) error {
 			if (iNdEx + 8) > l {
 				return io.ErrUnexpectedEOF
 			}
+			m.Id = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
 			iNdEx += 8
-			m.Id = uint64(dAtA[iNdEx-8])
-			m.Id |= uint64(dAtA[iNdEx-7]) << 8
-			m.Id |= uint64(dAtA[iNdEx-6]) << 16
-			m.Id |= uint64(dAtA[iNdEx-5]) << 24
-			m.Id |= uint64(dAtA[iNdEx-4]) << 32
-			m.Id |= uint64(dAtA[iNdEx-3]) << 40
-			m.Id |= uint64(dAtA[iNdEx-2]) << 48
-			m.Id |= uint64(dAtA[iNdEx-1]) << 56
 		case 2:
 			if wireType != 0 {
 				return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType)
@@ -7969,41 +7944,14 @@ func (m *Group) Unmarshal(dAtA []byte) error {
 			if postIndex > l {
 				return io.ErrUnexpectedEOF
 			}
-			var keykey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				keykey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			var mapkey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				mapkey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
 			if m.Members == nil {
 				m.Members = make(map[uint64]*Member)
 			}
-			if iNdEx < postIndex {
-				var valuekey uint64
+			var mapkey uint64
+			var mapvalue *Member
+			for iNdEx < postIndex {
+				entryPreIndex := iNdEx
+				var wire uint64
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
 						return ErrIntOverflowInternal
@@ -8013,46 +7961,74 @@ func (m *Group) Unmarshal(dAtA []byte) error {
 					}
 					b := dAtA[iNdEx]
 					iNdEx++
-					valuekey |= (uint64(b) & 0x7F) << shift
+					wire |= (uint64(b) & 0x7F) << shift
 					if b < 0x80 {
 						break
 					}
 				}
-				var mapmsglen int
-				for shift := uint(0); ; shift += 7 {
-					if shift >= 64 {
-						return ErrIntOverflowInternal
+				fieldNum := int32(wire >> 3)
+				if fieldNum == 1 {
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapkey |= (uint64(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
 					}
-					if iNdEx >= l {
+				} else if fieldNum == 2 {
+					var mapmsglen int
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapmsglen |= (int(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
+					}
+					if mapmsglen < 0 {
+						return ErrInvalidLengthInternal
+					}
+					postmsgIndex := iNdEx + mapmsglen
+					if mapmsglen < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if postmsgIndex > l {
 						return io.ErrUnexpectedEOF
 					}
-					b := dAtA[iNdEx]
-					iNdEx++
-					mapmsglen |= (int(b) & 0x7F) << shift
-					if b < 0x80 {
-						break
+					mapvalue = &Member{}
+					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+						return err
 					}
+					iNdEx = postmsgIndex
+				} else {
+					iNdEx = entryPreIndex
+					skippy, err := skipInternal(dAtA[iNdEx:])
+					if err != nil {
+						return err
+					}
+					if skippy < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if (iNdEx + skippy) > postIndex {
+						return io.ErrUnexpectedEOF
+					}
+					iNdEx += skippy
 				}
-				if mapmsglen < 0 {
-					return ErrInvalidLengthInternal
-				}
-				postmsgIndex := iNdEx + mapmsglen
-				if mapmsglen < 0 {
-					return ErrInvalidLengthInternal
-				}
-				if postmsgIndex > l {
-					return io.ErrUnexpectedEOF
-				}
-				mapvalue := &Member{}
-				if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
-					return err
-				}
-				iNdEx = postmsgIndex
-				m.Members[mapkey] = mapvalue
-			} else {
-				var mapvalue *Member
-				m.Members[mapkey] = mapvalue
 			}
+			m.Members[mapkey] = mapvalue
 			iNdEx = postIndex
 		case 2:
 			if wireType != 2 {
@@ -8080,51 +8056,14 @@ func (m *Group) Unmarshal(dAtA []byte) error {
 			if postIndex > l {
 				return io.ErrUnexpectedEOF
 			}
-			var keykey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				keykey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			var stringLenmapkey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				stringLenmapkey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			intStringLenmapkey := int(stringLenmapkey)
-			if intStringLenmapkey < 0 {
-				return ErrInvalidLengthInternal
-			}
-			postStringIndexmapkey := iNdEx + intStringLenmapkey
-			if postStringIndexmapkey > l {
-				return io.ErrUnexpectedEOF
-			}
-			mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
-			iNdEx = postStringIndexmapkey
 			if m.Tablets == nil {
 				m.Tablets = make(map[string]*Tablet)
 			}
-			if iNdEx < postIndex {
-				var valuekey uint64
+			var mapkey string
+			var mapvalue *Tablet
+			for iNdEx < postIndex {
+				entryPreIndex := iNdEx
+				var wire uint64
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
 						return ErrIntOverflowInternal
@@ -8134,46 +8073,85 @@ func (m *Group) Unmarshal(dAtA []byte) error {
 					}
 					b := dAtA[iNdEx]
 					iNdEx++
-					valuekey |= (uint64(b) & 0x7F) << shift
+					wire |= (uint64(b) & 0x7F) << shift
 					if b < 0x80 {
 						break
 					}
 				}
-				var mapmsglen int
-				for shift := uint(0); ; shift += 7 {
-					if shift >= 64 {
-						return ErrIntOverflowInternal
+				fieldNum := int32(wire >> 3)
+				if fieldNum == 1 {
+					var stringLenmapkey uint64
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						stringLenmapkey |= (uint64(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
 					}
-					if iNdEx >= l {
+					intStringLenmapkey := int(stringLenmapkey)
+					if intStringLenmapkey < 0 {
+						return ErrInvalidLengthInternal
+					}
+					postStringIndexmapkey := iNdEx + intStringLenmapkey
+					if postStringIndexmapkey > l {
 						return io.ErrUnexpectedEOF
 					}
-					b := dAtA[iNdEx]
-					iNdEx++
-					mapmsglen |= (int(b) & 0x7F) << shift
-					if b < 0x80 {
-						break
+					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
+					iNdEx = postStringIndexmapkey
+				} else if fieldNum == 2 {
+					var mapmsglen int
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapmsglen |= (int(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
 					}
+					if mapmsglen < 0 {
+						return ErrInvalidLengthInternal
+					}
+					postmsgIndex := iNdEx + mapmsglen
+					if mapmsglen < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if postmsgIndex > l {
+						return io.ErrUnexpectedEOF
+					}
+					mapvalue = &Tablet{}
+					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+						return err
+					}
+					iNdEx = postmsgIndex
+				} else {
+					iNdEx = entryPreIndex
+					skippy, err := skipInternal(dAtA[iNdEx:])
+					if err != nil {
+						return err
+					}
+					if skippy < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if (iNdEx + skippy) > postIndex {
+						return io.ErrUnexpectedEOF
+					}
+					iNdEx += skippy
 				}
-				if mapmsglen < 0 {
-					return ErrInvalidLengthInternal
-				}
-				postmsgIndex := iNdEx + mapmsglen
-				if mapmsglen < 0 {
-					return ErrInvalidLengthInternal
-				}
-				if postmsgIndex > l {
-					return io.ErrUnexpectedEOF
-				}
-				mapvalue := &Tablet{}
-				if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
-					return err
-				}
-				iNdEx = postmsgIndex
-				m.Tablets[mapkey] = mapvalue
-			} else {
-				var mapvalue *Tablet
-				m.Tablets[mapkey] = mapvalue
 			}
+			m.Tablets[mapkey] = mapvalue
 			iNdEx = postIndex
 		default:
 			iNdEx = preIndex
@@ -8400,27 +8378,56 @@ func (m *ZeroProposal) Unmarshal(dAtA []byte) error {
 				return err
 			}
 			iNdEx = postIndex
-		default:
-			iNdEx = preIndex
-			skippy, err := skipInternal(dAtA[iNdEx:])
-			if err != nil {
-				return err
-			}
-			if skippy < 0 {
-				return ErrInvalidLengthInternal
-			}
-			if (iNdEx + skippy) > l {
-				return io.ErrUnexpectedEOF
+		case 8:
+			if wireType != 2 {
+				return fmt.Errorf("proto: wrong wireType = %d for field Tls", wireType)
 			}
-			iNdEx += skippy
-		}
-	}
-
-	if iNdEx > l {
-		return io.ErrUnexpectedEOF
-	}
-	return nil
-}
+			var stringLen uint64
+			for shift := uint(0); ; shift += 7 {
+				if shift >= 64 {
+					return ErrIntOverflowInternal
+				}
+				if iNdEx >= l {
+					return io.ErrUnexpectedEOF
+				}
+				b := dAtA[iNdEx]
+				iNdEx++
+				stringLen |= (uint64(b) & 0x7F) << shift
+				if b < 0x80 {
+					break
+				}
+			}
+			intStringLen := int(stringLen)
+			if intStringLen < 0 {
+				return ErrInvalidLengthInternal
+			}
+			postIndex := iNdEx + intStringLen
+			if postIndex > l {
+				return io.ErrUnexpectedEOF
+			}
+			m.Tls = string(dAtA[iNdEx:postIndex])
+			iNdEx = postIndex
+		default:
+			iNdEx = preIndex
+			skippy, err := skipInternal(dAtA[iNdEx:])
+			if err != nil {
+				return err
+			}
+			if skippy < 0 {
+				return ErrInvalidLengthInternal
+			}
+			if (iNdEx + skippy) > l {
+				return io.ErrUnexpectedEOF
+			}
+			iNdEx += skippy
+		}
+	}
+
+	if iNdEx > l {
+		return io.ErrUnexpectedEOF
+	}
+	return nil
+}
 func (m *MembershipState) Unmarshal(dAtA []byte) error {
 	l := len(dAtA)
 	iNdEx := 0
@@ -8495,41 +8502,14 @@ func (m *MembershipState) Unmarshal(dAtA []byte) error {
 			if postIndex > l {
 				return io.ErrUnexpectedEOF
 			}
-			var keykey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				keykey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			var mapkey uint32
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				mapkey |= (uint32(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
 			if m.Groups == nil {
 				m.Groups = make(map[uint32]*Group)
 			}
-			if iNdEx < postIndex {
-				var valuekey uint64
+			var mapkey uint32
+			var mapvalue *Group
+			for iNdEx < postIndex {
+				entryPreIndex := iNdEx
+				var wire uint64
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
 						return ErrIntOverflowInternal
@@ -8539,46 +8519,74 @@ func (m *MembershipState) Unmarshal(dAtA []byte) error {
 					}
 					b := dAtA[iNdEx]
 					iNdEx++
-					valuekey |= (uint64(b) & 0x7F) << shift
+					wire |= (uint64(b) & 0x7F) << shift
 					if b < 0x80 {
 						break
 					}
 				}
-				var mapmsglen int
-				for shift := uint(0); ; shift += 7 {
-					if shift >= 64 {
-						return ErrIntOverflowInternal
+				fieldNum := int32(wire >> 3)
+				if fieldNum == 1 {
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapkey |= (uint32(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
 					}
-					if iNdEx >= l {
+				} else if fieldNum == 2 {
+					var mapmsglen int
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapmsglen |= (int(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
+					}
+					if mapmsglen < 0 {
+						return ErrInvalidLengthInternal
+					}
+					postmsgIndex := iNdEx + mapmsglen
+					if mapmsglen < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if postmsgIndex > l {
 						return io.ErrUnexpectedEOF
 					}
-					b := dAtA[iNdEx]
-					iNdEx++
-					mapmsglen |= (int(b) & 0x7F) << shift
-					if b < 0x80 {
-						break
+					mapvalue = &Group{}
+					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+						return err
 					}
+					iNdEx = postmsgIndex
+				} else {
+					iNdEx = entryPreIndex
+					skippy, err := skipInternal(dAtA[iNdEx:])
+					if err != nil {
+						return err
+					}
+					if skippy < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if (iNdEx + skippy) > postIndex {
+						return io.ErrUnexpectedEOF
+					}
+					iNdEx += skippy
 				}
-				if mapmsglen < 0 {
-					return ErrInvalidLengthInternal
-				}
-				postmsgIndex := iNdEx + mapmsglen
-				if mapmsglen < 0 {
-					return ErrInvalidLengthInternal
-				}
-				if postmsgIndex > l {
-					return io.ErrUnexpectedEOF
-				}
-				mapvalue := &Group{}
-				if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
-					return err
-				}
-				iNdEx = postmsgIndex
-				m.Groups[mapkey] = mapvalue
-			} else {
-				var mapvalue *Group
-				m.Groups[mapkey] = mapvalue
 			}
+			m.Groups[mapkey] = mapvalue
 			iNdEx = postIndex
 		case 3:
 			if wireType != 2 {
@@ -8606,41 +8614,14 @@ func (m *MembershipState) Unmarshal(dAtA []byte) error {
 			if postIndex > l {
 				return io.ErrUnexpectedEOF
 			}
-			var keykey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				keykey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			var mapkey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				mapkey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
 			if m.Zeros == nil {
 				m.Zeros = make(map[uint64]*Member)
 			}
-			if iNdEx < postIndex {
-				var valuekey uint64
+			var mapkey uint64
+			var mapvalue *Member
+			for iNdEx < postIndex {
+				entryPreIndex := iNdEx
+				var wire uint64
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
 						return ErrIntOverflowInternal
@@ -8650,46 +8631,74 @@ func (m *MembershipState) Unmarshal(dAtA []byte) error {
 					}
 					b := dAtA[iNdEx]
 					iNdEx++
-					valuekey |= (uint64(b) & 0x7F) << shift
+					wire |= (uint64(b) & 0x7F) << shift
 					if b < 0x80 {
 						break
 					}
 				}
-				var mapmsglen int
-				for shift := uint(0); ; shift += 7 {
-					if shift >= 64 {
-						return ErrIntOverflowInternal
+				fieldNum := int32(wire >> 3)
+				if fieldNum == 1 {
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapkey |= (uint64(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
 					}
-					if iNdEx >= l {
+				} else if fieldNum == 2 {
+					var mapmsglen int
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapmsglen |= (int(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
+					}
+					if mapmsglen < 0 {
+						return ErrInvalidLengthInternal
+					}
+					postmsgIndex := iNdEx + mapmsglen
+					if mapmsglen < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if postmsgIndex > l {
 						return io.ErrUnexpectedEOF
 					}
-					b := dAtA[iNdEx]
-					iNdEx++
-					mapmsglen |= (int(b) & 0x7F) << shift
-					if b < 0x80 {
-						break
+					mapvalue = &Member{}
+					if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
+						return err
 					}
+					iNdEx = postmsgIndex
+				} else {
+					iNdEx = entryPreIndex
+					skippy, err := skipInternal(dAtA[iNdEx:])
+					if err != nil {
+						return err
+					}
+					if skippy < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if (iNdEx + skippy) > postIndex {
+						return io.ErrUnexpectedEOF
+					}
+					iNdEx += skippy
 				}
-				if mapmsglen < 0 {
-					return ErrInvalidLengthInternal
-				}
-				postmsgIndex := iNdEx + mapmsglen
-				if mapmsglen < 0 {
-					return ErrInvalidLengthInternal
-				}
-				if postmsgIndex > l {
-					return io.ErrUnexpectedEOF
-				}
-				mapvalue := &Member{}
-				if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
-					return err
-				}
-				iNdEx = postmsgIndex
-				m.Zeros[mapkey] = mapvalue
-			} else {
-				var mapvalue *Member
-				m.Zeros[mapkey] = mapvalue
 			}
+			m.Zeros[mapkey] = mapvalue
 			iNdEx = postIndex
 		case 4:
 			if wireType != 0 {
@@ -8779,6 +8788,37 @@ func (m *MembershipState) Unmarshal(dAtA []byte) error {
 				return err
 			}
 			iNdEx = postIndex
+		case 8:
+			if wireType != 2 {
+				return fmt.Errorf("proto: wrong wireType = %d for field TlsInfo", wireType)
+			}
+			var byteLen int
+			for shift := uint(0); ; shift += 7 {
+				if shift >= 64 {
+					return ErrIntOverflowInternal
+				}
+				if iNdEx >= l {
+					return io.ErrUnexpectedEOF
+				}
+				b := dAtA[iNdEx]
+				iNdEx++
+				byteLen |= (int(b) & 0x7F) << shift
+				if b < 0x80 {
+					break
+				}
+			}
+			if byteLen < 0 {
+				return ErrInvalidLengthInternal
+			}
+			postIndex := iNdEx + byteLen
+			if postIndex > l {
+				return io.ErrUnexpectedEOF
+			}
+			m.TlsInfo = append(m.TlsInfo[:0], dAtA[iNdEx:postIndex]...)
+			if m.TlsInfo == nil {
+				m.TlsInfo = []byte{}
+			}
+			iNdEx = postIndex
 		default:
 			iNdEx = preIndex
 			skippy, err := skipInternal(dAtA[iNdEx:])
@@ -9149,15 +9189,8 @@ func (m *DirectedEdge) Unmarshal(dAtA []byte) error {
 			if (iNdEx + 8) > l {
 				return io.ErrUnexpectedEOF
 			}
+			m.Entity = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
 			iNdEx += 8
-			m.Entity = uint64(dAtA[iNdEx-8])
-			m.Entity |= uint64(dAtA[iNdEx-7]) << 8
-			m.Entity |= uint64(dAtA[iNdEx-6]) << 16
-			m.Entity |= uint64(dAtA[iNdEx-5]) << 24
-			m.Entity |= uint64(dAtA[iNdEx-4]) << 32
-			m.Entity |= uint64(dAtA[iNdEx-3]) << 40
-			m.Entity |= uint64(dAtA[iNdEx-2]) << 48
-			m.Entity |= uint64(dAtA[iNdEx-1]) << 56
 		case 2:
 			if wireType != 2 {
 				return fmt.Errorf("proto: wrong wireType = %d for field Attr", wireType)
@@ -9245,15 +9278,8 @@ func (m *DirectedEdge) Unmarshal(dAtA []byte) error {
 			if (iNdEx + 8) > l {
 				return io.ErrUnexpectedEOF
 			}
+			m.ValueId = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
 			iNdEx += 8
-			m.ValueId = uint64(dAtA[iNdEx-8])
-			m.ValueId |= uint64(dAtA[iNdEx-7]) << 8
-			m.ValueId |= uint64(dAtA[iNdEx-6]) << 16
-			m.ValueId |= uint64(dAtA[iNdEx-5]) << 24
-			m.ValueId |= uint64(dAtA[iNdEx-4]) << 32
-			m.ValueId |= uint64(dAtA[iNdEx-3]) << 40
-			m.ValueId |= uint64(dAtA[iNdEx-2]) << 48
-			m.ValueId |= uint64(dAtA[iNdEx-1]) << 56
 		case 6:
 			if wireType != 2 {
 				return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
@@ -10191,15 +10217,8 @@ func (m *Posting) Unmarshal(dAtA []byte) error {
 			if (iNdEx + 8) > l {
 				return io.ErrUnexpectedEOF
 			}
+			m.Uid = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
 			iNdEx += 8
-			m.Uid = uint64(dAtA[iNdEx-8])
-			m.Uid |= uint64(dAtA[iNdEx-7]) << 8
-			m.Uid |= uint64(dAtA[iNdEx-6]) << 16
-			m.Uid |= uint64(dAtA[iNdEx-5]) << 24
-			m.Uid |= uint64(dAtA[iNdEx-4]) << 32
-			m.Uid |= uint64(dAtA[iNdEx-3]) << 40
-			m.Uid |= uint64(dAtA[iNdEx-2]) << 48
-			m.Uid |= uint64(dAtA[iNdEx-1]) << 56
 		case 2:
 			if wireType != 2 {
 				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
@@ -11753,15 +11772,8 @@ func (m *MapEntry) Unmarshal(dAtA []byte) error {
 			if (iNdEx + 8) > l {
 				return io.ErrUnexpectedEOF
 			}
+			m.Uid = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
 			iNdEx += 8
-			m.Uid = uint64(dAtA[iNdEx-8])
-			m.Uid |= uint64(dAtA[iNdEx-7]) << 8
-			m.Uid |= uint64(dAtA[iNdEx-6]) << 16
-			m.Uid |= uint64(dAtA[iNdEx-5]) << 24
-			m.Uid |= uint64(dAtA[iNdEx-4]) << 32
-			m.Uid |= uint64(dAtA[iNdEx-3]) << 40
-			m.Uid |= uint64(dAtA[iNdEx-2]) << 48
-			m.Uid |= uint64(dAtA[iNdEx-1]) << 56
 		case 3:
 			if wireType != 2 {
 				return fmt.Errorf("proto: wrong wireType = %d for field Posting", wireType)
@@ -12147,41 +12159,14 @@ func (m *OracleDelta) Unmarshal(dAtA []byte) error {
 			if postIndex > l {
 				return io.ErrUnexpectedEOF
 			}
-			var keykey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				keykey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			var mapkey uint64
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowInternal
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				mapkey |= (uint64(b) & 0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
 			if m.Commits == nil {
 				m.Commits = make(map[uint64]uint64)
 			}
-			if iNdEx < postIndex {
-				var valuekey uint64
+			var mapkey uint64
+			var mapvalue uint64
+			for iNdEx < postIndex {
+				entryPreIndex := iNdEx
+				var wire uint64
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
 						return ErrIntOverflowInternal
@@ -12191,12 +12176,62 @@ func (m *OracleDelta) Unmarshal(dAtA []byte) error {
 					}
 					b := dAtA[iNdEx]
 					iNdEx++
-					valuekey |= (uint64(b) & 0x7F) << shift
+					wire |= (uint64(b) & 0x7F) << shift
 					if b < 0x80 {
 						break
 					}
 				}
-				var mapvalue uint64
+				fieldNum := int32(wire >> 3)
+				if fieldNum == 1 {
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapkey |= (uint64(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
+					}
+				} else if fieldNum == 2 {
+					for shift := uint(0); ; shift += 7 {
+						if shift >= 64 {
+							return ErrIntOverflowInternal
+						}
+						if iNdEx >= l {
+							return io.ErrUnexpectedEOF
+						}
+						b := dAtA[iNdEx]
+						iNdEx++
+						mapvalue |= (uint64(b) & 0x7F) << shift
+						if b < 0x80 {
+							break
+						}
+					}
+				} else {
+					iNdEx = entryPreIndex
+					skippy, err := skipInternal(dAtA[iNdEx:])
+					if err != nil {
+						return err
+					}
+					if skippy < 0 {
+						return ErrInvalidLengthInternal
+					}
+					if (iNdEx + skippy) > postIndex {
+						return io.ErrUnexpectedEOF
+					}
+					iNdEx += skippy
+				}
+			}
+			m.Commits[mapkey] = mapvalue
+			iNdEx = postIndex
+		case 2:
+			if wireType == 0 {
+				var v uint64
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
 						return ErrIntOverflowInternal
@@ -12206,19 +12241,13 @@ func (m *OracleDelta) Unmarshal(dAtA []byte) error {
 					}
 					b := dAtA[iNdEx]
 					iNdEx++
-					mapvalue |= (uint64(b) & 0x7F) << shift
+					v |= (uint64(b) & 0x7F) << shift
 					if b < 0x80 {
 						break
 					}
 				}
-				m.Commits[mapkey] = mapvalue
-			} else {
-				var mapvalue uint64
-				m.Commits[mapkey] = mapvalue
-			}
-			iNdEx = postIndex
-		case 2:
-			if wireType == 2 {
+				m.Aborts = append(m.Aborts, v)
+			} else if wireType == 2 {
 				var packedLen int
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
@@ -12259,23 +12288,6 @@ func (m *OracleDelta) Unmarshal(dAtA []byte) error {
 					}
 					m.Aborts = append(m.Aborts, v)
 				}
-			} else if wireType == 0 {
-				var v uint64
-				for shift := uint(0); ; shift += 7 {
-					if shift >= 64 {
-						return ErrIntOverflowInternal
-					}
-					if iNdEx >= l {
-						return io.ErrUnexpectedEOF
-					}
-					b := dAtA[iNdEx]
-					iNdEx++
-					v |= (uint64(b) & 0x7F) << shift
-					if b < 0x80 {
-						break
-					}
-				}
-				m.Aborts = append(m.Aborts, v)
 			} else {
 				return fmt.Errorf("proto: wrong wireType = %d for field Aborts", wireType)
 			}
@@ -12349,7 +12361,24 @@ func (m *TxnTimestamps) Unmarshal(dAtA []byte) error {
 		}
 		switch fieldNum {
 		case 1:
-			if wireType == 2 {
+			if wireType == 0 {
+				var v uint64
+				for shift := uint(0); ; shift += 7 {
+					if shift >= 64 {
+						return ErrIntOverflowInternal
+					}
+					if iNdEx >= l {
+						return io.ErrUnexpectedEOF
+					}
+					b := dAtA[iNdEx]
+					iNdEx++
+					v |= (uint64(b) & 0x7F) << shift
+					if b < 0x80 {
+						break
+					}
+				}
+				m.Ts = append(m.Ts, v)
+			} else if wireType == 2 {
 				var packedLen int
 				for shift := uint(0); ; shift += 7 {
 					if shift >= 64 {
@@ -12390,23 +12419,6 @@ func (m *TxnTimestamps) Unmarshal(dAtA []byte) error {
 					}
 					m.Ts = append(m.Ts, v)
 				}
-			} else if wireType == 0 {
-				var v uint64
-				for shift := uint(0); ; shift += 7 {
-					if shift >= 64 {
-						return ErrIntOverflowInternal
-					}
-					if iNdEx >= l {
-						return io.ErrUnexpectedEOF
-					}
-					b := dAtA[iNdEx]
-					iNdEx++
-					v |= (uint64(b) & 0x7F) << shift
-					if b < 0x80 {
-						break
-					}
-				}
-				m.Ts = append(m.Ts, v)
 			} else {
 				return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType)
 			}
@@ -12766,194 +12778,195 @@ var (
 func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) }
 
 var fileDescriptorInternal = []byte{
-	// 3013 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x39, 0xcb, 0x6e, 0x23, 0xc7,
-	0xb5, 0xec, 0x26, 0xd9, 0x6c, 0x1e, 0x92, 0x1a, 0xba, 0x3c, 0x9e, 0xa1, 0x69, 0x5f, 0x59, 0xae,
-	0xf1, 0xf5, 0xc8, 0x2f, 0xd9, 0x23, 0x8f, 0x1f, 0x77, 0xee, 0xf5, 0x0d, 0x64, 0x91, 0x1a, 0xd3,
-	0xa3, 0x97, 0x8b, 0x94, 0x1c, 0x67, 0x11, 0xa2, 0xc4, 0x2e, 0x51, 0x0d, 0x35, 0xbb, 0xdb, 0x5d,
-	0x4d, 0x81, 0xf2, 0x32, 0xbb, 0x20, 0x3f, 0xe0, 0x75, 0x80, 0xec, 0x02, 0x04, 0xc8, 0x32, 0x8b,
-	0xac, 0x12, 0x20, 0x8b, 0x00, 0x49, 0xfe, 0x20, 0x71, 0x36, 0x41, 0xb2, 0xca, 0x1f,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0xf1, 0xfb, 0x6f, 0x56, 0x8d, 0x3f, 0x7e, 0xb3, 0x6a, 0x7c, 0xfd, 0xe7, 0xd5,
-	0xc2, 0x89, 0x25, 0xff, 0x81, 0x7d, 0xf7, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x30, 0xc1,
-	0x11, 0xa6, 0x1d, 0x00, 0x00,
+	// 3036 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x39, 0xcb, 0x6e, 0x23, 0xc7,
+	0xb5, 0xea, 0x26, 0xd9, 0x6c, 0x1e, 0x92, 0x1a, 0xba, 0x3c, 0x9e, 0xa1, 0x69, 0x5f, 0x59, 0xee,
+	0xf1, 0xf5, 0xc8, 0x2f, 0xd9, 0x23, 0x8f, 0x1f, 0x77, 0xee, 0xf5, 0x0d, 0x64, 0x91, 0x33, 0xa6,
+	0x47, 0x2f, 0x17, 0xa9, 0x71, 0x9c, 0x45, 0x88, 0x12, 0xbb, 0xa4, 0x69, 0xa8, 0xd9, 0xdd, 0xee,
+	0x6a, 0x0a, 0x94, 0x97, 0xd9, 0x05, 0xf9, 0x01, 0xaf, 0x03, 0x64, 0x17, 0x20, 0x40, 0x3e, 0x20,
+	0xab, 0x04, 0xc8, 0x22, 0x40, 0x12, 0x20, 0x1f, 0x90, 0x38, 0x9b, 0x20, 0xbb, 0x7c, 0x40, 0x80,
+	0xa0, 0x4e, 0x55, 0x3f, 0xc8, 0xe1, 0xc8, 0x42, 0x1e, 0x2b, 0xf6, 0x39, 0x75, 0x4e, 0x3d, 0xce,
+	0xfb, 0x1c, 0xc2, 0xaa, 0x17, 0x24, 0x3c, 0x0e, 0x98, 0xbf, 0x19, 0xc5, 0x61, 0x12, 0x12, 0x4b,
+	0xc1, 0x9d, 0x1a, 0x8b, 0x3c, 0x85, 0x72, 0x3a, 0x50, 0xde, 0xf5, 0x44, 0x42, 0x08, 0x94, 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0xf7, 0x1f, 0x01,
+	0x00, 0x00, 0xff, 0xff, 0x6f, 0x97, 0x89, 0x1a, 0xd2, 0x1d, 0x00, 0x00,
 }
diff --git a/protos/internal.proto b/protos/internal.proto
index f0a8545a..93a1f2c6 100644
--- a/protos/internal.proto
+++ b/protos/internal.proto
@@ -134,6 +134,7 @@ message ZeroProposal {
 	uint64 maxTxnTs = 5;
 	uint64 maxRaftId = 6;
 	api.TxnContext txn = 7;
+        string tls = 8;
 }
 
 // MembershipState is used to pack together the current membership state of all the nodes
@@ -147,6 +148,7 @@ message MembershipState {
 	uint64 maxTxnTs = 5;
 	uint64 maxRaftId = 6;
 	repeated Member removed = 7;
+        bytes tlsInfo = 8;
 }
 
 message ConnectionState {
@@ -200,7 +202,7 @@ message Proposal {
 	repeated KV kv = 4;
 	MembershipState state = 5;
 	string clean_predicate = 6; // Delete the predicate which was moved to other group.
-	string key = 7;
+        string key = 7;        
 }
 
 message KVS {
diff --git a/worker/groups.go b/worker/groups.go
index 80c62c74..493f65bb 100644
--- a/worker/groups.go
+++ b/worker/groups.go
@@ -39,6 +39,7 @@ type groupi struct {
 	tablets   map[string]*intern.Tablet
 	triggerCh chan struct{} // Used to trigger membership sync
 	delPred   chan struct{} // Ensures that predicate move doesn't happen when deletion is ongoing.
+    newkeys   chan []byte
 }
 
 var gr *groupi
@@ -51,10 +52,10 @@ func groups() *groupi {
 // and either start or restart RAFT nodes.
 // This function triggers RAFT nodes to be created, and is the entrace to the RAFT
 // world from main.go.
-func StartRaftNodes(walStore *badger.ManagedDB, bindall bool) {
+func StartRaftNodes(walStore *badger.ManagedDB, bindall bool, newkeys chan []byte) {
 	gr = new(groupi)
 	gr.ctx, gr.cancel = context.WithCancel(context.Background())
-
+    gr.newkeys = newkeys
 	if len(Config.MyAddr) == 0 {
 		Config.MyAddr = fmt.Sprintf("localhost:%d", workerPort())
 	} else {
@@ -236,6 +237,8 @@ func UpdateMembershipState(ctx context.Context) error {
 	return nil
 }
 
+
+
 func (g *groupi) applyState(state *intern.MembershipState) {
 	x.AssertTrue(state != nil)
 	g.Lock()
@@ -247,6 +250,11 @@ func (g *groupi) applyState(state *intern.MembershipState) {
 		return
 	}
 
+    if state.TlsInfo != nil {
+        fmt.Println("got new tls keys", g.newkeys)
+        g.newkeys <- state.TlsInfo
+    }
+    
 	g.state = state
 
 	// While restarting we fill Node information after retrieving initial state.
diff --git a/x/tls_helper.go b/x/tls_helper.go
index 89d10140..283fa456 100644
--- a/x/tls_helper.go
+++ b/x/tls_helper.go
@@ -11,6 +11,7 @@ import (
 	"crypto/tls"
 	"crypto/x509"
 	"encoding/pem"
+    "encoding/json" 
 	"fmt"
 	"io/ioutil"
 	"strings"
@@ -91,53 +92,37 @@ func generateCertPool(certPath string, useSystemCA bool) (*x509.CertPool, error)
 	return pool, nil
 }
 
-func parseCertificate(required bool, certPath string, certKeyPath string, certKeyPass string) (*tls.Certificate, error) {
-	if len(certKeyPath) > 0 || len(certPath) > 0 || required {
-		// Load key
-		keyFile, err := ioutil.ReadFile(certKeyPath)
-		if err != nil {
-			return nil, err
-		}
-
-		var certKey []byte
-		if block, _ := pem.Decode(keyFile); block != nil {
-			if x509.IsEncryptedPEMBlock(block) {
-				decryptKey, err := x509.DecryptPEMBlock(block, []byte(certKeyPass))
-				if err != nil {
-					return nil, err
-				}
-
-				privKey, err := x509.ParsePKCS1PrivateKey(decryptKey)
-				if err != nil {
-					return nil, err
-				}
-
-				certKey = pem.EncodeToMemory(&pem.Block{
-					Type:  "RSA PRIVATE KEY",
-					Bytes: x509.MarshalPKCS1PrivateKey(privKey),
-				})
-			} else {
-				certKey = pem.EncodeToMemory(block)
-			}
-		} else {
-			return nil, fmt.Errorf("Invalid Cert Key")
-		}
-
-		// Load cert
-		certFile, err := ioutil.ReadFile(certPath)
-		if err != nil {
-			return nil, err
-		}
-
-		// Load certificate, pair cert/key
-		certificate, err := tls.X509KeyPair(certFile, certKey)
-		if err != nil {
-			return nil, fmt.Errorf("Error reading certificate {cert: '%s', key: '%s'}\n%s", certPath, certKeyPath, err)
-		}
-
-		return &certificate, nil
-	}
-	return nil, nil
+func parseCertificate(cert []byte, certKey []byte, certKeyPass string) (*tls.Certificate, error) {
+    if block, _ := pem.Decode(certKey); block != nil {
+        if true {
+            decryptKey, err := x509.DecryptPEMBlock(block, []byte(certKeyPass))
+            if err != nil {
+                return nil, err
+            }
+            
+            privKey, err := x509.ParsePKCS1PrivateKey(decryptKey)
+            if err != nil {
+                return nil, err
+            }
+            
+            certKey = pem.EncodeToMemory(&pem.Block{
+                Type:  "RSA PRIVATE KEY",
+                Bytes: x509.MarshalPKCS1PrivateKey(privKey),
+            })
+        } else {
+            certKey = pem.EncodeToMemory(block)
+        }
+    } else {
+        return nil, fmt.Errorf("Invalid Cert Key")
+    }
+    
+    // Load certificate, pair cert/key
+    certificate, err := tls.X509KeyPair(cert, certKey)
+    if err != nil {
+        return nil, fmt.Errorf("Error installing certificates", err)
+    }
+    
+    return &certificate, nil
 }
 
 func setupVersion(cfg *tls.Config, minVersion string, maxVersion string) error {
@@ -194,27 +179,24 @@ func setupClientAuth(authType string) (tls.ClientAuthType, error) {
 // configuration provided. If the ConfigType provided in TLSHelperConfig is
 // TLSServerConfig, it's return a reload function. If any problem is found, an
 // error is returned
-func GenerateTLSConfig(config TLSHelperConfig) (tlsCfg *tls.Config, reloadConfig func(), err error) {
-	wrapper := new(wrapperTLSConfig)
+
+func GenerateTLSConfigServer(config TLSHelperConfig) (tlsCfg *tls.Config, reloadConfig func([]byte), err error) {
+    wrapper := new(wrapperTLSConfig)
 	tlsCfg = new(tls.Config)
 	wrapper.config = tlsCfg
+    wrapper.cert = &wrapperCert{}
+    tlsCfg.GetCertificate = wrapper.getCertificate
+    tlsCfg.VerifyPeerCertificate = wrapper.verifyPeerCertificate
+    wrapper.helperConfig = &config
+    return wrapper.config, wrapper.reloadConfigJson, nil
+}
 
-	cert, err := parseCertificate(config.CertRequired, config.Cert, config.Key, config.KeyPassphrase)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	if cert != nil {
-		switch config.ConfigType {
-		case TLSClientConfig:
-			tlsCfg.Certificates = []tls.Certificate{*cert}
-			tlsCfg.BuildNameToCertificate()
-		case TLSServerConfig:
-			wrapper.cert = &wrapperCert{cert: cert}
-			tlsCfg.GetCertificate = wrapper.getCertificate
-			tlsCfg.VerifyPeerCertificate = wrapper.verifyPeerCertificate
-		}
-	}
+// different one for server and client
+func GenerateTLSConfig(config TLSHelperConfig) (tlsCfg *tls.Config, reloadConfig func([]byte), err error) {
+	wrapper := new(wrapperTLSConfig)
+	tlsCfg = new(tls.Config)
+	wrapper.config = tlsCfg
+    wrapper.reloadConfig()
 
 	auth, err := setupClientAuth(config.ClientAuth)
 	if err != nil {
@@ -241,6 +223,7 @@ func GenerateTLSConfig(config TLSHelperConfig) (tlsCfg *tls.Config, reloadConfig
 	}
 
 	// Configure Root CAs
+    // xxx - should never use the system certs
 	if len(config.RootCACerts) > 0 || config.UseSystemRootCACerts {
 		pool, err := generateCertPool(config.RootCACerts, config.UseSystemRootCACerts)
 		if err != nil {
@@ -272,7 +255,7 @@ func GenerateTLSConfig(config TLSHelperConfig) (tlsCfg *tls.Config, reloadConfig
 	}
 
 	wrapper.helperConfig = &config
-	return tlsCfg, wrapper.reloadConfig, nil
+	return tlsCfg, wrapper.reloadConfigJson, nil
 }
 
 type wrapperCert struct {
@@ -346,28 +329,76 @@ func (c *wrapperTLSConfig) verifyPeerCertificate(rawCerts [][]byte, verifiedChai
 	return nil
 }
 
-func (c *wrapperTLSConfig) reloadConfig() {
-	c.mutex.Lock()
-	defer c.mutex.Unlock()
+// move me please, need to be visible by the populator
+type TlsInfo struct {
+    Cert string `json:"cert"` 
+    CertKey string `json:"certKey"`
+    CertKeyPassPhrase string `json:"certKeyPassPhrase"`
+}
 
-	// Loading new certificate
-	cert, err := parseCertificate(c.helperConfig.CertRequired, c.helperConfig.Cert, c.helperConfig.Key, c.helperConfig.KeyPassphrase)
-	if err != nil {
-		Printf("Error reloading certificate. %s\nUsing current certificate\n", err.Error())
-	} else if cert != nil {
-		if c.helperConfig.ConfigType == TLSServerConfig {
+func (c *wrapperTLSConfig) reloadConfigJson(jsonKeys []byte) {
+	c.mutex.Lock()
+	defer c.mutex.Unlock()    
+    ti := &TlsInfo{}
+    err := json.Unmarshal(jsonKeys, ti)
+    
+    if err != nil {
+        fmt.Println("json key unmarshal error", string(jsonKeys), ti, c.helperConfig)
+    } 
+
+    if c.helperConfig.CertRequired {    
+        cert, err := parseCertificate( []byte(ti.Cert), []byte(ti.CertKey), ti.CertKeyPassPhrase)
+        if err != nil {
+            Printf("Error reloading certificate. %s\nUsing current certificate\n", err.Error())
+        } else if cert != nil {
 			c.cert.Lock()
 			c.cert.cert = cert
 			c.cert.Unlock()
 		}
-	}
+    }
+}
 
-	// Configure Client CAs
-	if len(c.helperConfig.ClientCACerts) > 0 || c.helperConfig.UseSystemClientCACerts {
-		pool, err := generateCertPool(c.helperConfig.ClientCACerts, c.helperConfig.UseSystemClientCACerts)
-		if err != nil {
-			Printf("Error reloading CAs. %s\nUsing current Client CAs\n", err.Error())
-		} else {
+func (c *wrapperTLSConfig) reloadConfig() {
+	c.mutex.Lock()
+	defer c.mutex.Unlock()
+
+    if c.helperConfig.CertRequired {
+        // Load cert
+        certText, err := ioutil.ReadFile(c.helperConfig.Cert)
+        if err != nil {
+            // log
+            fmt.Println("couldn't load cert file")
+        }
+
+        // Load private key associated with cert
+        key, err := ioutil.ReadFile(c.helperConfig.Key)
+        if err != nil {
+            fmt.Println("couldn't load key file")
+        }
+        
+        // Loading new certificate
+        cert, err := parseCertificate(certText, key, c.helperConfig.KeyPassphrase)
+        if err != nil {
+            Printf("Error reloading certificate. %s\nUsing current certificate\n", err.Error())
+        } else if cert != nil {
+            if c.helperConfig.ConfigType == TLSServerConfig {
+                c.cert.Lock()
+                c.cert.cert = cert
+                c.cert.Unlock()
+            }
+        }
+        if c.helperConfig.ConfigType == TLSClientConfig {
+            c.config.Certificates = []tls.Certificate{*cert}
+			c.config.BuildNameToCertificate()
+        }
+    }
+    
+    // Configure Client CAs - is this server or client?
+    if len(c.helperConfig.ClientCACerts) > 0 || c.helperConfig.UseSystemClientCACerts {
+        pool, err := generateCertPool(c.helperConfig.ClientCACerts, c.helperConfig.UseSystemClientCACerts)
+        if err != nil {
+            Printf("Error reloading CAs. %s\nUsing current Client CAs\n", err.Error())
+        } else {
 			c.clientCAPool.Lock()
 			c.clientCAPool.pool = pool
 			c.clientCAPool.Unlock()
-- 
GitLab