Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More fixes to gets examples/https.p6 working

  • Loading branch information...
commit bb16c4481c960499f86989c3052039f580bf4a4b 1 parent 47bbc1e
@azawawi authored
Showing with 14 additions and 2 deletions.
  1. +2 −2 examples/https.p6
  2. +12 −0 lib/Net/Curl.pm6
View
4 examples/https.p6
@@ -25,7 +25,7 @@ if $curl {
# If you have a CA cert for the server stored someplace else than in the
# default bundle, then the CURLOPT_CAPATH option might come handy for
# you.
- curl_easy_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
}
if SKIP_HOSTNAME_VERIFICATION {
@@ -33,7 +33,7 @@ if $curl {
# they have mentioned in their server certificate's commonName (or
# subjectAltName) fields, libcurl will refuse to connect. You can skip
# this check, but this will make the connection less secure.
- curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ curl_easy_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
}
# Perform the request, res will get the return code
View
12 lib/Net/Curl.pm6
@@ -12,6 +12,10 @@ constant CURLINFO_STRING = 0x100000;
constant CURLOPT_URL is export = 10002;
constant CURLE_OK is export = 0;
constant CURLINFO_CONTENT_TYPE is export = CURLINFO_STRING + 18;
+constant CURLOPT_SSL_VERIFYPEE is export = 123;
+constant CURL_GLOBAL_DEFAULT is export = 123;
+constant CURLOPT_SSL_VERIFYPEER is export = 123;
+constant CURLOPT_SSL_VERIFYHOST is export = 123;
# Start a libcurl easy session
sub curl_easy_init()
@@ -53,3 +57,11 @@ sub curl_easy_getinfo(OpaquePointer, int, CArray[Str])
is native(LIB)
is export { ... };
+sub curl_global_init(int)
+ returns int
+ is native(LIB)
+ is export { ... };
+
+sub curl_global_cleanup
+ is native(LIB)
+ is export { ... };
Please sign in to comment.
Something went wrong with that request. Please try again.