TLS and HTTPS configuration in default developer config
This commit is contained in:
@@ -17,7 +17,10 @@ limitations under the License.
|
||||
*/
|
||||
package main
|
||||
|
||||
import "os"
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// postInit is run after /var/mqm is set up
|
||||
// This version of postInit is only included as part of the MQ Advanced for Developers build
|
||||
@@ -32,5 +35,26 @@ func postInit(name string) error {
|
||||
startWebServer()
|
||||
}()
|
||||
}
|
||||
|
||||
dir := "/etc/mqm/tls"
|
||||
keyFile := filepath.Join(dir, "key.kdb")
|
||||
stashFile := filepath.Join(dir, "key.sth")
|
||||
|
||||
_, err := os.Stat(keyFile)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = os.Stat(stashFile)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user