From 91c9b96f44c5373cb4ac6d4ca870c6c1e5f60ef4 Mon Sep 17 00:00:00 2001 From: Victor Vrantchan Date: Sun, 15 Oct 2017 23:01:29 -0400 Subject: [PATCH] try to set topic when initializing enroll service (#242) --- enroll/service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/enroll/service.go b/enroll/service.go index 29ea5d19..589e2842 100644 --- a/enroll/service.go +++ b/enroll/service.go @@ -64,6 +64,9 @@ func NewService(topic TopicProvider, sub pubsub.Subscriber, caCertPath, scepURL, subject = append(subject, [][]string{[]string{subjectKeyValue[0], subjectKeyValue[1]}}) } + // fetch the push topic from the db. + // will be "" if the push certificate hasn't been uploaded yet + pushTopic, _ := topic.PushTopic() svc := &service{ URL: url, SCEPURL: scepURL, @@ -72,6 +75,7 @@ func NewService(topic TopicProvider, sub pubsub.Subscriber, caCertPath, scepURL, CACert: caCert, TLSCert: tlsCert, ProfileDB: profileDB, + Topic: pushTopic, topicProvier: topic, }