Add more dev config tests
This commit is contained in:
@@ -117,15 +117,16 @@ func configureTLS(qmName string, inputFile string, passPhrase string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
f, err := os.OpenFile("/etc/mqm/20-dev-tls.mqsc", os.O_WRONLY|os.O_CREATE, 0770)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
// Change the Queue Manager's Key Repository to point at the new TLS key store
|
||||
fmt.Fprintf(f, "ALTER QMGR SSLKEYR('%s')\n", filepath.Join(dir, "key"))
|
||||
fmt.Fprintf(f, "ALTER QMGR CERTLABL('%s')\n", newLabel)
|
||||
|
||||
if os.Getenv("MQ_DEV") == "true" {
|
||||
f, err := os.OpenFile("/etc/mqm/20-dev-tls.mqsc", os.O_WRONLY|os.O_CREATE, 0770)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
// Change the Queue Manager's Key Repository to point at the new TLS key store
|
||||
fmt.Fprintf(f, "ALTER QMGR SSLKEYR('%s')\n", filepath.Join(dir, "key"))
|
||||
fmt.Fprintf(f, "ALTER QMGR CERTLABL('%s')\n", newLabel)
|
||||
// Alter the DEV channels to use TLS
|
||||
fmt.Fprintln(f, "ALTER CHANNEL('DEV.APP.SVRCONN') CHLTYPE(SVRCONN) SSLCIPH(TLS_RSA_WITH_AES_128_CBC_SHA256) SSLCAUTH(OPTIONAL)")
|
||||
fmt.Fprintln(f, "ALTER CHANNEL('DEV.ADMIN.SVRCONN') CHLTYPE(SVRCONN) SSLCIPH(TLS_RSA_WITH_AES_128_CBC_SHA256) SSLCAUTH(OPTIONAL)")
|
||||
|
||||
Reference in New Issue
Block a user