From a010f80382e8060a261516e0c238a1bf12e33804 Mon Sep 17 00:00:00 2001 From: Christopher Boumenot Date: Fri, 27 May 2016 21:52:26 -0700 Subject: [PATCH] Check for nil when querying a certificate. --- builder/azure/arm/step_get_certificate.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder/azure/arm/step_get_certificate.go b/builder/azure/arm/step_get_certificate.go index 22403ea94..5f9554aab 100644 --- a/builder/azure/arm/step_get_certificate.go +++ b/builder/azure/arm/step_get_certificate.go @@ -39,6 +39,10 @@ func (s *StepGetCertificate) getCertificateUrl(keyVaultName string, secretName s return "", err } + if secret == nil || secret.ID == nil { + return "", fmt.Errorf("certificate is nil") + } + return *secret.ID, err }