diff --git a/cmd/shell.go b/cmd/shell.go index 7f7d2f487..c8511e2da 100644 --- a/cmd/shell.go +++ b/cmd/shell.go @@ -54,13 +54,14 @@ type Config struct { // General AMQP struct { - Server string - RA Queue - VA Queue - SA Queue - CA Queue - OCSP Queue - TLS *TLSConfig + Server string + Insecure bool + RA Queue + VA Queue + SA Queue + CA Queue + OCSP Queue + TLS *TLSConfig } WFE struct { diff --git a/rpc/amqp-rpc.go b/rpc/amqp-rpc.go index 88c06dc79..927ee33a2 100644 --- a/rpc/amqp-rpc.go +++ b/rpc/amqp-rpc.go @@ -268,16 +268,20 @@ func AmqpChannel(conf cmd.Config) (*amqp.Channel, error) { log := blog.GetAuditLogger() - if conf.AMQP.TLS == nil { - // Configuration did not specify TLS options, but Dial will - // use TLS anyway if the URL scheme is "amqps" + if conf.AMQP.Insecure == true { + // If the Insecure flag is true, then just go ahead and connect conn, err = amqp.Dial(conf.AMQP.Server) } else { - // They provided TLS options, so let's load them. + // The insecure flag is false or not set, so we need to load up the options log.Info("AMQPS: Loading TLS Options.") if strings.HasPrefix(conf.AMQP.Server, "amqps") == false { - err = fmt.Errorf("AMQPS: TLS configuration provided, but not using an AMQPS URL") + err = fmt.Errorf("AMQPS: Not using an AMQPS URL. To use AMQP instead of AMQPS, set insecure=true.") + return nil, err + } + + if conf.AMQP.TLS == nil { + err = fmt.Errorf("AMQPS: No TLS configuration provided. To use AMQP instead of AMQPS, set insecure=true.") return nil, err } diff --git a/test.sh b/test.sh index bfa987142..b5ef2c704 100755 --- a/test.sh +++ b/test.sh @@ -236,9 +236,9 @@ case $? in 0) # Success update_status --state success ;; - 1) # Python client failed, but Node client didn't, which does - # not constitute failure + 1) # Python client failed update_status --state success --description "Python integration failed." + FAILURE=1 ;; 2) # Node client failed update_status --state failure --description "NodeJS integration failed." diff --git a/test/boulder-config.json b/test/boulder-config.json index f65749927..760316edf 100644 --- a/test/boulder-config.json +++ b/test/boulder-config.json @@ -7,6 +7,7 @@ "amqp": { "server": "amqp://guest:guest@localhost:5672", + "insecure": true, "-uncomment_for_AMQPS-tls": { "cacertfile": "/etc/boulder/rabbitmq-cacert.pem", "certfile": "/etc/boulder/rabbitmq-cert.pem", diff --git a/test/startservers.py b/test/startservers.py index 38d53412f..5a4909127 100644 --- a/test/startservers.py +++ b/test/startservers.py @@ -38,7 +38,7 @@ def run(path, race_detection): install = """GORACE="halt_on_error=1" go install -race""" binary = os.path.basename(path) - cmd = """%s ./%s; exec %s --config %s""" % (install, path, binary, config) + cmd = """%s ./%s && exec %s --config %s""" % (install, path, binary, config) p = subprocess.Popen(cmd, shell=True) p.cmd = cmd print('started %s with pid %d' % (p.cmd, p.pid))