Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
haoqu.ma
/
gotty
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5eb5959c
authored
Sep 30, 2015
by
Andrea Lusuardi - uovobw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tls client certificate authentication flags
1 parent
5de1ece3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
main.go
main.go
View file @
5eb5959
...
@@ -28,6 +28,9 @@ func main() {
...
@@ -28,6 +28,9 @@ func main() {
flag
{
"tls"
,
"t"
,
"Enable TLS/SSL"
},
flag
{
"tls"
,
"t"
,
"Enable TLS/SSL"
},
flag
{
"tls-crt"
,
""
,
"TLS/SSL crt file path"
},
flag
{
"tls-crt"
,
""
,
"TLS/SSL crt file path"
},
flag
{
"tls-key"
,
""
,
"TLS/SSL key file path"
},
flag
{
"tls-key"
,
""
,
"TLS/SSL key file path"
},
flag
{
"client"
,
"C"
,
"Enable Client Certificate"
},
flag
{
"client-ca-file"
,
""
,
"Client CA certificate file"
},
flag
{
"client-verify"
,
""
,
"Enable verification of client certificate"
},
flag
{
"index"
,
""
,
"Custom index.html file"
},
flag
{
"index"
,
""
,
"Custom index.html file"
},
flag
{
"title-format"
,
""
,
"Title format of browser window"
},
flag
{
"title-format"
,
""
,
"Title format of browser window"
},
flag
{
"reconnect"
,
""
,
"Enable reconnection"
},
flag
{
"reconnect"
,
""
,
"Enable reconnection"
},
...
@@ -36,12 +39,15 @@ func main() {
...
@@ -36,12 +39,15 @@ func main() {
}
}
mappingHint
:=
map
[
string
]
string
{
mappingHint
:=
map
[
string
]
string
{
"index"
:
"IndexFile"
,
"index"
:
"IndexFile"
,
"tls"
:
"EnableTLS"
,
"tls"
:
"EnableTLS"
,
"tls-crt"
:
"TLSCrtFile"
,
"tls-crt"
:
"TLSCrtFile"
,
"tls-key"
:
"TLSKeyFile"
,
"tls-key"
:
"TLSKeyFile"
,
"random-url"
:
"EnableRandomUrl"
,
"client"
:
"EnableClientCertificate"
,
"reconnect"
:
"EnableReconnect"
,
"client-ca-file"
:
"ClientCAFile"
,
"client-verify"
:
"EnableClientCertificateVerification"
,
"random-url"
:
"EnableRandomUrl"
,
"reconnect"
:
"EnableReconnect"
,
}
}
cliFlags
,
err
:=
generateFlags
(
flags
,
mappingHint
)
cliFlags
,
err
:=
generateFlags
(
flags
,
mappingHint
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment