-
-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
458 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ _cgo_export.* | |
|
||
_testmain.go | ||
|
||
*.swp | ||
*.exe | ||
*.test | ||
*.prof | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2014 ISRG. All rights reserved | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/letsencrypt/boulder/ca" | ||
"github.com/letsencrypt/boulder/cmd" | ||
"github.com/letsencrypt/boulder/rpc" | ||
) | ||
|
||
func main() { | ||
app := cmd.NewAppShell("boulder-ca") | ||
app.Action = func(c cmd.Config) { | ||
ch := cmd.AmqpChannel(c.AMQP.Server) | ||
|
||
sac, err := rpc.NewStorageAuthorityClient(c.AMQP.SA.Client, c.AMQP.SA.Client, ch) | ||
cmd.FailOnError(err, "Failed to create SA client") | ||
|
||
cai, err := ca.NewCertificateAuthorityImpl(c.CA.Server, c.CA.AuthKey, c.CA.Profile) | ||
cmd.FailOnError(err, "Failed to create CA impl") | ||
|
||
cai.SA = &sac | ||
|
||
cas, err := rpc.NewCertificateAuthorityServer(c.AMQP.CA.Server, ch, cai) | ||
cmd.FailOnError(err, "Unable to create CA server") | ||
|
||
cmd.RunForever(cas) | ||
} | ||
|
||
app.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2014 ISRG. All rights reserved | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/letsencrypt/boulder/cmd" | ||
"github.com/letsencrypt/boulder/ra" | ||
"github.com/letsencrypt/boulder/rpc" | ||
) | ||
|
||
func main() { | ||
app := cmd.NewAppShell("boulder-sa") | ||
app.Action = func(c cmd.Config) { | ||
ch := cmd.AmqpChannel(c.AMQP.Server) | ||
|
||
vac, err := rpc.NewValidationAuthorityClient(c.AMQP.VA.Client, c.AMQP.VA.Server, ch) | ||
cmd.FailOnError(err, "Unable to create VA client") | ||
|
||
cac, err := rpc.NewCertificateAuthorityClient(c.AMQP.CA.Client, c.AMQP.CA.Server, ch) | ||
cmd.FailOnError(err, "Unable to create CA client") | ||
|
||
sac, err := rpc.NewStorageAuthorityClient(c.AMQP.SA.Client, c.AMQP.SA.Server, ch) | ||
cmd.FailOnError(err, "Unable to create SA client") | ||
|
||
rai := ra.NewRegistrationAuthorityImpl() | ||
rai.VA = &vac | ||
rai.CA = &cac | ||
rai.SA = &sac | ||
|
||
ras, err := rpc.NewRegistrationAuthorityServer(c.AMQP.RA.Server, ch, &rai) | ||
cmd.FailOnError(err, "Unable to create RA server") | ||
cmd.RunForever(ras) | ||
} | ||
|
||
app.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2014 ISRG. All rights reserved | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
package main | ||
|
||
import ( | ||
// Load both drivers to allow configuring either | ||
_ "github.com/go-sql-driver/mysql" | ||
_ "github.com/mattn/go-sqlite3" | ||
|
||
"github.com/letsencrypt/boulder/cmd" | ||
"github.com/letsencrypt/boulder/rpc" | ||
"github.com/letsencrypt/boulder/sa" | ||
) | ||
|
||
func main() { | ||
app := cmd.NewAppShell("boulder-sa") | ||
app.Action = func(c cmd.Config) { | ||
ch := cmd.AmqpChannel(c.AMQP.Server) | ||
|
||
sai, err := sa.NewSQLStorageAuthority(c.SA.DBDriver, c.SA.DBName) | ||
cmd.FailOnError(err, "Failed to create SA impl") | ||
|
||
sas := rpc.NewStorageAuthorityServer(c.AMQP.SA.Server, ch, sai) | ||
cmd.RunForever(sas) | ||
} | ||
|
||
app.Run() | ||
} |
Oops, something went wrong.