Changing client auth method to verify if given 65/42165/2
authorKiran Kamineni <kiran.k.kamineni@intel.com>
Wed, 11 Apr 2018 05:07:18 +0000 (22:07 -0700)
committerGirish Havaldar <hg0071052@techmahindra.com>
Wed, 11 Apr 2018 22:40:22 +0000 (22:40 +0000)
Changing client auth to verify if given to allow client
connections where client does not have a certificate

Issue-ID: AAF-93
Change-Id: Ifd8f59108536889bacb0fe1477dc1e1c8a0ff4dc
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
sms-service/src/sms/auth/auth.go

index ad5afdc..dc5c7bf 100644 (file)
@@ -45,7 +45,8 @@ func GetTLSConfig(caCertFile string) (*tls.Config, error) {
                caCertPool.AppendCertsFromPEM(caCert)
 
                tlsConfig = &tls.Config{
-                       ClientAuth: tls.RequireAndVerifyClientCert,
+                       // Change to RequireAndVerify once we have mandatory certs
+                       ClientAuth: tls.VerifyClientCertIfGiven,
                        ClientCAs:  caCertPool,
                        MinVersion: tls.VersionTLS12,
                }