Skip to content

Commit

Permalink
scripts/http_server_auth.py: Add command line arguments '--cert', '--…
Browse files Browse the repository at this point in the history
…key' and '--ca_cert' for compatibility with 'curl'
  • Loading branch information
TheSomeMan committed May 5, 2024
1 parent 161bb70 commit 6ad7306
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions scripts/http_server_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,34 @@ def httpd_run(HandlerClass=BaseHTTPRequestHandler,
help="Just accept a connection, don't serve anything",
)
parser.add_argument(
"--ssl_cert",
"--cert",
dest="ssl_cert",
help="Path to server.pem (for HTTPS), if it contains private key, then --ssl_key is not needed",
)
parser.add_argument(
"--ssl_key",
"--ssl_cert", # --cert
dest="ssl_cert",
help="The same as --cert, for compatibility with python -m http.server",
)
parser.add_argument(
"--key",
dest="ssl_key",
help="Path to server_key.pem (for HTTPS)",
)
parser.add_argument(
"--ca_cert",
help="Path to ca_cert.pem (for HTTPS)",
"--ssl_key", # --key
dest="ssl_key",
help="The same as --key, for compatibility with python -m http.server",
)
parser.add_argument(
"--cacert",
dest="ca_cert",
help="Path to ca_cert.pem (certificate authority file) (for HTTPS)",
)
parser.add_argument(
"--ca_cert", # --cacert
dest="ca_cert",
help="The same as --cacert, for compatibility with python -m http.server",
)
parser.add_argument("--username", "-u", metavar="USERNAME")
parser.add_argument("--password", "-p", metavar="PASSWORD")
Expand Down

0 comments on commit 6ad7306

Please sign in to comment.