TLS and HTTPS configuration in default developer config

This commit is contained in:
Arthur Barr
2018-03-20 16:47:24 +00:00
parent 913465620b
commit ab3b44e84b
21 changed files with 849 additions and 42 deletions

View File

@@ -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
}