Skip to content

Commit

Permalink
fix: pass address of ca blob to setopt (#19)
Browse files Browse the repository at this point in the history
As per https://curl.se/libcurl/c/CURLOPT_CAINFO_BLOB.html

For some reason this was working completely fine when I ran on macOS,
but then I tried running the same thing on linux and would always get
return code 43 (bad arg).
  • Loading branch information
shnupta authored Oct 25, 2024
1 parent 7fc8136 commit 3a590c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Easy.zig
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ pub fn setCommonOpts(self: Self) !void {
.len = bundle.items.len,
.flags = c.CURL_BLOB_NOCOPY,
};
try checkCode(c.curl_easy_setopt(self.handle, c.CURLOPT_CAINFO_BLOB, blob));
try checkCode(c.curl_easy_setopt(self.handle, c.CURLOPT_CAINFO_BLOB, &blob));
}
try checkCode(c.curl_easy_setopt(self.handle, c.CURLOPT_TIMEOUT_MS, self.timeout_ms));
try checkCode(c.curl_easy_setopt(self.handle, c.CURLOPT_USERAGENT, self.user_agent.ptr));
Expand Down

0 comments on commit 3a590c7

Please sign in to comment.