Make tests pass
This commit is contained in:
parent
ef8f57863d
commit
24fcc3a760
|
@ -38,18 +38,18 @@ func main() {
|
|||
go cmd.ProfileCmd("VA", stats)
|
||||
|
||||
pc := &va.PortConfig{
|
||||
SimpleHTTPPort: 80,
|
||||
SimpleHTTPSPort: 443,
|
||||
DVSNIPort: 443,
|
||||
HTTPPort: 80,
|
||||
HTTPSPort: 443,
|
||||
TLSPort: 443,
|
||||
}
|
||||
if c.VA.PortConfig.SimpleHTTPPort != 0 {
|
||||
pc.SimpleHTTPPort = c.VA.PortConfig.SimpleHTTPPort
|
||||
if c.VA.PortConfig.HTTPPort != 0 {
|
||||
pc.HTTPPort = c.VA.PortConfig.HTTPPort
|
||||
}
|
||||
if c.VA.PortConfig.SimpleHTTPSPort != 0 {
|
||||
pc.SimpleHTTPSPort = c.VA.PortConfig.SimpleHTTPSPort
|
||||
if c.VA.PortConfig.HTTPSPort != 0 {
|
||||
pc.HTTPSPort = c.VA.PortConfig.HTTPSPort
|
||||
}
|
||||
if c.VA.PortConfig.DVSNIPort != 0 {
|
||||
pc.DVSNIPort = c.VA.PortConfig.DVSNIPort
|
||||
if c.VA.PortConfig.TLSPort != 0 {
|
||||
pc.TLSPort = c.VA.PortConfig.TLSPort
|
||||
}
|
||||
vai := va.NewValidationAuthorityImpl(pc, stats, clock.Default())
|
||||
dnsTimeout, err := time.ParseDuration(c.Common.DNSTimeout)
|
||||
|
|
|
@ -42,6 +42,7 @@ import (
|
|||
"github.com/letsencrypt/boulder/core"
|
||||
blog "github.com/letsencrypt/boulder/log"
|
||||
"github.com/letsencrypt/boulder/publisher"
|
||||
"github.com/letsencrypt/boulder/va"
|
||||
)
|
||||
|
||||
// Config stores configuration parameters that applications
|
||||
|
@ -106,11 +107,7 @@ type Config struct {
|
|||
VA struct {
|
||||
UserAgent string
|
||||
|
||||
PortConfig struct {
|
||||
SimpleHTTPPort int
|
||||
SimpleHTTPSPort int
|
||||
DVSNIPort int
|
||||
}
|
||||
PortConfig va.PortConfig
|
||||
// DebugAddr is the address to run the /debug handlers on.
|
||||
DebugAddr string
|
||||
}
|
||||
|
|
|
@ -130,9 +130,9 @@
|
|||
"userAgent": "boulder",
|
||||
"debugAddr": "localhost:8004",
|
||||
"portConfig": {
|
||||
"simpleHTTPPort": 5001,
|
||||
"simpleHTTPSPort": 5001,
|
||||
"dvsniPort": 5001
|
||||
"httpPort": 5001,
|
||||
"httpsPort": 5001,
|
||||
"tlsPort": 5001
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ var cryptoUtil = require("./crypto-util");
|
|||
var child_process = require('child_process');
|
||||
var fs = require('fs');
|
||||
var http = require('http');
|
||||
var https = require('https');
|
||||
var inquirer = require("inquirer");
|
||||
var request = require('request');
|
||||
var url = require('url');
|
||||
|
@ -348,7 +347,7 @@ function getReadyToValidate(err, resp, body) {
|
|||
|
||||
var authz = JSON.parse(body);
|
||||
|
||||
var httpChallenges = authz.challenges.filter(function(x) { return x.type == "simpleHttp"; });
|
||||
var httpChallenges = authz.challenges.filter(function(x) { return x.type == "http-00"; });
|
||||
if (httpChallenges.length == 0) {
|
||||
console.log("The server didn't offer any challenges we can handle.");
|
||||
process.exit(1);
|
||||
|
@ -377,13 +376,12 @@ function getReadyToValidate(err, resp, body) {
|
|||
response.end("");
|
||||
}
|
||||
}
|
||||
state.httpServer = https.createServer({
|
||||
cert: fs.readFileSync("temp-cert.pem"),
|
||||
key: fs.readFileSync(state.keyFile)
|
||||
}, httpResponder)
|
||||
state.httpServer = http.createServer(httpResponder)
|
||||
if (/localhost/.test(state.newRegistrationURL)) {
|
||||
console.log("listening on port 5001");
|
||||
state.httpServer.listen(5001)
|
||||
} else {
|
||||
console.log("listening on port 443");
|
||||
state.httpServer.listen(443)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue