Merge master

This commit is contained in:
Roland Shoemaker 2015-08-10 11:58:02 -07:00
commit 6315068ead
5 changed files with 21 additions and 15 deletions

View File

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

View File

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

View File

@ -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."

View File

@ -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",

View File

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