From d56fce65c23f37c5fad07d4ea45c2fd66972f972 Mon Sep 17 00:00:00 2001 From: Riccardo Biraghi Date: Tue, 10 Apr 2018 16:29:14 +0100 Subject: [PATCH] Fix tls template file --- cmd/runmqdevserver/tls.go | 2 +- .../mqadvanced-server-dev/20-dev-tls.mqsc.tpl | 20 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/cmd/runmqdevserver/tls.go b/cmd/runmqdevserver/tls.go index 89cf70f..3a3443b 100644 --- a/cmd/runmqdevserver/tls.go +++ b/cmd/runmqdevserver/tls.go @@ -127,7 +127,7 @@ func configureTLS(qmName string, inputFile string, passPhrase string) error { const mqsc string = "/etc/mqm/20-dev-tls.mqsc" const mqscTemplate string = mqsc + ".tpl" - err = processTemplateFile(mqsc+".tpl", mqsc, map[string]string{ + err = processTemplateFile(mqscTemplate, mqsc, map[string]string{ "SSLKeyR": filepath.Join(dir, "key"), "CertificateLabel": newLabel, "SSLCipherSpec": sslCipherSpec, diff --git a/incubating/mqadvanced-server-dev/20-dev-tls.mqsc.tpl b/incubating/mqadvanced-server-dev/20-dev-tls.mqsc.tpl index 359f46c..34b6b3d 100644 --- a/incubating/mqadvanced-server-dev/20-dev-tls.mqsc.tpl +++ b/incubating/mqadvanced-server-dev/20-dev-tls.mqsc.tpl @@ -1,4 +1,22 @@ +* © Copyright IBM Corporation 2018 +* +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. + +* Set the keystore location for the queue manager ALTER QMGR SSLKEYR('{{ .SSLKeyR }}') -ALTER QMGR CERTLABL('{{ .CertificateLabel }}}}') +ALTER QMGR CERTLABL('{{ .CertificateLabel }}') + +* Set the cipherspec for dev channels ALTER CHANNEL('DEV.APP.SVRCONN') CHLTYPE(SVRCONN) SSLCIPH({{ .SSLCipherSpec }}) SSLCAUTH(OPTIONAL) ALTER CHANNEL('DEV.ADMIN.SVRCONN') CHLTYPE(SVRCONN) SSLCIPH({{ .SSLCipherSpec }}) SSLCAUTH(OPTIONAL)