From c15d7a9611ae1a1e884233c0d00bb8df5bfd1f0f Mon Sep 17 00:00:00 2001 From: Mosen Date: Fri, 1 Jul 2016 10:24:44 +1000 Subject: [PATCH] Make public facing URL and SCEP server URL configurable. Degrade gracefully to disabling enrollment endpoint if either URL or SCEP url are not provided. --- service.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service.go b/service.go index b1457bb7..a15298d5 100644 --- a/service.go +++ b/service.go @@ -6,7 +6,7 @@ type Service interface { Enroll() (Profile, error) } -func NewService(pushCertPath string, pushCertPass string, caCertPath string) (Service, error) { +func NewService(pushCertPath string, pushCertPass string, caCertPath string, url string, scepUrl string) (Service, error) { pushTopic, err := GetPushTopicFromPKCS12(pushCertPath, pushCertPass) if err != nil { return nil, err @@ -30,8 +30,8 @@ func NewService(pushCertPath string, pushCertPass string, caCertPath string) (Se } return &service{ - Url: "https://micromdm.local:6443", - SCEPUrl: "http://micromdm.local:2019/scep", + Url: url, + SCEPUrl: scepUrl, SCEPSubject: scepSubject, Topic: pushTopic, CACert: caCert,