forked from remind101/empire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathssl.go
73 lines (67 loc) · 1.81 KB
/
ssl.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package main
import "errors"
func sslRemoved(cmd *Command, args []string) {
must(errors.New("the ssl commands have been replaced with `cert-attach`"))
}
var cmdSSL = &Command{
Run: sslRemoved,
Hidden: true,
Usage: "ssl",
NeedsApp: true,
Category: "ssl",
Short: "show ssl endpoint info",
Long: `Show SSL endpoint and certificate information.`,
}
var cmdSSLCertAdd = &Command{
Run: sslRemoved,
Hidden: true,
Usage: "ssl-cert-add [-s] <certfile> <keyfile>",
NeedsApp: true,
Category: "ssl",
Short: "add a new ssl cert",
Long: `
Add a new SSL certificate to an app. An SSL endpoint will be
created if the app doesn't yet have one. Otherwise, its cert will
be updated.
Options:
-s skip SSL cert optimization and pre-processing
Examples:
$ emp ssl-cert-add cert.pem key.pem
hobby-dev $0/mo
`,
}
var cmdSSLDestroy = &Command{
Run: sslRemoved,
Hidden: true,
Usage: "ssl-destroy",
NeedsApp: true,
Category: "ssl",
Short: "destroy ssl endpoint",
Long: `
Removes the SSL endpoints from an app along with all SSL
certificates. If your app's DNS is still configured to point at
the SSL endpoint, this may take your app offline. The command
will prompt for confirmation, or accept confirmation via stdin.
Examples:
$ emp ssl-destroy
warning: This will destroy the SSL endpoint on myapp. Please type "myapp" to continue:
> myapp
Destroyed SSL endpoint on myapp.
$ echo myapp | emp ssl-destroy
Destroyed SSL endpoint on myapp.
`,
}
var cmdSSLCertRollback = &Command{
Run: sslRemoved,
Hidden: true,
Usage: "ssl-cert-rollback",
NeedsApp: true,
Category: "ssl",
Short: "add a new ssl cert",
Long: `
Rolls back an SSL endpoint's certificate to the previous version.
Examples:
$ emp ssl-cert-rollback
Rolled back cert for myapp.
`,
}