mirror of
https://git.proxmox.com/git/pve-esxi-import-tools
synced 2025-08-16 11:51:41 +00:00
rename --insecure option to --skip-cert-verification
a bit more telling about what it actually does. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3ba622ecbc
commit
34c87be1ff
@ -72,7 +72,7 @@ def get_all_datacenters(service_instance: vim.ServiceInstance) -> List[vim.Datac
|
||||
return datacenters
|
||||
|
||||
def main():
|
||||
if sys.argv[1] == '--insecure':
|
||||
if sys.argv[1] == '--skip-cert-verification':
|
||||
del sys.argv[1]
|
||||
ssl_context = ssl._create_unverified_context()
|
||||
else:
|
||||
|
10
src/main.rs
10
src/main.rs
@ -56,7 +56,7 @@ fn usage<W: std::io::Write>(arg0: &OsStr, mut out: W, exit: i32) -> ! {
|
||||
--change-user=UID change to the provided user after mounting\n \
|
||||
--change-group=UID change to the provided group after mounting\n \
|
||||
--ready-fd=FDNUM close file descriptor FDNUM when ready\n \
|
||||
--insecure disable certificate verification\n\
|
||||
--skip-cert-verification disable certificate verification\n\
|
||||
"
|
||||
);
|
||||
|
||||
@ -72,7 +72,7 @@ struct Args {
|
||||
change_user: Option<String>,
|
||||
change_group: Option<String>,
|
||||
ready_fd: Option<RawFd>,
|
||||
insecure: bool,
|
||||
skip_cert_verification: bool,
|
||||
|
||||
// positional:
|
||||
host: String,
|
||||
@ -164,8 +164,8 @@ fn parse_args() -> Result<Args, Error> {
|
||||
args.ready_fd = Some(value);
|
||||
}
|
||||
|
||||
while argparse.contains("--insecure") {
|
||||
args.insecure = true;
|
||||
while argparse.contains("--skip-cert-verification") {
|
||||
args.skip_cert_verification = true;
|
||||
}
|
||||
|
||||
while argparse.contains("--debug") {
|
||||
@ -250,7 +250,7 @@ async fn main() -> Result<(), Error> {
|
||||
}
|
||||
|
||||
let mut connector = SslConnector::builder(SslMethod::tls()).unwrap();
|
||||
if args.insecure {
|
||||
if args.skip_cert_verification {
|
||||
connector.set_verify(openssl::ssl::SslVerifyMode::NONE);
|
||||
}
|
||||
let connector = connector.build();
|
||||
|
Loading…
Reference in New Issue
Block a user