try to set topic when initializing enroll service (#242)

This commit is contained in:
Victor Vrantchan
2017-10-15 23:01:29 -04:00
committed by GitHub
parent 4b9b004d39
commit 91c9b96f44

View File

@@ -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,
}