Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
caddy
Commits
a6ea1e6b
Commit
a6ea1e6b
authored
Oct 27, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
letsencrypt: -ca flag to customize CA server
parent
c487b702
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
caddy/letsencrypt/letsencrypt.go
caddy/letsencrypt/letsencrypt.go
+4
-6
main.go
main.go
+6
-2
No files found.
caddy/letsencrypt/letsencrypt.go
View file @
a6ea1e6b
...
@@ -158,7 +158,7 @@ func newClient(leEmail string) (*acme.Client, error) {
...
@@ -158,7 +158,7 @@ func newClient(leEmail string) (*acme.Client, error) {
}
}
// The client facilitates our communication with the CA server.
// The client facilitates our communication with the CA server.
client
:=
acme
.
NewClient
(
caURL
,
&
leUser
,
rsaKeySizeToUse
,
exposePort
)
client
:=
acme
.
NewClient
(
CAUrl
,
&
leUser
,
rsaKeySizeToUse
,
exposePort
)
// If not registered, the user must register an account with the CA
// If not registered, the user must register an account with the CA
// and agree to terms
// and agree to terms
...
@@ -331,15 +331,13 @@ var (
...
@@ -331,15 +331,13 @@ var (
// Whether user has agreed to the Let's Encrypt SA
// Whether user has agreed to the Let's Encrypt SA
Agreed
bool
Agreed
bool
// The base URL to the CA's ACME endpoint
CAUrl
string
)
)
// Some essential values related to the Let's Encrypt process
// Some essential values related to the Let's Encrypt process
const
(
const
(
// The base URL to the Let's Encrypt CA
// TODO: Staging API URL is: https://acme-staging.api.letsencrypt.org
// TODO: Production endpoint is: https://acme-v01.api.letsencrypt.org
caURL
=
"http://192.168.99.100:4000"
// The port to expose to the CA server for Simple HTTP Challenge
// The port to expose to the CA server for Simple HTTP Challenge
exposePort
=
"5001"
exposePort
=
"5001"
...
...
main.go
View file @
a6ea1e6b
...
@@ -29,16 +29,20 @@ const (
...
@@ -29,16 +29,20 @@ const (
func
init
()
{
func
init
()
{
flag
.
StringVar
(
&
conf
,
"conf"
,
""
,
"Configuration file to use (default="
+
caddy
.
DefaultConfigFile
+
")"
)
flag
.
StringVar
(
&
conf
,
"conf"
,
""
,
"Configuration file to use (default="
+
caddy
.
DefaultConfigFile
+
")"
)
flag
.
BoolVar
(
&
caddy
.
HTTP2
,
"http2"
,
true
,
"
Enable
HTTP/2 support"
)
// TODO: temporary flag until http2 merged into std lib
flag
.
BoolVar
(
&
caddy
.
HTTP2
,
"http2"
,
true
,
"HTTP/2 support"
)
// TODO: temporary flag until http2 merged into std lib
flag
.
BoolVar
(
&
caddy
.
Quiet
,
"quiet"
,
false
,
"Quiet mode (no initialization output)"
)
flag
.
BoolVar
(
&
caddy
.
Quiet
,
"quiet"
,
false
,
"Quiet mode (no initialization output)"
)
flag
.
StringVar
(
&
cpu
,
"cpu"
,
"100%"
,
"CPU cap"
)
flag
.
StringVar
(
&
cpu
,
"cpu"
,
"100%"
,
"CPU cap"
)
flag
.
StringVar
(
&
caddy
.
Root
,
"root"
,
caddy
.
DefaultRoot
,
"Root path to default site"
)
flag
.
StringVar
(
&
caddy
.
Root
,
"root"
,
caddy
.
DefaultRoot
,
"Root path to default site"
)
flag
.
StringVar
(
&
caddy
.
Host
,
"host"
,
caddy
.
DefaultHost
,
"Default host"
)
flag
.
StringVar
(
&
caddy
.
Host
,
"host"
,
caddy
.
DefaultHost
,
"Default host"
)
flag
.
StringVar
(
&
caddy
.
Port
,
"port"
,
caddy
.
DefaultPort
,
"Default port"
)
flag
.
StringVar
(
&
caddy
.
Port
,
"port"
,
caddy
.
DefaultPort
,
"Default port"
)
flag
.
BoolVar
(
&
version
,
"version"
,
false
,
"Show version"
)
flag
.
BoolVar
(
&
version
,
"version"
,
false
,
"Show version"
)
// TODO: Boulder dev URL is: http://192.168.99.100:4000
// TODO: Staging API URL is: https://acme-staging.api.letsencrypt.org
// TODO: Production endpoint is: https://acme-v01.api.letsencrypt.org
flag
.
StringVar
(
&
letsencrypt
.
CAUrl
,
"ca"
,
"https://acme-staging.api.letsencrypt.org"
,
"Certificate authority ACME server"
)
flag
.
BoolVar
(
&
letsencrypt
.
Agreed
,
"agree"
,
false
,
"Agree to Let's Encrypt Subscriber Agreement"
)
flag
.
BoolVar
(
&
letsencrypt
.
Agreed
,
"agree"
,
false
,
"Agree to Let's Encrypt Subscriber Agreement"
)
flag
.
StringVar
(
&
letsencrypt
.
DefaultEmail
,
"email"
,
""
,
"Default email address to use for Let's Encrypt transactions"
)
flag
.
StringVar
(
&
letsencrypt
.
DefaultEmail
,
"email"
,
""
,
"Default email address to use for Let's Encrypt transactions"
)
flag
.
StringVar
(
&
revoke
,
"revoke"
,
""
,
"Hostname for which to revoke
its
certificate"
)
flag
.
StringVar
(
&
revoke
,
"revoke"
,
""
,
"Hostname for which to revoke
the
certificate"
)
}
}
func
main
()
{
func
main
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment