Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More fixes to gets examples/https.p6 working

  • Loading branch information...
commit bb16c4481c960499f86989c3052039f580bf4a4b 1 parent 47bbc1e
Ahmad M. Zawawi authored November 17, 2012
4  examples/https.p6
@@ -25,7 +25,7 @@ if $curl {
25 25
 # If you have a CA cert for the server stored someplace else than in the
26 26
 # default bundle, then the CURLOPT_CAPATH option might come handy for
27 27
 # you.
28  
-	  	curl_easy_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0L);
  28
+	  	curl_easy_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
29 29
 	}
30 30
 
31 31
 	if SKIP_HOSTNAME_VERIFICATION {
@@ -33,7 +33,7 @@ if $curl {
33 33
 # they have mentioned in their server certificate's commonName (or
34 34
 # subjectAltName) fields, libcurl will refuse to connect. You can skip
35 35
 # this check, but this will make the connection less secure.
36  
-	    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
  36
+	    curl_easy_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
37 37
 	}
38 38
 
39 39
     # Perform the request, res will get the return code
12  lib/Net/Curl.pm6
@@ -12,6 +12,10 @@ constant CURLINFO_STRING                  = 0x100000;
12 12
 constant CURLOPT_URL is export            = 10002;
13 13
 constant CURLE_OK    is export            = 0;
14 14
 constant CURLINFO_CONTENT_TYPE is export  = CURLINFO_STRING + 18;
  15
+constant CURLOPT_SSL_VERIFYPEE is export  = 123;
  16
+constant CURL_GLOBAL_DEFAULT is export    = 123;
  17
+constant CURLOPT_SSL_VERIFYPEER is export = 123;
  18
+constant CURLOPT_SSL_VERIFYHOST is export = 123;
15 19
 
16 20
 # Start a libcurl easy session 
17 21
 sub curl_easy_init() 
@@ -53,3 +57,11 @@ sub curl_easy_getinfo(OpaquePointer, int, CArray[Str])
53 57
 	is native(LIB)
54 58
 	is export { ... };
55 59
 
  60
+sub curl_global_init(int)
  61
+	returns int
  62
+	is native(LIB)
  63
+	is export { ... };
  64
+
  65
+sub curl_global_cleanup
  66
+	is native(LIB)
  67
+	is export { ... };

0 notes on commit bb16c44

Please sign in to comment.
Something went wrong with that request. Please try again.