Skip to content

Commit 062a64c

Browse files
committed
Add config to skip tls verification
1 parent 1f7a9e6 commit 062a64c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

runprompt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import glob
2828
import base64
2929
import mimetypes
3030
import socket
31+
import ssl
3132

3233
# Try to use PyYAML if available, otherwise use minimal parser
3334
try:
@@ -49,6 +50,7 @@ CONFIG_KEYS = {
4950
"openai_base_url", "openai_api_base", "cache", "cache_dir",
5051
"safe_yes", "verbose", "anthropic_api_key", "openai_api_key",
5152
"google_api_key", "openrouter_api_key", "chat", "chat_history", "history_file", "timeout",
53+
"insecure",
5254
}
5355

5456
PROVIDERS = {
@@ -176,6 +178,8 @@ def init_config(args):
176178
for key, value in args.overrides.items():
177179
args_dict[normalize_key(key)] = value
178180
CONFIG["args"] = args_dict
181+
if get_conf("insecure"):
182+
ssl._create_default_https_context = ssl._create_unverified_context
179183

180184

181185
def get_timeout():
@@ -623,6 +627,8 @@ def parse_args(args):
623627
help="Interactive chat mode: prompt for input after each response")
624628
parser.add_argument("--timeout", type=float, metavar="SECONDS",
625629
help="LLM request timeout in seconds")
630+
parser.add_argument("--insecure", action="store_true",
631+
help="Disable TLS certificate verification")
626632
parser.add_argument("--read", "--file", action="append", default=[],
627633
metavar="FILE",
628634
help="Read file(s) into context (supports globs)")

0 commit comments

Comments
 (0)