Skip to content

Commit 9559972

Browse files
author
Grok Compression
committed
Consolidate SSL bypass to single env var GRK_CURL_ALLOW_INSECURE
Remove GRK_HTTP_UNSAFESSL; use GRK_CURL_ALLOW_INSECURE everywhere. Update launch.json, S3.md docs, S3Fetcher and CurlFetcher.
1 parent f32f588 commit 9559972

4 files changed

Lines changed: 7 additions & 11 deletions

File tree

.vscode/launch.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
{ "name": "AWS_SECRET_ACCESS_KEY", "value": "minioadmin" },
103103
{ "name": "AWS_S3_ENDPOINT", "value": "https://minio.example.com:9000" },
104104
{ "name": "AWS_VIRTUAL_HOSTING", "value": "FALSE" },
105-
{ "name": "GRK_HTTP_UNSAFESSL", "value": "YES" }
105+
{ "name": "GRK_CURL_ALLOW_INSECURE", "value": "YES" }
106106
],
107107
"MIMode": "gdb",
108108
"miDebuggerPath": "/usr/bin/gdb"
@@ -130,7 +130,7 @@
130130
{ "name": "AWS_SECRET_ACCESS_KEY", "value": "minioadmin" },
131131
{ "name": "AWS_S3_ENDPOINT", "value": "https://minio.example.com:9000" },
132132
{ "name": "AWS_VIRTUAL_HOSTING", "value": "FALSE" },
133-
{ "name": "GRK_HTTP_UNSAFESSL", "value": "YES" }
133+
{ "name": "GRK_CURL_ALLOW_INSECURE", "value": "YES" }
134134
],
135135
"MIMode": "gdb",
136136
"miDebuggerPath": "/usr/bin/gdb"
@@ -528,7 +528,7 @@
528528
{ "name": "AWS_SECRET_ACCESS_KEY", "value": "minioadmin" },
529529
{ "name": "AWS_S3_ENDPOINT", "value": "https://minio.example.com:9000" },
530530
{ "name": "AWS_VIRTUAL_HOSTING", "value": "FALSE" },
531-
{ "name": "GRK_HTTP_UNSAFESSL", "value": "YES" }
531+
{ "name": "GRK_CURL_ALLOW_INSECURE", "value": "YES" }
532532
],
533533
"MIMode": "gdb",
534534
"miDebuggerPath": "/usr/bin/gdb"
@@ -610,7 +610,7 @@
610610
{ "name": "AWS_SECRET_ACCESS_KEY", "value": "minioadmin" },
611611
{ "name": "AWS_S3_ENDPOINT", "value": "https://minio.example.com:9000" },
612612
{ "name": "AWS_VIRTUAL_HOSTING", "value": "FALSE" },
613-
{ "name": "GRK_HTTP_UNSAFESSL", "value": "YES" }
613+
{ "name": "GRK_CURL_ALLOW_INSECURE", "value": "YES" }
614614
],
615615
"MIMode": "gdb",
616616
"miDebuggerPath": "/usr/bin/gdb"
@@ -809,7 +809,7 @@
809809
{ "name": "AWS_SECRET_ACCESS_KEY", "value": "minioadmin" },
810810
{ "name": "AWS_S3_ENDPOINT", "value": "https://minio.example.com:9000" },
811811
{ "name": "AWS_VIRTUAL_HOSTING", "value": "TRUE" },
812-
{ "name": "GRK_HTTP_UNSAFESSL", "value": "TRUE" },
812+
{ "name": "GRK_CURL_ALLOW_INSECURE", "value": "TRUE" },
813813
],
814814
"cwd": "${workspaceFolder}",
815815
"MIMode": "gdb",
@@ -862,7 +862,7 @@
862862
{ "name": "AWS_SECRET_ACCESS_KEY", "value": "minioadmin" },
863863
{ "name": "AWS_S3_ENDPOINT", "value": "https://minio.example.com:9000" },
864864
{ "name": "AWS_VIRTUAL_HOSTING", "value": "FALSE" },
865-
{ "name": "GRK_HTTP_UNSAFESSL", "value": "TRUE" },
865+
{ "name": "GRK_CURL_ALLOW_INSECURE", "value": "TRUE" },
866866
],
867867
"cwd": "${workspaceFolder}",
868868
"MIMode": "gdb",

doc/S3.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ These variables are handled in the `auth()` method and apply to all S3 requests.
207207
| Variable | Default | Description |
208208
|----------|---------|-------------|
209209
| `GRK_CURL_ALLOW_INSECURE` | `NO` | Disable SSL certificate verification |
210-
| `GRK_HTTP_UNSAFESSL` | `NO` | Disable SSL verification (inherited from CurlFetcher) |
211210

212211
### Timeouts
213212

src/lib/core/stream/fetchers/CurlFetcher.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,7 @@ class CurlFetcher : public IFetcher
561561

562562
virtual void auth(CURL* curl)
563563
{
564-
if(EnvVarManager::test_bool("GRK_HTTP_UNSAFESSL") ||
565-
EnvVarManager::test_bool("GRK_CURL_ALLOW_INSECURE") ||
566-
auth_.s3_allow_insecure_)
564+
if(EnvVarManager::test_bool("GRK_CURL_ALLOW_INSECURE") || auth_.s3_allow_insecure_)
567565
{
568566
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
569567
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);

src/lib/core/stream/fetchers/S3Fetcher.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ namespace grk
151151
* ║ HTTP / CURL CONFIGURATION ║
152152
* ╠═══════════════════════════════════════════════════════════════════════════╣
153153
* ║ GRK_CURL_ALLOW_INSECURE YES / NO — disable SSL verification ║
154-
* ║ GRK_HTTP_UNSAFESSL YES / NO — same (from CurlFetcher) ║
155154
* ║ GRK_CURL_TIMEOUT Request timeout in seconds ║
156155
* ║ GRK_CURL_CACHE_SIZE Curl receive buffer size in bytes ║
157156
* ║ GRK_CURL_NON_CACHED Disable connection reuse for prefix ║

0 commit comments

Comments
 (0)