Skip to content

Commit

Permalink
insecure fix (It was working backwards) (#26)
Browse files Browse the repository at this point in the history
I modified setInsecure because it was working backwards.
When setInsecure is true the c_long param must be 0L

Co-authored-by: Javier Orfo <javierorfo@prontonmail.com>
  • Loading branch information
javiorfo and Javier Orfo authored Jan 28, 2025
1 parent 3e79611 commit 273793d
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 @@ -395,7 +395,7 @@ pub fn setIpResolve(self: Self, ipr: IpResolve) !void {
}

pub fn setInsecure(self: Self, enable: bool) !void {
const param: c_long = @intCast(@intFromBool(enable));
const param: c_long = @intCast(@intFromBool(!enable));
try checkCode(c.curl_easy_setopt(self.handle, c.CURLOPT_SSL_VERIFYPEER, param));
try checkCode(c.curl_easy_setopt(self.handle, c.CURLOPT_SSL_VERIFYHOST, param));
}
Expand Down

0 comments on commit 273793d

Please sign in to comment.