~ubuntu-branches/ubuntu/lucid/curl/lucid-security

« back to all changes in this revision

Viewing changes to docs/FAQ

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-12 15:04:52 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051212150452-2ymlra67b2p7kjyy
Tags: 7.15.1-1ubuntu1
Resynchronise with Debian to get URL parser overflow fix from 7.15.1
(CVE-2005-4077).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Updated: April 13, 2005 (http://curl.haxx.se/docs/faq.html)
 
1
Updated: November 2, 2005 (http://curl.haxx.se/docs/faq.html)
2
2
                                  _   _ ____  _
3
3
                              ___| | | |  _ \| |
4
4
                             / __| | | | |_) | |
16
16
  1.6 What do you get for making curl?
17
17
  1.7 What about CURL from curl.com?
18
18
  1.8 I have a problem who do I mail?
 
19
  1.9 Where do I buy commercial support for curl?
 
20
  1.10 How many are using curl?
19
21
 
20
22
 2. Install Related Problems
21
23
  2.1 configure doesn't find OpenSSL even when it is installed
64
66
  4.10 My HTTP request using HEAD, PUT or DELETE doesn't work!
65
67
  4.11 Why does my HTTP range requests return the full document?
66
68
  4.12 Why do I get "certificate verify failed" ?
 
69
  4.13 Why is curl -R on Windows one hour off?
 
70
  4.14 Redirects work in browser but not with curl!
67
71
 
68
72
 5. libcurl Issues
69
73
  5.1 Is libcurl thread-safe?
86
90
  6.4 I have a program that uses LGPL libraries, can I use libcurl?
87
91
  6.5 Can I modify curl/libcurl for my program and keep the changes secret?
88
92
  6.6 Can you please change the curl/libcurl license to XXXX?
 
93
  6.7 What are my obligations when using libcurl in my commerical apps?
89
94
 
90
95
 7. PHP/CURL Issues
91
96
  7.1 What is PHP/CURL?
132
137
 
133
138
  We pronounce curl and cURL with an initial k sound: [kurl].
134
139
 
135
 
  NOTE: there are numerous sub-projects and related projects that also use the
136
 
  word curl in the project names in various combinations, but you should take
 
140
  There are numerous sub-projects and related projects that also use the word
 
141
  curl in the project names in various combinations, but you should take
137
142
  notice that this FAQ is directed at the command-line tool named curl (and
138
143
  libcurl the library), and may therefore not be valid for other curl-related
139
 
  projects.
 
144
  projects. (There is however a small section for the PHP/CURL in this FAQ.)
140
145
 
141
146
  1.2 What is libcurl?
142
147
 
146
151
  You can use libcurl for free in your application, be it open source,
147
152
  commercial or closed-source.
148
153
 
 
154
  libcurl is most probably the most portable, most powerful and most often
 
155
  used C-based multi-platform file transfer library on this planet - be it
 
156
  open source or commercial.
 
157
 
149
158
  1.3 What is curl not?
150
159
 
151
160
  Curl is *not* a wget clone. That is a common misconception.  Never, during
197
206
 
198
207
  1.5 Who makes curl?
199
208
 
200
 
  curl and libcurl are not made by any single individual. Sure, Daniel
201
 
  Stenberg writes the major parts, but other persons' submissions are
 
209
  curl and libcurl are not made by any single individual. Daniel Stenberg is
 
210
  project leader and main developer, but other persons' submissions are
202
211
  important and crucial. Anyone can contribute and post their changes and
203
212
  improvements and have them inserted in the main sources (of course on the
204
213
  condition that developers agree on that the fixes are good).
205
214
 
206
 
  The list of contributors in the docs/THANKS file is only a small part of all
207
 
  the people that every day provide us with bug reports, suggestions, ideas
208
 
  and source code.
 
215
  The full list of the more than 450 contributors is found in the docs/THANKS
 
216
  file.
209
217
 
210
218
  curl is developed by a community, with Daniel at the wheel.
211
219
 
220
228
  have sponsored certain parts of the development in the past and I hope some
221
229
  will continue to do so in the future.
222
230
 
223
 
  If you want to support our project with a donation or similar, one way of
224
 
  doing that would be to buy "gift certificates" at useful online shopping
225
 
  sites, such as amazon.com or thinkgeek.com. Another way would be to sponsor
226
 
  us through a banner-program or even better: by helping us coding,
227
 
  documenting, testing etc. You're welcome to send us a buck using paypal, as
228
 
  described here: http://curl.haxx.se/donation.html
 
231
  If you want to support our project, consider a donation or a banner-program
 
232
  or even better: by helping us coding, documenting, testing etc.
229
233
 
230
234
  1.7 What about CURL from curl.com?
231
235
 
256
260
  users thanks to the web based archives of the mailing lists), thus saving us
257
261
  from having to repeat ourselves even more. Thanks for respecting this.
258
262
 
 
263
  If you have found or simply suspect a security problem in curl or libcurl,
 
264
  mail curl-security at haxx.se (closed list of receivers, mails are not
 
265
  disclosed) and tell. Then we can produce a fix in a timely manner before the
 
266
  flaw is announced to the world, thus lessen the impact the problem will have
 
267
  on existing users.
 
268
 
 
269
  1.9 Where do I buy commercial support for curl?
 
270
 
 
271
  curl is fully open source. It means you can hire any skilled engineer to fix
 
272
  your curl-related problems.
 
273
 
 
274
  We list available alternatives on the curl web site:
 
275
  http://curl.haxx.se/support.html
 
276
 
 
277
  1.10 How many are using curl?
 
278
 
 
279
  It is impossible to tell.
 
280
 
 
281
  We don't know how many users that knowingly have installed and use curl.
 
282
 
 
283
  We don't know how many users that use curl without knowing that they are in
 
284
  fact using it.
 
285
 
 
286
  We don't know how many users that downloaded or installed curl and then
 
287
  never use it.
 
288
 
 
289
  Some facts to use as input to the math:
 
290
 
 
291
  curl packages have been downloaded from the curl.haxx.se site well over a
 
292
  million times. curl is installed by default with most Linux
 
293
  distributions. curl is installed by default with Mac OS X. curl and libcurl
 
294
  as used by numerous applications that include libcurl binaries in their
 
295
  distribution packages (like Adobe Acrobat Reader and Google Earth).
 
296
 
 
297
  More than 40 known named companies use curl in commercial environments and
 
298
  products. More than 100 known named open source projects depend on
 
299
  (lib)curl.
 
300
 
 
301
  In a poll on the curl web site mid-2005, more than 50% of the 300+ answers
 
302
  estimated a user base of one million users or more.
 
303
 
 
304
  In March 2005, the "Linux Counter project" estimated a total Linux user base
 
305
  of some 29 millions, while Netcraft detected some 4 million "active" Linux
 
306
  based web servers. A guess is that a fair amount of these Linux
 
307
  installations have curl installed.
 
308
 
 
309
  http://curl.haxx.se/docs/companies.html
 
310
  http://curl.haxx.se/docs/programs.html
 
311
  http://curl.haxx.se/libcurl/using/apps.html
 
312
  http://counter.li.org/estimates.php
 
313
  http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
 
314
 
259
315
 
260
316
2. Install Related Problems
261
317
 
396
452
 
397
453
     curl -L http://redirector.com
398
454
 
 
455
  Not all redirects are HTTP ones, see 4.14
 
456
 
399
457
  3.9 How do I use curl in my favorite programming language?
400
458
 
401
459
  There exist many language interfaces/bindings for curl that integrates it
509
567
  - Server certificate. The server you communicate with has a server
510
568
    certificate. You can and should verify this certificate to make sure that
511
569
    you are truly talking to the real server and not a server impersonating
512
 
    it. The server certificate verification process is made by using a
513
 
    Certificate Authority certificate ("CA cert") that was used to sign the
514
 
    server certificate. Server certificate verification is enabled by default
515
 
    in curl and libcurl and is often the reason for problems as explained in
516
 
    FAQ entry 4.12 and the SSLCERTS document
 
570
    it.
 
571
 
 
572
  - Certificate Authority certificate ("CA cert"). You often have several CA
 
573
    certs in a CA cert bundle that can be used to verify a server certificate
 
574
    that was signed by one of the authorities in the bundle. curl comes with a
 
575
    default CA cert bundle. You can override the default.
 
576
 
 
577
    The server certificate verification process is made by using a Certificate
 
578
    Authority certificate ("CA cert") that was used to sign the server
 
579
    certificate. Server certificate verification is enabled by default in curl
 
580
    and libcurl and is often the reason for problems as explained in FAQ entry
 
581
    4.12 and the SSLCERTS document
517
582
    (http://curl.haxx.se/docs/sslcerts.html). Server certificates that are
518
583
    "self-signed" or otherwise signed by a CA that you do not have a CA cert
519
584
    for, cannot be verified. If the verification during a connect fails, you
520
585
    are refused access. You then need to explicitly disable the verification
521
586
    to connect to the server.
522
587
 
523
 
  - Certificate Authority certificate ("CA cert"). You often have several CA
524
 
    certs in a CA cert bundle that can be used to verify a server certificate
525
 
    that was signed by one of the authorities in the bundle. curl comes with a
526
 
    default CA cert bundle. You can override the default.
527
 
 
528
588
  3.17 How do I list the root dir of an FTP server?
529
589
 
530
590
  There are two ways. The way defined in the RFC is to use an encoded slash
541
601
 
542
602
  No.
543
603
 
 
604
  But you could easily write your own program using libcurl to do such stunts.
 
605
 
544
606
 
545
607
4. Running Problems
546
608
 
734
796
  Details are also in the SSLCERTS file in the release archives, found online
735
797
  here: http://curl.haxx.se/docs/sslcerts.html
736
798
 
 
799
  4.13 Why is curl -R on Windows one hour off?
 
800
 
 
801
  During daylight savings time, when -R is used, curl will set a time that
 
802
  appears one hour off. This happens due to a flaw in how Windows stores and
 
803
  uses file modification times and it is not easily worked around. For details
 
804
  on this problem, read this: http://www.codeproject.com/datetime/dstbugs.asp
 
805
 
 
806
  4.14 Redirects work in browser but not with curl!
 
807
 
 
808
  curl supports HTTP redirects fine (see item 3.8). Browsers generally support
 
809
  at least two other ways to perform directs that curl does not:
 
810
 
 
811
  - Meta tags. You can write a HTML tag that will cause the browser to
 
812
    redirect to another given URL after a certain time.
 
813
 
 
814
  - Javascript. You can write a javascript program embeded in a HTML page
 
815
    that redirects the browser to another given URL.
 
816
 
 
817
  There is no way to make curl follow these redirects. You must either
 
818
  manually figure out what the page is set to do, or you write a script that
 
819
  parses the results and fetches the new URL.
 
820
 
737
821
 
738
822
5. libcurl Issues
739
823
 
754
838
  need to provide locking function(s) for libgcrypt (which is used by GnuTLS
755
839
  for the crypto functions).
756
840
 
757
 
    [informative link missing]
 
841
    http://www.gnu.org/software/gnutls/manual/html_node/Multi_002dthreaded-applications.html
758
842
 
759
843
  5.2 How can I receive all data into a large memory chunk?
760
844
 
766
850
 
767
851
  One solution to this problem could be to have a pointer to a struct that you
768
852
  pass to the callback function. You set the pointer using the
769
 
  curl_easy_setopt(CURLOPT_FILE) function. Then that pointer will be passed to
770
 
  the callback instead of a FILE * to a file:
 
853
  CURLOPT_WRITEDATA option. Then that pointer will be passed to the callback
 
854
  instead of a FILE * to a file:
771
855
 
772
856
        /* imaginary struct */
773
857
        struct MemoryStruct {
874
958
 
875
959
  5.9 How does libcurl resolve host names?
876
960
 
877
 
  libcurl includes a number of different name resolve functions:
 
961
  libcurl supports a large a number of different name resolve functions. One
 
962
  of them is picked at build-time and will be used unconditionally. Thus, if
 
963
  you want to change name resolver function you must rebuild libcurl and tell
 
964
  it to use a different function.
878
965
 
879
966
  - The non-ipv6 resolver that can use one out of four host name resolve calls
880
967
    (depending on what your system supports):
887
974
  - The ipv6-resolver that uses getaddrinfo()
888
975
 
889
976
  - The c-ares based name resolver that uses the c-ares library for resolves.
 
977
    Using this offers asynchronous name resolves but it currently has no IPv6
 
978
    support.
890
979
 
891
980
  - The Windows threaded resolver. It use:
892
981
 
899
988
  5.10 How do I prevent libcurl from writing the response to stdout?
900
989
 
901
990
  libcurl provides a default built-in write function that writes received data
902
 
  to stdout. Set a WRITEFUNCTION to receive the data, or possibly set
903
 
  WRITEDATA to a different FILE * handle.
 
991
  to stdout. Set the CURLOPT_WRITEFUNCTION to receive the data, or possibly
 
992
  set CURLOPT_WRITEDATA to a different FILE * handle.
904
993
 
905
994
  5.11 How do I make libcurl not receive the whole HTTP response?
906
995
 
929
1018
  is just a brief summary for the cases we get the most questions. (Parts of
930
1019
  this section was much enhanced by Bjorn Reese.)
931
1020
 
 
1021
  We are not lawyers and this is not legal advice. You should probably consult
 
1022
  one if you want true and accurate legal insights without our prejudice.
 
1023
 
932
1024
  6.1 I have a GPL program, can I use the libcurl library?
933
1025
 
934
1026
  Yes!
973
1065
  libraries that use it. It should be possible for everyone to use libcurl or
974
1066
  curl in their projects, no matter what license they already have in use.
975
1067
 
 
1068
  6.7 What are my obligations when using libcurl in my commerical apps?
 
1069
 
 
1070
  Next to none. All you need to adhere to is the MIT-style license (stated in
 
1071
  the COPYING file) which basically says you have to include the copyright
 
1072
  notice in "all copies" and that you may not use the copyright holder's name
 
1073
  when promoting your software.
 
1074
 
 
1075
  You do not have to release any of your source code.
 
1076
 
 
1077
  You do not have to reveal or make public any changes to the libcurl source
 
1078
  code.
 
1079
 
 
1080
  You do not have to reveal or make public that you are using libcurl within
 
1081
  your app.
 
1082
 
 
1083
  As can be seen here: http://curl.haxx.se/docs/companies.html and
 
1084
  elsewhere, more and more companies are dicovering the power
 
1085
  of libcurl and take advantage of it even in commercial environments.
 
1086
 
 
1087
 
976
1088
7. PHP/CURL Issues
977
1089
 
978
1090
  7.1 What is PHP/CURL?
979
1091
 
980
1092
  The module for PHP that makes it possible for PHP programs to access curl-
981
 
  functions from within PHP. We often call it PHP/CURL to differentiate from
982
 
  curl the command line tool and libcurl the library.
 
1093
  functions from within PHP.
 
1094
 
 
1095
  In the cURL project we call this module PHP/CURL to differentiate it from
 
1096
  curl the command line tool and libcurl the library. The PHP team however
 
1097
  does not refer to it like this (for unknown reasons). They call it plain
 
1098
  CURL (often using all caps) which causes much confusion to users which in
 
1099
  turn gives us a higher question load.
983
1100
 
984
1101
  7.2 Who write PHP/CURL?
985
1102