File tree 2 files changed +21
-4
lines changed
2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,7 @@ func main() {
8
8
easy := curl .EasyInit ()
9
9
defer easy .Cleanup ()
10
10
if easy != nil {
11
- easy .Setopt (curl .OPT_URL , "https://mail.google.com/" )
12
- // skip_peer_verification
13
- easy .Setopt (curl .OPT_SSL_VERIFYPEER , false ) // 0 is ok
14
-
11
+ easy .Setopt (curl .OPT_URL , "https://baidu.com/" )
15
12
easy .Perform ()
16
13
}
17
14
}
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ curl "github.com/andelf/go-curl"
5
+ )
6
+
7
+ func main () {
8
+ easy := curl .EasyInit ()
9
+ defer easy .Cleanup ()
10
+ if easy != nil {
11
+ easy .Setopt (curl .OPT_URL , "https://mail.google.com/" )
12
+
13
+ // OPT_SSL_VERIFYPEER determines whether curl verifies the authenticity of the peer's certificate.
14
+ // Do not disable OPT_SSL_VERIFYPEER unless you absolutely sure of the security implications.
15
+ // https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html
16
+ easy .Setopt (curl .OPT_SSL_VERIFYPEER , false ) // 0 also means false
17
+
18
+ easy .Perform ()
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments