Check-in [d169bced5f]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:update curl to version 7.60.0
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d169bced5f3a0855eb9857050734473006d4b5c8
User & Date: chw 2018-05-22 22:23:05.478
Context
2018-05-23
08:33
elimate more compiler warnings check-in: 5a5b494d15 user: chw tags: trunk
2018-05-22
22:23
update curl to version 7.60.0 check-in: d169bced5f user: chw tags: trunk
05:06
eliminate some compiler warnings check-in: 80242bdd6b user: chw tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to jni/curl/CHANGES.
1
2
3
4
5
6
7
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































8
9
10
11
12
13
14
                                  _   _ ____  _
                              ___| | | |  _ \| |
                             / __| | | | |_) | |
                            | (__| |_| |  _ <| |___
                             \___|\___/|_| \_\_____|

                                  Changelog

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Version 7.59.0 (13 Mar 2018)

Daniel Stenberg (13 Mar 2018)
- release: 7.59.0

Kamil Dudka (13 Mar 2018)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
                                  _   _ ____  _
                              ___| | | |  _ \| |
                             / __| | | | |_) | |
                            | (__| |_| |  _ <| |___
                             \___|\___/|_| \_\_____|

                                  Changelog

Version 7.60.0 (15 May 2018)

Daniel Stenberg (15 May 2018)
- RELEASE-NOTES: 7.60.0 release

- THANKS: added people from the curl 7.60.0 release

- docs/libcurl/index.html: removed
  
  The HTML files are long gone from the dist, now remove the last HTML
  file pointing to those missing files.
  
  d

- [steini2000 brought this change]

  http2: remove unused variable
  
  Closes #2570

- [steini2000 brought this change]

  http2: use easy handle of stream for logging

- gcc: disable picky gcc-8 function pointer warnings in two places
  
  Reported-by: Rikard Falkeborn
  Bug: #2560
  Closes #2569

- http2: use the correct function pointer typedef
  
  Fixes gcc-8 picky compiler warnings
  Reported-by: Rikard Falkeborn
  Bug: #2560
  Closes #2568

- CODE_STYLE: mention return w/o parens, but sizeof with
  
  ... and remove the github markdown syntax so that it renders better on
  the web site. Also, don't use back-ticks inlined to allow the CSS to
  highlight source code better.

- [Rikard Falkeborn brought this change]

  examples: Fix format specifiers
  
  Closes #2561

- [Rikard Falkeborn brought this change]

  tool: Fix format specifiers

- [Rikard Falkeborn brought this change]

  ntlm: Fix format specifiers

- [Rikard Falkeborn brought this change]

  tests: Fix format specifiers

- [Rikard Falkeborn brought this change]

  lib: Fix format specifiers

- contributors.sh: use "on github", not at

- http2: getsock fix for uploads
  
  When there's an upload in progress, make sure to wait for the socket to
  become writable.
  
  Detected-by: steini2000 on github
  Bug: #2520
  Closes #2567

- pingpong: fix response cache memcpy overflow
  
  Response data for a handle with a large buffer might be cached and then
  used with the "closure" handle when it has a smaller buffer and then the
  larger cache will be copied and overflow the new smaller heap based
  buffer.
  
  Reported-by: Dario Weisser
  CVE: CVE-2018-1000300
  Bug: https://curl.haxx.se/docs/adv_2018-82c2.html

- http: restore buffer pointer when bad response-line is parsed
  
  ... leaving the k->str could lead to buffer over-reads later on.
  
  CVE: CVE-2018-1000301
  Assisted-by: Max Dymond
  
  Detected by OSS-Fuzz.
  Bug: https://curl.haxx.se/docs/adv_2018-b138.html
  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7105

Patrick Monnerat (13 May 2018)
- cookies: do not take cookie name as a parameter
  
  RFC 6265 section 4.2.1 does not set restrictions on cookie names.
  This is a follow-up to commit 7f7fcd0.
  Also explicitly check proper syntax of cookie name/value pair.
  
  New test 1155 checks that cookie names are not reserved words.
  
  Reported-By: anshnd at github
  Fixes #2564
  Closes #2566

Daniel Stenberg (12 May 2018)
- smb: reject negative file sizes
  
  Assisted-by: Max Dymond
  
  Detected by OSS-Fuzz
  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8245

- setup_transfer: deal with both sockets being -1
  
  Detected by Coverity; CID 1435559.  Follow-up to f8d608f38d00. It would
  index the array with -1 if neither index was a socket.

- travis: add build using NSS
  
  Closes #2558

- [Sunny Purushe brought this change]

  openssl: change FILE ops to BIO ops
  
  To make builds with VS2015 work. Recent changes in VS2015 _IOB_ENTRIES
  handling is causing problems. This fix changes the OpenSSL backend code
  to use BIO functions instead of FILE I/O functions to circumvent those
  problems.
  
  Closes #2512

- travis: add a build using WolfSSL
  
  Assisted-by: Dan Fandrich
  
  Closes #2528

- RELEASE-NOTES: typo

- RELEASE-NOTES: synced

- [Daniel Gustafsson brought this change]

  URLs: fix one more http url
  
  This file wasn't included in commit 4af40b3646d3b09 which updated all
  haxx.se http urls to https. The file was committed prior to that update,
  but may have been merged after it and hence didn't get updated.
  
  Closes #2550

- github/lock: auto-lock closed issues after 90 days of inactivity

- vtls: fix missing commas
  
  follow-up to e66cca046cef

- vtls: use unified "supports" bitfield member in backends
  
  ... instead of previous separate struct fields, to make it easier to
  extend and change individual backends without having to modify them all.
  
  closes #2547

- transfer: don't unset writesockfd on setup of multiplexed conns
  
  Curl_setup_transfer() can be called to setup a new individual transfer
  over a multiplexed connection so it shouldn't unset writesockfd.
  
  Bug: #2520
  Closes #2549

- [Frank Gevaerts brought this change]

  configure: put CURLDEBUG and DEBUGBUILD in lib/curl_config.h
  
  They are removed from the compiler flags.
  
  This ensures that make dependency tracking will force a rebuild whenever
  configure --enable-debug or --enable-curldebug changes.
  
  Closes #2548

- http: don't set the "rewind" flag when not uploading anything
  
  It triggers an assert.
  
  Detected by OSS-Fuzz
  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8144
  Closes #2546

- travis: add an mbedtls build
  
  Closes #2531

- configure: only check for CA bundle for file-using SSL backends
  
  When only building with SSL backends that don't use the CA bundle file
  (by default), skip the check.
  
  Fixes #2543
  Fixes #2180
  Closes #2545

- ssh-libssh.c: fix left shift compiler warning
  
  ssh-libssh.c:2429:21: warning: result of '1 << 31' requires 33 bits to
  represent, but 'int' only has 32 bits [-Wshift-overflow=]
  
  'len' will never be that big anyway so I converted the run-time check to
  a regular assert.

- [Stephan Mühlstrasser brought this change]

  URL: fix ASCII dependency in strcpy_url and strlen_url
  
  Commit 3c630f9b0af097663a64e5c875c580aa9808a92b partially reverted the
  changes from commit dd7521bcc1b7a6fcb53c31f9bd1192fcc884bd56 because of
  the problem that strcpy_url() was modified unilaterally without also
  modifying strlen_url(). As a consequence strcpy_url() was again
  depending on ASCII encoding.
  
  This change fixes strlen_url() and strcpy_url() in parallel to use a
  common host-encoding independent criterion for deciding whether an URL
  character must be %-escaped.
  
  Closes #2535

- [Denis Ollier brought this change]

  docs: remove extraneous commas in man pages
  
  Closes #2544

- RELEASE-NOTES: synced

- Revert "TODO: remove configure --disable-pthreads"
  
  This reverts commit d5d683a97f9765bddfd964fe32e137aa6e703ed3.
  
  --disable-pthreads can be used to disable pthreads and get the threaded
  resolver to use the windows threading when building with mingw.

- vtls: don't define MD5_DIGEST_LENGTH for wolfssl
  
  ... as it defines it (too)

- TODO: remove configure --disable-pthreads

Jay Satiro (2 May 2018)
- [David Garske brought this change]

  wolfssl: Fix non-blocking connect
  
  Closes https://github.com/curl/curl/pull/2542

Daniel Stenberg (30 Apr 2018)
- CURLOPT_URL.3: add ENCODING section [ci skip]
  
  Feedback-by: Michael Kilburn

- KNOWN_BUGS: Client cert with Issuer DN differs between backends
  
  Closes #1411

- KNOWN_BUGS: Passive transfer tries only one IP address
  
  Closes #1508

- KNOWN_BUGS: --upload-file . hang if delay in STDIN
  
  Closes #2051

- KNOWN_BUGS: Connection information when using TCP Fast Open
  
  Closes #1332

- travis: enable libssh2 on both macos and Linux
  
  It seems to not be detected by default anymore (which is a bug I
  believe)
  
  Closes #2541

- TODO: Support the clienthello extension
  
  Closes #2299

- TODO: CLOEXEC
  
  Closes #2252

- tests: provide 'manual' as a feature to optionally require
  
  ... and make test 1026 rely on that feature so that --disable-manual
  builds don't cause test failures.
  
  Reported-by: Max Dymond and Anders Roxell
  Fixes #2533
  Closes #2540

- CURLINFO_PROTOCOL.3: mention the existing defined names

Jay Satiro (27 Apr 2018)
- [Daniel Gustafsson brought this change]

  cookies: remove unused macro
  
  Commit 2bc230de63 made the macro MAX_COOKIE_LINE_TXT become unused,
  so remove as it's not part of the published API.
  
  Closes https://github.com/curl/curl/pull/2537

Daniel Stenberg (27 Apr 2018)
- [Daniel Gustafsson brought this change]

  checksrc: force indentation of lines after an else
  
  This extends the INDENTATION case to also handle 'else' statements
  and require proper indentation on the following line. Also fixes the
  offending cases found in the codebase.
  
  Closes #2532

- http2: fix null pointer dereference in http2_connisdead
  
  This function can get called on a connection that isn't setup enough to
  have the 'recv_underlying' function pointer initialized so it would try
  to call the NULL pointer.
  
  Reported-by: Dario Weisser
  
  Follow-up to db1b2c7fe9b093f8 (never shipped in a release)
  Closes #2536

- http2: get rid of another strstr()
  
  Follow-up to 1514c44655e12e: replace another strstr() call done on a
  buffer that might not be zero terminated - with a memchr() call, even if
  we know the substring will be found.
  
  Assisted-by: Max Dymond
  
  Detected by OSS-Fuzz
  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8021
  
  Closes #2534

- cyassl: adapt to libraries without TLS 1.0 support built-in
  
  WolfSSL doesn't enable it by default anymore

- configure: provide --with-wolfssl as an alias for --with-cyassl

- RELEASE-NOTES: synced

- [Daniel Gustafsson brought this change]

  os400.c: fix ASSIGNWITHINCONDITION checksrc warnings
  
  All occurrences of assignment within conditional expression in
  os400sys.c rewritten into two steps: first assignment and then the check
  on the success of the assignment. Also adjust related incorrect brace
  positions to match project indentation style.
  
  This was spurred by seeing "if((inp = input_token))", but while in there
  all warnings were fixed.
  
  There should be no functional change from these changes.
  
  Closes #2525

- [Daniel Gustafsson brought this change]

  cookies: ensure that we have cookies before writing jar
  
  The jar should be written iff there are cookies, so ensure that we still
  have cookies after expiration to avoid creating an empty file.
  
  Closes #2529

- strcpy_url: only %-encode values >= 0x80
  
  OSS-Fuzz detected
  
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8000
  
  Broke in dd7521bcc1b7

- mime: avoid NULL pointer dereference risk
  
  Coverity detected, CID 1435120
  
  Closes #2527

- [Stephan Mühlstrasser brought this change]

  ctype: restore character classification for non-ASCII platforms
  
  With commit 4272a0b0fc49a1ac0ceab5c4a365c9f6ab8bf8e2 curl-speficic
  character classification macros and functions were introduced in
  curl_ctype.[ch] to avoid dependencies on the locale. This broke curl on
  non-ASCII, e.g. EBCDIC platforms. This change restores the previous set
  of character classification macros when CURL_DOES_CONVERSIONS is
  defined.
  
  Closes #2494

- ftplistparser: keep state between invokes
  
  Fixes FTP wildcard parsing when done over a number of read buffers.
  
  Regression from f786d1f14
  
  Reported-by: wncboy on github
  Fixes #2445
  Closes #2526

- examples/http2-upload: expand buffer to avoid silly warning
  
  http2-upload.c:135:44: error: ‘%02d’ directive output may be truncated
  writing between 2 and 11 bytes into a region of size between 8 and 17

- examples/sftpuploadresume: typecast fseek argument to long
  
  /docs/examples/sftpuploadresume.c:102:12: warning: conversion to 'long
  int' from 'curl_off_t {aka long long int}' may alter its value

- Revert "ftplistparser: keep state between invokes"
  
  This reverts commit abbc8457d85aca74b7cfda1d394b0844932b2934.
  
  Caused fuzzer problems on travis not seen when this was a PR!

- Curl_memchr: zero length input can't match
  
  Avoids undefined behavior.
  
  Reported-by: Geeknik Labs

- ftplistparser: keep state between invokes
  
  Fixes FTP wildcard parsing when doing over a number of read buffers.
  
  Regression from f786d1f14
  
  Reported-by: wncboy on github
  Fixes #2445
  Closes #2519

- ftplistparser: renamed some members and variables
  
  ... to make them better spell out what they're for.

- RELEASE-NOTES: synced

- [Christian Schmitz brought this change]

  curl_global_sslset: always provide available backends
  
  Closes #2499

- http2: convert an assert to run-time check
  
  Fuzzing has proven we can reach code in on_frame_recv with status_code
  not having been set, so let's detect that in run-time (instead of with
  assert) and error error accordingly.
  
  (This should no longer happen with the latest nghttp2)
  
  Detected by OSS-Fuzz
  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7903
  Closes #2514

- curl.1: clarify that options and URLs can be mixed
  
  Fixes #2515
  Closes #2517

Jay Satiro (23 Apr 2018)
- [Archangel_SDY brought this change]

  CURLOPT_SSLCERT.3: improve WinSSL-specific usage info
  
  Ref: https://github.com/curl/curl/pull/2376#issuecomment-381858780
  
  Closes https://github.com/curl/curl/pull/2504

- [Archangel_SDY brought this change]

  schannel: fix build error on targets <= XP
  
  - Use CRYPT_STRING_HEX instead of CRYPT_STRING_HEXRAW since XP doesn't
    support the latter.
  
  Ref: https://github.com/curl/curl/pull/2376#issuecomment-382153668
  
  Closes https://github.com/curl/curl/pull/2504

Daniel Stenberg (23 Apr 2018)
- Revert "ftplistparser: keep state between invokes"
  
  This reverts commit 8fb78f9ddc6d858d630600059b8ad84a80892fd9.
  
  Unfortunately this fix introduces memory leaks I've not been able to fix
  in several days. Reverting this for now to get the leaks fixed.

Jay Satiro (21 Apr 2018)
- tool_help: clarify --max-time unit of time is seconds
  
  Before:
   -m, --max-time <time> Maximum time allowed for the transfer
  
  After:
   -m, --max-time <seconds> Maximum time allowed for the transfer

Daniel Stenberg (20 Apr 2018)
- http2: handle GOAWAY properly
  
  When receiving REFUSED_STREAM, mark the connection for close and retry
  streams accordingly on another/fresh connection.
  
  Reported-by: Terry Wu
  Fixes #2416
  Fixes #1618
  Closes #2510

- http2: clear the "drain counter" when a stream is closed
  
  This fixes the notorious "httpc->drain_total >= data->state.drain"
  assert.
  
  Reported-by: Anders Bakken
  
  Fixes #1680
  Closes #2509

- http2: avoid strstr() on data not zero terminated
  
  It's not strictly clear if the API contract allows us to call strstr()
  on a string that isn't zero terminated even when we know it will find
  the substring, and clang's ASAN check dislikes us for it.
  
  Also added a check of the return code in case it fails, even if I can't
  think of a situation how that can trigger.
  
  Detected by OSS-Fuzz
  Closes #2513
  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7760

- [Stephan Mühlstrasser brought this change]

  openssl: fix subjectAltName check on non-ASCII platforms
  
  Curl_cert_hostcheck operates with the host character set, therefore the
  ASCII subjectAltName string retrieved with OpenSSL must be converted to
  the host encoding before comparison.
  
  Closes #2493

Jay Satiro (20 Apr 2018)
- openssl: Add support for OpenSSL 1.1.1 verbose-mode trace messages
  
  - Support handling verbose-mode trace messages of type
    SSL3_RT_INNER_CONTENT_TYPE, SSL3_MT_ENCRYPTED_EXTENSIONS,
    SSL3_MT_END_OF_EARLY_DATA, SSL3_MT_KEY_UPDATE, SSL3_MT_NEXT_PROTO,
    SSL3_MT_MESSAGE_HASH
  
  Reported-by: iz8mbw@users.noreply.github.com
  
  Fixes https://github.com/curl/curl/issues/2403

Daniel Stenberg (19 Apr 2018)
- ftplistparser: keep state between invokes
  
  Regression from f786d1f14
  
  Reported-by: wncboy on github
  Fixes #2445
  Closes #2508

- detect_proxy: only show proxy use if it had contents

- http2: handle on_begin_headers() called more than once
  
  This triggered an assert if called more than once in debug mode (and a
  memory leak if not debug build). With the right sequence of HTTP/2
  headers incoming it can happen.
  
  Detected by OSS-Fuzz
  
  Closes #2507
  Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7764

Jay Satiro (18 Apr 2018)
- [Dan McNulty brought this change]

  schannel: add support for CURLOPT_CAINFO
  
  - Move verify_certificate functionality in schannel.c into a new
    file called schannel_verify.c. Additionally, some structure defintions
    from schannel.c have been moved to schannel.h to allow them to be
    used in schannel_verify.c.
  
  - Make verify_certificate functionality for Schannel available on
    all versions of Windows instead of just Windows CE. verify_certificate
    will be invoked on Windows CE or when the user specifies
    CURLOPT_CAINFO and CURLOPT_SSL_VERIFYPEER.
  
  - In verify_certificate, create a custom certificate chain engine that
    exclusively trusts the certificate store backed by the CURLOPT_CAINFO
    file.
  
  - doc updates of --cacert/CAINFO support for schannel
  
  - Use CERT_NAME_SEARCH_ALL_NAMES_FLAG when invoking CertGetNameString
    when available. This implements a TODO in schannel.c to improve
    handling of multiple SANs in a certificate. In particular, all SANs
    will now be searched instead of just the first name.
  
  - Update tool_operate.c to not search for the curl-ca-bundle.crt file
    when using Schannel to maintain backward compatibility. Previously,
    any curl-ca-bundle.crt file found in that search would have been
    ignored by Schannel. But, with CAINFO support, the file found by
    that search would have been used as the certificate store and
    could cause issues for any users that have curl-ca-bundle.crt in
    the search path.
  
  - Update url.c to not set the build time CURL_CA_BUNDLE if the selected
    SSL backend is Schannel. We allow setting CA location for schannel
    only when explicitly specified by the user via CURLOPT_CAINFO /
    --cacert.
  
  - Add new test cases 3000 and 3001. These test cases check that the first
    and last SAN, respectively, matches the connection hostname. New test
    certificates have been added for these cases. For 3000, the certificate
    prefix is Server-localhost-firstSAN and for 3001, the certificate
    prefix is Server-localhost-secondSAN.
  
  - Remove TODO 15.2 (Add support for custom server certificate
    validation), this commit addresses it.
  
  Closes https://github.com/curl/curl/pull/1325

- schannel: fix warning
  
  - Fix warning 'integer from pointer without a cast' on 3rd arg in
    CertOpenStore. The arg type HCRYPTPROV may be a pointer or integer
    type of the same size.
  
  Follow-up to e35b025.
  
  Caught by Marc's CI builds.

- [Jakub Wilk brought this change]

  docs: fix typos
  
  Closes https://github.com/curl/curl/pull/2503

Daniel Stenberg (17 Apr 2018)
- RELEASE-NOTES: synced

Jay Satiro (17 Apr 2018)
- [Kees Dekker brought this change]

  winbuild: Support custom devel paths for each dependency
  
  - Support custom devel paths for c-ares, mbedTLS, nghttp2, libSSH2,
    OpenSSL and zlib. Respectively: CARES_PATH, MBEDTLS_PATH,
    NGHTTP2_PATH, SSH2_PATH, SSL_PATH and ZLIB_PATH.
  
  - Use lib.exe for making the static library instead of link.exe /lib.
    The latter is undocumented and could cause problems as noted in the
    comments.
  
  - Remove a dangling URL that no longer worked. (I was not able to find
    the IDN download at MSDN/microsoft.com, so it seems to be removed.)
  
  - Remove custom override for release-ssh2-ssl-dll-zlib configuration.
    Nobody knows why it was there and as far as we can see is unnecessary.
  
  Closes https://github.com/curl/curl/pull/2474

Daniel Stenberg (17 Apr 2018)
- [Jess brought this change]

  README.md: add backers and sponsors
  
  Closes #2484

- [Archangel_SDY brought this change]

  schannel: add client certificate authentication
  
  Users can now specify a client certificate in system certificates store
  explicitly using expression like `--cert "CurrentUser\MY\<thumbprint>"`
  
  Closes #2376

Marcel Raad (16 Apr 2018)
- [toughengineer brought this change]

  ntlm_sspi: fix authentication using Credential Manager
  
  If you pass empty user/pass asking curl to use Windows Credential
  Storage (as stated in the docs) and it has valid credentials for the
  domain, e.g.
  curl -v -u : --ntlm example.com
  currently authentication fails.
  This change fixes it by providing proper SPN string to the SSPI API
  calls.
  
  Fixes https://github.com/curl/curl/issues/1622
  Closes https://github.com/curl/curl/pull/1660

Daniel Stenberg (16 Apr 2018)
- configure: keep LD_LIBRARY_PATH changes local
  
  ... only set it when we actually have to run tests to reduce its impact
  on for example build commands etc.
  
  Fixes #2490
  Closes #2492
  
  Reported-by: Dmitry Mikhirev

Marcel Raad (16 Apr 2018)
- urldata: make service names unconditional
  
  The ifdefs have become quite long. Also, the condition for the
  definition of CURLOPT_SERVICE_NAME and for setting it from
  CURLOPT_SERVICE_NAME have diverged. We will soon also need the two
  options for NTLM, at least when using SSPI, for
  https://github.com/curl/curl/pull/1660.
  Just make the definitions unconditional to make that easier.
  
  Closes https://github.com/curl/curl/pull/2479

Daniel Stenberg (16 Apr 2018)
- test1148: tolerate progress updates better
  
  Fixes #2446
  Closes #2488

- [Christian Schmitz brought this change]

  ssh: show libSSH2 error code when closing fails
  
  Closes #2500

Jay Satiro (15 Apr 2018)
- [Daniel Gustafsson brought this change]

  vauth: Fix typo
  
  Address various spellings of "credentials".
  
  Closes https://github.com/curl/curl/pull/2496

- [Dagobert Michelsen brought this change]

  system.h: Add sparcv8plus to oracle/sunpro 32-bit detection
  
  With specific compiler options selecting the arch like -xarch=sparc on
  newer compilers like Oracle Studio 12.4 there is no definition of
  __sparcv8 but __sparcv8plus which means the V9 ISA, but limited to the
  32ÎíÎñbit subset defined by the V8plus ISA specification, without the
  Visual Instruction Set (VIS), and without other implementation-specific
  ISA extensions. So it should be the same as __sparcv8.
  
  Closes https://github.com/curl/curl/pull/2491

- [Daniel Gustafsson brought this change]

  checksrc: Fix typo
  
  Fix typo in "semicolon" spelling and remove stray tab character.
  
  Closes https://github.com/curl/curl/pull/2498

- [Daniel Gustafsson brought this change]

  all: Refactor malloc+memset to use calloc
  
  When a zeroed out allocation is required, use calloc() rather than
  malloc() followed by an explicit memset(). The result will be the
  same, but using calloc() everywhere increases consistency in the
  codebase and avoids the risk of subtle bugs when code is injected
  between malloc and memset by accident.
  
  Closes https://github.com/curl/curl/pull/2497

Daniel Stenberg (12 Apr 2018)
- duphandle: make sure CURLOPT_RESOLVE is duplicated fine too
  
  Verified in test 1502 now
  
  Fixes #2485
  Closes #2486
  Reported-by: Ernst Sjöstrand

- mailmap: add a monnerat fixup [ci skip]

- proxy: show getenv proxy use in verbose output
  
  ... to aid debugging etc as it sometimes isn't immediately obvious why
  curl uses or doesn't use a proxy.
  
  Inspired by #2477
  
  Closes #2480

- travis: build libpsl and make builds use it
  
  closes #2471

- travis: bump to clang 6 and gcc 7
  
  Extra-eye-on-this-by: Marcel Raad
  
  Closes #2478

Marcel Raad (10 Apr 2018)
- travis: use trusty for coverage build
  
  This works now and precise is in the process of being decommissioned.
  
  Closes https://github.com/curl/curl/pull/2476

- lib: silence null-dereference warnings
  
  In debug mode, MingGW-w64's GCC 7.3 issues null-dereference warnings
  when dereferencing pointers after DEBUGASSERT-ing that they are not
  NULL.
  Fix this by removing the DEBUGASSERTs.
  
  Suggested-by: Daniel Stenberg
  Ref: https://github.com/curl/curl/pull/2463

- [Kees Dekker brought this change]

  winbuild: fix URL
  
  Follow up on https://github.com/curl/curl/pull/2472.
  Now using en-us instead of nl-nl as language code in the URL.
  
  Closes https://github.com/curl/curl/pull/2475

Daniel Stenberg (9 Apr 2018)
- [Kees Dekker brought this change]

  winbuild: updated the documentation
  
  The setenv command no longer exists and visual studio build prompts got
  changed. Used Visual Studio 2015/2017 as reference.
  
  Closes #2472

- test1136: fix cookie order after commit c990eadd1277

- build: cleanup to fix clang warnings/errors
  
  unit1309 and vtls/gtls: error: arithmetic on a null pointer treated as a
  cast from integer to pointer is a GNU extension
  
  Reported-by: Rikard Falkeborn
  
  Fixes #2466
  Closes #2468

Jay Satiro (7 Apr 2018)
- examples/sftpuploadresmue: Fix Windows large file seek
  
  - Use _fseeki64 instead of fseek (long) to seek curl_off_t in Windows.
  
  - Use CURL_FORMAT_CURL_OFF_T specifier instead of %ld to print
    curl_off_t.
  
  Caught by Marc's CI builds.

Daniel Stenberg (7 Apr 2018)
- curl_setup: provide a CURL_SA_FAMILY_T type if none exists
  
  ... and use this type instead of 'sa_family_t' in the code since several
  platforms don't have it.
  
  Closes #2463

- [Eric Gallager brought this change]

  build: add picky compiler warning flags for gcc 6 and 7

- configure: detect sa_family_t

Jay Satiro (7 Apr 2018)
- [Stefan Agner brought this change]

  tool_operate: Fix retry on FTP 4xx to ignore other protocols
  
  Only treat response code as FTP response codes in case the
  protocol type is FTP.
  
  This fixes an issue where an HTTP download was treated as FTP
  in case libcurl returned with 33. This happens when the
  download has already finished and the server responses 416:
    HTTP/1.1 416 Requested Range Not Satisfiable
  
  This should not be treated as an FTP error.
  
  Fixes #2464
  Closes #2465

Daniel Stenberg (6 Apr 2018)
- hash: calculate sizes with size_t instead of longs
  
  ... since they return size_t anyway!
  
  closes #2462

- RELEASE-NOTES: synced

- [Jay Satiro brought this change]

  build-openssl.bat: Refer to VS2017 as VC14.1 instead of VC15
  
  .. and do the same for build-wolfssl.bat.
  
  Because MS calls it VC14.1.
  
  Closes https://github.com/curl/curl/pull/2189

- [Kees Dekker brought this change]

  winbuild: make the clean target work without build-type
  
  Due to the check in Makefile.vc and MakefileBuild.vc, no make call can
  be invoked unless a build-type was specified. However, a clean target
  only existed when a build type was specified. As a result, the clean
  target was unreachable. Made clean target unconditional.
  
  Closes #2455

- [patelvivekv1993 brought this change]

  build-openssl.bat: allow custom paths for VS and perl
  
  Fixes #2430
  Closes #2457

- [Laurie Clark-Michalek brought this change]

  FTP: allow PASV on IPv6 connections when a proxy is being used
  
  In the situation of a client connecting to an FTP server using an IPv6
  tunnel proxy, the connection info will indicate that the connection is
  IPv6. However, because the server behing the proxy is IPv4, it is
  permissable to attempt PSV mode. In the case of the FTP server being
  IPv4 only, EPSV will always fail, and with the current logic curl will
  be unable to connect to the server, as the IPv6 fwdproxy causes curl to
  think that EPSV is impossible.
  
  Closes #2432

- [Jon DeVree brought this change]

  file: restore old behavior for file:////foo/bar URLs
  
  curl 7.57.0 and up interpret this according to Appendix E.3.2 of RFC
  8089 but then returns an error saying this is unimplemented. This is
  actually a regression in behavior on both Windows and Unix.
  
  Before curl 7.57.0 this URL was treated as a path of "//foo/bar" and
  then passed to the relevant OS API. This means that the behavior of this
  case is actually OS dependent.
  
  The Unix path resolution rules say that the OS must handle swallowing
  the extra "/" and so this path is the same as "/foo/bar"
  
  The Windows path resolution rules say that this is a UNC path and
  automatically handles the SMB access for the program. So curl on Windows
  was already doing Appendix E.3.2 without any special code in curl.
  
  Regression
  
  Closes #2438

- [Gaurav Malhotra brought this change]

  Revert "openssl: Don't add verify locations when verifypeer==0"
  
  This reverts commit dc85437736e1fc90e689bb1f6c51c8f1aa9430eb.
  
  libcurl (with the OpenSSL backend) performs server certificate verification
  even if verifypeer == 0 and the verification result is available using
  CURLINFO_SSL_VERIFYRESULT. The commit that is being reverted caused the
  CURLINFO_SSL_VERIFYRESULT to not have useful information for the
  verifypeer == 0 use case (it would always have
  X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY).
  
  Closes #2451

- [Wyatt O'Day brought this change]

  tls: fix mbedTLS 2.7.0 build + handle sha256 failures
  
  (mbedtls 2.70 compiled with MBEDTLS_DEPRECATED_REMOVED)
  
  Closes #2453

- [Lauri Kasanen brought this change]

  cookie: case-insensitive hashing for the domains
  
  closes #2458

Patrick Monnerat (4 Apr 2018)
- cookie: fix and optimize 2nd top level domain name extraction
  
  This fixes a segfault occurring when a name of the (invalid) form "domain..tld"
  is processed.
  
  test46 updated to cover this case.
  
  Follow-up to commit c990ead.
  
  Ref: https://github.com/curl/curl/pull/2440

Daniel Stenberg (4 Apr 2018)
- openssl: provide defines for argument typecasts to build warning-free
  
  ... as OpenSSL >= 1.1.0 and libressl >= 2.7.0 use different argument types.

- [Bernard Spil brought this change]

  openssl: fix build with LibreSSL 2.7
  
   - LibreSSL 2.7 implements (most of) OpenSSL 1.1 API
  
  Fixes #2319
  Closes #2447
  Closes #2448
  
  Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>

- [Lauri Kasanen brought this change]

  cookie: store cookies per top-level-domain-specific hash table
  
  This makes libcurl handle thousands of cookies much better and speedier.
  
  Closes #2440

- [Lauri Kasanen brought this change]

  cookies: when reading from a file, only remove_expired once
  
  This drops the cookie load time for 8k cookies from 178ms to 15ms.
  
  Closes #2441

- test1148: set a fixed locale for the test
  
  ...as otherwise it might use a different decimal sign.
  
  Bug: #2436
  Reported-by: Oumph on github

Jay Satiro (31 Mar 2018)
- docs: fix CURLINFO_*_T examples use of CURL_FORMAT_CURL_OFF_T
  
  - Put a percent sign before each CURL_FORMAT_CURL_OFF_T in printf.
  
  For example "%" CURL_FORMAT_CURL_OFF_T becomes %lld or similar.
  
  Bug: https://curl.haxx.se/mail/lib-2018-03/0140.html
  Reported-by: David L.

Sergei Nikulov (27 Mar 2018)
- [Michał Janiszewski brought this change]

  cmake: Add advapi32 as explicit link library for win32
  
  ARM targets need advapi32 explicitly.
  
  Closes #2363

Daniel Stenberg (27 Mar 2018)
- TODO: connection cache sharing is now supporte

Jay Satiro (26 Mar 2018)
- travis: enable apt retry on fail
  
  This is a workaround for an unsolved travis issue that is causing CI
  instances to sporadically fail due to 'unable to connect' issues during
  apt stage.
  
  Ref: https://github.com/travis-ci/travis-ci/issues/8507
  Ref: https://github.com/travis-ci/travis-ci/issues/9112#issuecomment-376305909

Michael Kaufmann (26 Mar 2018)
- runtests.pl: fix warning 'use of uninitialized value'
  
  follow-up to a9a7b60
  
  Closes #2428

Daniel Stenberg (24 Mar 2018)
- gitignore: ignore more generated files

- threaded resolver: track resolver time and set suitable timeout values
  
  In order to make curl_multi_timeout() return suitable "sleep" times even
  when there's no socket to wait for while the name is being resolved in a
  helper thread.
  
  It will increases the timeouts as time passes.
  
  Closes #2419

- [Howard Chu brought this change]

  openldap: fix for NULL return from ldap_get_attribute_ber()
  
  Closes #2399

GitHub (22 Mar 2018)
- [Sergei Nikulov brought this change]

  travis-ci: enable -Werror for CMake builds (#2418)

- [Sergei Nikulov brought this change]

  cmake: avoid warn-as-error during config checks (#2411)
  
  - Move the CURL_WERROR option processing after the configuration checks
    to avoid failures in case of warnings during the configuration checks.
  
  This is a partial fix for #2358

- [Sergei Nikulov brought this change]

  timeval: remove compilation warning by casting (#2417)
  
  This is fixes #2358

Daniel Stenberg (22 Mar 2018)
- http2: read pending frames (including GOAWAY) in connection-check
  
  If a connection has received a GOAWAY frame while not being used, the
  function now reads frames off the connection before trying to reuse it
  to avoid reusing connections the server has told us not to use.
  
  Reported-by: Alex Baines
  Fixes #1967
  Closes #2402

- [Bas van Schaik brought this change]

  CI: add lgtm.yml for tweaking lgtm.com analysis
  
  Closes #2414

- CURLINFO_SSL_VERIFYRESULT.3: fix the example, add some text
  
  Reported-by: Michal Trybus
  
  Fixes #2400

- TODO: expand ~/ in config files
  
  Closes #2317

- cookie.d: mention that "-" as filename means stdin
  
  Reported-by: Dongliang Mu
  Fixes #2410

- CURLINFO_COOKIELIST.3: made the example not leak memory
  
  Reported-by: Muz Dima

- vauth/cleartext: fix integer overflow check
  
  Make the integer overflow check not rely on the undefined behavior that
  a size_t wraps around on overflow.
  
  Detected by lgtm.com
  Closes #2408

- lib/curl_path.h: add #ifdef header guard
  
  Detected by lgtm.com

- vauth/ntlm.h: fix the #ifdef header guard
  
  Detected by lgtm.com

Jay Satiro (20 Mar 2018)
- examples/hiperfifo: checksrc compliance

Daniel Stenberg (19 Mar 2018)
- [Nikos Tsipinakis brought this change]

  parsedate: support UT timezone
  
  RFC822 section 5.2 mentions Universal Time, 'UT', to be synonymous with
  GMT.
  
  Closes #2401

- RELEASE-NOTES: synced

- [Don brought this change]

  cmake: add support for brotli
  
  Currently CMake cannot detect Brotli support. This adds detection of the
  libraries and associated header files. It also adds this to the
  generated config.
  
  Closes #2392

- [Chris Araman brought this change]

  darwinssl: fix iOS build

Patrick Monnerat (18 Mar 2018)
- ILE/RPG binding: Add CURLOPT_HAPROXYPROTOCOL/Fix CURLOPT_DNS_SHUFFLE_ADDRESSES

Daniel Stenberg (17 Mar 2018)
- [Rick Deist brought this change]

  resolve: add CURLOPT_DNS_SHUFFLE_ADDRESSES
  
  This patch adds CURLOPT_DNS_SHUFFLE_ADDRESSES to explicitly request
  shuffling of IP addresses returned for a hostname when there is more
  than one. This is useful when the application knows that a round robin
  approach is appropriate and is willing to accept the consequences of
  potentially discarding some preference order returned by the system's
  implementation.
  
  Closes #1694

- add_handle/easy_perform: clear errorbuffer on start if set
  
  To offer applications a more defined behavior, we clear the buffer as
  early as possible.
  
  Assisted-by: Jay Satiro
  
  Fixes #2190
  Closes #2377

- [Lawrence Matthews brought this change]

  CURLOPT_HAPROXYPROTOCOL: support the HAProxy PROXY protocol
  
  Add --haproxy-protocol for the command line tool
  
  Closes #2162

- curl_version_info.3: fix ssl_version description
  
  Reported-by: Vincas Razma
  Fixes #2364

- multi: improved pending transfers handling => improved performance
  
  When a transfer is requested to get done and it is put in the pending
  queue when limited by number of connections, total or per-host, libcurl
  would previously very aggressively retry *ALL* pending transfers to get
  them transferring. That was very time consuming.
  
  By reducing the aggressiveness in how pending are being retried, we
  waste MUCH less time on putting transfers back into pending again.
  
  Some test cases got a factor 30(!) speed improvement with this change.
  
  Reported-by: Cyril B
  Fixes #2369
  Closes #2383

- pause: when changing pause state, update socket state
  
  Especially unpausing a transfer might have to move the socket back to the
  "currently used sockets" hash to get monitored. Otherwise it would never get
  any more data and get stuck. Easily triggered with pausing using the
  multi_socket API.
  
  Reported-by: Philip Prindeville
  Bug: https://curl.haxx.se/mail/lib-2018-03/0048.html
  Fixes #2393
  Closes #2391

- [Philip Prindeville brought this change]

  examples/hiperfifo.c: improved
  
   * use member struct event’s instead of pointers to alloc’d struct
     events
  
   * simplify the cases for the mcode_or_die() function via macros;
  
   * make multi_timer_cb() actually do what the block comment says it
     should;
  
   * accept a “stop” command on the FIFO to shut down the service;
  
   * use cleaner notation for unused variables than the (void) hack;
  
   * allow following redirections (304’s);

- rate-limit: use three second window to better handle high speeds
  
  Due to very frequent updates of the rate limit "window", it could
  attempt to rate limit within the same milliseconds and that then made
  the calculations wrong, leading to it not behaving correctly on very
  fast transfers.
  
  This new logic updates the rate limit "window" to be no shorter than the
  last three seconds and only updating the timestamps for this when
  switching between the states TOOFAST/PERFORM.
  
  Reported-by: 刘佩东
  Fixes #2386
  Closes #2388

- [luz.paz brought this change]

  cleanup: misc typos in strings and comments
  
  Found via `codespell`
  
  Closes #2389

- RELEASE-NOTES: toward 7.60.0

- [Kobi Gurkan brought this change]

  http2: fixes typo
  
  Closes #2387

- user-agent.d:: mention --proxy-header as well
  
  Bug: https://github.com/curl/curl/issues/2381

- transfer: make HTTP without headers count correct body size
  
  This is what "HTTP/0.9" basically looks like.
  
  Reported on IRC
  
  Closes #2382

- test1208: marked flaky
  
  It fails somewhere between every 3rd to 10th travis-CI run

- SECURITY-PROCESS: mention how we write/add advisories

- [dasimx brought this change]

  FTP: fix typo in recursive callback detection for seeking
  
  Fixes #2380

Version 7.59.0 (13 Mar 2018)

Daniel Stenberg (13 Mar 2018)
- release: 7.59.0

Kamil Dudka (13 Mar 2018)
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498

  timeval: use mach time on MacOS
  
  If clock_gettime() is not supported, use mach_absolute_time() on MacOS.
  
  closes #2033

monnerat (29 Oct 2017)
- [Patrick Monnerat brought this change]

  cli tool: improve ";type=" handling in -F option arguments

- [Patrick Monnerat brought this change]

  cli tool: in -F option arg, comma is a delimiter for files only
  
  Also upgrade test 1133 to cover this case and clarify man page about
  form data quoting.
  
  Bug: https://github.com/curl/curl/issues/2022
  Reported-By: omau on github








|
<
<
|

<
<
|







3853
3854
3855
3856
3857
3858
3859
3860


3861
3862


3863
3864
3865
3866
3867
3868
3869
3870

  timeval: use mach time on MacOS
  
  If clock_gettime() is not supported, use mach_absolute_time() on MacOS.
  
  closes #2033

Patrick Monnerat (29 Oct 2017)


- cli tool: improve ";type=" handling in -F option arguments



- cli tool: in -F option arg, comma is a delimiter for files only
  
  Also upgrade test 1133 to cover this case and clarify man page about
  form data quoting.
  
  Bug: https://github.com/curl/curl/issues/2022
  Reported-By: omau on github

5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
- sockfilt: suppress conversion warning with explicit cast
  
  MSVC warns when implicitly casting -1 to unsigned long.

- rtspd: fix MSVC level 4 warning
  
  warning C4701: potentially uninitialized local variable 'req' used

- winbuild: re-enable warning C4127 for curl tool
  
  Disabled in cda19a345f6970e22fe8b7a808aeb8f086a21eac. It only needs to
  be disabled for libcurl.

- winbuild: build with warning level 4
  
  This is consistent with 7bc64561a2e63ca93e4b0b31d350773ba80955c2, which
  changed the warning level from 3 to 4 for the Visual Studio project
  files. But disable the level 4 warning C4127 "conditional expression is
  constant", as that one is issued by older versions of the Windows SDK
  as well as curl itself under some circumstances.
  
  Closes https://github.com/curl/curl/pull/1667

Jay Satiro (12 Jul 2017)
- [Max Dymond brought this change]

  travis: install libidn2
  
  Install libidn2 to increase test coverage (IDN tests)
  
  Closes https://github.com/curl/curl/pull/1673

Marcel Raad (12 Jul 2017)
- travis: enable warnings also in release mode
  
  ... to get warnings also on Linux/GCC and OSX/clang.
  
  Closes https://github.com/curl/curl/pull/1666

Daniel Stenberg (12 Jul 2017)
- [Max Dymond brought this change]

  travis: install libssh2
  
  Install libssh2 to increase test coverage (SFTP, SCP)

Marcel Raad (12 Jul 2017)
- system.h: include winsock2.h before windows.h
  
  ... to avoid compiler warnings if the user doesn't want
  WIN32_LEAN_AND_MEAN.

- build: remove WIN32_LEAN_AND_MEAN from individual build systems
  
  It's defined for all build systems in curl_setup.h since commit
  beb08481d01a07a8b10938b1078a5e298b1c2912. This caused macro
  redefinition warnings in the configure builds.
  
  Closes https://github.com/curl/curl/pull/1677

Jay Satiro (11 Jul 2017)
- ISSUE_TEMPLATE: Add a comment not to file security issues on github

Marcel Raad (11 Jul 2017)
- curl_setup: always define WIN32_LEAN_AND_MEAN on Windows
  
  Make sure to always define WIN32_LEAN_AND_MEAN before including any
  Windows headers to avoid pulling in unnecessary headers. This avoids
  unnecessary macro clashes and compiler warnings.
  
  Ref: https://github.com/curl/curl/issues/1562
  Closes https://github.com/curl/curl/pull/1672

Jay Satiro (11 Jul 2017)
- strerror: Preserve Windows error code in some functions
  
  This is a follow-up to af02162 which removed (SET_)ERRNO macros. That
  commit was an earlier draft that I committed by mistake, which was then
  remedied by a5834e5 and e909de6, and now this commit. With this commit
  there is now no difference between the current code and the changes that
  were approved in the final draft.
  
  Thanks-to: Max Dymond, Marcel Raad, Daniel Stenberg, Gisle Vanem
  Ref: https://github.com/curl/curl/pull/1589

Marcel Raad (10 Jul 2017)
- [Max Dymond brought this change]

  tests: Fix up issues with errno in test files
  
  Closes https://github.com/curl/curl/pull/1671

Daniel Stenberg (10 Jul 2017)
- errno: fix non-windows builds after af0216251b94e7

- [Ryan Winograd brought this change]

  make: fix docs build on OpenBSD
  
  Ref: #1591

Marcel Raad (10 Jul 2017)
- ldap: fix MinGW compiler warning
  
  ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with
  the latest original MinGW, resulting in compiler warnings since commit
  f0fe66f13c93d3d0af45d9fb1231c9164e0f9dc8. Fix this for the non-SSPI
  case by using ldap_simple_bind_s again instead of ldap_bind_s with
  LDAP_AUTH_SIMPLE.
  
  Closes https://github.com/curl/curl/pull/1664

- curl-compilers.m4: disable warning spam with Cygwin's clang
  
  When building with Cygwin or MinGW, libtool uses a wrapper executable
  instead of a wrapper script [1], which is written in C and throws
  missing-variable-declarations warnings. Don't enable these warnings on
  Cygwin and MinGW in order to avoid warnings for every executable built,
  which spams the test suite output when using Cygwin's clang.
  
  [1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html
  
  Closes https://github.com/curl/curl/pull/1665

Jay Satiro (10 Jul 2017)
- curl_setup_once: Remove ERRNO/SET_ERRNO macros
  
  Prior to this change (SET_)ERRNO mapped to GetLastError/SetLastError
  for Win32 and regular errno otherwise.
  
  I reviewed the code and found no justifiable reason for conflating errno
  on WIN32 with GetLastError/SetLastError. All Win32 CRTs support errno,
  and any Win32 multithreaded CRT supports thread-local errno.
  
  Fixes https://github.com/curl/curl/issues/895
  Closes https://github.com/curl/curl/pull/1589

- tool_getparam: fix potentially uninitialized err

Marcel Raad (9 Jul 2017)
- smb: rename variable to fix shadowing warning
  
  GCC 4.6.3 on travis complains:
  smb.c: In function ‘get_posix_time’:
  smb.c:725:13: error: declaration of ‘time’ shadows a global declaration
  [-Werror=shadow]
  
  Fix this by renaming the variable.

- tool_cb_wrt: fix variable shadowing warning
  
  GCC 4.4 complains:
  tool_cb_wrt.c:81: error: declaration of ‘isatty’ shadows a global
  declaration
  /usr/include/unistd.h:782: error: shadowed declaration is here
  
  Fix this by renaming the variable.
  
  Closes https://github.com/curl/curl/pull/1661

Daniel Stenberg (8 Jul 2017)
- RELEASE-NOTES: synced with be2c999b8

- travis: install stunnel

- valgrind.supp: supress OpenSSL false positive seen on travis

- travis: detect and use valgrind for normal builds
  
  Closes #1653

- travis: add SMB, DICT, TELNET torture to coverage test

- [Paul Harris brought this change]

  cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC
  
  Removes BUILD_RELEASE_DEBUG_DIRS since it wasn't used anywhere.
  
  Closes #1649

- CURLOPT_POSTFIELDS.3: explain the 100-continue magic better

- [Max Dymond brought this change]

  test1452: add telnet negotiation
  
  Add a basic telnet server for negotiating some telnet options before
  echoing back any data that's sent to it.
  
  Closes #1645

- travis: do more tests in the coverage run
  
  I added a selection of torture and event tests that run "fast enough"

- curl_easy_escape.3: mention the (lack of) encoding
  
  Fixes #1612
  Reported-by: Jeroen Ooms

- [Gisle Vanem brought this change]

  memdebug: don't setbuf() if the file open failed
  
  Bug: https://github.com/curl/curl/issues/828#issuecomment-313475151

- appveyor: enable CURL_WERROR on all builds

- cmake: add CURL_WERROR for enabling "warning as errors"

- [Hannes Magnusson brought this change]

  cmake: remove spurious "-l" from linker flags
  
  Fixes #1552

- test506: skip if threaded-resolver

- runtests: support "threaded-resolver" as a feature
  
  ... to let tests require it or skip if present

- asyn-thread.c: fix unused variable warnings on macOS

- http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD
  
  Make the name reflect its use better, and add a short comment describing
  what it's for.

- cmake: if inet_pton is used, bump _WIN32_WINNT
  
  ... and make sure inet_pton is always checked for when *not* using Windows,
  which is a regression from 4fc6ebe18.
  
  Idea-by: Sergei Nikulov

- select.h: avoid macro redefinition harder
  
  ... by checking the POLLIN define, as the header file checks don't work
  on Windows.

- inet_pton: fix include on windows to get prototype
  
  inet_pton() exists on Windows and gets used by our cmake builds. Make
  sure the correct header file is included to avoid compiler warnings.
  
  Closes #1639

- TODO: 1.10 auto-detect proxy
  
  Closes #1572

- TODO: HTTP proxy CONNECT is non-blocking now

- cmake: fix send/recv argument scanner for windows
  
  ... by simply trying the Windows argument types first.
  
  Fixes #1640

- RELEASE-NOTES: synced with 596cfb6c0

- [Gisle Vanem brought this change]

  smb: add support for CURLOPT_FILETIME
  
  Bug: https://curl.haxx.se/mail/lib-2017-07/0005.html
  
  Closes #1643

- travis: install nghttp2 on linux builds
  
  Closes #1642

- [Gisle Vanem brought this change]

  smb: fix build for djgpp/MSDOS
  
  bug: https://curl.haxx.se/mail/lib-2017-07/0005.html

- configure: try ldap/lber in reversed order first
  
  When scanning for which LDAP libraries to use, try the -lldap -llber
  combination before the reversed order since it has a greater chance of
  working when linking with libcurl statically.
  
  Fixes #1619
  Closes #1634
  Reported-by: David E. Narváez

- configure: remove checks for 5 functions never used
  
  fork, getprotobyname, inet_addr, perror, uname
  
  closes #1638

- dist: add SMB python deps into the tarball

- [Max Dymond brought this change]

  test1451: add SMB support to the testbed
  
  Add test 1451 which does some very basic SMB testing using the impacket
  SMB server.
  
  Closes #1630

- [Max Dymond brought this change]

  test: add impacket for SMB testing
  
  Import impacket 0.9.15 for use in SMB testing. This was generated by
  doing "pip2.7 install -t . impacket"
  
  Unnecessary files for current testing were deleted.

- travis.yml: use --enable-werror on debug builds
  
  ... to better detect and fault on compiler warnings/errors
  
  Closes #1637

- tool_sleep: typecast to avoid macos compiler warning
  
  tool_sleep.c:54:24: error: implicit conversion loses integer precision:
  'long' to '__darwin_suseconds_t' (aka 'int')
  [-Werror,-Wshorten-64-to-32]

- [Martin Kepplinger brought this change]

  timeval.c: Use long long constant type for timeval assignment
  
  On a 64 bit host, sparse says:
  
  timeval.c:148:15: warning: constant 0x7fffffffffffffff is so big it is long
  timeval.c:149:12: warning: constant 0x7fffffffffffffff is so big it is long
  
  so let's use long long constant types in order to prevent undesired overflow
  failures.
  
  Bug: https://curl.haxx.se/mail/lib-2017-07/0003.html
  
  Closes #1636
  
  Signed-off-by: Martin Kepplinger <martink@posteo.de>

- url: make the original string get used on subsequent transfers
  
  ... since CURLOPT_URL should follow the same rules as other options:
  they remain set until changed or cleared.
  
  Added test 1551 to verify.
  
  Fixes #1631
  Closes #1632
  Reported-by: Pavel Rochnyak

- [Johannes Schindelin brought this change]

  gtls: fix build when sizeof(long) < sizeof(void *)
  
  - Change gnutls pointer/int macros to pointer/curl_socket_t.
    Prior to this change they used long type as well.
  
  The size of the `long` data type can be shorter than that of pointer
  types. This is the case most notably on Windows.
  
  If C99 were acceptable, we could simply use `intptr_t` here. But we
  want to retain C89 compatibility.
  
  Simply use the trick of performing pointer arithmetic with the NULL
  pointer: to convert an integer `i` to a pointer, simply take the
  address of the `i`th element of a hypothetical character array
  starting at address NULL. To convert back, simply cast the pointer
  difference.
  
  Thanks to Jay Satiro for the initial modification to use curl_socket_t
  instead of int/long.
  
  Closes #1617
  
  Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

- [Ryan Winograd brought this change]

  unit1399: fix integer overflow
  
  Bug: #1616
  Closes #1633

- [Per Malmberg brought this change]

  cmake: Added compatibility options for older Windows versions
  
  CURL_STATIC_CRT and ENABLE_INET_PTON
  
  Closes #1621

- unit1399: add logging to time comparison
  
  ... to enable tracking down why autobuilds fail on this
  
  Bug: #1616

- make: build the docs subdir only from within src
  
  ... and don't build at all in include
  
  Prompted-by-work-by: Simon Warta
  Ref: #1590
  Closes #1591

- [Max Dymond brought this change]

  test1450: fix up DICT server in torture mode
  
  As per https://github.com/curl/curl/pull/1615, the DICT server is a
  little spammy in torture mode due to the sockets being torn down
  unexpectedly. Fix this by adding some error handling to the handling
  function.
  
  Closes #1629

- [Max Dymond brought this change]

  test1450: add simple testing for DICT
  
  Add a new server which provides a DICT interface. This is intended to
  begin coverage testing for lib/dict.c
  
  Closes #1615

- [Dan Fandrich brought this change]

  test1521: fix out-of-tree builds, broken with 467da3af
  
  The test.h file is no longer in the same directory as the source file,
  so that directory needs to be added to the include path.
  
  Fixes #1627
  Closes #1628

- [Max Dymond brought this change]

  http2: handle PING frames
  
  Add a connection check function to HTTP2 based off RTSP. This causes
  PINGs to be handled the next time the connection is reused.
  
  Closes #1521

- [Max Dymond brought this change]

  handler: refactor connection checking
  
  Add a new type of callback to Curl_handler which performs checks on
  the connection. Alter RTSP so that it uses this callback to do its
  own check on connection health.

- [Dmitry Kostjuchenko brought this change]

  openssl: improve fallback seed of PRNG with a time based hash
  
  Fixes #1620

- [Ryan Winograd brought this change]

  progress: prevent resetting t_starttransfer
  
  Prevent `Curl_pgrsTime` from modifying `t_starttransfer` when invoked
  with `TIMER_STARTTRANSFER` more than once during a single request.
  
  When a redirect occurs, this is considered a new request and
  `t_starttransfer` can be updated to reflect the `t_starttransfer` time
  of the redirect request.
  
  Closes #1616
  
  Bug: https://github.com/curl/curl/pull/1602#issuecomment-310267370

- curl_strequal.3: fix typo in SYNOPSIS
  
  Reported-by: Jesse Chisholm
  
  Fixes #1623

- RELEASE-NOTES: synced with ce2c3ebda

Kamil Dudka (28 Jun 2017)
- curl --socks5-{basic,gssapi}: control socks5 auth
  
  Closes https://github.com/curl/curl/pull/1454

- CURLOPT_SOCKS5_AUTH: allowed methods for SOCKS5 proxy auth
  
  If libcurl was built with GSS-API support, it unconditionally advertised
  GSS-API authentication while connecting to a SOCKS5 proxy.  This caused
  problems in environments with improperly configured Kerberos: a stock
  libcurl failed to connect, despite libcurl built without GSS-API
  connected fine using username and password.
  
  This commit introduces the CURLOPT_SOCKS5_AUTH option to control the
  allowed methods for SOCKS5 authentication at run time.
  
  Note that a new option was preferred over reusing CURLOPT_PROXYAUTH
  for compatibility reasons because the set of authentication methods
  allowed by default was different for HTTP and SOCKS5 proxies.
  
  Bug: https://curl.haxx.se/mail/lib-2017-01/0005.html
  Closes https://github.com/curl/curl/pull/1454

- socks: deduplicate the code for auth request

- socks: use proxy_user instead of proxy_name
  
  ... to make it obvious what the data is used for

Daniel Stenberg (27 Jun 2017)
- libtest/make: generate lib1521.c
  
  ... instead of having the generated code checked in. This saves space in
  the tarball but primarily automatically adapts to newly added options.
  
  Closes #1614

Jay Satiro (26 Jun 2017)
- tool_getparam: fix memory leak on test 1147 OOM (torture tests)
  
  Bug: https://github.com/curl/curl/pull/1486#issuecomment-310926872
  Reported-by: Dan Fandrich

Dan Fandrich (25 Jun 2017)
- test1537: fixed memory leak on OOM

Marcel Raad (25 Jun 2017)
- test1521: fix compiler warnings
  
  The integer literal 3123123123 doesn't fit into a 32-bit signed
  integer, so GCC with 32-bit long warns in C90 mode:
  this decimal constant is unsigned only in ISO C90 [enabled by default]
  Fix this by using ULONG_MAX, which should fit in any curl_off_t and has
  the correct suffix to not issue any warnings.
  Also adds the missing CURLOPT_REQUEST_TARGET from commit
  9b167fd090f596eac828817d48c247eeae53407f.
  
  Closes https://github.com/curl/curl/pull/1611

Daniel Stenberg (24 Jun 2017)
- curl/system.h: add check for XTENSA for 32bit gcc
  
  Reported-by: Neil Kolban
  Fixes: 1598

- [Henrik S. Gaßmann brought this change]

  winbuild: fix boringssl build
  
  Compile with `WIN32_LEAN_AND_MEAN` which prevents `windows.h` from
  including too much clutter including `wincrypt.h` which in turn contains
  some preprocessor macros that clash with boringssl symbols.
  
  Detect boringssl by checking the existance of `is_boringssl.h` and set
  the corresponding `HAVE_BORINGSSL` for compilation which is used in
  `ldap.c` to undefine the evil macros.
  
  Closes #1610

- progress: progress.timespent needs to be us
  
  follow-up to 64ed44a815e4e to fix test 500 failures

Marcel Raad (24 Jun 2017)
- curl-compilers.m4: fix unknown-warning-option on Apple clang
  
  Since 5598b0bd63f690c151074494ce47ef872f004ab4, clang -v is used to
  detect the clang version. The version number was expected to come after
  the word "version". For Apple clang, this doesn't work as it has its
  own versioning scheme.
  The version number is now first searched after the string
  "based on LLVM". This works for Apple clang before version 7, and also
  for e.g. Ubuntu's clang up to version 3.7. If it's not found and the
  version string contains "Apple LLVM version", clang version 3.7 is
  assumed, which is the version that comes with Xcode 7. Otherwise, the
  version number is still expected after the word "version", which works
  for very old Apple clang versions.
  
  Ref: https://trac.macports.org/wiki/XcodeVersionInfo
  Fixes https://github.com/curl/curl/issues/1606
  Closes https://github.com/curl/curl/pull/1607

Daniel Stenberg (24 Jun 2017)
- progress: fix "time spent", broke in adef394ac

- CURLINFO_REDIRECT_URL.3: mention the CURLOPT_MAXREDIRS case
  
  ... supported since 7.54.1

- maketgz: switch to -6e for xz
  
  To reduce the memory requirement for decompress, and still do almost as
  good compression as with -9e.
  
  Pointed-out-by: Dan Fandrich

- libtest/Makefile: remove unused lib1541 variables

- CONTRIBUTE.md: mention the out-of-tree build test too

- maketgz: switch to xz instead of lzma
  
  The compressed output size seems to be a tad bit smaller, but generally
  xz seems more preferred these days and is used directly by for example
  gentoo instead of bz2.
  
  "Users of LZMA Utils should move to XZ Utils" =>
  https://tukaani.org/lzma/
  
  Closes #1604

- --request-target: instead of --strip-path-slash
  
  ... and CURLOPT_REQUEST_TARGET instead of CURLOPT_STRIP_PATH_SLASH.
  
  This option instead provides the full "alternative" target to use in the
  request, instead of extracting the path from the URL.
  
  Test 1298 and 1299 updated accordingly.
  
  Idea-by: Evert Pot
  Suggestion: https://daniel.haxx.se/blog/2017/06/19/options-with-curl/comment-page-1/#comment-18373
  
  Closes #1593

Marcel Raad (21 Jun 2017)
- lib1521: fix missing-variable-declarations clang warnings
  
  Declare TU-local variables static.

- travis: enable typecheck-gcc warnings
  
  - switch debug and release configurations so that we get an optimized
    build with GCC 4.3+ as required by typecheck-gcc
  - enable warnings-as-errors for release builds
    (which have warnings disabled)
  
  Closes https://github.com/curl/curl/pull/1595

- typecheck-gcc: add support for CURLINFO_OFF_T
  
  typecheck-gcc expected curl_socket_t instead of curl_off_t arguments
  for CURLINFO_OFF_T. Detected by test1521, unfortunately only when run
  locally.
  
  Closes https://github.com/curl/curl/pull/1592

Daniel Stenberg (21 Jun 2017)
- [Simon Warta brought this change]

  ci: whitelist branches to avoid testing feature branches twice

- [Gisle Vanem brought this change]

  lib: fix the djgpp build
  
  Bug: https://github.com/curl/curl/commit/73a2fcea0b4adea6ba342cd7ed1149782c214ae3#commitcomment-22655993

Marcel Raad (20 Jun 2017)
- if2ip: fix compiler warning in ISO C90 mode
  
  remote_scope_id is only used when both HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  and ENABLE_IPV6 are defined instead of only one of them.

Daniel Stenberg (20 Jun 2017)
- travis: do the distcheck test build out-of-tree as well

- http: add --strip-path-slash and CURLOPT_STRIP_PATH_SLASH
  
  ... to enable sending "OPTIONS *" which wasn't possible previously.
  
  This option currently only works for HTTP.
  
  Added test cases 1298 + 1299 to verify
  
  Fixes #1280
  Closes #1462

- test1521: test getinfo's OFF_T types too
  
  Closes #1588

- lib1521: add curl_easy_getinfo calls to the test set
  
  Also added return value checks to make sure no unexpected return codes
  are used.

- [Simon Warta brought this change]

  automake: use $(MKHELP) variable instead if constant mkhelp.pl
  
  this improves symmetry with the rule above

- [Simon Warta brought this change]

  mkhelp.pl: fix script name in usage text

- RELEASE-NOTES: synced with 3b80d3ca4

- getinfo: return sizes as curl_off_t
  
  This change introduces new alternatives for the existing six
  curl_easy_getinfo() options that return sizes or speeds as doubles. The
  new versions are named like the old ones but with an appended '_T':
  
  CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
  CURLINFO_CONTENT_LENGTH_UPLOAD_T
  CURLINFO_SIZE_DOWNLOAD_T
  CURLINFO_SIZE_UPLOAD_T
  CURLINFO_SPEED_DOWNLOAD_T
  CURLINFO_SPEED_UPLOAD_T
  
  Closes #1511

- PIPELINING_SERVER_BL: cleanup the internal list use
  
  The list was freed incorrectly since the llist refactor of
  cbae73e1dd959. Added test 1550 to verify that it works and avoid future
  regressions.
  
  Reported-by: Pascal Terjan
  
  Fixes #1584
  Closes #1585

- http2: fix OOM crash
  
  torture mode with test 1021 found it

- CURLOPT_PREQUOTE.3: spellfix man page reference

Marcel Raad (18 Jun 2017)
- http_proxy: fix build with http and proxy
  
  After deff7de0eb0e22d2d142b96b9cc84cd8db5d2a48, the build without
  CURL_DISABLE_PROXY and CURL_DISABLE_HTTP was failing because of missing
  includes.

- http_proxy: fix compiler warning
  
  With CURL_DISABLE_PROXY or CURL_DISABLE_HTTP, GCC complained about a
  missing prototype for Curl_connect_free.

Daniel Stenberg (18 Jun 2017)
- TODO: update the TOC too

- TODO: implement support for CURLOPT_PREQUOTE with SFTP
  
  ... also updated the CURLOPT_PREQUOTE.3 man page to mention the correct
  protocol support.
  
  Closes #1514

- tool_wrte_cb: remove check for config == NULL
  
  ... as it really cannot have reached this far with config being NULL,
  thus this is unnecesary and misleading.
  
  Bug: https://news.ycombinator.com/item?id=14577585 and
  https://daniel.haxx.se/blog/2017/06/17/curl-doesnt-spew-binary-anymore/comment-page-1/#comment-18356
  
  Forwarded-to-us-by: Jakub Wilk

- curl: prevent binary output spewed to terminal
  
  ... unless "--output -" is used. Binary detection is done by simply
  checking for a binary zero in early data.
  
  Added test 1425 1426 to verify.
  
  Closes #1512

Marcel Raad (16 Jun 2017)
- Makefile.m32: enable -W for MinGW32 build
  
  The configure-based build also has this in addition to -Wall.
  
  Closes https://github.com/curl/curl/pull/1578

- curl-compilers.m4: enable comma clang warning
  
  It usually warns when using commas instead of semicolons or other
  operators by accident.
  
  Closes https://github.com/curl/curl/pull/1578

- curl-compilers.m4: enable missing-variable-declarations clang warning
  
  It usually warns when forgetting to declare TU-local variables static.
  
  Closes https://github.com/curl/curl/pull/1578

- curl-compilers.m4: enable double-promotion warning
  
  Enable -Wdouble-promotion for both GCC and clang. It warns on implicit
  promotion from float to double.
  
  Closes https://github.com/curl/curl/pull/1578

- curl-compilers.m4: enable vla warning for clang
  
  Previously, that warning was only implicitly active in C90 mode.
  Enable it unconditionally as already done for GCC.
  
  Closes https://github.com/curl/curl/pull/1578

Daniel Stenberg (16 Jun 2017)
- http-proxy: fix chunked-encoded CONNECT responses
  
  Regression since 5113ad0424.
  
  ... and remove 'flaky' from test 1061 again
  
  Closes #1579

- http-proxy: deal with EAGAIN
  
  ... the previous code would reset the header length wrongly (since
  5113ad0424). This makes test 1060 reliable again.
  
  Also: make sws send even smaller chunks of data to increase the
  likeliness of this happening.

- libtest/libntlmconnect: fix compiler warnings from f94fcdb

- [Jay Satiro brought this change]

  HTTPS-Proxy: don't offer h2 for https proxy connections
  
  Bug: https://github.com/curl/curl/issues/1254
  
  Closes #1546

- tests: stabilize test 2032 and 2033
  
  Both these tests run the same underlying test code: libntlmconnect.c -
  this test code made some assumptions about socket ordering when it used
  curl_easy_fdset() and when we changed timing or got accidental changes
  in libcurl the tests would fail.
  
  The tests verify that the different transfers keep using the same
  connections, which I now instead made sure by adding the number of bytes
  each transfer gets and then verifies that they always get the same
  amount as when these tests worked.
  
  Closes #1576

- test1148: verify the -# progressbar
  
  Closes #1569

- test1061: mark as flaky
  
  Fails intermittently on travis builds since a few days. Likely due to
  5113ad0424.

Jay Satiro (16 Jun 2017)
- url: refactor the check for Windows drive letter in path
  
  - Move the logic to detect a Windows drive letter prefix
    (eg c: in c:foo) into a function-like macro.
  
  Closes https://github.com/curl/curl/pull/1571

- mk-ca-bundle.pl: Check curl's exit code after certdata download
  
  - No longer allow partial downloads of certdata.
  
  Prior to this change partial downloads were (erroneously?) allowed since
  only the server code was checked to be 200.
  
  Bug: https://github.com/curl/curl/pull/1577
  Reported-by: Matteo B.

Daniel Stenberg (16 Jun 2017)
- dist: add the fuzz dir to the tarball

- configure: disable nghttp2 too if HTTP has been disabled

- http-proxy: fix build with --disable-proxy or --disable-http
  
  Reported-by: Dan Fandrich

- fuzz/README: document how to build
  
  Fixes #1476

- [Frederik B brought this change]

  fuzz: corpora file structure, initial commit

- [Frederik B brought this change]

  fuzz: bring oss-fuzz initial code converted to C89

- http-proxy: only attempt FTP over HTTP proxy
  
  ... all other non-HTTP protocol schemes are now defaulting to "tunnel
  trough" mode if a HTTP proxy is specified. In reality there are no HTTP
  proxies out there that allow those other schemes.
  
  Assisted-by: Ray Satiro, Michael Kaufmann
  
  Closes #1505

- TODO: the generated include file is gone
  
  ... since commit 73a2fcea0b

- curl_setup.h: error out on CURL_WANTS_CA_BUNDLE_ENV use
  
  ... to make it really apparent if there's any user using this on purpose.
  
  Suggested-by: Jay Satiro
  
  Closes #1542

- lib/curl_setup.h: remove CURL_WANTS_CA_BUNDLE_ENV
  
  When this define was set, libcurl would check the environment variable
  named CURL_CA_BUNDLE at run-time and use that CA cert bundle. This
  feature was only defined by the watcom and m32 makefiles and caused
  inconsistent behaviours among libcurls built on different platforms.
  
  The curl tool does already feature its own similar logic and the library
  does not really need it, and it isn't documented libcurl behavior. So
  this change removes it.
  
  Ref: #1538

- test1147: verify -H on a file

- curl: allow --header and --proxy-header read from file
  
  So many headers can be provided as @filename.
  
  Suggested-by: Timothe Litt
  
  Closes #1486

- RELEASE-NOTES: synced with 2ad80eec5

- curl/curlver.h: start working on 7.55.0

- http-proxy: do the HTTP CONNECT process entirely non-blocking
  
  Mentioned as a problem since 2007 (8f87c15bdac63) and of course it
  existed even before that.
  
  Closes #1547

- progress: let "current speed" be UL + DL speeds combined
  
  Bug #1556
  Reported-by: Paul Harris
  Closes #1559

Marcel Raad (14 Jun 2017)
- system.h: fix MinGW build
  
  CURLSYS_PULL_WS2TCPIP_H got renamed to CURL_PULL_WS2TCPIP_H in commit
  73a2fcea0b4adea6ba342cd7ed1149782c214ae3.

Daniel Stenberg (14 Jun 2017)
- timers: store internal time stamps as time_t instead of doubles
  
  This gives us accurate precision and it allows us to avoid storing "no
  time" for systems with too low timer resolution as we then bump the time
  up to 1 microsecond. Should fix test 573 on windows.
  
  Remove the now unused curlx_tvdiff_secs() function.
  
  Maintains the external getinfo() API with using doubles.
  
  Fixes #1531

- dist: make the hugehelp.c not get regenerated unnecessarily
  
  The maketgz script now makes sure the generated hugehelp.c file in the
  tarball is newer than the generated curl.1 man page, so that it doesn't
  have to get unnecessarily rebuilt first thing in a typical build. It
  thus also removes the need for perl to build off a plain release
  tarball.
  
  Fixes #1565

- includes: remove curl/curlbuild.h and curl/curlrules.h
  
  Rely entirely on curl/system.h now.
  
  Introduced in Aug 2008 with commit 14240e9e109f. Now gone.
  
  Fixes #1456

Version 7.54.1 (14 Jun 2017)

Daniel Stenberg (14 Jun 2017)
- release: 7.54.1

Dan Fandrich (13 Jun 2017)
- mk-lib1521.pl: updated to match the test changes in 916ec30a

Daniel Stenberg (13 Jun 2017)
- [Stuart Henderson brought this change]

  libressl: OCSP and intermediate certs workaround no longer needed
  
  lib/vtls/openssl.c has a workaround for a bug with OCSP responses signed
  by intermediate certs, this was fixed in LibreSSL in
  https://github.com/libressl-portable/openbsd/commit/912c64f68f7ac4f225b7d1fdc8fbd43168912ba0
  
  Bug: https://curl.haxx.se/mail/lib-2017-06/0038.html

- url: fix buffer overwrite with file protocol (CVE-2017-9502)
  
  Bug: https://github.com/curl/curl/issues/1540
  Advisory: https://curl.haxx.se/docs/adv_20170614.html
  
  Assisted-by: Ray Satiro
  Reported-by: Marcel Raad

- urlglob: fix division by zero
  
  The multiply() function that is used to avoid integer overflows, was
  itself reason for a possible division by zero error when passed a
  specially formatted glob.
  
  Reported-by: GwanYeong Kim

- configure: update the copyright year in the output

- [ygrek brought this change]

  BINDINGS: update SP-Forth and OCaml urls

Michael Kaufmann (11 Jun 2017)
- FindWin32CACert: Use a temporary buffer on the stack
  
  Don't malloc() the temporary buffer, and use the correct type:
  SearchPath() works with TCHAR, but SearchPathA() works with char.
  Set the buffer size to MAX_PATH, because the terminating null byte
  is already included in MAX_PATH.
  
  Reviewed-by: Daniel Stenberg
  Reviewed-by: Marcel Raad
  
  Closes #1548

Dan Fandrich (11 Jun 2017)
- test1521: fixed OOM handling

Daniel Stenberg (9 Jun 2017)
- RELEASE-PROCEDURE: updated future release dates

- [Paul Harris brought this change]

  gitignore: ignore all vim swap files
  
  Closes #1561

- lib1521: fix compiler warnings on the use of bad 'long' values
  
  Reported-by: Marcel Raad
  Bug: https://github.com/curl/curl/commit/cccac4fb2b20d6ed87da7978408c3ecacc464fe4#commitcomment-22453387

- setopt: check CURLOPT_ADDRESS_SCOPE option range
  
  ... and return error instead of triggering an assert() when being way
  out of range.

Jay Satiro (8 Jun 2017)
- [TheAssassin brought this change]

  cmake: Fix inconsistency regarding mbed TLS include directory
  
  Previously, one had to set MBEDTLS_INCLUDE_DIR to make CMake find the
  headers, but the system complained that mbed TLS wasn't found due to
  MBEDTLS_INCLUDE_DIRS (note the trailing s) was not set. This commit
  attempts to fix that.
  
  Closes https://github.com/curl/curl/pull/1541

Daniel Stenberg (8 Jun 2017)
- [Ryuichi KAWAMATA brought this change]

  examples/multi-uv.c: fix deprecated symbol
  
  Closes #1557

- asyn-ares: s/Curl_expire_latest/Curl_expire

- expire: remove Curl_expire_latest()
  
  With the introduction of expire IDs and the fact that existing timers
  can be removed now and thus never expire, the concept with adding a
  "latest" timer is not working anymore as it risks to not expire at all.
  
  So, to be certain the timers actually are in line and will expire, the
  plain Curl_expire() needs to be used. The _latest() function was added
  as a sort of shortcut in the past that's quite simply not necessary
  anymore.
  
  Follow-up to 31b39c40cf90
  
  Reported-by: Paul Harris
  
  Closes #1555

- [Chris Carlmar brought this change]

  configure: fix link with librtmp when specifying path
  
  Bug: https://curl.haxx.se/mail/lib-2017-06/0017.html

- file: make speedcheck use current time for checks
  
  ... as it would previously just get the "now" timestamp before the
  transfer starts and then not update it again.
  
  Closes #1550

- metalink: remove unused printf() argument

- travis: let some builds *not* use --enable-debug
  
  typecheck-gcc and other things require optimized builds
  
  Closes #1544

- README.md: show the coverall coverage on github

- lib1521: fix compiler warnings

- test1521: make the code < 80 columns wide

- test1121: use stricter types to work with typcheck-gcc

- typecheck-gcc: allow CURLOPT_STDERR to be NULL too

- test1521: test *all* curl_easy_setopt options
  
  mk-lib1521.pl generates a test program (lib1521.c) that calls
  curl_easy_setopt() for every known option with a few typical values to
  make sure they work (ignoring the return codes).
  
  Some small changes were necessary to avoid asserts and NULL accesses
  when doing this.
  
  The perl script needs to be manually rerun when we add new options.
  
  Closes #1543

Dan Fandrich (5 Jun 2017)
- test1538: added "verbose logs" keyword
  
  These error messages are not displayed with --disable-verbose

Daniel Stenberg (5 Jun 2017)
- test1262: verify ftp download with -z for "if older than this"

Marcel Raad (5 Jun 2017)
- curl_ntlm_core: use Curl_raw_toupper instead of toupper
  
  This was the only remaining use of toupper in the entire source code.
  
  Suggested-by: Daniel Stenberg

Daniel Stenberg (4 Jun 2017)
- RELEASE-NOTES: synced with 65ba92650







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
7165
7166
7167
7168
7169
7170
7171



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































- sockfilt: suppress conversion warning with explicit cast
  
  MSVC warns when implicitly casting -1 to unsigned long.

- rtspd: fix MSVC level 4 warning
  
  warning C4701: potentially uninitialized local variable 'req' used



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to jni/curl/CMakeLists.txt.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
endif()

# Disable warnings on Borland to avoid changing 3rd party code.
if(BORLAND)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
endif(BORLAND)

if(CURL_WERROR)
  if(MSVC_VERSION)
    set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /WX")
    set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX")
  else()
    # this assumes clang or gcc style options
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
  endif()
endif(CURL_WERROR)

# If we are on AIX, do the _ALL_SOURCE magic
if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
  set(_ALL_SOURCE 1)
endif(${CMAKE_SYSTEM_NAME} MATCHES AIX)

# Include all the necessary files for macros
include (CheckFunctionExists)







<
<
<
<
<
<
<
<
<
<







228
229
230
231
232
233
234










235
236
237
238
239
240
241
endif()

# Disable warnings on Borland to avoid changing 3rd party code.
if(BORLAND)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
endif(BORLAND)











# If we are on AIX, do the _ALL_SOURCE magic
if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
  set(_ALL_SOURCE 1)
endif(${CMAKE_SYSTEM_NAME} MATCHES AIX)

# Include all the necessary files for macros
include (CheckFunctionExists)
291
292
293
294
295
296
297

298
299
300
301
302
303
304
endif(NOT NOT_NEED_LIBNSL)

check_function_exists(gethostname HAVE_GETHOSTNAME)

if(WIN32)
  check_library_exists_concat("ws2_32" getch        HAVE_LIBWS2_32)
  check_library_exists_concat("winmm"  getch        HAVE_LIBWINMM)

endif()

# check SSL libraries
# TODO support GNUTLS, NSS, POLARSSL, AXTLS, CYASSL

if(APPLE)
  option(CMAKE_USE_DARWINSSL "enable Apple OS native SSL/TLS" OFF)







>







281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
endif(NOT NOT_NEED_LIBNSL)

check_function_exists(gethostname HAVE_GETHOSTNAME)

if(WIN32)
  check_library_exists_concat("ws2_32" getch        HAVE_LIBWS2_32)
  check_library_exists_concat("winmm"  getch        HAVE_LIBWINMM)
  list(APPEND CURL_LIBS "advapi32")
endif()

# check SSL libraries
# TODO support GNUTLS, NSS, POLARSSL, AXTLS, CYASSL

if(APPLE)
  option(CMAKE_USE_DARWINSSL "enable Apple OS native SSL/TLS" OFF)
516
517
518
519
520
521
522












523
524
525
526
527
528
529
    set(HAVE_ZLIB ON)
    set(HAVE_LIBZ ON)
    list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
    include_directories(${ZLIB_INCLUDE_DIRS})
    list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
  endif()
endif()













#libSSH2
option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON)
mark_as_advanced(CMAKE_USE_LIBSSH2)
set(USE_LIBSSH2 OFF)
set(HAVE_LIBSSH2 OFF)
set(HAVE_LIBSSH2_H OFF)







>
>
>
>
>
>
>
>
>
>
>
>







507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
    set(HAVE_ZLIB ON)
    set(HAVE_LIBZ ON)
    list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
    include_directories(${ZLIB_INCLUDE_DIRS})
    list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
  endif()
endif()

option(CURL_BROTLI "Set to ON to enable building curl with brotli support." OFF)
set(HAVE_BROTLI OFF)
if(CURL_BROTLI)
  find_package(BROTLI QUIET)
  if(BROTLI_FOUND)
    set(HAVE_BROTLI ON)
    list(APPEND CURL_LIBS ${BROTLI_LIBRARIES})
    include_directories(${BROTLI_INCLUDE_DIRS})
    list(APPEND CMAKE_REQUIRED_INCLUDES ${BROTLI_INCLUDE_DIRS})
  endif()
endif()

#libSSH2
option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON)
mark_as_advanced(CMAKE_USE_LIBSSH2)
set(USE_LIBSSH2 OFF)
set(HAVE_LIBSSH2 OFF)
set(HAVE_LIBSSH2_H OFF)
1111
1112
1113
1114
1115
1116
1117









1118
1119
1120
1121
1122
1123
1124
  if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
    string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  else(CMAKE_C_FLAGS MATCHES "/W[0-4]")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
  endif(CMAKE_C_FLAGS MATCHES "/W[0-4]")
endif(MSVC)










# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it).
function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
  file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT)
  string(REPLACE "$(top_srcdir)"   "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
  string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})

  string(REGEX REPLACE "\\\\\n" "!π!α!" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})







>
>
>
>
>
>
>
>
>







1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
  if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
    string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  else(CMAKE_C_FLAGS MATCHES "/W[0-4]")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
  endif(CMAKE_C_FLAGS MATCHES "/W[0-4]")
endif(MSVC)

if(CURL_WERROR)
  if(MSVC_VERSION)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
  else()
    # this assumes clang or gcc style options
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
  endif()
endif(CURL_WERROR)

# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it).
function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
  file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT)
  string(REPLACE "$(top_srcdir)"   "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
  string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})

  string(REGEX REPLACE "\\\\\n" "!π!α!" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
Changes to jni/curl/Makefile.in.
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
  vauth/digest.c vauth/digest_sspi.c vauth/krb5_gssapi.c                \
  vauth/krb5_sspi.c vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c       \
  vauth/spnego_gssapi.c vauth/spnego_sspi.c

LIB_VAUTH_HFILES = vauth/vauth.h vauth/digest.h vauth/ntlm.h
LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \
  vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c               \
  vtls/cyassl.c vtls/schannel.c vtls/darwinssl.c vtls/gskit.c           \
  vtls/mbedtls.c

LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h                \
  vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h   \
  vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h           \
  vtls/mbedtls.h

LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \







|
|







649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
  vauth/digest.c vauth/digest_sspi.c vauth/krb5_gssapi.c                \
  vauth/krb5_sspi.c vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c       \
  vauth/spnego_gssapi.c vauth/spnego_sspi.c

LIB_VAUTH_HFILES = vauth/vauth.h vauth/digest.h vauth/ntlm.h
LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \
  vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c               \
  vtls/cyassl.c vtls/schannel.c vtls/schannel_verify.c                  \
  vtls/darwinssl.c vtls/gskit.c vtls/mbedtls.c

LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h                \
  vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h   \
  vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h           \
  vtls/mbedtls.h

LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \
Changes to jni/curl/RELEASE-NOTES.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

23
24
25
26







27

28
29
30






31
32

33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48
49
50


51







52
53
54
55
56
57
58





59

60
61
62
63
64
65
66
67
68
69




70

71



72
73
74
75
76
77


78



79
80
81
82
83
84

85
86
87
88
89
90
91
92
93
94




95

96
97




98
99
100
101
102
103
104
105
106

107
108
109
110



111

112
113

114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135




















136
137
138
139
140
141
142
143
144
145
146
147
148
149








150


151
152
153
154
155
156
157
158
159
160
161
162
163

164
165
166
167
168
169
170
171
172






173
174



175
176
177
178

Curl and libcurl 7.59.0

 Public curl releases:         173
 Command line options:         213
 curl_easy_setopt() options:   253
 Public functions in libcurl:  74
 Contributors:                 1705

This release includes the following changes:

 o curl: add --proxy-pinnedpubkey [10]
 o added: CURLOPT_TIMEVALUE_LARGE and CURLINFO_FILETIME_T [13]
 o CURLOPT_RESOLVE: Add support for multiple IP addresses per entry [37]
 o Add option CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS [37]
 o Add new tool option --happy-eyeballs-timeout-ms [37]
 o Add CURLOPT_RESOLVER_START_FUNCTION and CURLOPT_RESOLVER_START_DATA [39]

This release includes the following bugfixes:

 o openldap: check ldap_get_attribute_ber() results for NULL before using [50]
 o FTP: reject path components with control codes [51]
 o readwrite: make sure excess reads don't go beyond buffer end [52]

 o lib555: drop text conversion and encode data as ascii codes [1]
 o lib517: make variable static to avoid compiler warning
 o lib544: sync ascii code data with textual data [1]
 o GSKit: restore pinnedpubkey functionality [2]







 o darwinssl: Don't import client certificates into Keychain on macOS [3]

 o parsedate: fix date parsing for systems with 32 bit long [4]
 o openssl: fix pinned public key build error in FIPS mode [5]
 o SChannel/WinSSL: Implement public key pinning [6]






 o cookies: remove verbose "cookie size:" output
 o progress-bar: don't use stderr explicitly, use bar->out [7]

 o Fixes for MSDOS
 o build: open VC15 projects with VS 2017
 o curl_ctype: private is*() type macros and functions [8]
 o configure: set PATH_SEPARATOR to colon for PATH w/o separator [9]
 o winbuild: make linker generate proper PDB [11]
 o curl_easy_reset: clear digest auth state [12]
 o curl/curl.h: fix comment typo for CURLOPT_DNS_LOCAL_IP6 [14]
 o range: commonize FTP and FILE range handling [15]

 o progress-bar docs: update to match implementation [16]
 o fnmatch: do not match the empty string with a character set
 o fnmatch: accept an alphanum to be followed by a non-alphanum in char set [17]
 o build: fix termios issue on android cross-compile [18]
 o getdate: return -1 for out of range [19]
 o formdata: use the mime-content type function [20]
 o time-cond: fix reading the file modification time on Windows [21]
 o build-openssl.bat: Extend VC15 support to include Enterprise and Professional
 o build-wolfssl.bat: Extend VC15 support to include Enterprise and Professional
 o openssl: Don't add verify locations when verifypeer==0


 o fnmatch: optimize processing of consecutive *s and ?s pattern characters [22]







 o schannel: fix compiler warnings [23]
 o content_encoding: Add "none" alias to "identity" [24]
 o get_posix_time: only check for overflows if they can happen
 o http_chunks: don't write chunks twice with CURLOPT_HTTP_TRANSFER_DECODING [25]
 o README: language fix [26]
 o sha256: build with OpenSSL < 0.9.8 [27]
 o smtp: fix processing of initial dot in data [28]





 o --tlsauthtype: works only if libcurl is built with TLS-SRP support [29]

 o tests: new tests for http raw mode [30]
 o libcurl-security.3: man page discussion security concerns when using libcurl
 o curl_gssapi: make sure this file too uses our *printf()
 o BINDINGS: fix curb link (and remove ruby-curl-multi)
 o nss: use PK11_CreateManagedGenericObject() if available [31]
 o travis: add build with iconv enabled [32]
 o ssh: add two missing state names [33]
 o CURLOPT_HEADERFUNCTION.3: mention folded headers
 o http: fix the max header length detection logic [34]
 o header callback: don't chop headers into smaller pieces [35]




 o CURLOPT_HEADER.3: clarify problems with different data sizes

 o curl --version: show PSL if the run-time lib has it enabled



 o examples/sftpuploadresume: resume upload via CURLOPT_APPEND [36]
 o Return error if called recursively from within callbacks [38]
 o sasl: prefer PLAIN mechanism over LOGIN
 o winbuild: Use CALL to run batch scripts [40]
 o curl_share_setopt.3: connection cache is shared within multi handles
 o winbuild: Use macros for the names of some build utilities [41]


 o projects/README: remove reference to dead IDN link/package [42]



 o lib655: silence compiler warning [43]
 o configure: Fix version check for OpenSSL 1.1.1
 o docs/MANUAL: formfind.pl is not accessible on the site anymore [44]
 o unit1309: fix warning on Windows x64 [45]
 o unit1307: proper cleanup on OOM to fix torture tests
 o curl_ctype: fix macro redefinition warnings

 o build: get CFLAGS (including -werror) used for examples and tests [46]
 o NO_PROXY: fix for IPv6 numericals in the URL [47]
 o krb5: use nondeprecated functions [48]
 o winbuild: prefer documented zlib library names [49]
 o http2: mark the connection for close on GOAWAY [53]
 o limit-rate: kick in even before "limit" data has been received [54]
 o HTTP: allow "header;" to replace an internal header with a blank one [55]
 o http2: verbose output new MAX_CONCURRENT_STREAMS values
 o SECURITY: distros' max embargo time is 14 days
 o curl tool: accept --compressed also if Brotli is enabled and zlib is not




 o WolfSSL: adding TLSv1.3 [56]

 o checksrc.pl: add -i and -m options
 o CURLOPT_COOKIEFILE.3: "-" as file name means stdin





This release includes the following known bugs:

 o see docs/KNOWN_BUGS (https://curl.haxx.se/docs/knownbugs.html)

This release would not have looked like this without help, code, reports and
advice from friends like these:

  Adam Marcionek, Alessandro Ghedini, Anders Bakken, Aron Bergman, Ben Greear,

  Björn Stenberg, Bruno Grasselli, Dair Grant, Dan Fandrich, Daniel Stenberg,
  Dario Weisser, Douglas Mencken, Duy Phan Thanh, Earnestly on github,
  Erik Johansson, Francisco Sedano, Gisle Vanem, Guido Berhoerster,
  Henry Roeland, Kamil Dudka, Klaus Stein, Łukasz Domeradzki, Marcel Raad,



  Martin Dreher, Max Dymond, Michael Kaufmann, Michał Janiszewski,

  Mohammad AlSaleh, Patrick Monnerat, Patrick Schlangen, Ray Satiro,
  Richard Alcock, Richard Moore, Rod Widdowson, Ruurd Beerstra,

  Sergii Kavunenko, Sergio Borghese, Somnath Kundu, steelman on github,
  Stefan Kanthak, Steve Holme, Tim Mcdonough, Travis Burtrum, Viktor Szakats,
  刘佩东,
  (45 contributors)

        Thanks! (and sorry if I forgot to mention someone)

References to bug reports and discussions on issues:

 [1] = https://curl.haxx.se/bug/?i=1872
 [2] = https://curl.haxx.se/bug/?i=2263
 [3] = https://curl.haxx.se/bug/?i=2085
 [4] = https://curl.haxx.se/bug/?i=2250
 [5] = https://curl.haxx.se/bug/?i=2258
 [6] = https://curl.haxx.se/bug/?i=1429
 [7] = https://github.com/curl/curl/commit/993dd5651a6c853bfe3870f6a69c7b329fa4e8ce#commitcomment-27070080
 [8] = https://curl.haxx.se/bug/?i=2269
 [9] = https://curl.haxx.se/bug/?i=2202
 [10] = https://curl.haxx.se/bug/?i=2268
 [11] = https://curl.haxx.se/bug/?i=2274
 [12] = https://curl.haxx.se/mail/lib-2018-01/0074.html
 [13] = https://curl.haxx.se/bug/?i=2238




















 [14] = https://curl.haxx.se/bug/?i=2275
 [15] = https://curl.haxx.se/bug/?i=2205
 [16] = https://curl.haxx.se/bug/?i=2271
 [17] = https://curl.haxx.se/mail/lib-2018-01/0114.html
 [18] = https://curl.haxx.se/mail/lib-2018-01/0122.html
 [19] = https://curl.haxx.se/bug/?i=2278
 [20] = https://curl.haxx.se/bug/?i=2282
 [21] = https://curl.haxx.se/bug/?i=2164
 [22] = https://curl.haxx.se/bug/?i=2291
 [23] = https://curl.haxx.se/bug/?i=2296
 [24] = https://curl.haxx.se/bug/?i=2298
 [25] = https://curl.haxx.se/bug/?i=2303
 [26] = https://curl.haxx.se/bug/?i=2300
 [27] = https://curl.haxx.se/bug/?i=2305








 [28] = https://curl.haxx.se/bug/?i=2304


 [29] = https://bugzilla.redhat.com/1542256
 [30] = https://curl.haxx.se/bug/?i=2303
 [31] = https://bugzilla.redhat.com/1510247
 [32] = https://curl.haxx.se/bug/?i=1872
 [33] = https://curl.haxx.se/bug/?i=2312
 [34] = https://curl.haxx.se/mail/lib-2018-02/0056.html
 [35] = https://curl.haxx.se/bug/?i=2314
 [36] = https://curl.haxx.se/mail/lib-2018-02/0072.html
 [37] = https://curl.haxx.se/bug/?i=2260
 [38] = https://curl.haxx.se/bug/?i=2302
 [39] = https://curl.haxx.se/bug/?i=2311
 [40] = https://curl.haxx.se/bug/?i=2330
 [41] = https://curl.haxx.se/bug/?i=2329

 [42] = https://curl.haxx.se/bug/?i=2325
 [43] = https://curl.haxx.se/bug/?i=2335
 [44] = https://curl.haxx.se/bug/?i=2342
 [45] = https://curl.haxx.se/bug/?i=2341
 [46] = https://curl.haxx.se/bug/?i=2337
 [47] = https://curl.haxx.se/bug/?i=2353
 [48] = https://curl.haxx.se/bug/?i=2356
 [49] = https://curl.haxx.se/bug/?i=2354
 [50] = https://curl.haxx.se/docs/adv_2018-97a2.html






 [51] = https://curl.haxx.se/docs/adv_2018-9cd6.html
 [52] = https://curl.haxx.se/docs/adv_2018-b047.html



 [53] = https://curl.haxx.se/bug/?i=2365
 [54] = https://curl.haxx.se/bug/?i=2371
 [55] = https://curl.haxx.se/bug/?i=2357
 [56] = https://curl.haxx.se/bug/?i=2349

|

|
|
|

|



<
<
<
|
|
|



<
|
|
>
|
|
|
|
>
>
>
>
>
>
>
|
>
|
|
<
>
>
>
>
>
>
|
<
>
|
<
<
<
<
<
|
|
>
|
<
|
|
|
|
|
<
<
|
>
>
|
>
>
>
>
>
>
>
|
<
<
<
|
|
<
>
>
>
>
>
|
>
|
<
|
|
|
|
|
|
|
|
>
>
>
>
|
>
|
>
>
>
|
<
<
<
<
<
>
>
|
>
>
>
|
|
|
|
<
|
>
|
|
|
|
|
|
|
|
|
|
>
>
>
>
|
>
|
|
>
>
>
>








|
>
|
|
<
|
>
>
>
|
>
|
<
>
|
<
|
|





|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
|
|
>
>
>
|
|
|
|
>
1
2
3
4
5
6
7
8
9
10



11
12
13
14
15
16

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35
36
37
38
39
40
41

42
43





44
45
46
47

48
49
50
51
52


53
54
55
56
57
58
59
60
61
62
63
64



65
66

67
68
69
70
71
72
73
74

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93





94
95
96
97
98
99
100
101
102
103

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139

140
141
142
143
144
145
146

147
148

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
Curl and libcurl 7.60.0

 Public curl releases:         174
 Command line options:         214
 curl_easy_setopt() options:   255
 Public functions in libcurl:  74
 Contributors:                 1741

This release includes the following changes:




 o Add CURLOPT_HAPROXYPROTOCOL, support for the HAProxy PROXY protocol [10]
 o Add --haproxy-protocol for the command line tool [10]
 o Add CURLOPT_DNS_SHUFFLE_ADDRESSES, shuffle returned IP addresses [12]

This release includes the following bugfixes:


 o FTP: shutdown response buffer overflow CVE-2018-1000300 [88]
 o RTSP: bad headers buffer over-read CVE-2018-1000301 [89]
 o FTP: fix typo in recursive callback detection for seeking [1]
 o test1208: marked flaky
 o HTTP: make header-less responses still count correct body size [2]
 o user-agent.d:: mention --proxy-header as well [3]
 o http2: fixes typo [4]
 o cleanup: misc typos in strings and comments [5]
 o rate-limit: use three second window to better handle high speeds [6]
 o examples/hiperfifo.c: improved
 o pause: when changing pause state, update socket state [7]
 o multi: improved pending transfers handling => improved performance [8]
 o curl_version_info.3: fix ssl_version description [9]
 o add_handle/easy_perform: clear errorbuffer on start if set [11]
 o darwinssl: fix iOS build [13]
 o cmake: add support for brotli [14]
 o parsedate: support UT timezone [15]
 o vauth/ntlm.h: fix the #ifdef header guard

 o lib/curl_path.h: added #ifdef header guard
 o vauth/cleartext: fix integer overflow check [16]
 o CURLINFO_COOKIELIST.3: made the example not leak memory
 o cookie.d: mention that "-" as filename means stdin [17]
 o CURLINFO_SSL_VERIFYRESULT.3: fixed the example [18]
 o http2: read pending frames (including GOAWAY) in connection-check [19]
 o timeval: remove compilation warning by casting [20]

 o cmake: avoid warn-as-error during config checks [21]
 o travis-ci: enable -Werror for CMake builds [22]





 o openldap: fix for NULL return from ldap_get_attribute_ber() [23]
 o threaded resolver: track resolver time and set suitable timeout values [24]
 o cmake: Add advapi32 as explicit link library for win32 [25]
 o docs: fix CURLINFO_*_T examples use of CURL_FORMAT_CURL_OFF_T [26]

 o test1148: set a fixed locale for the test [27]
 o cookies: when reading from a file, only remove_expired once [28]
 o cookie: store cookies per top-level-domain-specific hash table [29]
 o openssl: fix build with LibreSSL 2.7 [30]
 o tls: fix mbedTLS 2.7.0 build + handle sha256 failures [31]


 o openssl: RESTORED verify locations when verifypeer==0 [32]
 o file: restore old behavior for file:////foo/bar URLs [33]
 o FTP: allow PASV on IPv6 connections when a proxy is being used [34]
 o build-openssl.bat: allow custom paths for VS and perl [35]
 o winbuild: make the clean target work without build-type [36]
 o build-openssl.bat: Refer to VS2017 as VC14.1 instead of VC15 [37]
 o curl: retry on FTP 4xx, ignore other protocols [38]
 o configure: detect (and use) sa_family_t [39]
 o examples/sftpuploadresume: Fix Windows large file seek
 o build: cleanup to fix clang warnings/errors [40]
 o winbuild: updated the documentation [41]
 o lib: silence null-dereference warnings [42]



 o travis: bump to clang 6 and gcc 7 [43]
 o travis: build libpsl and make builds use it [44]

 o proxy: show getenv proxy use in verbose output [45]
 o duphandle: make sure CURLOPT_RESOLVE is duplicated [46]
 o all: Refactor malloc+memset to use calloc [47]
 o checksrc: Fix typo [48]
 o system.h: Add sparcv8plus to oracle/sunpro 32-bit detection [49]
 o vauth: Fix typo [50]
 o ssh: show libSSH2 error code when closing fails [51]
 o test1148: tolerate progress updates better [52]

 o urldata: make service names unconditional [53]
 o configure: keep LD_LIBRARY_PATH changes local [54]
 o ntlm_sspi: fix authentication using Credential Manager [55]
 o schannel: add client certificate authentication [56]
 o winbuild: Support custom devel paths for each dependency [57]
 o schannel: add support for CURLOPT_CAINFO [58]
 o http2: handle on_begin_headers() called more than once [59]
 o openssl: support OpenSSL 1.1.1 verbose-mode trace messages [60]
 o openssl: fix subjectAltName check on non-ASCII platforms [61]
 o http2: avoid strstr() on data not zero terminated [62]
 o http2: clear the "drain counter" when a stream is closed [63]
 o http2: handle GOAWAY properly [64]
 o tool_help: clarify --max-time unit of time is seconds
 o curl.1: clarify that options and URLs can be mixed [65]
 o http2: convert an assert to run-time check [66]
 o curl_global_sslset: always provide available backends [67]
 o ftplistparser: keep state between invokes [68]
 o Curl_memchr: zero length input can't match
 o examples/sftpuploadresume: typecast fseek argument to long





 o examples/http2-upload: expand buffer to avoid silly warning
 o ctype: restore character classification for non-ASCII platforms [69]
 o mime: avoid NULL pointer dereference risk [70]
 o cookies: ensure that we have cookies before writing jar [71]
 o os400.c: fix checksrc warnings [72]
 o configure: provide --with-wolfssl as an alias for --with-cyassl
 o cyassl: adapt to libraries without TLS 1.0 support built-in
 o http2: get rid of another strstr [73]
 o checksrc: force indentation of lines after an else [74]
 o cookies: remove unused macro [75]

 o CURLINFO_PROTOCOL.3: mention the existing defined names
 o tests: provide 'manual' as a feature to optionally require [76]
 o travis: enable libssh2 on both macos and Linux [77]
 o CURLOPT_URL.3: added ENCODING section
 o wolfssl: Fix non-blocking connect [78]
 o vtls: don't define MD5_DIGEST_LENGTH for wolfssl
 o docs: remove extraneous commas in man pages [79]
 o URL: fix ASCII dependency in strcpy_url and strlen_url [80]
 o ssh-libssh.c: fix left shift compiler warning
 o configure: only check for CA bundle for file-using SSL backends [81]
 o travis: add an mbedtls build [82]
 o http: don't set the "rewind" flag when not uploading anything [83]
 o configure: put CURLDEBUG and DEBUGBUILD in lib/curl_config.h [84]
 o transfer: don't unset writesockfd on setup of multiplexed conns [85]
 o vtls: use unified "supports" bitfield member in backends [86]
 o URLs: fix one more http url [87]
 o travis: add a build using WolfSSL [90]
 o openssl: change FILE ops to BIO ops [91]
 o travis: add build using NSS [92]
 o smb: reject negative file sizes [93]
 o cookies: accept parameter names as cookie name [94]
 o http2: getsock fix for uploads [95]
 o all over: fixed format specifiers [96]
 o http2: use the correct function pointer typedef [97]

This release includes the following known bugs:

 o see docs/KNOWN_BUGS (https://curl.haxx.se/docs/knownbugs.html)

This release would not have looked like this without help, code, reports and
advice from friends like these:

  Adam Brown, Alex Baines, Anders Bakken, Anders Roxell, anshnd on github,
  Bas van Schaik, Bernard Spil, Chris Araman, Christian Schmitz, Cyril B,
  Dagobert Michelsen, Dan Fandrich, Daniel Gustafsson, Daniel Stenberg,
  Dan McNulty, Dario Weisser, dasimx on github, David Garske, David L.,

  Denis Ollier, Dmitry Mikhirev, Dongliang Mu, Don J Olmstead, Eric Gallager,
  Ernst Sjöstrand, Frank Gevaerts, Gaurav Malhotra, Geeknik Labs, Howard Chu,
  iz8mbw on github, Jakub Wilk, Jon DeVree, Kees Dekker, Kobi Gurkan,
  Laurie Clark-Michalek, Lauri Kasanen, Lawrence Matthews, Luz Paz,
  Marcel Raad, Max Dymond, Michael Kaufmann, Michael Kilburn,
  Michał Janiszewski, Michal Trybus, Muz Dima, Nikos Tsipinakis, Ori Avtalion,
  Oumph on github, patelvivekv1993 on github, Patrick Monnerat,

  Philip Prindeville, Ray Satiro, Rick Deist, Rikard Falkeborn, Sergei Nikulov,
  Stefan Agner, steini2000 on github, Stephan Mühlstrasser, Sunny Purushe,

  Terry Wu, Vincas Razma, wncboy on github, Wyatt O'Day, 刘佩东,
  (64 contributors)

        Thanks! (and sorry if I forgot to mention someone)

References to bug reports and discussions on issues:

 [1] = https://curl.haxx.se/bug/?i=2380
 [2] = https://curl.haxx.se/bug/?i=2382
 [3] = https://curl.haxx.se/bug/?i=2381
 [4] = https://curl.haxx.se/bug/?i=2387
 [5] = https://curl.haxx.se/bug/?i=2389
 [6] = https://curl.haxx.se/bug/?i=2386
 [7] = https://curl.haxx.se/mail/lib-2018-03/0048.html
 [8] = https://curl.haxx.se/bug/?i=2369
 [9] = https://curl.haxx.se/bug/?i=2364
 [10] = https://curl.haxx.se/bug/?i=2162
 [11] = https://curl.haxx.se/bug/?i=2190
 [12] = https://curl.haxx.se/bug/?i=1694
 [13] = https://curl.haxx.se/bug/?i=2397
 [14] = https://curl.haxx.se/bug/?i=2392
 [15] = https://curl.haxx.se/bug/?i=2401
 [16] = https://curl.haxx.se/bug/?i=2408
 [17] = https://curl.haxx.se/bug/?i=2410
 [18] = https://curl.haxx.se/bug/?i=2400
 [19] = https://curl.haxx.se/bug/?i=1967
 [20] = https://curl.haxx.se/bug/?i=2358
 [21] = https://curl.haxx.se/bug/?i=2358
 [22] = https://curl.haxx.se/bug/?i=2418
 [23] = https://curl.haxx.se/bug/?i=2399
 [24] = https://curl.haxx.se/bug/?i=2419
 [25] = https://curl.haxx.se/bug/?i=2363
 [26] = https://curl.haxx.se/mail/lib-2018-03/0140.html
 [27] = https://curl.haxx.se/bug/?i=2436
 [28] = https://curl.haxx.se/bug/?i=2441
 [29] = https://curl.haxx.se/bug/?i=2440
 [30] = https://curl.haxx.se/bug/?i=2319
 [31] = https://curl.haxx.se/bug/?i=2453
 [32] = https://curl.haxx.se/bug/?i=2451
 [33] = https://curl.haxx.se/bug/?i=2438
 [34] = https://curl.haxx.se/bug/?i=2432
 [35] = https://curl.haxx.se/bug/?i=2430
 [36] = https://curl.haxx.se/bug/?i=2455
 [37] = https://curl.haxx.se/bug/?i=2189
 [38] = https://curl.haxx.se/bug/?i=2462
 [39] = https://curl.haxx.se/bug/?i=2463
 [40] = https://curl.haxx.se/bug/?i=2466
 [41] = https://curl.haxx.se/bug/?i=2472
 [42] = https://curl.haxx.se/bug/?i=2463
 [43] = https://curl.haxx.se/bug/?i=2478
 [44] = https://curl.haxx.se/bug/?i=2471
 [45] = https://curl.haxx.se/bug/?i=2480
 [46] = https://curl.haxx.se/bug/?i=2485
 [47] = https://curl.haxx.se/bug/?i=2497
 [48] = https://curl.haxx.se/bug/?i=2498
 [49] = https://curl.haxx.se/bug/?i=2491
 [50] = https://curl.haxx.se/bug/?i=2496
 [51] = https://curl.haxx.se/bug/?i=2500
 [52] = https://curl.haxx.se/bug/?i=2446
 [53] = https://curl.haxx.se/bug/?i=2479
 [54] = https://curl.haxx.se/bug/?i=2490
 [55] = https://curl.haxx.se/bug/?i=1622
 [56] = https://curl.haxx.se/bug/?i=2376
 [57] = https://curl.haxx.se/bug/?i=2474
 [58] = https://curl.haxx.se/bug/?i=1325
 [59] = https://curl.haxx.se/bug/?i=2507
 [60] = https://curl.haxx.se/bug/?i=2403
 [61] = https://curl.haxx.se/bug/?i=2493
 [62] = https://curl.haxx.se/bug/?i=2513
 [63] = https://curl.haxx.se/bug/?i=1680
 [64] = https://curl.haxx.se/bug/?i=2416
 [65] = https://curl.haxx.se/bug/?i=2515
 [66] = https://curl.haxx.se/bug/?i=2514
 [67] = https://curl.haxx.se/bug/?i=2499
 [68] = https://curl.haxx.se/bug/?i=2445
 [69] = https://curl.haxx.se/bug/?i=2494
 [70] = https://curl.haxx.se/bug/?i=2527
 [71] = https://curl.haxx.se/bug/?i=2529
 [72] = https://curl.haxx.se/bug/?i=2525
 [73] = https://curl.haxx.se/bug/?i=2534
 [74] = https://curl.haxx.se/bug/?i=2532
 [75] = https://curl.haxx.se/bug/?i=2537
 [76] = https://curl.haxx.se/bug/?i=2533
 [77] = https://curl.haxx.se/bug/?i=2541
 [78] = https://curl.haxx.se/bug/?i=2542
 [79] = https://curl.haxx.se/bug/?i=2544
 [80] = https://curl.haxx.se/bug/?i=2535
 [81] = https://curl.haxx.se/bug/?i=2180
 [82] = https://curl.haxx.se/bug/?i=2531
 [83] = https://curl.haxx.se/bug/?i=2546
 [84] = https://curl.haxx.se/bug/?i=2548
 [85] = https://curl.haxx.se/bug/?i=2520
 [86] = https://curl.haxx.se/bug/?i=2547
 [87] = https://curl.haxx.se/bug/?i=2550
 [88] = https://curl.haxx.se/docs/adv_2018-82c2.html
 [89] = https://curl.haxx.se/docs/adv_2018-b138.html
 [90] = https://curl.haxx.se/bug/?i=2528
 [91] = https://curl.haxx.se/bug/?i=2512
 [92] = https://curl.haxx.se/bug/?i=2558
 [93] = https://curl.haxx.se/bug/?i=2558
 [94] = https://curl.haxx.se/bug/?i=2564
 [95] = https://curl.haxx.se/bug/?i=2520
 [96] = https://curl.haxx.se/bug/?i=2561
 [97] = https://curl.haxx.se/bug/?i=2560
Changes to jni/curl/config.guess.
1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh
# Attempt to guess a canonical system name.
#   Copyright 1992-2017 Free Software Foundation, Inc.

timestamp='2017-11-07'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but


|

|







1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh
# Attempt to guess a canonical system name.
#   Copyright 1992-2018 Free Software Foundation, Inc.

timestamp='2018-02-24'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

Report bugs and patches to <config-patches@gnu.org>."

version="\
GNU config.guess ($timestamp)

Originally written by Per Bothner.
Copyright 1992-2017 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

help="
Try \`$me --help' for more information."








|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

Report bugs and patches to <config-patches@gnu.org>."

version="\
GNU config.guess ($timestamp)

Originally written by Per Bothner.
Copyright 1992-2018 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

help="
Try \`$me --help' for more information."

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
 ,,)    echo "int x;" > $dummy.c ;
	for c in cc gcc c89 c99 ; do
	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
	     CC_FOR_BUILD="$c"; break ;
	  fi ;
	done ;
	if test x"$CC_FOR_BUILD" = x ; then
	  CC_FOR_BUILD=no_compiler_found ;
	fi
	;;







|

|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
 ,,)    echo "int x;" > "$dummy.c" ;
	for c in cc gcc c89 c99 ; do
	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
	     CC_FOR_BUILD="$c"; break ;
	  fi ;
	done ;
	if test x"$CC_FOR_BUILD" = x ; then
	  CC_FOR_BUILD=no_compiler_found ;
	fi
	;;
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267



268
269
270
271
272
273
274
fi

UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown

case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
	# If the system lacks a compiler, then just pick glibc.
	# We could probably try harder.
	LIBC=gnu

	eval $set_cc_for_build
	cat <<-EOF > $dummy.c
	#include <features.h>
	#if defined(__UCLIBC__)
	LIBC=uclibc
	#elif defined(__dietlibc__)
	LIBC=dietlibc
	#else
	LIBC=gnu
	#endif
	EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`







	;;
esac

# Note: order is significant - the case branches are not exclusive.

case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    *:NetBSD:*:*)
	# NetBSD (nbsd) targets should (where applicable) match one or
	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
	# switched to ELF, *-*-netbsd* would select the old
	# object file format.  This provides both forward
	# compatibility and a consistent mechanism for selecting the
	# object file format.
	#
	# Note: NetBSD doesn't particularly care about the vendor
	# portion of the name.  We always set it to "unknown".
	sysctl="sysctl -n hw.machine_arch"
	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
	    /sbin/$sysctl 2>/dev/null || \
	    /usr/sbin/$sysctl 2>/dev/null || \
	    echo unknown)`
	case "${UNAME_MACHINE_ARCH}" in
	    armeb) machine=armeb-unknown ;;
	    arm*) machine=arm-unknown ;;
	    sh3el) machine=shl-unknown ;;
	    sh3eb) machine=sh-unknown ;;
	    sh5el) machine=sh5le-unknown ;;
	    earmv*)
		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
		machine=${arch}${endian}-unknown
		;;
	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
	esac
	# The Operating System including object format, if it has switched
	# to ELF recently (or will in the future) and ABI.
	case "${UNAME_MACHINE_ARCH}" in
	    earm*)
		os=netbsdelf
		;;
	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
		eval $set_cc_for_build
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
			| grep -q __ELF__
		then
		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
		    # Return netbsd for either.  FIX?
		    os=netbsd
		else
		    os=netbsdelf
		fi
		;;
	    *)
		os=netbsd
		;;
	esac
	# Determine ABI tags.
	case "${UNAME_MACHINE_ARCH}" in
	    earm*)
		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
		;;
	esac
	# The OS release
	# Debian GNU/NetBSD machines have a different userland, and
	# thus, need a distinct triplet. However, they do not need
	# kernel version information, so it can be replaced with a
	# suitable tag, in the style of linux-gnu.
	case "${UNAME_VERSION}" in
	    Debian*)
		release='-gnu'
		;;
	    *)
		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
		;;
	esac
	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
	# contains redundant information, the shorter form:
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
	echo "${machine}-${os}${release}${abi}"
	exit ;;
    *:Bitrig:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
	exit ;;
    *:OpenBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
	exit ;;
    *:LibertyBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
	exit ;;
    *:MidnightBSD:*:*)
	echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE}
	exit ;;
    *:ekkoBSD:*:*)
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
	exit ;;
    *:SolidBSD:*:*)
	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
	exit ;;
    macppc:MirBSD:*:*)
	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
	exit ;;
    *:MirBSD:*:*)
	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
	exit ;;
    *:Sortix:*:*)
	echo ${UNAME_MACHINE}-unknown-sortix
	exit ;;
    *:Redox:*:*)
	echo ${UNAME_MACHINE}-unknown-redox
	exit ;;



    alpha:OSF1:*:*)
	case $UNAME_RELEASE in
	*4.0)
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
		;;
	*5.*)
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`







|





|
|









|
>
>
>
>
>
>
>





|













|
|

|






|
|
|

|



|




|















|


|







|




|





|



|



|



|


|


|


|


|


|


|


|

>
>
>







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
fi

UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown

case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
	# If the system lacks a compiler, then just pick glibc.
	# We could probably try harder.
	LIBC=gnu

	eval "$set_cc_for_build"
	cat <<-EOF > "$dummy.c"
	#include <features.h>
	#if defined(__UCLIBC__)
	LIBC=uclibc
	#elif defined(__dietlibc__)
	LIBC=dietlibc
	#else
	LIBC=gnu
	#endif
	EOF
	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"

	# If ldd exists, use it to detect musl libc.
	if command -v ldd >/dev/null && \
		ldd --version 2>&1 | grep -q ^musl
	then
	    LIBC=musl
	fi
	;;
esac

# Note: order is significant - the case branches are not exclusive.

case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
    *:NetBSD:*:*)
	# NetBSD (nbsd) targets should (where applicable) match one or
	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
	# switched to ELF, *-*-netbsd* would select the old
	# object file format.  This provides both forward
	# compatibility and a consistent mechanism for selecting the
	# object file format.
	#
	# Note: NetBSD doesn't particularly care about the vendor
	# portion of the name.  We always set it to "unknown".
	sysctl="sysctl -n hw.machine_arch"
	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
	    "/sbin/$sysctl" 2>/dev/null || \
	    "/usr/sbin/$sysctl" 2>/dev/null || \
	    echo unknown)`
	case "$UNAME_MACHINE_ARCH" in
	    armeb) machine=armeb-unknown ;;
	    arm*) machine=arm-unknown ;;
	    sh3el) machine=shl-unknown ;;
	    sh3eb) machine=sh-unknown ;;
	    sh5el) machine=sh5le-unknown ;;
	    earmv*)
		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
		machine="${arch}${endian}"-unknown
		;;
	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
	esac
	# The Operating System including object format, if it has switched
	# to ELF recently (or will in the future) and ABI.
	case "$UNAME_MACHINE_ARCH" in
	    earm*)
		os=netbsdelf
		;;
	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
		eval "$set_cc_for_build"
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
			| grep -q __ELF__
		then
		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
		    # Return netbsd for either.  FIX?
		    os=netbsd
		else
		    os=netbsdelf
		fi
		;;
	    *)
		os=netbsd
		;;
	esac
	# Determine ABI tags.
	case "$UNAME_MACHINE_ARCH" in
	    earm*)
		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
		;;
	esac
	# The OS release
	# Debian GNU/NetBSD machines have a different userland, and
	# thus, need a distinct triplet. However, they do not need
	# kernel version information, so it can be replaced with a
	# suitable tag, in the style of linux-gnu.
	case "$UNAME_VERSION" in
	    Debian*)
		release='-gnu'
		;;
	    *)
		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
		;;
	esac
	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
	# contains redundant information, the shorter form:
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
	echo "$machine-${os}${release}${abi}"
	exit ;;
    *:Bitrig:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
	exit ;;
    *:OpenBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
	exit ;;
    *:LibertyBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
	exit ;;
    *:MidnightBSD:*:*)
	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
	exit ;;
    *:ekkoBSD:*:*)
	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
	exit ;;
    *:SolidBSD:*:*)
	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
	exit ;;
    macppc:MirBSD:*:*)
	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
	exit ;;
    *:MirBSD:*:*)
	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
	exit ;;
    *:Sortix:*:*)
	echo "$UNAME_MACHINE"-unknown-sortix
	exit ;;
    *:Redox:*:*)
	echo "$UNAME_MACHINE"-unknown-redox
	exit ;;
    mips:OSF1:*.*)
        echo mips-dec-osf1
        exit ;;
    alpha:OSF1:*:*)
	case $UNAME_RELEASE in
	*4.0)
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
		;;
	*5.*)
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
		UNAME_MACHINE=alphaev79 ;;
	esac
	# A Pn.n version is a patched version.
	# A Vn.n version is a released version.
	# A Tn.n version is a released field test version.
	# A Xn.n version is an unreleased experimental baselevel.
	# 1.2 uses "1.2" for uname -r.
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
	exitcode=$?
	trap '' 0
	exit $exitcode ;;
    Amiga*:UNIX_System_V:4.0:*)
	echo m68k-unknown-sysv4
	exit ;;
    *:[Aa]miga[Oo][Ss]:*:*)
	echo ${UNAME_MACHINE}-unknown-amigaos
	exit ;;
    *:[Mm]orph[Oo][Ss]:*:*)
	echo ${UNAME_MACHINE}-unknown-morphos
	exit ;;
    *:OS/390:*:*)
	echo i370-ibm-openedition
	exit ;;
    *:z/VM:*:*)
	echo s390-ibm-zvmoe
	exit ;;
    *:OS400:*:*)
	echo powerpc-ibm-os400
	exit ;;
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
	echo arm-acorn-riscix${UNAME_RELEASE}
	exit ;;
    arm*:riscos:*:*|arm*:RISCOS:*:*)
	echo arm-unknown-riscos
	exit ;;
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
	echo hppa1.1-hitachi-hiuxmpp
	exit ;;







|








|


|











|







322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
		UNAME_MACHINE=alphaev79 ;;
	esac
	# A Pn.n version is a patched version.
	# A Vn.n version is a released version.
	# A Tn.n version is a released field test version.
	# A Xn.n version is an unreleased experimental baselevel.
	# 1.2 uses "1.2" for uname -r.
	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
	exitcode=$?
	trap '' 0
	exit $exitcode ;;
    Amiga*:UNIX_System_V:4.0:*)
	echo m68k-unknown-sysv4
	exit ;;
    *:[Aa]miga[Oo][Ss]:*:*)
	echo "$UNAME_MACHINE"-unknown-amigaos
	exit ;;
    *:[Mm]orph[Oo][Ss]:*:*)
	echo "$UNAME_MACHINE"-unknown-morphos
	exit ;;
    *:OS/390:*:*)
	echo i370-ibm-openedition
	exit ;;
    *:z/VM:*:*)
	echo s390-ibm-zvmoe
	exit ;;
    *:OS400:*:*)
	echo powerpc-ibm-os400
	exit ;;
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
	echo arm-acorn-riscix"$UNAME_RELEASE"
	exit ;;
    arm*:riscos:*:*|arm*:RISCOS:*:*)
	echo arm-unknown-riscos
	exit ;;
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
	echo hppa1.1-hitachi-hiuxmpp
	exit ;;
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
	echo sparc-icl-nx6
	exit ;;
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
	case `/usr/bin/uname -p` in
	    sparc) echo sparc-icl-nx7; exit ;;
	esac ;;
    s390x:SunOS:*:*)
	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    sun4H:SunOS:5.*:*)
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
	echo i386-pc-auroraux${UNAME_RELEASE}
	exit ;;
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
	eval $set_cc_for_build
	SUN_ARCH=i386
	# If there is a compiler, see if it is configured for 64-bit objects.
	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
	# This test works for both compilers.
	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
		grep IS_64BIT_ARCH >/dev/null
	    then
		SUN_ARCH=x86_64
	    fi
	fi
	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    sun4*:SunOS:6*:*)
	# According to config.sub, this is the proper way to canonicalize
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
	# it's likely to be more like Solaris than SunOS4.
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    sun4*:SunOS:*:*)
	case "`/usr/bin/arch -k`" in
	    Series*|S4*)
		UNAME_RELEASE=`uname -v`
		;;
	esac
	# Japanese Language versions have a version number like `4.1.3-JL'.
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
	exit ;;
    sun3*:SunOS:*:*)
	echo m68k-sun-sunos${UNAME_RELEASE}
	exit ;;
    sun*:*:4.2BSD:*)
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
	case "`/bin/arch`" in
	    sun3)
		echo m68k-sun-sunos${UNAME_RELEASE}
		;;
	    sun4)
		echo sparc-sun-sunos${UNAME_RELEASE}
		;;
	esac
	exit ;;
    aushp:SunOS:*:*)
	echo sparc-auspex-sunos${UNAME_RELEASE}
	exit ;;
    # The situation for MiNT is a little confusing.  The machine name
    # can be virtually everything (everything which is not
    # "atarist" or "atariste" at least should have a processor
    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
    # to the lowercase version "mint" (or "freemint").  Finally
    # the system name "TOS" denotes a system which is actually not
    # MiNT.  But MiNT is downward compatible to TOS, so this should
    # be no problem.
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
	echo m68k-atari-mint${UNAME_RELEASE}
	exit ;;
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
	echo m68k-atari-mint${UNAME_RELEASE}
	exit ;;
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
	echo m68k-atari-mint${UNAME_RELEASE}
	exit ;;
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
	echo m68k-milan-mint${UNAME_RELEASE}
	exit ;;
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
	echo m68k-hades-mint${UNAME_RELEASE}
	exit ;;
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
	echo m68k-unknown-mint${UNAME_RELEASE}
	exit ;;
    m68k:machten:*:*)
	echo m68k-apple-machten${UNAME_RELEASE}
	exit ;;
    powerpc:machten:*:*)
	echo powerpc-apple-machten${UNAME_RELEASE}
	exit ;;
    RISC*:Mach:*:*)
	echo mips-dec-mach_bsd4.3
	exit ;;
    RISC*:ULTRIX:*:*)
	echo mips-dec-ultrix${UNAME_RELEASE}
	exit ;;
    VAX*:ULTRIX*:*:*)
	echo vax-dec-ultrix${UNAME_RELEASE}
	exit ;;
    2020:CLIX:*:* | 2430:CLIX:*:*)
	echo clipper-intergraph-clix${UNAME_RELEASE}
	exit ;;
    mips:*:*:UMIPS | mips:*:*:RISCos)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h>  /* for printf() prototype */
	int main (int argc, char *argv[]) {
#else
	int main (argc, argv) int argc; char *argv[]; {
#endif
	#if defined (host_mips) && defined (MIPSEB)
	#if defined (SYSTYPE_SYSV)
	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
	#endif
	#if defined (SYSTYPE_SVR4)
	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
	#endif
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
	#endif
	#endif
	  exit (-1);
	}
EOF
	$CC_FOR_BUILD -o $dummy $dummy.c &&
	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
	  SYSTEM_NAME=`$dummy $dummyarg` &&
	    { echo "$SYSTEM_NAME"; exit; }
	echo mips-mips-riscos${UNAME_RELEASE}
	exit ;;
    Motorola:PowerMAX_OS:*:*)
	echo powerpc-motorola-powermax
	exit ;;
    Motorola:*:4.3:PL8-*)
	echo powerpc-harris-powermax
	exit ;;







|


|


|


|


|












|





|








|


|



|


|


|




|










|


|


|


|


|


|


|


|





|


|


|


|
|




















|
|
|

|







373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
	echo sparc-icl-nx6
	exit ;;
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
	case `/usr/bin/uname -p` in
	    sparc) echo sparc-icl-nx7; exit ;;
	esac ;;
    s390x:SunOS:*:*)
	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
	exit ;;
    sun4H:SunOS:5.*:*)
	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
	exit ;;
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
	exit ;;
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
	echo i386-pc-auroraux"$UNAME_RELEASE"
	exit ;;
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
	eval "$set_cc_for_build"
	SUN_ARCH=i386
	# If there is a compiler, see if it is configured for 64-bit objects.
	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
	# This test works for both compilers.
	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
		grep IS_64BIT_ARCH >/dev/null
	    then
		SUN_ARCH=x86_64
	    fi
	fi
	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
	exit ;;
    sun4*:SunOS:6*:*)
	# According to config.sub, this is the proper way to canonicalize
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
	# it's likely to be more like Solaris than SunOS4.
	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
	exit ;;
    sun4*:SunOS:*:*)
	case "`/usr/bin/arch -k`" in
	    Series*|S4*)
		UNAME_RELEASE=`uname -v`
		;;
	esac
	# Japanese Language versions have a version number like `4.1.3-JL'.
	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
	exit ;;
    sun3*:SunOS:*:*)
	echo m68k-sun-sunos"$UNAME_RELEASE"
	exit ;;
    sun*:*:4.2BSD:*)
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
	case "`/bin/arch`" in
	    sun3)
		echo m68k-sun-sunos"$UNAME_RELEASE"
		;;
	    sun4)
		echo sparc-sun-sunos"$UNAME_RELEASE"
		;;
	esac
	exit ;;
    aushp:SunOS:*:*)
	echo sparc-auspex-sunos"$UNAME_RELEASE"
	exit ;;
    # The situation for MiNT is a little confusing.  The machine name
    # can be virtually everything (everything which is not
    # "atarist" or "atariste" at least should have a processor
    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
    # to the lowercase version "mint" (or "freemint").  Finally
    # the system name "TOS" denotes a system which is actually not
    # MiNT.  But MiNT is downward compatible to TOS, so this should
    # be no problem.
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
	echo m68k-atari-mint"$UNAME_RELEASE"
	exit ;;
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
	echo m68k-atari-mint"$UNAME_RELEASE"
	exit ;;
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
	echo m68k-atari-mint"$UNAME_RELEASE"
	exit ;;
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
	echo m68k-milan-mint"$UNAME_RELEASE"
	exit ;;
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
	echo m68k-hades-mint"$UNAME_RELEASE"
	exit ;;
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
	echo m68k-unknown-mint"$UNAME_RELEASE"
	exit ;;
    m68k:machten:*:*)
	echo m68k-apple-machten"$UNAME_RELEASE"
	exit ;;
    powerpc:machten:*:*)
	echo powerpc-apple-machten"$UNAME_RELEASE"
	exit ;;
    RISC*:Mach:*:*)
	echo mips-dec-mach_bsd4.3
	exit ;;
    RISC*:ULTRIX:*:*)
	echo mips-dec-ultrix"$UNAME_RELEASE"
	exit ;;
    VAX*:ULTRIX*:*:*)
	echo vax-dec-ultrix"$UNAME_RELEASE"
	exit ;;
    2020:CLIX:*:* | 2430:CLIX:*:*)
	echo clipper-intergraph-clix"$UNAME_RELEASE"
	exit ;;
    mips:*:*:UMIPS | mips:*:*:RISCos)
	eval "$set_cc_for_build"
	sed 's/^	//' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h>  /* for printf() prototype */
	int main (int argc, char *argv[]) {
#else
	int main (argc, argv) int argc; char *argv[]; {
#endif
	#if defined (host_mips) && defined (MIPSEB)
	#if defined (SYSTYPE_SYSV)
	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
	#endif
	#if defined (SYSTYPE_SVR4)
	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
	#endif
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
	#endif
	#endif
	  exit (-1);
	}
EOF
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
	    { echo "$SYSTEM_NAME"; exit; }
	echo mips-mips-riscos"$UNAME_RELEASE"
	exit ;;
    Motorola:PowerMAX_OS:*:*)
	echo powerpc-motorola-powermax
	exit ;;
    Motorola:*:4.3:PL8-*)
	echo powerpc-harris-powermax
	exit ;;
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
	exit ;;
    m88k:*:3*:R3*)
	echo m88k-motorola-sysv3
	exit ;;
    AViiON:dgux:*:*)
	# DG/UX returns AViiON for all architectures
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
	then
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
	    then
		echo m88k-dg-dgux${UNAME_RELEASE}
	    else
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
	    fi
	else
	    echo i586-dg-dgux${UNAME_RELEASE}
	fi
	exit ;;
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
	echo m88k-dolphin-sysv3
	exit ;;
    M88*:*:R3*:*)
	# Delta 88k system running SVR3
	echo m88k-motorola-sysv3
	exit ;;
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
	echo m88k-tektronix-sysv3
	exit ;;
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
	echo m68k-tektronix-bsd
	exit ;;
    *:IRIX*:*:*)
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
	exit ;;
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
    i*86:AIX:*:*)
	echo i386-ibm-aix
	exit ;;
    ia64:AIX:*:*)
	if [ -x /usr/bin/oslevel ] ; then
		IBM_REV=`/usr/bin/oslevel`
	else
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
	fi
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
	exit ;;
    *:AIX:2:3)
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
		eval $set_cc_for_build
		sed 's/^		//' << EOF >$dummy.c
		#include <sys/systemcfg.h>

		main()
			{
			if (!__power_pc())
				exit(1);
			puts("powerpc-ibm-aix3.2.5");
			exit(0);
			}
EOF
		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
		then
			echo "$SYSTEM_NAME"
		else
			echo rs6000-ibm-aix3.2.5
		fi
	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
		echo rs6000-ibm-aix3.2.4
	else
		echo rs6000-ibm-aix3.2
	fi
	exit ;;
    *:AIX:*:[4567])
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
		IBM_ARCH=rs6000
	else
		IBM_ARCH=powerpc
	fi
	if [ -x /usr/bin/lslpp ] ; then
		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
	else
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
	fi
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
	exit ;;
    *:AIX:*:*)
	echo rs6000-ibm-aix
	exit ;;
    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
	echo romp-ibm-bsd4.4
	exit ;;
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
	exit ;;                             # report: romp-ibm BSD 4.3
    *:BOSX:*:*)
	echo rs6000-bull-bosx
	exit ;;
    DPX/2?00:B.O.S.:*:*)
	echo m68k-bull-sysv3
	exit ;;
    9000/[34]??:4.3bsd:1.*:*)
	echo m68k-hp-bsd
	exit ;;
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
	echo m68k-hp-bsd4.4
	exit ;;
    9000/[34678]??:HP-UX:*:*)
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	case "${UNAME_MACHINE}" in
	    9000/31?)            HP_ARCH=m68000 ;;
	    9000/[34]??)         HP_ARCH=m68k ;;
	    9000/[678][0-9][0-9])
		if [ -x /usr/bin/getconf ]; then
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
		    case "${sc_cpu_version}" in
		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
		      532)                      # CPU_PA_RISC2_0
			case "${sc_kernel_bits}" in
			  32) HP_ARCH=hppa2.0n ;;
			  64) HP_ARCH=hppa2.0w ;;
			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
			esac ;;
		    esac
		fi
		if [ "${HP_ARCH}" = "" ]; then
		    eval $set_cc_for_build
		    sed 's/^		//' << EOF >$dummy.c

		#define _HPUX_SOURCE
		#include <stdlib.h>
		#include <unistd.h>

		int main ()
		{







|

|
|

|

|


|
















|











|

|



|
|










|













|








|

|








|














|
|






|



|






|
|
|







530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
	exit ;;
    m88k:*:3*:R3*)
	echo m88k-motorola-sysv3
	exit ;;
    AViiON:dgux:*:*)
	# DG/UX returns AViiON for all architectures
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
	then
	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
	       [ "$TARGET_BINARY_INTERFACE"x = x ]
	    then
		echo m88k-dg-dgux"$UNAME_RELEASE"
	    else
		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
	    fi
	else
	    echo i586-dg-dgux"$UNAME_RELEASE"
	fi
	exit ;;
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
	echo m88k-dolphin-sysv3
	exit ;;
    M88*:*:R3*:*)
	# Delta 88k system running SVR3
	echo m88k-motorola-sysv3
	exit ;;
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
	echo m88k-tektronix-sysv3
	exit ;;
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
	echo m68k-tektronix-bsd
	exit ;;
    *:IRIX*:*:*)
	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
	exit ;;
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
    i*86:AIX:*:*)
	echo i386-ibm-aix
	exit ;;
    ia64:AIX:*:*)
	if [ -x /usr/bin/oslevel ] ; then
		IBM_REV=`/usr/bin/oslevel`
	else
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
	fi
	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
	exit ;;
    *:AIX:2:3)
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
		eval "$set_cc_for_build"
		sed 's/^		//' << EOF > "$dummy.c"
		#include <sys/systemcfg.h>

		main()
			{
			if (!__power_pc())
				exit(1);
			puts("powerpc-ibm-aix3.2.5");
			exit(0);
			}
EOF
		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
		then
			echo "$SYSTEM_NAME"
		else
			echo rs6000-ibm-aix3.2.5
		fi
	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
		echo rs6000-ibm-aix3.2.4
	else
		echo rs6000-ibm-aix3.2
	fi
	exit ;;
    *:AIX:*:[4567])
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
		IBM_ARCH=rs6000
	else
		IBM_ARCH=powerpc
	fi
	if [ -x /usr/bin/lslpp ] ; then
		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
	else
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
	fi
	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
	exit ;;
    *:AIX:*:*)
	echo rs6000-ibm-aix
	exit ;;
    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
	echo romp-ibm-bsd4.4
	exit ;;
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
	exit ;;                             # report: romp-ibm BSD 4.3
    *:BOSX:*:*)
	echo rs6000-bull-bosx
	exit ;;
    DPX/2?00:B.O.S.:*:*)
	echo m68k-bull-sysv3
	exit ;;
    9000/[34]??:4.3bsd:1.*:*)
	echo m68k-hp-bsd
	exit ;;
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
	echo m68k-hp-bsd4.4
	exit ;;
    9000/[34678]??:HP-UX:*:*)
	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
	case "$UNAME_MACHINE" in
	    9000/31?)            HP_ARCH=m68000 ;;
	    9000/[34]??)         HP_ARCH=m68k ;;
	    9000/[678][0-9][0-9])
		if [ -x /usr/bin/getconf ]; then
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
		    case "$sc_cpu_version" in
		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
		      532)                      # CPU_PA_RISC2_0
			case "$sc_kernel_bits" in
			  32) HP_ARCH=hppa2.0n ;;
			  64) HP_ARCH=hppa2.0w ;;
			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
			esac ;;
		    esac
		fi
		if [ "$HP_ARCH" = "" ]; then
		    eval "$set_cc_for_build"
		    sed 's/^		//' << EOF > "$dummy.c"

		#define _HPUX_SOURCE
		#include <stdlib.h>
		#include <unistd.h>

		int main ()
		{
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
			    puts ("hppa2.0"); break;
		#endif
			default: puts ("hppa1.0"); break;
			}
		    exit (0);
		}
EOF
		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
		    test -z "$HP_ARCH" && HP_ARCH=hppa
		fi ;;
	esac
	if [ ${HP_ARCH} = hppa2.0w ]
	then
	    eval $set_cc_for_build

	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
	    # generating 64-bit code.  GNU and HP use different nomenclature:
	    #
	    # $ CC_FOR_BUILD=cc ./config.guess
	    # => hppa2.0w-hp-hpux11.23
	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
	    # => hppa64-hp-hpux11.23

	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
		grep -q __LP64__
	    then
		HP_ARCH=hppa2.0w
	    else
		HP_ARCH=hppa64
	    fi
	fi
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
	exit ;;
    ia64:HP-UX:*:*)
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	echo ia64-hp-hpux${HPUX_REV}
	exit ;;
    3050*:HI-UX:*:*)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#include <unistd.h>
	int
	main ()
	{
	  long cpu = sysconf (_SC_CPU_VERSION);
	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct







|



|

|


















|


|
|


|
|







690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
			    puts ("hppa2.0"); break;
		#endif
			default: puts ("hppa1.0"); break;
			}
		    exit (0);
		}
EOF
		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
		    test -z "$HP_ARCH" && HP_ARCH=hppa
		fi ;;
	esac
	if [ "$HP_ARCH" = hppa2.0w ]
	then
	    eval "$set_cc_for_build"

	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
	    # generating 64-bit code.  GNU and HP use different nomenclature:
	    #
	    # $ CC_FOR_BUILD=cc ./config.guess
	    # => hppa2.0w-hp-hpux11.23
	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
	    # => hppa64-hp-hpux11.23

	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
		grep -q __LP64__
	    then
		HP_ARCH=hppa2.0w
	    else
		HP_ARCH=hppa64
	    fi
	fi
	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
	exit ;;
    ia64:HP-UX:*:*)
	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
	echo ia64-hp-hpux"$HPUX_REV"
	exit ;;
    3050*:HI-UX:*:*)
	eval "$set_cc_for_build"
	sed 's/^	//' << EOF > "$dummy.c"
	#include <unistd.h>
	int
	main ()
	{
	  long cpu = sysconf (_SC_CPU_VERSION);
	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
	    }
	  else if (CPU_IS_HP_MC68K (cpu))
	    puts ("m68k-hitachi-hiuxwe2");
	  else puts ("unknown-hitachi-hiuxwe2");
	  exit (0);
	}
EOF
	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
		{ echo "$SYSTEM_NAME"; exit; }
	echo unknown-hitachi-hiuxwe2
	exit ;;
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
	echo hppa1.1-hp-bsd
	exit ;;
    9000/8??:4.3bsd:*:*)
	echo hppa1.0-hp-bsd
	exit ;;
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
	echo hppa1.0-hp-mpeix
	exit ;;
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
	echo hppa1.1-hp-osf
	exit ;;
    hp8??:OSF1:*:*)
	echo hppa1.0-hp-osf
	exit ;;
    i*86:OSF1:*:*)
	if [ -x /usr/sbin/sysversion ] ; then
	    echo ${UNAME_MACHINE}-unknown-osf1mk
	else
	    echo ${UNAME_MACHINE}-unknown-osf1
	fi
	exit ;;
    parisc*:Lites*:*:*)
	echo hppa1.1-hp-lites
	exit ;;
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
	echo c1-convex-bsd







|




















|

|







748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
	    }
	  else if (CPU_IS_HP_MC68K (cpu))
	    puts ("m68k-hitachi-hiuxwe2");
	  else puts ("unknown-hitachi-hiuxwe2");
	  exit (0);
	}
EOF
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
		{ echo "$SYSTEM_NAME"; exit; }
	echo unknown-hitachi-hiuxwe2
	exit ;;
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
	echo hppa1.1-hp-bsd
	exit ;;
    9000/8??:4.3bsd:*:*)
	echo hppa1.0-hp-bsd
	exit ;;
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
	echo hppa1.0-hp-mpeix
	exit ;;
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
	echo hppa1.1-hp-osf
	exit ;;
    hp8??:OSF1:*:*)
	echo hppa1.0-hp-osf
	exit ;;
    i*86:OSF1:*:*)
	if [ -x /usr/sbin/sysversion ] ; then
	    echo "$UNAME_MACHINE"-unknown-osf1mk
	else
	    echo "$UNAME_MACHINE"-unknown-osf1
	fi
	exit ;;
    parisc*:Lites*:*:*)
	echo hppa1.1-hp-lites
	exit ;;
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
	echo c1-convex-bsd
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038



1039

1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
	echo c38-convex-bsd
	exit ;;
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
	echo c4-convex-bsd
	exit ;;
    CRAY*Y-MP:*:*:*)
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*[A-Z]90:*:*:*)
	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
	      -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*TS:*:*:*)
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*T3E:*:*:*)
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*SV1:*:*:*)
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    *:UNICOS/mp:*:*)
	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
	exit ;;
    5000:UNIX_System_V:4.*:*)
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
	exit ;;
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
	exit ;;
    sparc*:BSD/OS:*:*)
	echo sparc-unknown-bsdi${UNAME_RELEASE}
	exit ;;
    *:BSD/OS:*:*)
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
	exit ;;
    *:FreeBSD:*:*)
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	case ${UNAME_PROCESSOR} in
	    amd64)
		UNAME_PROCESSOR=x86_64 ;;
	    i386)
		UNAME_PROCESSOR=i586 ;;
	esac
	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
	exit ;;
    i*:CYGWIN*:*)
	echo ${UNAME_MACHINE}-pc-cygwin
	exit ;;
    *:MINGW64*:*)
	echo ${UNAME_MACHINE}-pc-mingw64
	exit ;;
    *:MINGW*:*)
	echo ${UNAME_MACHINE}-pc-mingw32
	exit ;;
    *:MSYS*:*)
	echo ${UNAME_MACHINE}-pc-msys
	exit ;;
    i*:PW*:*)
	echo ${UNAME_MACHINE}-pc-pw32
	exit ;;
    *:Interix*:*)
	case ${UNAME_MACHINE} in
	    x86)
		echo i586-pc-interix${UNAME_RELEASE}
		exit ;;
	    authenticamd | genuineintel | EM64T)
		echo x86_64-unknown-interix${UNAME_RELEASE}
		exit ;;
	    IA64)
		echo ia64-unknown-interix${UNAME_RELEASE}
		exit ;;
	esac ;;
    i*:UWIN*:*)
	echo ${UNAME_MACHINE}-pc-uwin
	exit ;;
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
	echo x86_64-unknown-cygwin
	exit ;;
    prep*:SunOS:5.*:*)
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    *:GNU:*:*)
	# the GNU system
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
	exit ;;
    *:GNU/*:*:*)
	# other systems with GNU libc and userland
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
	exit ;;
    i*86:Minix:*:*)
	echo ${UNAME_MACHINE}-pc-minix
	exit ;;
    aarch64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    aarch64_be:Linux:*:*)
	UNAME_MACHINE=aarch64_be
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    alpha:Linux:*:*)
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
	  EV5)   UNAME_MACHINE=alphaev5 ;;
	  EV56)  UNAME_MACHINE=alphaev56 ;;
	  PCA56) UNAME_MACHINE=alphapca56 ;;
	  PCA57) UNAME_MACHINE=alphapca56 ;;
	  EV6)   UNAME_MACHINE=alphaev6 ;;
	  EV67)  UNAME_MACHINE=alphaev67 ;;
	  EV68*) UNAME_MACHINE=alphaev68 ;;
	esac
	objdump --private-headers /bin/sh | grep -q ld.so.1
	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    arc:Linux:*:* | arceb:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    arm*:Linux:*:*)
	eval $set_cc_for_build
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
	    | grep -q __ARM_EABI__
	then
	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	else
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
		| grep -q __ARM_PCS_VFP
	    then
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
	    else
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
	    fi
	fi
	exit ;;
    avr32*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    cris:Linux:*:*)
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
	exit ;;
    crisv32:Linux:*:*)
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
	exit ;;
    e2k:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    frv:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    hexagon:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    i*86:Linux:*:*)
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
	exit ;;
    ia64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    k1om:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    m32r*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    m68*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    mips:Linux:*:* | mips64:Linux:*:*)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#undef CPU
	#undef ${UNAME_MACHINE}
	#undef ${UNAME_MACHINE}el
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
	CPU=${UNAME_MACHINE}el
	#else
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
	CPU=${UNAME_MACHINE}
	#else
	CPU=
	#endif
	#endif
EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
	;;
    mips64el:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    openrisc*:Linux:*:*)
	echo or1k-unknown-linux-${LIBC}
	exit ;;
    or32:Linux:*:* | or1k*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    padre:Linux:*:*)
	echo sparc-unknown-linux-${LIBC}
	exit ;;
    parisc64:Linux:*:* | hppa64:Linux:*:*)
	echo hppa64-unknown-linux-${LIBC}
	exit ;;
    parisc:Linux:*:* | hppa:Linux:*:*)
	# Look for CPU level
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
	  *)    echo hppa-unknown-linux-${LIBC} ;;
	esac
	exit ;;
    ppc64:Linux:*:*)
	echo powerpc64-unknown-linux-${LIBC}
	exit ;;
    ppc:Linux:*:*)
	echo powerpc-unknown-linux-${LIBC}
	exit ;;
    ppc64le:Linux:*:*)
	echo powerpc64le-unknown-linux-${LIBC}
	exit ;;
    ppcle:Linux:*:*)
	echo powerpcle-unknown-linux-${LIBC}
	exit ;;
    riscv32:Linux:*:* | riscv64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    s390:Linux:*:* | s390x:Linux:*:*)
	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
	exit ;;
    sh64*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    sh*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    sparc:Linux:*:* | sparc64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    tile*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    vax:Linux:*:*)
	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
	exit ;;
    x86_64:Linux:*:*)



	echo ${UNAME_MACHINE}-pc-linux-${LIBC}

	exit ;;
    xtensa*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    i*86:DYNIX/ptx:4*:*)
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
	# earlier versions are messed up and put the nodename in both
	# sysname and nodename.
	echo i386-sequent-sysv4
	exit ;;
    i*86:UNIX_SV:4.2MP:2.*)
	# Unixware is an offshoot of SVR4, but it has its own version
	# number series starting with 2...
	# I am not positive that other SVR4 systems won't match this,
	# I just have to hope.  -- rms.
	# Use sysv4.2uw... so that sysv4* matches it.
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
	exit ;;
    i*86:OS/2:*:*)
	# If we were able to find `uname', then EMX Unix compatibility
	# is probably installed.
	echo ${UNAME_MACHINE}-pc-os2-emx
	exit ;;
    i*86:XTS-300:*:STOP)
	echo ${UNAME_MACHINE}-unknown-stop
	exit ;;
    i*86:atheos:*:*)
	echo ${UNAME_MACHINE}-unknown-atheos
	exit ;;
    i*86:syllable:*:*)
	echo ${UNAME_MACHINE}-pc-syllable
	exit ;;
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
	echo i386-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    i*86:*DOS:*:*)
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
	exit ;;
    i*86:*:4.*:*)
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
	else
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
	fi
	exit ;;
    i*86:*:5:[678]*)
	# UnixWare 7.x, OpenUNIX and OpenServer 6.
	case `/bin/uname -X | grep "^Machine"` in
	    *486*)	     UNAME_MACHINE=i486 ;;
	    *Pentium)	     UNAME_MACHINE=i586 ;;
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
	esac
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
	exit ;;
    i*86:*:3.2:*)
	if test -f /usr/options/cb.name; then
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
			&& UNAME_MACHINE=i586
		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
			&& UNAME_MACHINE=i686
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
			&& UNAME_MACHINE=i686
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
	else
		echo ${UNAME_MACHINE}-pc-sysv32
	fi
	exit ;;
    pc:*:*:*)
	# Left here for compatibility:
	# uname -m prints for DJGPP always 'pc', but it prints nothing about
	# the processor, so we play safe by assuming i586.
	# Note: whatever this is, it MUST be the same as what config.sub
	# prints for the "djgpp" host, or else GDB configure will decide that
	# this is a cross-build.
	echo i586-pc-msdosdjgpp
	exit ;;
    Intel:Mach:3*:*)
	echo i386-pc-mach3
	exit ;;
    paragon:*:*:*)
	echo i860-intel-osf1
	exit ;;
    i860:*:4.*:*) # i860-SVR4
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
	else # Add other i860-SVR4 vendors below as they are discovered.
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
	fi
	exit ;;
    mini*:CTIX:SYS*5:*)
	# "miniframe"
	echo m68010-convergent-sysv
	exit ;;
    mc68k:UNIX:SYSTEM5:3.51m)
	echo m68k-convergent-sysv
	exit ;;
    M680?0:D-NIX:5.3:*)
	echo m68k-diab-dnix
	exit ;;
    M68*:*:R3V[5678]*:*)
	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
	OS_REL=''
	test -r /etc/.relid \
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	  && { echo i486-ncr-sysv4; exit; } ;;
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
	OS_REL='.3'
	test -r /etc/.relid \
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
	echo m68k-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    mc68030:UNIX_System_V:4.*:*)
	echo m68k-atari-sysv4
	exit ;;
    TSUNAMI:LynxOS:2.*:*)
	echo sparc-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    rs6000:LynxOS:2.*:*)
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    SM[BE]S:UNIX_SV:*:*)
	echo mips-dde-sysv${UNAME_RELEASE}
	exit ;;
    RM*:ReliantUNIX-*:*:*)
	echo mips-sni-sysv4
	exit ;;
    RM*:SINIX-*:*:*)
	echo mips-sni-sysv4
	exit ;;
    *:SINIX-*:*:*)
	if uname -p 2>/dev/null >/dev/null ; then
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
		echo ${UNAME_MACHINE}-sni-sysv4
	else
		echo ns32k-sni-sysv
	fi
	exit ;;
    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
			# says <Richard.M.Bartel@ccMail.Census.GOV>
	echo i586-unisys-sysv4
	exit ;;
    *:UNIX_System_V:4*:FTX*)
	# From Gerald Hewes <hewes@openmarket.com>.
	# How about differentiating between stratus architectures? -djm
	echo hppa1.1-stratus-sysv4
	exit ;;
    *:*:*:FTX*)
	# From seanf@swdc.stratus.com.
	echo i860-stratus-sysv4
	exit ;;
    i*86:VOS:*:*)
	# From Paul.Green@stratus.com.
	echo ${UNAME_MACHINE}-stratus-vos
	exit ;;
    *:VOS:*:*)
	# From Paul.Green@stratus.com.
	echo hppa1.1-stratus-vos
	exit ;;
    mc68*:A/UX:*:*)
	echo m68k-apple-aux${UNAME_RELEASE}
	exit ;;
    news*:NEWS-OS:6*:*)
	echo mips-sony-newsos6
	exit ;;
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
	if [ -d /usr/nec ]; then
		echo mips-nec-sysv${UNAME_RELEASE}
	else
		echo mips-unknown-sysv${UNAME_RELEASE}
	fi
	exit ;;
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
	echo powerpc-be-beos
	exit ;;
    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
	echo powerpc-apple-beos
	exit ;;
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
	echo i586-pc-beos
	exit ;;
    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
	echo i586-pc-haiku
	exit ;;
    x86_64:Haiku:*:*)
	echo x86_64-unknown-haiku
	exit ;;
    SX-4:SUPER-UX:*:*)
	echo sx4-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-5:SUPER-UX:*:*)
	echo sx5-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-6:SUPER-UX:*:*)
	echo sx6-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-7:SUPER-UX:*:*)
	echo sx7-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-8:SUPER-UX:*:*)
	echo sx8-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-8R:SUPER-UX:*:*)
	echo sx8r-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-ACE:SUPER-UX:*:*)
	echo sxace-nec-superux${UNAME_RELEASE}
	exit ;;
    Power*:Rhapsody:*:*)
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
	exit ;;
    *:Rhapsody:*:*)
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
	exit ;;
    *:Darwin:*:*)
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
	eval $set_cc_for_build
	if test "$UNAME_PROCESSOR" = unknown ; then
	    UNAME_PROCESSOR=powerpc
	fi
	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
		       grep IS_64BIT_ARCH >/dev/null
		then
		    case $UNAME_PROCESSOR in
			i386) UNAME_PROCESSOR=x86_64 ;;







|


|





|


|


|


|




|




|



|


|


|



|





|


|


|


|


|


|


|

|


|


|



|





|



|



|


|


|



|













|


|


|



|




|

|




|


|


|


|


|


|


|


|


|


|


|


|
|













|
|


|


|


|


|


|




|
|
|



|


|


|


|


|


|


|


|


|


|


|


>
>
>
|
>


|













|




|


|


|


|


|


|


|

|

|









|




|









|

|



















|

|



















|

|








|

|

|

|





|


|


|


|










|



















|






|






|

|


















|


|


|


|


|


|


|


|


|



|



|







796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
	echo c38-convex-bsd
	exit ;;
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
	echo c4-convex-bsd
	exit ;;
    CRAY*Y-MP:*:*:*)
	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*[A-Z]90:*:*:*)
	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
	      -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*TS:*:*:*)
	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*T3E:*:*:*)
	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*SV1:*:*:*)
	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    *:UNICOS/mp:*:*)
	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
	exit ;;
    5000:UNIX_System_V:4.*:*)
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
	exit ;;
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
	exit ;;
    sparc*:BSD/OS:*:*)
	echo sparc-unknown-bsdi"$UNAME_RELEASE"
	exit ;;
    *:BSD/OS:*:*)
	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
	exit ;;
    *:FreeBSD:*:*)
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	case "$UNAME_PROCESSOR" in
	    amd64)
		UNAME_PROCESSOR=x86_64 ;;
	    i386)
		UNAME_PROCESSOR=i586 ;;
	esac
	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
	exit ;;
    i*:CYGWIN*:*)
	echo "$UNAME_MACHINE"-pc-cygwin
	exit ;;
    *:MINGW64*:*)
	echo "$UNAME_MACHINE"-pc-mingw64
	exit ;;
    *:MINGW*:*)
	echo "$UNAME_MACHINE"-pc-mingw32
	exit ;;
    *:MSYS*:*)
	echo "$UNAME_MACHINE"-pc-msys
	exit ;;
    i*:PW*:*)
	echo "$UNAME_MACHINE"-pc-pw32
	exit ;;
    *:Interix*:*)
	case "$UNAME_MACHINE" in
	    x86)
		echo i586-pc-interix"$UNAME_RELEASE"
		exit ;;
	    authenticamd | genuineintel | EM64T)
		echo x86_64-unknown-interix"$UNAME_RELEASE"
		exit ;;
	    IA64)
		echo ia64-unknown-interix"$UNAME_RELEASE"
		exit ;;
	esac ;;
    i*:UWIN*:*)
	echo "$UNAME_MACHINE"-pc-uwin
	exit ;;
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
	echo x86_64-unknown-cygwin
	exit ;;
    prep*:SunOS:5.*:*)
	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
	exit ;;
    *:GNU:*:*)
	# the GNU system
	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
	exit ;;
    *:GNU/*:*:*)
	# other systems with GNU libc and userland
	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
	exit ;;
    i*86:Minix:*:*)
	echo "$UNAME_MACHINE"-pc-minix
	exit ;;
    aarch64:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    aarch64_be:Linux:*:*)
	UNAME_MACHINE=aarch64_be
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    alpha:Linux:*:*)
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
	  EV5)   UNAME_MACHINE=alphaev5 ;;
	  EV56)  UNAME_MACHINE=alphaev56 ;;
	  PCA56) UNAME_MACHINE=alphapca56 ;;
	  PCA57) UNAME_MACHINE=alphapca56 ;;
	  EV6)   UNAME_MACHINE=alphaev6 ;;
	  EV67)  UNAME_MACHINE=alphaev67 ;;
	  EV68*) UNAME_MACHINE=alphaev68 ;;
	esac
	objdump --private-headers /bin/sh | grep -q ld.so.1
	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    arc:Linux:*:* | arceb:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    arm*:Linux:*:*)
	eval "$set_cc_for_build"
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
	    | grep -q __ARM_EABI__
	then
	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	else
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
		| grep -q __ARM_PCS_VFP
	    then
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
	    else
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
	    fi
	fi
	exit ;;
    avr32*:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    cris:Linux:*:*)
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
	exit ;;
    crisv32:Linux:*:*)
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
	exit ;;
    e2k:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    frv:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    hexagon:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    i*86:Linux:*:*)
	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
	exit ;;
    ia64:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    k1om:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    m32r*:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    m68*:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    mips:Linux:*:* | mips64:Linux:*:*)
	eval "$set_cc_for_build"
	sed 's/^	//' << EOF > "$dummy.c"
	#undef CPU
	#undef ${UNAME_MACHINE}
	#undef ${UNAME_MACHINE}el
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
	CPU=${UNAME_MACHINE}el
	#else
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
	CPU=${UNAME_MACHINE}
	#else
	CPU=
	#endif
	#endif
EOF
	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
	test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
	;;
    mips64el:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    openrisc*:Linux:*:*)
	echo or1k-unknown-linux-"$LIBC"
	exit ;;
    or32:Linux:*:* | or1k*:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    padre:Linux:*:*)
	echo sparc-unknown-linux-"$LIBC"
	exit ;;
    parisc64:Linux:*:* | hppa64:Linux:*:*)
	echo hppa64-unknown-linux-"$LIBC"
	exit ;;
    parisc:Linux:*:* | hppa:Linux:*:*)
	# Look for CPU level
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
	  *)    echo hppa-unknown-linux-"$LIBC" ;;
	esac
	exit ;;
    ppc64:Linux:*:*)
	echo powerpc64-unknown-linux-"$LIBC"
	exit ;;
    ppc:Linux:*:*)
	echo powerpc-unknown-linux-"$LIBC"
	exit ;;
    ppc64le:Linux:*:*)
	echo powerpc64le-unknown-linux-"$LIBC"
	exit ;;
    ppcle:Linux:*:*)
	echo powerpcle-unknown-linux-"$LIBC"
	exit ;;
    riscv32:Linux:*:* | riscv64:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    s390:Linux:*:* | s390x:Linux:*:*)
	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
	exit ;;
    sh64*:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    sh*:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    sparc:Linux:*:* | sparc64:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    tile*:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    vax:Linux:*:*)
	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
	exit ;;
    x86_64:Linux:*:*)
	if objdump -f /bin/sh | grep -q elf32-x86-64; then
	    echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
	else
	    echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
	fi
	exit ;;
    xtensa*:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    i*86:DYNIX/ptx:4*:*)
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
	# earlier versions are messed up and put the nodename in both
	# sysname and nodename.
	echo i386-sequent-sysv4
	exit ;;
    i*86:UNIX_SV:4.2MP:2.*)
	# Unixware is an offshoot of SVR4, but it has its own version
	# number series starting with 2...
	# I am not positive that other SVR4 systems won't match this,
	# I just have to hope.  -- rms.
	# Use sysv4.2uw... so that sysv4* matches it.
	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
	exit ;;
    i*86:OS/2:*:*)
	# If we were able to find `uname', then EMX Unix compatibility
	# is probably installed.
	echo "$UNAME_MACHINE"-pc-os2-emx
	exit ;;
    i*86:XTS-300:*:STOP)
	echo "$UNAME_MACHINE"-unknown-stop
	exit ;;
    i*86:atheos:*:*)
	echo "$UNAME_MACHINE"-unknown-atheos
	exit ;;
    i*86:syllable:*:*)
	echo "$UNAME_MACHINE"-pc-syllable
	exit ;;
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
	echo i386-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
    i*86:*DOS:*:*)
	echo "$UNAME_MACHINE"-pc-msdosdjgpp
	exit ;;
    i*86:*:4.*:*)
	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
	else
		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
	fi
	exit ;;
    i*86:*:5:[678]*)
	# UnixWare 7.x, OpenUNIX and OpenServer 6.
	case `/bin/uname -X | grep "^Machine"` in
	    *486*)	     UNAME_MACHINE=i486 ;;
	    *Pentium)	     UNAME_MACHINE=i586 ;;
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
	esac
	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
	exit ;;
    i*86:*:3.2:*)
	if test -f /usr/options/cb.name; then
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
			&& UNAME_MACHINE=i586
		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
			&& UNAME_MACHINE=i686
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
			&& UNAME_MACHINE=i686
		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
	else
		echo "$UNAME_MACHINE"-pc-sysv32
	fi
	exit ;;
    pc:*:*:*)
	# Left here for compatibility:
	# uname -m prints for DJGPP always 'pc', but it prints nothing about
	# the processor, so we play safe by assuming i586.
	# Note: whatever this is, it MUST be the same as what config.sub
	# prints for the "djgpp" host, or else GDB configure will decide that
	# this is a cross-build.
	echo i586-pc-msdosdjgpp
	exit ;;
    Intel:Mach:3*:*)
	echo i386-pc-mach3
	exit ;;
    paragon:*:*:*)
	echo i860-intel-osf1
	exit ;;
    i860:*:4.*:*) # i860-SVR4
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
	else # Add other i860-SVR4 vendors below as they are discovered.
	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
	fi
	exit ;;
    mini*:CTIX:SYS*5:*)
	# "miniframe"
	echo m68010-convergent-sysv
	exit ;;
    mc68k:UNIX:SYSTEM5:3.51m)
	echo m68k-convergent-sysv
	exit ;;
    M680?0:D-NIX:5.3:*)
	echo m68k-diab-dnix
	exit ;;
    M68*:*:R3V[5678]*:*)
	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
	OS_REL=''
	test -r /etc/.relid \
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	  && { echo i486-ncr-sysv4; exit; } ;;
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
	OS_REL='.3'
	test -r /etc/.relid \
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
	echo m68k-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
    mc68030:UNIX_System_V:4.*:*)
	echo m68k-atari-sysv4
	exit ;;
    TSUNAMI:LynxOS:2.*:*)
	echo sparc-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
    rs6000:LynxOS:2.*:*)
	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
    SM[BE]S:UNIX_SV:*:*)
	echo mips-dde-sysv"$UNAME_RELEASE"
	exit ;;
    RM*:ReliantUNIX-*:*:*)
	echo mips-sni-sysv4
	exit ;;
    RM*:SINIX-*:*:*)
	echo mips-sni-sysv4
	exit ;;
    *:SINIX-*:*:*)
	if uname -p 2>/dev/null >/dev/null ; then
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
		echo "$UNAME_MACHINE"-sni-sysv4
	else
		echo ns32k-sni-sysv
	fi
	exit ;;
    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
			# says <Richard.M.Bartel@ccMail.Census.GOV>
	echo i586-unisys-sysv4
	exit ;;
    *:UNIX_System_V:4*:FTX*)
	# From Gerald Hewes <hewes@openmarket.com>.
	# How about differentiating between stratus architectures? -djm
	echo hppa1.1-stratus-sysv4
	exit ;;
    *:*:*:FTX*)
	# From seanf@swdc.stratus.com.
	echo i860-stratus-sysv4
	exit ;;
    i*86:VOS:*:*)
	# From Paul.Green@stratus.com.
	echo "$UNAME_MACHINE"-stratus-vos
	exit ;;
    *:VOS:*:*)
	# From Paul.Green@stratus.com.
	echo hppa1.1-stratus-vos
	exit ;;
    mc68*:A/UX:*:*)
	echo m68k-apple-aux"$UNAME_RELEASE"
	exit ;;
    news*:NEWS-OS:6*:*)
	echo mips-sony-newsos6
	exit ;;
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
	if [ -d /usr/nec ]; then
		echo mips-nec-sysv"$UNAME_RELEASE"
	else
		echo mips-unknown-sysv"$UNAME_RELEASE"
	fi
	exit ;;
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
	echo powerpc-be-beos
	exit ;;
    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
	echo powerpc-apple-beos
	exit ;;
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
	echo i586-pc-beos
	exit ;;
    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
	echo i586-pc-haiku
	exit ;;
    x86_64:Haiku:*:*)
	echo x86_64-unknown-haiku
	exit ;;
    SX-4:SUPER-UX:*:*)
	echo sx4-nec-superux"$UNAME_RELEASE"
	exit ;;
    SX-5:SUPER-UX:*:*)
	echo sx5-nec-superux"$UNAME_RELEASE"
	exit ;;
    SX-6:SUPER-UX:*:*)
	echo sx6-nec-superux"$UNAME_RELEASE"
	exit ;;
    SX-7:SUPER-UX:*:*)
	echo sx7-nec-superux"$UNAME_RELEASE"
	exit ;;
    SX-8:SUPER-UX:*:*)
	echo sx8-nec-superux"$UNAME_RELEASE"
	exit ;;
    SX-8R:SUPER-UX:*:*)
	echo sx8r-nec-superux"$UNAME_RELEASE"
	exit ;;
    SX-ACE:SUPER-UX:*:*)
	echo sxace-nec-superux"$UNAME_RELEASE"
	exit ;;
    Power*:Rhapsody:*:*)
	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
	exit ;;
    *:Rhapsody:*:*)
	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
	exit ;;
    *:Darwin:*:*)
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
	eval "$set_cc_for_build"
	if test "$UNAME_PROCESSOR" = unknown ; then
	    UNAME_PROCESSOR=powerpc
	fi
	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
		       grep IS_64BIT_ARCH >/dev/null
		then
		    case $UNAME_PROCESSOR in
			i386) UNAME_PROCESSOR=x86_64 ;;
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331



1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
	    # that puts up a graphical alert prompting to install
	    # developer tools.  Any system running Mac OS X 10.7 or
	    # later (Darwin 11 and later) is required to have a 64-bit
	    # processor. This is not true of the ARM version of Darwin
	    # that Apple uses in portable devices.
	    UNAME_PROCESSOR=x86_64
	fi
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
	exit ;;
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
	UNAME_PROCESSOR=`uname -p`
	if test "$UNAME_PROCESSOR" = x86; then
		UNAME_PROCESSOR=i386
		UNAME_MACHINE=pc
	fi
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
	exit ;;
    *:QNX:*:4*)
	echo i386-pc-qnx
	exit ;;
    NEO-*:NONSTOP_KERNEL:*:*)
	echo neo-tandem-nsk${UNAME_RELEASE}
	exit ;;
    NSE-*:NONSTOP_KERNEL:*:*)
	echo nse-tandem-nsk${UNAME_RELEASE}
	exit ;;
    NSR-*:NONSTOP_KERNEL:*:*)
	echo nsr-tandem-nsk${UNAME_RELEASE}
	exit ;;



    NSX-*:NONSTOP_KERNEL:*:*)
	echo nsx-tandem-nsk${UNAME_RELEASE}
	exit ;;
    *:NonStop-UX:*:*)
	echo mips-compaq-nonstopux
	exit ;;
    BS2000:POSIX*:*:*)
	echo bs2000-siemens-sysv
	exit ;;
    DS/*:UNIX_System_V:*:*)
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
	exit ;;
    *:Plan9:*:*)
	# "uname -m" is not consistent, so use $cputype instead. 386
	# is converted to i386 for consistency with other x86
	# operating systems.
	if test "$cputype" = 386; then
	    UNAME_MACHINE=i386
	else
	    UNAME_MACHINE="$cputype"
	fi
	echo ${UNAME_MACHINE}-unknown-plan9
	exit ;;
    *:TOPS-10:*:*)
	echo pdp10-unknown-tops10
	exit ;;
    *:TENEX:*:*)
	echo pdp10-unknown-tenex
	exit ;;
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
	echo pdp10-dec-tops20
	exit ;;
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
	echo pdp10-xkl-tops20
	exit ;;
    *:TOPS-20:*:*)
	echo pdp10-unknown-tops20
	exit ;;
    *:ITS:*:*)
	echo pdp10-unknown-its
	exit ;;
    SEI:*:*:SEIUX)
	echo mips-sei-seiux${UNAME_RELEASE}
	exit ;;
    *:DragonFly:*:*)
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
	exit ;;
    *:*VMS:*:*)
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
	case "${UNAME_MACHINE}" in
	    A*) echo alpha-dec-vms ; exit ;;
	    I*) echo ia64-dec-vms ; exit ;;
	    V*) echo vax-dec-vms ; exit ;;
	esac ;;
    *:XENIX:*:SysV)
	echo i386-pc-xenix
	exit ;;
    i*86:skyos:*:*)
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
	exit ;;
    i*86:rdos:*:*)
	echo ${UNAME_MACHINE}-pc-rdos
	exit ;;
    i*86:AROS:*:*)
	echo ${UNAME_MACHINE}-pc-aros
	exit ;;
    x86_64:VMkernel:*:*)
	echo ${UNAME_MACHINE}-unknown-esx
	exit ;;
    amd64:Isilon\ OneFS:*:*)
	echo x86_64-unknown-onefs
	exit ;;
esac

echo "$0: unable to guess system type" >&2

case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in
    mips:Linux | mips64:Linux)
	# If we got here on MIPS GNU/Linux, output extra information.
	cat >&2 <<EOF

NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
the system type. Please install a C compiler and try again.
EOF







|







|





|


|


|

>
>
>

|








|










|




















|


|



|








|


|


|


|








|







1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
	    # that puts up a graphical alert prompting to install
	    # developer tools.  Any system running Mac OS X 10.7 or
	    # later (Darwin 11 and later) is required to have a 64-bit
	    # processor. This is not true of the ARM version of Darwin
	    # that Apple uses in portable devices.
	    UNAME_PROCESSOR=x86_64
	fi
	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
	exit ;;
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
	UNAME_PROCESSOR=`uname -p`
	if test "$UNAME_PROCESSOR" = x86; then
		UNAME_PROCESSOR=i386
		UNAME_MACHINE=pc
	fi
	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
	exit ;;
    *:QNX:*:4*)
	echo i386-pc-qnx
	exit ;;
    NEO-*:NONSTOP_KERNEL:*:*)
	echo neo-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    NSE-*:NONSTOP_KERNEL:*:*)
	echo nse-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    NSR-*:NONSTOP_KERNEL:*:*)
	echo nsr-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    NSV-*:NONSTOP_KERNEL:*:*)
	echo nsv-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    NSX-*:NONSTOP_KERNEL:*:*)
	echo nsx-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    *:NonStop-UX:*:*)
	echo mips-compaq-nonstopux
	exit ;;
    BS2000:POSIX*:*:*)
	echo bs2000-siemens-sysv
	exit ;;
    DS/*:UNIX_System_V:*:*)
	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
	exit ;;
    *:Plan9:*:*)
	# "uname -m" is not consistent, so use $cputype instead. 386
	# is converted to i386 for consistency with other x86
	# operating systems.
	if test "$cputype" = 386; then
	    UNAME_MACHINE=i386
	else
	    UNAME_MACHINE="$cputype"
	fi
	echo "$UNAME_MACHINE"-unknown-plan9
	exit ;;
    *:TOPS-10:*:*)
	echo pdp10-unknown-tops10
	exit ;;
    *:TENEX:*:*)
	echo pdp10-unknown-tenex
	exit ;;
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
	echo pdp10-dec-tops20
	exit ;;
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
	echo pdp10-xkl-tops20
	exit ;;
    *:TOPS-20:*:*)
	echo pdp10-unknown-tops20
	exit ;;
    *:ITS:*:*)
	echo pdp10-unknown-its
	exit ;;
    SEI:*:*:SEIUX)
	echo mips-sei-seiux"$UNAME_RELEASE"
	exit ;;
    *:DragonFly:*:*)
	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
	exit ;;
    *:*VMS:*:*)
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
	case "$UNAME_MACHINE" in
	    A*) echo alpha-dec-vms ; exit ;;
	    I*) echo ia64-dec-vms ; exit ;;
	    V*) echo vax-dec-vms ; exit ;;
	esac ;;
    *:XENIX:*:SysV)
	echo i386-pc-xenix
	exit ;;
    i*86:skyos:*:*)
	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
	exit ;;
    i*86:rdos:*:*)
	echo "$UNAME_MACHINE"-pc-rdos
	exit ;;
    i*86:AROS:*:*)
	echo "$UNAME_MACHINE"-pc-aros
	exit ;;
    x86_64:VMkernel:*:*)
	echo "$UNAME_MACHINE"-unknown-esx
	exit ;;
    amd64:Isilon\ OneFS:*:*)
	echo x86_64-unknown-onefs
	exit ;;
esac

echo "$0: unable to guess system type" >&2

case "$UNAME_MACHINE:$UNAME_SYSTEM" in
    mips:Linux | mips64:Linux)
	# If we got here on MIPS GNU/Linux, output extra information.
	cat >&2 <<EOF

NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
the system type. Please install a C compiler and try again.
EOF
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
hostinfo               = `(hostinfo) 2>/dev/null`
/bin/universe          = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch              = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`

UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM  = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
EOF

exit 1

# Local variables:
# eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:







|
|
|
|










1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
hostinfo               = `(hostinfo) 2>/dev/null`
/bin/universe          = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch              = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`

UNAME_MACHINE = "$UNAME_MACHINE"
UNAME_RELEASE = "$UNAME_RELEASE"
UNAME_SYSTEM  = "$UNAME_SYSTEM"
UNAME_VERSION = "$UNAME_VERSION"
EOF

exit 1

# Local variables:
# eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
Changes to jni/curl/config.sub.
1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh
# Configuration validation subroutine script.
#   Copyright 1992-2017 Free Software Foundation, Inc.

timestamp='2017-11-23'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but


|

|







1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/sh
# Configuration validation subroutine script.
#   Copyright 1992-2018 Free Software Foundation, Inc.

timestamp='2018-02-22'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  -v, --version      print version number, then exit

Report bugs and patches to <config-patches@gnu.org>."

version="\
GNU config.sub ($timestamp)

Copyright 1992-2017 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

help="
Try \`$me --help' for more information."








|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  -v, --version      print version number, then exit

Report bugs and patches to <config-patches@gnu.org>."

version="\
GNU config.sub ($timestamp)

Copyright 1992-2018 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

help="
Try \`$me --help' for more information."

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
       break ;;
    -* )
       echo "$me: invalid option $1$help"
       exit 1 ;;

    *local*)
       # First pass through any local machine types.
       echo $1
       exit ;;

    * )
       break ;;
  esac
done

case $# in
 0) echo "$me: missing argument$help" >&2
    exit 1;;
 1) ;;
 *) echo "$me: too many arguments$help" >&2
    exit 1;;
esac

# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
  kopensolaris*-gnu* | cloudabi*-eabi* | \
  storm-chaos* | os2-emx* | rtmk-nova*)
    os=-$maybe_os
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    ;;
  android-linux)
    os=-linux-android
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
    ;;
  *)
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
    if [ $basic_machine != $1 ]
    then os=`echo $1 | sed 's/.*-/-/'`
    else os=; fi
    ;;
esac

### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work.  We also
### recognize some manufacturers as not being operating systems, so we







|

















|







|



|


|
|
|







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
       break ;;
    -* )
       echo "$me: invalid option $1$help"
       exit 1 ;;

    *local*)
       # First pass through any local machine types.
       echo "$1"
       exit ;;

    * )
       break ;;
  esac
done

case $# in
 0) echo "$me: missing argument$help" >&2
    exit 1;;
 1) ;;
 *) echo "$me: too many arguments$help" >&2
    exit 1;;
esac

# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
  kopensolaris*-gnu* | cloudabi*-eabi* | \
  storm-chaos* | os2-emx* | rtmk-nova*)
    os=-$maybe_os
    basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    ;;
  android-linux)
    os=-linux-android
    basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
    ;;
  *)
    basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
    if [ "$basic_machine" != "$1" ]
    then os=`echo "$1" | sed 's/.*-/-/'`
    else os=; fi
    ;;
esac

### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work.  We also
### recognize some manufacturers as not being operating systems, so we
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
		basic_machine=$1
		;;
	-hiux*)
		os=-hiuxwe2
		;;
	-sco6)
		os=-sco5v6
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco5)
		os=-sco3.2v5
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco4)
		os=-sco3.2v4
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco3.2.[4-9]*)
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco3.2v[4-9]*)
		# Don't forget version if it is 3.2v4 or newer.
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco5v6*)
		# Don't forget version if it is 3.2v4 or newer.
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-sco*)
		os=-sco3.2v2
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-udk*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-isc)
		os=-isc2.2
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-clix*)
		basic_machine=clipper-intergraph
		;;
	-isc*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
		;;
	-lynx*178)
		os=-lynxos178
		;;
	-lynx*5)
		os=-lynxos5
		;;
	-lynx*)
		os=-lynxos
		;;
	-ptx*)
		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
		;;
	-psos*)
		os=-psos
		;;
	-mint | -mint[0-9]*)
		basic_machine=m68k-atari
		os=-mint







|



|



|



|



|



|



|


|



|





|











|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
		basic_machine=$1
		;;
	-hiux*)
		os=-hiuxwe2
		;;
	-sco6)
		os=-sco5v6
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-sco5)
		os=-sco3.2v5
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-sco4)
		os=-sco3.2v4
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-sco3.2.[4-9]*)
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-sco3.2v[4-9]*)
		# Don't forget version if it is 3.2v4 or newer.
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-sco5v6*)
		# Don't forget version if it is 3.2v4 or newer.
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-sco*)
		os=-sco3.2v2
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-udk*)
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-isc)
		os=-isc2.2
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-clix*)
		basic_machine=clipper-intergraph
		;;
	-isc*)
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
		;;
	-lynx*178)
		os=-lynxos178
		;;
	-lynx*5)
		os=-lynxos5
		;;
	-lynx*)
		os=-lynxos
		;;
	-ptx*)
		basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
		;;
	-psos*)
		os=-psos
		;;
	-mint | -mint[0-9]*)
		basic_machine=m68k-atari
		os=-mint
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
	| moxie \
	| mt \
	| msp430 \
	| nds32 | nds32le | nds32be \
	| nios | nios2 | nios2eb | nios2el \
	| ns16k | ns32k \
	| open8 | or1k | or1knd | or32 \
	| pdp10 | pdp11 | pj | pjl \
	| powerpc | powerpc64 | powerpc64le | powerpcle \
	| pru \
	| pyramid \
	| riscv32 | riscv64 \
	| rl78 | rx \
	| score \
	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \







|







292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
	| moxie \
	| mt \
	| msp430 \
	| nds32 | nds32le | nds32be \
	| nios | nios2 | nios2eb | nios2el \
	| ns16k | ns32k \
	| open8 | or1k | or1knd | or32 \
	| pdp10 | pj | pjl \
	| powerpc | powerpc64 | powerpc64le | powerpcle \
	| pru \
	| pyramid \
	| riscv32 | riscv64 \
	| rl78 | rx \
	| score \
	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
	leon|leon[3-9])
		basic_machine=sparc-$basic_machine
		;;
	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
		basic_machine=$basic_machine-unknown
		os=-none
		;;
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
		;;
	ms1)
		basic_machine=mt-unknown
		;;

	strongarm | thumb | xscale)
		basic_machine=arm-unknown







|







329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
	leon|leon[3-9])
		basic_machine=sparc-$basic_machine
		;;
	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
		basic_machine=$basic_machine-unknown
		os=-none
		;;
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
		;;
	ms1)
		basic_machine=mt-unknown
		;;

	strongarm | thumb | xscale)
		basic_machine=arm-unknown
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
	# because (1) that's what they normally are, and
	# (2) the word "unknown" tends to confuse beginning users.
	i*86 | x86_64)
	  basic_machine=$basic_machine-pc
	  ;;
	# Object if more than one company name word.
	*-*-*)
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
		exit 1
		;;
	# Recognize the basic CPU types with company name.
	580-* \
	| a29k-* \
	| aarch64-* | aarch64_be-* \
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \







|







358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
	# because (1) that's what they normally are, and
	# (2) the word "unknown" tends to confuse beginning users.
	i*86 | x86_64)
	  basic_machine=$basic_machine-pc
	  ;;
	# Object if more than one company name word.
	*-*-*)
		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
		exit 1
		;;
	# Recognize the basic CPU types with company name.
	580-* \
	| a29k-* \
	| aarch64-* | aarch64_be-* \
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
	# Recognize the basic CPU types without company name, with glob match.
	xtensa*)
		basic_machine=$basic_machine-unknown
		;;
	# Recognize the various machine names and aliases which stand
	# for a CPU type and a company and sometimes even an OS.
	386bsd)
		basic_machine=i386-unknown
		os=-bsd
		;;
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
		basic_machine=m68000-att
		;;
	3b*)
		basic_machine=we32k-att







|







453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
	# Recognize the basic CPU types without company name, with glob match.
	xtensa*)
		basic_machine=$basic_machine-unknown
		;;
	# Recognize the various machine names and aliases which stand
	# for a CPU type and a company and sometimes even an OS.
	386bsd)
		basic_machine=i386-pc
		os=-bsd
		;;
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
		basic_machine=m68000-att
		;;
	3b*)
		basic_machine=we32k-att
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
		basic_machine=a29k-none
		os=-bsd
		;;
	amd64)
		basic_machine=x86_64-pc
		;;
	amd64-*)
		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	amdahl)
		basic_machine=580-amdahl
		os=-sysv
		;;
	amiga | amiga-*)
		basic_machine=m68k-unknown







|







487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
		basic_machine=a29k-none
		os=-bsd
		;;
	amd64)
		basic_machine=x86_64-pc
		;;
	amd64-*)
		basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	amdahl)
		basic_machine=580-amdahl
		os=-sysv
		;;
	amiga | amiga-*)
		basic_machine=m68k-unknown
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
		os=-dynix
		;;
	blackfin)
		basic_machine=bfin-unknown
		os=-linux
		;;
	blackfin-*)
		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
		os=-linux
		;;
	bluegene*)
		basic_machine=powerpc-ibm
		os=-cnk
		;;
	c54x-*)
		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	c55x-*)
		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	c6x-*)
		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	c90)
		basic_machine=c90-cray
		os=-unicos
		;;
	cegcc)
		basic_machine=arm-unknown







|







|


|


|







532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
		os=-dynix
		;;
	blackfin)
		basic_machine=bfin-unknown
		os=-linux
		;;
	blackfin-*)
		basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		os=-linux
		;;
	bluegene*)
		basic_machine=powerpc-ibm
		os=-cnk
		;;
	c54x-*)
		basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	c55x-*)
		basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	c6x-*)
		basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	c90)
		basic_machine=c90-cray
		os=-unicos
		;;
	cegcc)
		basic_machine=arm-unknown
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
		os=-sysv3
		;;
	e500v[12])
		basic_machine=powerpc-unknown
		os=$os"spe"
		;;
	e500v[12]-*)
		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
		os=$os"spe"
		;;
	ebmon29k)
		basic_machine=a29k-amd
		os=-ebmon
		;;
	elxsi)







|







644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
		os=-sysv3
		;;
	e500v[12])
		basic_machine=powerpc-unknown
		os=$os"spe"
		;;
	e500v[12]-*)
		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		os=$os"spe"
		;;
	ebmon29k)
		basic_machine=a29k-amd
		os=-ebmon
		;;
	elxsi)
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
		;;
	hp9k8[0-9][13679] | hp8[0-9][13679])
		basic_machine=hppa1.1-hp
		;;
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
		basic_machine=hppa1.0-hp
		;;
	hppa-next)
		os=-nextstep3
		;;
	hppaosf)
		basic_machine=hppa1.1-hp
		os=-osf
		;;
	hppro)
		basic_machine=hppa1.1-hp
		os=-proelf
		;;
	i370-ibm* | ibm*)
		basic_machine=i370-ibm
		;;
	i*86v32)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv32
		;;
	i*86v4*)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv4
		;;
	i*86v)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-sysv
		;;
	i*86sol2)
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
		os=-solaris2
		;;
	i386mach)
		basic_machine=i386-mach
		os=-mach
		;;
	i386-vsta | vsta)
		basic_machine=i386-unknown
		os=-vsta
		;;
	iris | iris4d)
		basic_machine=mips-sgi
		case $os in
		    -irix*)
			;;
		    *)
			os=-irix4
			;;
		esac
		;;
	isi68 | isi)
		basic_machine=m68k-isi
		os=-sysv
		;;
	leon-*|leon[3-9]-*)
		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
		;;
	m68knommu)
		basic_machine=m68k-unknown
		os=-linux
		;;
	m68knommu-*)
		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
		os=-linux
		;;
	m88k-omron*)
		basic_machine=m88k-omron
		;;
	magnum | m3230)
		basic_machine=mips-mips
		os=-sysv
		;;
	merlin)
		basic_machine=ns32k-utek
		os=-sysv







<
<
<












|



|



|



|






|


















|






|


<
<
<







736
737
738
739
740
741
742



743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802



803
804
805
806
807
808
809
		;;
	hp9k8[0-9][13679] | hp8[0-9][13679])
		basic_machine=hppa1.1-hp
		;;
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
		basic_machine=hppa1.0-hp
		;;



	hppaosf)
		basic_machine=hppa1.1-hp
		os=-osf
		;;
	hppro)
		basic_machine=hppa1.1-hp
		os=-proelf
		;;
	i370-ibm* | ibm*)
		basic_machine=i370-ibm
		;;
	i*86v32)
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
		os=-sysv32
		;;
	i*86v4*)
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
		os=-sysv4
		;;
	i*86v)
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
		os=-sysv
		;;
	i*86sol2)
		basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
		os=-solaris2
		;;
	i386mach)
		basic_machine=i386-mach
		os=-mach
		;;
	vsta)
		basic_machine=i386-unknown
		os=-vsta
		;;
	iris | iris4d)
		basic_machine=mips-sgi
		case $os in
		    -irix*)
			;;
		    *)
			os=-irix4
			;;
		esac
		;;
	isi68 | isi)
		basic_machine=m68k-isi
		os=-sysv
		;;
	leon-*|leon[3-9]-*)
		basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
		;;
	m68knommu)
		basic_machine=m68k-unknown
		os=-linux
		;;
	m68knommu-*)
		basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		os=-linux
		;;



	magnum | m3230)
		basic_machine=mips-mips
		os=-sysv
		;;
	merlin)
		basic_machine=ns32k-utek
		os=-sysv
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
		basic_machine=m68000-convergent
		;;
	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
		basic_machine=m68k-atari
		os=-mint
		;;
	mips3*-*)
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
		;;
	mips3*)
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
		;;
	monitor)
		basic_machine=m68k-rom68k
		os=-coff
		;;
	morphos)
		basic_machine=powerpc-unknown
		os=-morphos
		;;
	moxiebox)
		basic_machine=moxie-unknown
		os=-moxiebox
		;;
	msdos)
		basic_machine=i386-pc
		os=-msdos
		;;
	ms1-*)
		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
		;;
	msys)
		basic_machine=i686-pc
		os=-msys
		;;
	mvs)
		basic_machine=i370-ibm







|


|


















|







827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
		basic_machine=m68000-convergent
		;;
	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
		basic_machine=m68k-atari
		os=-mint
		;;
	mips3*-*)
		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
		;;
	mips3*)
		basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
		;;
	monitor)
		basic_machine=m68k-rom68k
		os=-coff
		;;
	morphos)
		basic_machine=powerpc-unknown
		os=-morphos
		;;
	moxiebox)
		basic_machine=moxie-unknown
		os=-moxiebox
		;;
	msdos)
		basic_machine=i386-pc
		os=-msdos
		;;
	ms1-*)
		basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
		;;
	msys)
		basic_machine=i686-pc
		os=-msys
		;;
	mvs)
		basic_machine=i370-ibm
942
943
944
945
946
947
948



949
950
951
952
953
954
955
		;;
	nse-tandem)
		basic_machine=nse-tandem
		;;
	nsr-tandem)
		basic_machine=nsr-tandem
		;;



	nsx-tandem)
		basic_machine=nsx-tandem
		;;
	op50n-* | op60c-*)
		basic_machine=hppa1.1-oki
		os=-proelf
		;;







>
>
>







936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
		;;
	nse-tandem)
		basic_machine=nse-tandem
		;;
	nsr-tandem)
		basic_machine=nsr-tandem
		;;
	nsv-tandem)
		basic_machine=nsv-tandem
		;;
	nsx-tandem)
		basic_machine=nsx-tandem
		;;
	op50n-* | op60c-*)
		basic_machine=hppa1.1-oki
		os=-proelf
		;;
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
		os=-osf
		;;
	parisc)
		basic_machine=hppa-unknown
		os=-linux
		;;
	parisc-*)
		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
		os=-linux
		;;
	pbd)
		basic_machine=sparc-tti
		;;
	pbb)
		basic_machine=m68k-tti
		;;
	pc532 | pc532-*)
		basic_machine=ns32k-pc532
		;;
	pc98)
		basic_machine=i386-pc
		;;
	pc98-*)
		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentium | p5 | k5 | k6 | nexgen | viac3)
		basic_machine=i586-pc
		;;
	pentiumpro | p6 | 6x86 | athlon | athlon_*)
		basic_machine=i686-pc
		;;
	pentiumii | pentium2 | pentiumiii | pentium3)
		basic_machine=i686-pc
		;;
	pentium4)
		basic_machine=i786-pc
		;;
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pentium4-*)
		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	pn)
		basic_machine=pn-gould
		;;
	power)	basic_machine=power-ibm
		;;
	ppc | ppcbe)	basic_machine=powerpc-unknown
		;;
	ppc-* | ppcbe-*)
		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppcle | powerpclittle)
		basic_machine=powerpcle-unknown
		;;
	ppcle-* | powerpclittle-*)
		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppc64)	basic_machine=powerpc64-unknown
		;;
	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ppc64le | powerpc64little)
		basic_machine=powerpc64le-unknown
		;;
	ppc64le-* | powerpc64little-*)
		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	ps2)
		basic_machine=i386-ibm
		;;
	pw32)
		basic_machine=i586-unknown
		os=-pw32







|















|














|


|


|


|









|





|



|





|







974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
		os=-osf
		;;
	parisc)
		basic_machine=hppa-unknown
		os=-linux
		;;
	parisc-*)
		basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		os=-linux
		;;
	pbd)
		basic_machine=sparc-tti
		;;
	pbb)
		basic_machine=m68k-tti
		;;
	pc532 | pc532-*)
		basic_machine=ns32k-pc532
		;;
	pc98)
		basic_machine=i386-pc
		;;
	pc98-*)
		basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	pentium | p5 | k5 | k6 | nexgen | viac3)
		basic_machine=i586-pc
		;;
	pentiumpro | p6 | 6x86 | athlon | athlon_*)
		basic_machine=i686-pc
		;;
	pentiumii | pentium2 | pentiumiii | pentium3)
		basic_machine=i686-pc
		;;
	pentium4)
		basic_machine=i786-pc
		;;
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
		basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
		basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	pentium4-*)
		basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	pn)
		basic_machine=pn-gould
		;;
	power)	basic_machine=power-ibm
		;;
	ppc | ppcbe)	basic_machine=powerpc-unknown
		;;
	ppc-* | ppcbe-*)
		basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	ppcle | powerpclittle)
		basic_machine=powerpcle-unknown
		;;
	ppcle-* | powerpclittle-*)
		basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	ppc64)	basic_machine=powerpc64-unknown
		;;
	ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	ppc64le | powerpc64little)
		basic_machine=powerpc64le-unknown
		;;
	ppc64le-* | powerpc64little-*)
		basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	ps2)
		basic_machine=i386-ibm
		;;
	pw32)
		basic_machine=i586-unknown
		os=-pw32
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
	sei)
		basic_machine=mips-sei
		os=-seiux
		;;
	sequent)
		basic_machine=i386-sequent
		;;
	sh)
		basic_machine=sh-hitachi
		os=-hms
		;;
	sh5el)
		basic_machine=sh5le-unknown
		;;
	sh64)
		basic_machine=sh64-unknown
		;;
	sparclite-wrs | simso-wrs)
		basic_machine=sparclite-wrs
		os=-vxworks
		;;
	sps7)
		basic_machine=m68k-bull
		os=-sysv2
		;;
	spur)
		basic_machine=spur-unknown
		;;
	st2000)
		basic_machine=m68k-tandem
		;;
	stratus)
		basic_machine=i860-stratus
		os=-sysv4
		;;
	strongarm-* | thumb-*)
		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
		;;
	sun2)
		basic_machine=m68000-sun
		;;
	sun2os3)
		basic_machine=m68000-sun
		os=-sunos3







<
<
<
<



<
<
<
|


















|







1094
1095
1096
1097
1098
1099
1100




1101
1102
1103



1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
	sei)
		basic_machine=mips-sei
		os=-seiux
		;;
	sequent)
		basic_machine=i386-sequent
		;;




	sh5el)
		basic_machine=sh5le-unknown
		;;



	simso-wrs)
		basic_machine=sparclite-wrs
		os=-vxworks
		;;
	sps7)
		basic_machine=m68k-bull
		os=-sysv2
		;;
	spur)
		basic_machine=spur-unknown
		;;
	st2000)
		basic_machine=m68k-tandem
		;;
	stratus)
		basic_machine=i860-stratus
		os=-sysv4
		;;
	strongarm-* | thumb-*)
		basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
		;;
	sun2)
		basic_machine=m68000-sun
		;;
	sun2os3)
		basic_machine=m68000-sun
		os=-sunos3
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
		basic_machine=m68k-wrs
		os=-vxworks
		;;
	vxworks29k)
		basic_machine=a29k-wrs
		os=-vxworks
		;;
	wasm32)
		basic_machine=wasm32-unknown
		;;
	w65*)
		basic_machine=w65-wdc
		os=-none
		;;
	w89k-*)
		basic_machine=hppa1.1-winbond
		os=-proelf
		;;
	x64)
		basic_machine=x86_64-pc
		;;
	xbox)
		basic_machine=i686-pc
		os=-mingw32
		;;
	xps | xps100)
		basic_machine=xps100-honeywell
		;;
	xscale-* | xscalee[bl]-*)
		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
		;;
	ymp)
		basic_machine=ymp-cray
		os=-unicos
		;;
	z8k-*-coff)
		basic_machine=z8k-unknown
		os=-sim
		;;
	z80-*-coff)
		basic_machine=z80-unknown
		os=-sim
		;;
	none)
		basic_machine=none-none
		os=-none
		;;

# Here we handle the default manufacturer of certain CPU types.  It is in
# some cases the only manufacturer, in others, it is the most popular.







<
<
<



















|





<
<
<
<
<
<
<
<







1230
1231
1232
1233
1234
1235
1236



1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261








1262
1263
1264
1265
1266
1267
1268
		basic_machine=m68k-wrs
		os=-vxworks
		;;
	vxworks29k)
		basic_machine=a29k-wrs
		os=-vxworks
		;;



	w65*)
		basic_machine=w65-wdc
		os=-none
		;;
	w89k-*)
		basic_machine=hppa1.1-winbond
		os=-proelf
		;;
	x64)
		basic_machine=x86_64-pc
		;;
	xbox)
		basic_machine=i686-pc
		os=-mingw32
		;;
	xps | xps100)
		basic_machine=xps100-honeywell
		;;
	xscale-* | xscalee[bl]-*)
		basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
		;;
	ymp)
		basic_machine=ymp-cray
		os=-unicos
		;;








	none)
		basic_machine=none-none
		os=-none
		;;

# Here we handle the default manufacturer of certain CPU types.  It is in
# some cases the only manufacturer, in others, it is the most popular.
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
		;;
	rs6000)
		basic_machine=rs6000-ibm
		;;
	vax)
		basic_machine=vax-dec
		;;
	pdp10)
		# there are many clones, so DEC is not a safe bet
		basic_machine=pdp10-unknown
		;;
	pdp11)
		basic_machine=pdp11-dec
		;;
	we32k)
		basic_machine=we32k-att
		;;
	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
		basic_machine=sh-unknown
		;;
	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
		basic_machine=sparc-sun
		;;
	cydra)
		basic_machine=cydra-cydrome
		;;
	orion)
		basic_machine=orion-highlevel
		;;
	orion105)
		basic_machine=clipper-highlevel
		;;
	mac | mpw | mac-mpw)
		basic_machine=m68k-apple
		;;
	pmac | pmac-mpw)
		basic_machine=powerpc-apple
		;;
	*-unknown)
		# Make sure to match an already-canonicalized machine name.
		;;
	*)
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
		exit 1
		;;
esac

# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
	*-digital*)
		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
		;;
	*-commodore*)
		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
		;;
	*)
		;;
esac

# Decode manufacturer-specific aliases for certain operating systems.








<
<
<
<









<
<
<



















|







|


|







1283
1284
1285
1286
1287
1288
1289




1290
1291
1292
1293
1294
1295
1296
1297
1298



1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
		;;
	rs6000)
		basic_machine=rs6000-ibm
		;;
	vax)
		basic_machine=vax-dec
		;;




	pdp11)
		basic_machine=pdp11-dec
		;;
	we32k)
		basic_machine=we32k-att
		;;
	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
		basic_machine=sh-unknown
		;;



	cydra)
		basic_machine=cydra-cydrome
		;;
	orion)
		basic_machine=orion-highlevel
		;;
	orion105)
		basic_machine=clipper-highlevel
		;;
	mac | mpw | mac-mpw)
		basic_machine=m68k-apple
		;;
	pmac | pmac-mpw)
		basic_machine=powerpc-apple
		;;
	*-unknown)
		# Make sure to match an already-canonicalized machine name.
		;;
	*)
		echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
		exit 1
		;;
esac

# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
	*-digital*)
		basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
		;;
	*-commodore*)
		basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
		;;
	*)
		;;
esac

# Decode manufacturer-specific aliases for certain operating systems.

1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387




1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419

1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
		;;
	-solaris1 | -solaris1.*)
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
		;;
	-solaris)
		os=-solaris2
		;;
	-svr4*)
		os=-sysv4
		;;
	-unixware*)
		os=-sysv4.2uw
		;;
	-gnu/linux*)
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`




		;;
	# Now accept the basic system types.
	# The portable systems comes first.
	# Each alternative MUST end in a * to match a version number.
	# -sysv* is not here because it comes later, after sysvr4.
	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
	      | -sym* | -kopensolaris* | -plan9* \
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
	      | -aos* | -aros* | -cloudabi* | -sortix* \
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)

	# Remember, each alternative MUST END IN *, to match a version number.
		;;
	-qnx*)
		case $basic_machine in
		    x86-* | i*86-*)
			;;
		    *)
			os=-nto$os
			;;
		esac
		;;
	-nto-qnx*)
		;;
	-nto*)
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
		;;
	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
		;;
	-mac*)
		os=`echo $os | sed -e 's|mac|macos|'`
		;;
	-linux-dietlibc)
		os=-linux-dietlibc
		;;
	-linux*)
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
		;;
	-sunos5*)
		os=`echo $os | sed -e 's|sunos5|solaris2|'`
		;;
	-sunos6*)
		os=`echo $os | sed -e 's|sunos6|solaris3|'`
		;;
	-opened*)
		os=-openedition
		;;
	-os400*)
		os=-os400
		;;
	-wince*)
		os=-wince
		;;
	-osfrose*)
		os=-osfrose
		;;
	-osf*)
		os=-osf
		;;
	-utek*)
		os=-bsd
		;;
	-dynix*)
		os=-bsd
		;;
	-acis*)







<
<
<





>
>
>
>













|










|



|


|
>
















|
|



|








|


|










<
<
<
<
<
<







1345
1346
1347
1348
1349
1350
1351



1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437






1438
1439
1440
1441
1442
1443
1444
		;;
	-solaris1 | -solaris1.*)
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
		;;
	-solaris)
		os=-solaris2
		;;



	-unixware*)
		os=-sysv4.2uw
		;;
	-gnu/linux*)
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
		;;
	# es1800 is here to avoid being matched by es* (a different OS)
	-es1800*)
		os=-ose
		;;
	# Now accept the basic system types.
	# The portable systems comes first.
	# Each alternative MUST end in a * to match a version number.
	# -sysv* is not here because it comes later, after sysvr4.
	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
	      | -sym* | -kopensolaris* | -plan9* \
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
	      | -aos* | -aros* | -cloudabi* | -sortix* \
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
	      | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
	      | -morphos* | -superux* | -rtmk* | -windiss* \
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
	      | -midnightbsd*)
	# Remember, each alternative MUST END IN *, to match a version number.
		;;
	-qnx*)
		case $basic_machine in
		    x86-* | i*86-*)
			;;
		    *)
			os=-nto$os
			;;
		esac
		;;
	-nto-qnx*)
		;;
	-nto*)
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
		;;
	-sim | -xray | -os68k* | -v88r* \
	      | -windows* | -osx | -abug | -netware* | -os9* \
	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
		;;
	-mac*)
		os=`echo "$os" | sed -e 's|mac|macos|'`
		;;
	-linux-dietlibc)
		os=-linux-dietlibc
		;;
	-linux*)
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
		;;
	-sunos5*)
		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
		;;
	-sunos6*)
		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
		;;
	-opened*)
		os=-openedition
		;;
	-os400*)
		os=-os400
		;;
	-wince*)
		os=-wince
		;;






	-utek*)
		os=-bsd
		;;
	-dynix*)
		os=-bsd
		;;
	-acis*)
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
		;;
	-triton*)
		os=-sysv3
		;;
	-oss*)
		os=-sysv3
		;;
	-svr4)
		os=-sysv4
		;;
	-svr3)
		os=-sysv3
		;;
	-sysvr4)
		os=-sysv4
		;;
	# This must come after -sysvr4.
	-sysv*)
		;;
	-ose*)
		os=-ose
		;;
	-es1800*)
		os=-ose
		;;
	-xenix)
		os=-xenix
		;;
	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
		os=-mint
		;;
	-aros*)
		os=-aros
		;;
	-zvmoe)
		os=-zvmoe
		;;
	-dicos*)
		os=-dicos
		;;
	-pikeos*)







|














<
<
<
<
<
<



<
<
<







1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498






1499
1500
1501



1502
1503
1504
1505
1506
1507
1508
		;;
	-triton*)
		os=-sysv3
		;;
	-oss*)
		os=-sysv3
		;;
	-svr4*)
		os=-sysv4
		;;
	-svr3)
		os=-sysv3
		;;
	-sysvr4)
		os=-sysv4
		;;
	# This must come after -sysvr4.
	-sysv*)
		;;
	-ose*)
		os=-ose
		;;






	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
		os=-mint
		;;



	-zvmoe)
		os=-zvmoe
		;;
	-dicos*)
		os=-dicos
		;;
	-pikeos*)
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
	-ios)
		;;
	-none)
		;;
	*)
		# Get rid of the `-' at the beginning of $os.
		os=`echo $os | sed 's/[^-]*-//'`
		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
		exit 1
		;;
esac
else

# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their







|







1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
	-ios)
		;;
	-none)
		;;
	*)
		# Get rid of the `-' at the beginning of $os.
		os=`echo $os | sed 's/[^-]*-//'`
		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
		exit 1
		;;
esac
else

# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
		;;
	pru-*)
		os=-elf
		;;
	*-be)
		os=-beos
		;;
	*-haiku)
		os=-haiku
		;;
	*-ibm)
		os=-aix
		;;
	*-knuth)
		os=-mmixware
		;;
	*-wec)







<
<
<







1619
1620
1621
1622
1623
1624
1625



1626
1627
1628
1629
1630
1631
1632
		;;
	pru-*)
		os=-elf
		;;
	*-be)
		os=-beos
		;;



	*-ibm)
		os=-aix
		;;
	*-knuth)
		os=-mmixware
		;;
	*-wec)
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
		;;
	*-ns)
		os=-genix
		;;
	i370-*)
		os=-mvs
		;;
	*-next)
		os=-nextstep3
		;;
	*-gould)
		os=-sysv
		;;
	*-highlevel)
		os=-bsd
		;;
	*-encore)







<
<
<







1673
1674
1675
1676
1677
1678
1679



1680
1681
1682
1683
1684
1685
1686
		;;
	*-ns)
		os=-genix
		;;
	i370-*)
		os=-mvs
		;;



	*-gould)
		os=-sysv
		;;
	*-highlevel)
		os=-bsd
		;;
	*-encore)
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
				vendor=atari
				;;
			-vos*)
				vendor=stratus
				;;
		esac
		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
		;;
esac

echo $basic_machine$os
exit

# Local variables:
# eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:







|



|








1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
				vendor=atari
				;;
			-vos*)
				vendor=stratus
				;;
		esac
		basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
		;;
esac

echo "$basic_machine$os"
exit

# Local variables:
# eval: (add-hook 'write-file-functions 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
Changes to jni/curl/configure.
1175
1176
1177
1178
1179
1180
1181

1182
1183
1184
1185
1186
1187
1188
with_ssl
with_egd_socket
with_random
with_gnutls
with_polarssl
with_mbedtls
with_cyassl

with_nss
with_axtls
with_ca_bundle
with_ca_path
with_ca_fallback
with_libpsl
with_libmetalink







>







1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
with_ssl
with_egd_socket
with_random
with_gnutls
with_polarssl
with_mbedtls
with_cyassl
with_wolfssl
with_nss
with_axtls
with_ca_bundle
with_ca_path
with_ca_fallback
with_libpsl
with_libmetalink
1990
1991
1992
1993
1994
1995
1996



1997
1998
1999
2000
2001
2002
2003
  --without-polarssl      disable PolarSSL detection
  --with-mbedtls=PATH     where to look for mbedTLS, PATH points to the
                          installation root
  --without-mbedtls       disable mbedTLS detection
  --with-cyassl=PATH      where to look for CyaSSL, PATH points to the
                          installation root (default: system lib default)
  --without-cyassl        disable CyaSSL detection



  --with-nss=PATH         where to look for NSS, PATH points to the
                          installation root
  --without-nss           disable NSS detection
  --with-axtls=PATH       Where to look for axTLS, PATH points to the axTLS
                          installation prefix (default: /usr/local). Ignored
                          if another SSL engine is selected.
  --without-axtls         disable axTLS







>
>
>







1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
  --without-polarssl      disable PolarSSL detection
  --with-mbedtls=PATH     where to look for mbedTLS, PATH points to the
                          installation root
  --without-mbedtls       disable mbedTLS detection
  --with-cyassl=PATH      where to look for CyaSSL, PATH points to the
                          installation root (default: system lib default)
  --without-cyassl        disable CyaSSL detection
  --with-wolfssl=PATH     where to look for WolfSSL, PATH points to the
                          installation root (default: system lib default)
  --without-wolfssl       disable WolfSSL detection
  --with-nss=PATH         where to look for NSS, PATH points to the
                          installation root
  --without-nss           disable NSS detection
  --with-axtls=PATH       Where to look for axTLS, PATH points to the axTLS
                          installation prefix (default: /usr/local). Ignored
                          if another SSL engine is selected.
  --without-axtls         disable axTLS
3200
3201
3202
3203
3204
3205
3206



3207
3208
3209
3210
3211
3212
3213
            want_debug="no"
      ;;
    default)
            want_debug="no"
      ;;
    *)
            want_debug="yes"



      ;;
  esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_debug" >&5
$as_echo "$want_debug" >&6; }


      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable compiler optimizer" >&5







>
>
>







3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
            want_debug="no"
      ;;
    default)
            want_debug="no"
      ;;
    *)
            want_debug="yes"

$as_echo "#define DEBUGBUILD 1" >>confdefs.h

      ;;
  esac
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $want_debug" >&5
$as_echo "$want_debug" >&6; }


      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable compiler optimizer" >&5
3303
3304
3305
3306
3307
3308
3309



3310
3311
3312
3313
3314
3315
3316
3317
3318



3319
3320
3321
3322
3323
3324
3325
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      ;;
    default)
                                          if test "$want_debug" = "yes"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
$as_echo "(assumed) yes" >&6; }



      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      fi
      want_curldebug_assumed="yes"
      want_curldebug="$want_debug"
      ;;
    *)
                                                      want_curldebug="yes"



      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
      ;;
  esac


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable hiding of library internal symbols" >&5







>
>
>









>
>
>







3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      ;;
    default)
                                          if test "$want_debug" = "yes"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: (assumed) yes" >&5
$as_echo "(assumed) yes" >&6; }

$as_echo "#define CURLDEBUG 1" >>confdefs.h

      else
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
      fi
      want_curldebug_assumed="yes"
      want_curldebug="$want_debug"
      ;;
    *)
                                                      want_curldebug="yes"

$as_echo "#define CURLDEBUG 1" >>confdefs.h

      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
      ;;
  esac


    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable hiding of library internal symbols" >&5
18039
18040
18041
18042
18043
18044
18045















18046
18047
18048
18049
18050
18051
18052
            fi
          fi
          #
                    if test "$compiler_num" -ge "406"; then
            tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
          fi
          #















        fi
        #
                if test "$compiler_num" -ge "300"; then
          tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
        else
                              if test "x$cross_compiling" = "xyes"; then
            if test "$compiler_num" -ge "104"; then







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
            fi
          fi
          #
                    if test "$compiler_num" -ge "406"; then
            tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
          fi
          #
                    if test "$compiler_num" -ge "600"; then
            tmp_CFLAGS="$tmp_CFLAGS -Wshift-negative-value"
            tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
            tmp_CFLAGS="$tmp_CFLAGS -Wnull-dereference"
            tmp_CFLAGS="$tmp_CFLAGS -Wduplicated-cond"
          fi
          #
                    if test "$compiler_num" -ge "700"; then
            tmp_CFLAGS="$tmp_CFLAGS -Wduplicated-branches"
            tmp_CFLAGS="$tmp_CFLAGS -Wrestrict"
            tmp_CFLAGS="$tmp_CFLAGS -Walloc-zero"
            tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
            tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
          fi
          #
        fi
        #
                if test "$compiler_num" -ge "300"; then
          tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
        else
                              if test "x$cross_compiling" = "xyes"; then
            if test "$compiler_num" -ge "104"; then
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
$as_echo "$supports_curldebug" >&6; }
    if test "$supports_curldebug" = "no"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable curl debug memory tracking." >&5
$as_echo "$as_me: WARNING: cannot enable curl debug memory tracking." >&2;}
      want_curldebug="no"
    fi
  fi
  #
  if test "$want_curldebug" = "yes"; then
    CPPFLAGS="-DCURLDEBUG $CPPFLAGS"
    squeeze CPPFLAGS
  fi
  if test "$want_debug" = "yes"; then
    CPPFLAGS="-DDEBUGBUILD $CPPFLAGS"
    squeeze CPPFLAGS
  fi

 if test x$want_curldebug = xyes; then
  CURLDEBUG_TRUE=
  CURLDEBUG_FALSE='#'
else
  CURLDEBUG_TRUE='#'
  CURLDEBUG_FALSE=







<
<
<
<
<
<
<
<
<







18602
18603
18604
18605
18606
18607
18608









18609
18610
18611
18612
18613
18614
18615
$as_echo "$supports_curldebug" >&6; }
    if test "$supports_curldebug" = "no"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot enable curl debug memory tracking." >&5
$as_echo "$as_me: WARNING: cannot enable curl debug memory tracking." >&2;}
      want_curldebug="no"
    fi
  fi










 if test x$want_curldebug = xyes; then
  CURLDEBUG_TRUE=
  CURLDEBUG_FALSE='#'
else
  CURLDEBUG_TRUE='#'
  CURLDEBUG_FALSE=
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
    as_fn_error $? "BROTLI libs and/or directories were not found where specified!" "$LINENO" 5
  fi

  if test "$HAVE_BROTLI" = "1"; then
    if test -n "$DIR_BROTLI"; then

       if test "x$cross_compiling" != "xyes"; then
         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_BROTLI"
         export LD_LIBRARY_PATH
         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_BROTLI to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $DIR_BROTLI to LD_LIBRARY_PATH" >&6;}
       fi
    fi
  else
        LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
  fi







|
|
|
|







21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
    as_fn_error $? "BROTLI libs and/or directories were not found where specified!" "$LINENO" 5
  fi

  if test "$HAVE_BROTLI" = "1"; then
    if test -n "$DIR_BROTLI"; then

       if test "x$cross_compiling" != "xyes"; then
         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI"
         export CURL_LIBRARY_PATH
         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_BROTLI to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $DIR_BROTLI to CURL_LIBRARY_PATH" >&6;}
       fi
    fi
  else
        LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
  fi
21968
21969
21970
21971
21972
21973
21974
21975
21976



21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002


22003
22004
22005
22006
22007
22008
22009
$as_echo "no" >&6; }
  fi
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if argv can be written to" >&5
$as_echo_n "checking if argv can be written to... " >&6; }
if test "$cross_compiling" = yes; then :




  curl_cv_writable_argv=cross

else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


int main(int argc, char ** argv) {
    argv[0][0] = ' ';
    return (argv[0][0] == ' ')?0:1;
}


_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

  curl_cv_writable_argv=yes

else

  curl_cv_writable_argv=no

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi



case $curl_cv_writable_argv in
yes)

$as_echo "#define HAVE_WRITABLE_ARGV 1" >>confdefs.h

        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5







|

>
>
>






<

|
|

<



<



<






>
>







21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004

22005
22006
22007
22008

22009
22010
22011

22012
22013
22014

22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
$as_echo "no" >&6; }
  fi
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if argv can be written to" >&5
$as_echo_n "checking if argv can be written to... " >&6; }


   old=$LD_LIBRARY_PATH
   LD_LIBRARY_PATH=$CURL_LIBRARY_PATH
   if test "$cross_compiling" = yes; then :
  curl_cv_writable_argv=cross

else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


int main(int argc, char ** argv) {
    argv00 = ' ';
    return (argv00 == ' ')?0:1;
}


_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

  curl_cv_writable_argv=yes

else

  curl_cv_writable_argv=no

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

   LD_LIBRARY_PATH=$old # restore

case $curl_cv_writable_argv in
yes)

$as_echo "#define HAVE_WRITABLE_ARGV 1" >>confdefs.h

        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi

  if test "$OPENSSL_ENABLED" = "1"; then
    if test -n "$LIB_OPENSSL"; then
                            if test "x$cross_compiling" != "xyes"; then
         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
         export LD_LIBRARY_PATH
         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;}
       fi
    fi

  #

  #
  tst_api="unknown"







|
|
|
|







23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  fi

  if test "$OPENSSL_ENABLED" = "1"; then
    if test -n "$LIB_OPENSSL"; then
                            if test "x$cross_compiling" != "xyes"; then
         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
         export CURL_LIBRARY_PATH
         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $LIB_OPENSSL to CURL_LIBRARY_PATH" >&6;}
       fi
    fi

  #

  #
  tst_api="unknown"
23720
23721
23722
23723
23724
23725
23726

23727
23728
23729
23730
23731
23732
23733
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_match" >&5
$as_echo "$tst_match" >&6; }
  if test "$tst_match" != "yes"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $tst_warns" >&5
$as_echo "$as_me: WARNING: $tst_warns" >&2;}
  fi


  fi

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi


if test X"$OPENSSL_ENABLED" = X"1"; then







>







23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tst_match" >&5
$as_echo "$tst_match" >&6; }
  if test "$tst_match" != "yes"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $tst_warns" >&5
$as_echo "$as_me: WARNING: $tst_warns" >&2;}
  fi

    check_for_ca_bundle=1
  fi

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi


if test X"$OPENSSL_ENABLED" = X"1"; then
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107

fi


      if test "x$USE_GNUTLS" = "xyes"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: detected GnuTLS version $version" >&5
$as_echo "$as_me: detected GnuTLS version $version" >&6;}

        if test -n "$gtlslib"; then
                                                  if test "x$cross_compiling" != "xyes"; then
            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
            export LD_LIBRARY_PATH
            { $as_echo "$as_me:${as_lineno-$LINENO}: Added $gtlslib to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $gtlslib to LD_LIBRARY_PATH" >&6;}
          fi
        fi
        for ac_func in gnutls_certificate_set_x509_key_file2 gnutls_alpn_set_protocols gnutls_ocsp_req_init
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :







|


|
|
|
|







24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128

fi


      if test "x$USE_GNUTLS" = "xyes"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: detected GnuTLS version $version" >&5
$as_echo "$as_me: detected GnuTLS version $version" >&6;}
        check_for_ca_bundle=1
        if test -n "$gtlslib"; then
                                                  if test "x$cross_compiling" != "xyes"; then
            CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
            export CURL_LIBRARY_PATH
            { $as_echo "$as_me:${as_lineno-$LINENO}: Added $gtlslib to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $gtlslib to CURL_LIBRARY_PATH" >&6;}
          fi
        fi
        for ac_func in gnutls_certificate_set_x509_key_file2 gnutls_alpn_set_protocols gnutls_ocsp_req_init
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
fi

    fi

    if test "x$USE_POLARSSL" = "xyes"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: detected PolarSSL" >&5
$as_echo "$as_me: detected PolarSSL" >&6;}

      LIBS="-lpolarssl $LIBS"

      if test -n "$polarssllib"; then
                                        if test "x$cross_compiling" != "xyes"; then
          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
          export LD_LIBRARY_PATH
          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $polarssllib to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $polarssllib to LD_LIBRARY_PATH" >&6;}
        fi
      fi
    fi

  fi
  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi







|




|
|
|
|







24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
fi

    fi

    if test "x$USE_POLARSSL" = "xyes"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: detected PolarSSL" >&5
$as_echo "$as_me: detected PolarSSL" >&6;}
      check_for_ca_bundle=1
      LIBS="-lpolarssl $LIBS"

      if test -n "$polarssllib"; then
                                        if test "x$cross_compiling" != "xyes"; then
          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$polarssllib"
          export CURL_LIBRARY_PATH
          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $polarssllib to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $polarssllib to CURL_LIBRARY_PATH" >&6;}
        fi
      fi
    fi

  fi
  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi
24641
24642
24643
24644
24645
24646
24647

24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675







24676
24677
24678
24679
24680
24681
24682
fi

    fi

    if test "x$USE_MBEDTLS" = "xyes"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: detected mbedTLS" >&5
$as_echo "$as_me: detected mbedTLS" >&6;}


      LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"

      if test -n "$mbedtlslib"; then
                                        if test "x$cross_compiling" != "xyes"; then
          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mbedtlslib"
          export LD_LIBRARY_PATH
          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $mbedtlslib to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $mbedtlslib to LD_LIBRARY_PATH" >&6;}
        fi
      fi
    fi

  fi
  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi


OPT_CYASSL=no

_cppflags=$CPPFLAGS
_ldflags=$LDFLAGS

# Check whether --with-cyassl was given.
if test "${with_cyassl+set}" = set; then :
  withval=$with_cyassl; OPT_CYASSL=$withval
fi









if test -z "$ssl_backends" -o "x$OPT_CYASSL" != xno; then
  ssl_msg=

  if test X"$OPT_CYASSL" != Xno; then

    if test "$OPT_CYASSL" = "yes"; then







>





|
|
|
|



















>
>
>
>
>
>
>







24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
fi

    fi

    if test "x$USE_MBEDTLS" = "xyes"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: detected mbedTLS" >&5
$as_echo "$as_me: detected mbedTLS" >&6;}
      check_for_ca_bundle=1

      LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"

      if test -n "$mbedtlslib"; then
                                        if test "x$cross_compiling" != "xyes"; then
          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib"
          export CURL_LIBRARY_PATH
          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $mbedtlslib to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $mbedtlslib to CURL_LIBRARY_PATH" >&6;}
        fi
      fi
    fi

  fi
  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi


OPT_CYASSL=no

_cppflags=$CPPFLAGS
_ldflags=$LDFLAGS

# Check whether --with-cyassl was given.
if test "${with_cyassl+set}" = set; then :
  withval=$with_cyassl; OPT_CYASSL=$withval
fi



# Check whether --with-wolfssl was given.
if test "${with_wolfssl+set}" = set; then :
  withval=$with_wolfssl; OPT_CYASSL=$withval
fi


if test -z "$ssl_backends" -o "x$OPT_CYASSL" != xno; then
  ssl_msg=

  if test X"$OPT_CYASSL" != Xno; then

    if test "$OPT_CYASSL" = "yes"; then
24874
24875
24876
24877
24878
24879
24880

24881
24882
24883
24884
24885
24886
24887
    conftest$ac_exeext conftest.$ac_ext
      LIBS="$my_ac_save_LIBS"
    fi

    if test "x$USE_CYASSL" = "xyes"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: detected $cyassllibname" >&5
$as_echo "$as_me: detected $cyassllibname" >&6;}


            # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
$as_echo_n "checking size of long long... " >&6; }







>







24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
    conftest$ac_exeext conftest.$ac_ext
      LIBS="$my_ac_save_LIBS"
    fi

    if test "x$USE_CYASSL" = "xyes"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: detected $cyassllibname" >&5
$as_echo "$as_me: detected $cyassllibname" >&6;}
      check_for_ca_bundle=1

            # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
$as_echo_n "checking size of long long... " >&6; }
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
fi
done

      fi

      if test -n "$cyassllib"; then
                                        if test "x$cross_compiling" != "xyes"; then
          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
          export LD_LIBRARY_PATH
          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $cyassllib to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $cyassllib to LD_LIBRARY_PATH" >&6;}
        fi
      fi

    fi

  fi
  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"







|
|
|
|







25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
fi
done

      fi

      if test -n "$cyassllib"; then
                                        if test "x$cross_compiling" != "xyes"; then
          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$cyassllib"
          export CURL_LIBRARY_PATH
          { $as_echo "$as_me:${as_lineno-$LINENO}: Added $cyassllib to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $cyassllib to CURL_LIBRARY_PATH" >&6;}
        fi
      fi

    fi

  fi
  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
fi


            NSS_LIBS=$addlib


                              if test "x$cross_compiling" != "xyes"; then
        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
        export LD_LIBRARY_PATH
        { $as_echo "$as_me:${as_lineno-$LINENO}: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH" >&6;}
      fi

    fi
  fi
  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi








|
|
|
|







25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
fi


            NSS_LIBS=$addlib


                              if test "x$cross_compiling" != "xyes"; then
        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff"
        export CURL_LIBRARY_PATH
        { $as_echo "$as_me:${as_lineno-$LINENO}: Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH" >&6;}
      fi

    fi
  fi
  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi

25497
25498
25499
25500
25501
25502
25503

25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
      LIBS="-laxtls $LIBS"

$as_echo "#define USE_AXTLS 1" >>confdefs.h

      USE_AXTLS=1

      AXTLS_ENABLED=1

      USE_AXTLS="yes"
      ssl_msg="axTLS"
      test axtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes

      if test "x$cross_compiling" != "xyes"; then
        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
        export LD_LIBRARY_PATH
        { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_AXTLS to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $LIB_AXTLS to LD_LIBRARY_PATH" >&6;}
      fi

else

      LDFLAGS="$CLEANLDFLAGS"
      CPPFLAGS="$CLEANCPPFLAGS"
      LIBS="$CLEANLIBS"







>





|
|
|
|







25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
      LIBS="-laxtls $LIBS"

$as_echo "#define USE_AXTLS 1" >>confdefs.h

      USE_AXTLS=1

      AXTLS_ENABLED=1
      check_for_ca_bundle=1
      USE_AXTLS="yes"
      ssl_msg="axTLS"
      test axtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes

      if test "x$cross_compiling" != "xyes"; then
        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_AXTLS"
        export CURL_LIBRARY_PATH
        { $as_echo "$as_me:${as_lineno-$LINENO}: Added $LIB_AXTLS to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $LIB_AXTLS to CURL_LIBRARY_PATH" >&6;}
      fi

else

      LDFLAGS="$CLEANLDFLAGS"
      CPPFLAGS="$CLEANCPPFLAGS"
      LIBS="$CLEANLIBS"
25570
25571
25572
25573
25574
25575
25576

25577
25578
25579
25580
25581
25582
25583
cat >>confdefs.h <<_ACEOF
#define CURL_DEFAULT_SSL_BACKEND "$DEFAULT_SSL_BACKEND"
_ACEOF

fi





  { $as_echo "$as_me:${as_lineno-$LINENO}: checking default CA cert bundle/path" >&5
$as_echo_n "checking default CA cert bundle/path... " >&6; }


# Check whether --with-ca-bundle was given.







>







25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
cat >>confdefs.h <<_ACEOF
#define CURL_DEFAULT_SSL_BACKEND "$DEFAULT_SSL_BACKEND"
_ACEOF

fi


if test "$check_for_ca_bundle" -gt 0; then


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking default CA cert bundle/path" >&5
$as_echo_n "checking default CA cert bundle/path... " >&6; }


# Check whether --with-ca-bundle was given.
25729
25730
25731
25732
25733
25734
25735

25736
25737
25738
25739
25740
25741
25742

cat >>confdefs.h <<_ACEOF
#define CURL_CA_FALLBACK 1
_ACEOF

  fi





# Check whether --with-libpsl was given.
if test "${with_libpsl+set}" = set; then :
  withval=$with_libpsl; with_libpsl=$withval
else







>







25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775

cat >>confdefs.h <<_ACEOF
#define CURL_CA_FALLBACK 1
_ACEOF

  fi

fi



# Check whether --with-libpsl was given.
if test "${with_libpsl+set}" = set; then :
  withval=$with_libpsl; with_libpsl=$withval
else
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
    as_fn_error $? "libSSH2 libs and/or directories were not found where specified!" "$LINENO" 5
  fi

  if test "$LIBSSH2_ENABLED" = "1"; then
    if test -n "$DIR_SSH2"; then

       if test "x$cross_compiling" != "xyes"; then
         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
         export LD_LIBRARY_PATH
         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH2 to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $DIR_SSH2 to LD_LIBRARY_PATH" >&6;}
       fi
    fi
  else
        LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
  fi







|
|
|
|







26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
    as_fn_error $? "libSSH2 libs and/or directories were not found where specified!" "$LINENO" 5
  fi

  if test "$LIBSSH2_ENABLED" = "1"; then
    if test -n "$DIR_SSH2"; then

       if test "x$cross_compiling" != "xyes"; then
         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2"
         export CURL_LIBRARY_PATH
         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH2 to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $DIR_SSH2 to CURL_LIBRARY_PATH" >&6;}
       fi
    fi
  else
        LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
  fi
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
    as_fn_error $? "libSSH libs and/or directories were not found where specified!" "$LINENO" 5
  fi

  if test "$LIBSSH_ENABLED" = "1"; then
    if test -n "$DIR_SSH"; then

       if test "x$cross_compiling" != "xyes"; then
         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH"
         export LD_LIBRARY_PATH
         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $DIR_SSH to LD_LIBRARY_PATH" >&6;}
       fi
    fi
  else
        LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
  fi







|
|
|
|







26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
    as_fn_error $? "libSSH libs and/or directories were not found where specified!" "$LINENO" 5
  fi

  if test "$LIBSSH_ENABLED" = "1"; then
    if test -n "$DIR_SSH"; then

       if test "x$cross_compiling" != "xyes"; then
         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH"
         export CURL_LIBRARY_PATH
         { $as_echo "$as_me:${as_lineno-$LINENO}: Added $DIR_SSH to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $DIR_SSH to CURL_LIBRARY_PATH" >&6;}
       fi
    fi
  else
        LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
  fi
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
$as_echo "#define HAVE_LIBIDN2 1" >>confdefs.h


    IDN_ENABLED=1

    curl_idn_msg="enabled (libidn2)"
    if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
      LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
      export LD_LIBRARY_PATH
      { $as_echo "$as_me:${as_lineno-$LINENO}: Added $IDN_DIR to LD_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $IDN_DIR to LD_LIBRARY_PATH" >&6;}
    fi
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5
$as_echo "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled" >&2;}
    CPPFLAGS="$clean_CPPFLAGS"
    LDFLAGS="$clean_LDFLAGS"
    LIBS="$clean_LIBS"







|
|
|
|







27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
$as_echo "#define HAVE_LIBIDN2 1" >>confdefs.h


    IDN_ENABLED=1

    curl_idn_msg="enabled (libidn2)"
    if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
      CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR"
      export CURL_LIBRARY_PATH
      { $as_echo "$as_me:${as_lineno-$LINENO}: Added $IDN_DIR to CURL_LIBRARY_PATH" >&5
$as_echo "$as_me: Added $IDN_DIR to CURL_LIBRARY_PATH" >&6;}
    fi
  else
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libraries for IDN support: IDN disabled" >&5
$as_echo "$as_me: WARNING: Cannot find libraries for IDN support: IDN disabled" >&2;}
    CPPFLAGS="$clean_CPPFLAGS"
    LDFLAGS="$clean_LDFLAGS"
    LIBS="$clean_LIBS"
28887
28888
28889
28890
28891
28892
28893
28894


































28895
28896
28897
28898



28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929


28930
28931
28932
28933
28934
28935
28936


$as_echo "#define HAVE_BOOL_T 1" >>confdefs.h


fi




































{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if time_t is unsigned" >&5
$as_echo_n "checking if time_t is unsigned... " >&6; }
if test "$cross_compiling" = yes; then :




    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


  #include <time.h>
  #include <limits.h>
  time_t t = -1;
  return (t > 0);

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define HAVE_TIME_T_UNSIGNED 1" >>confdefs.h


else

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi





curl_includes_ws2tcpip="\
/* includes start */
#ifdef HAVE_WINDOWS_H
#  ifndef WIN32_LEAN_AND_MEAN








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


|

>
>
>






<








<







<







>
>







28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974

28975
28976
28977
28978
28979
28980
28981
28982

28983
28984
28985
28986
28987
28988
28989

28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005


$as_echo "#define HAVE_BOOL_T 1" >>confdefs.h


fi


# check for sa_family_t
ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif

"
if test "x$ac_cv_type_sa_family_t" = xyes; then :

$as_echo "#define CURL_SA_FAMILY_T sa_family_t" >>confdefs.h

else

   # The windows name?
   ac_fn_c_check_type "$LINENO" "ADDRESS_FAMILY" "ac_cv_type_ADDRESS_FAMILY" "
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif

"
if test "x$ac_cv_type_ADDRESS_FAMILY" = xyes; then :

$as_echo "#define CURL_SA_FAMILY_T ADDRESS_FAMILY" >>confdefs.h

else

$as_echo "#define CURL_SA_FAMILY_T unsigned short" >>confdefs.h

fi


fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if time_t is unsigned" >&5
$as_echo_n "checking if time_t is unsigned... " >&6; }


   old=$LD_LIBRARY_PATH
   LD_LIBRARY_PATH=$CURL_LIBRARY_PATH
   if test "$cross_compiling" = yes; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */


  #include <time.h>
  #include <limits.h>
  time_t t = -1;
  return (t > 0);

_ACEOF
if ac_fn_c_try_run "$LINENO"; then :

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define HAVE_TIME_T_UNSIGNED 1" >>confdefs.h


else

  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

   LD_LIBRARY_PATH=$old # restore



curl_includes_ws2tcpip="\
/* includes start */
#ifdef HAVE_WINDOWS_H
#  ifndef WIN32_LEAN_AND_MEAN
Changes to jni/curl/configure.ac.
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
     test "$HAVE_BROTLI" != "1"; then
    AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!])
  fi

  if test "$HAVE_BROTLI" = "1"; then
    if test -n "$DIR_BROTLI"; then
       dnl when the brotli shared libs were found in a path that the run-time
       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
       dnl to prevent further configure tests to fail due to this

       if test "x$cross_compiling" != "xyes"; then
         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_BROTLI"
         export LD_LIBRARY_PATH
         AC_MSG_NOTICE([Added $DIR_BROTLI to LD_LIBRARY_PATH])
       fi
    fi
  else
    dnl no brotli, revert back to clean variables
    LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS







|



|
|
|







1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
     test "$HAVE_BROTLI" != "1"; then
    AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!])
  fi

  if test "$HAVE_BROTLI" = "1"; then
    if test -n "$DIR_BROTLI"; then
       dnl when the brotli shared libs were found in a path that the run-time
       dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
       dnl to prevent further configure tests to fail due to this

       if test "x$cross_compiling" != "xyes"; then
         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI"
         export CURL_LIBRARY_PATH
         AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH])
       fi
    fi
  else
    dnl no brotli, revert back to clean variables
    LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
fi

dnl **********************************************************************
dnl Check if the operating system allows programs to write to their own argv[]
dnl **********************************************************************

AC_MSG_CHECKING([if argv can be written to])
AC_RUN_IFELSE([
  AC_LANG_SOURCE([[
int main(int argc, char ** argv) {
    argv[0][0] = ' ';
    return (argv[0][0] == ' ')?0:1;
}
  ]])
],[
  curl_cv_writable_argv=yes
],[
  curl_cv_writable_argv=no
],[
  curl_cv_writable_argv=cross
])







|
<




<







1226
1227
1228
1229
1230
1231
1232
1233

1234
1235
1236
1237

1238
1239
1240
1241
1242
1243
1244
fi

dnl **********************************************************************
dnl Check if the operating system allows programs to write to their own argv[]
dnl **********************************************************************

AC_MSG_CHECKING([if argv can be written to])
CURL_RUN_IFELSE([

int main(int argc, char ** argv) {
    argv[0][0] = ' ';
    return (argv[0][0] == ' ')?0:1;
}

],[
  curl_cv_writable_argv=yes
],[
  curl_cv_writable_argv=no
],[
  curl_cv_writable_argv=cross
])
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822

1823
1824
1825
1826
1827
1828
1829
      AC_MSG_RESULT([no])
    ])
  fi

  if test "$OPENSSL_ENABLED" = "1"; then
    if test -n "$LIB_OPENSSL"; then
       dnl when the ssl shared libs were found in a path that the run-time
       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
       dnl to prevent further configure tests to fail due to this
       if test "x$cross_compiling" != "xyes"; then
         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
         export LD_LIBRARY_PATH
         AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
       fi
    fi
    CURL_CHECK_OPENSSL_API

  fi

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi

dnl **********************************************************************
dnl Check for the random seed preferences







|


|
|
|



>







1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
      AC_MSG_RESULT([no])
    ])
  fi

  if test "$OPENSSL_ENABLED" = "1"; then
    if test -n "$LIB_OPENSSL"; then
       dnl when the ssl shared libs were found in a path that the run-time
       dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
       dnl to prevent further configure tests to fail due to this
       if test "x$cross_compiling" != "xyes"; then
         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
         export CURL_LIBRARY_PATH
         AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH])
       fi
    fi
    CURL_CHECK_OPENSSL_API
    check_for_ca_bundle=1
  fi

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi

dnl **********************************************************************
dnl Check for the random seed preferences
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
       [
         LIBS="$CLEANLIBS"
         CPPFLAGS="$CLEANCPPFLAGS"
       ])

      if test "x$USE_GNUTLS" = "xyes"; then
        AC_MSG_NOTICE([detected GnuTLS version $version])

        if test -n "$gtlslib"; then
          dnl when shared libs were found in a path that the run-time
          dnl linker doesn't search through, we need to add it to
          dnl LD_LIBRARY_PATH to prevent further configure tests to fail
          dnl due to this
          if test "x$cross_compiling" != "xyes"; then
            LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
            export LD_LIBRARY_PATH
            AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
          fi
        fi
        AC_CHECK_FUNCS([gnutls_certificate_set_x509_key_file2 gnutls_alpn_set_protocols gnutls_ocsp_req_init])
      fi

    fi








|



|


|
|
|







1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
       [
         LIBS="$CLEANLIBS"
         CPPFLAGS="$CLEANCPPFLAGS"
       ])

      if test "x$USE_GNUTLS" = "xyes"; then
        AC_MSG_NOTICE([detected GnuTLS version $version])
        check_for_ca_bundle=1
        if test -n "$gtlslib"; then
          dnl when shared libs were found in a path that the run-time
          dnl linker doesn't search through, we need to add it to
          dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
          dnl due to this
          if test "x$cross_compiling" != "xyes"; then
            CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$gtlslib"
            export CURL_LIBRARY_PATH
            AC_MSG_NOTICE([Added $gtlslib to CURL_LIBRARY_PATH])
          fi
        fi
        AC_CHECK_FUNCS([gnutls_certificate_set_x509_key_file2 gnutls_alpn_set_protocols gnutls_ocsp_req_init])
      fi

    fi

2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
         CPPFLAGS=$_cppflags
         LDFLAGS=$_ldflags
       ])
    fi

    if test "x$USE_POLARSSL" = "xyes"; then
      AC_MSG_NOTICE([detected PolarSSL])

      LIBS="-lpolarssl $LIBS"

      if test -n "$polarssllib"; then
        dnl when shared libs were found in a path that the run-time
        dnl linker doesn't search through, we need to add it to
        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
        dnl due to this
        if test "x$cross_compiling" != "xyes"; then
          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
          export LD_LIBRARY_PATH
          AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
        fi
      fi
    fi

  fi dnl PolarSSL not disabled

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"







|





|


|
|
|







2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
         CPPFLAGS=$_cppflags
         LDFLAGS=$_ldflags
       ])
    fi

    if test "x$USE_POLARSSL" = "xyes"; then
      AC_MSG_NOTICE([detected PolarSSL])
      check_for_ca_bundle=1
      LIBS="-lpolarssl $LIBS"

      if test -n "$polarssllib"; then
        dnl when shared libs were found in a path that the run-time
        dnl linker doesn't search through, we need to add it to
        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
        dnl due to this
        if test "x$cross_compiling" != "xyes"; then
          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$polarssllib"
          export CURL_LIBRARY_PATH
          AC_MSG_NOTICE([Added $polarssllib to CURL_LIBRARY_PATH])
        fi
      fi
    fi

  fi dnl PolarSSL not disabled

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
2190
2191
2192
2193
2194
2195
2196

2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
         CPPFLAGS=$_cppflags
         LDFLAGS=$_ldflags
       ], -lmbedx509 -lmbedcrypto)
    fi

    if test "x$USE_MBEDTLS" = "xyes"; then
      AC_MSG_NOTICE([detected mbedTLS])


      LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"

      if test -n "$mbedtlslib"; then
        dnl when shared libs were found in a path that the run-time
        dnl linker doesn't search through, we need to add it to
        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
        dnl due to this
        if test "x$cross_compiling" != "xyes"; then
          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$mbedtlslib"
          export LD_LIBRARY_PATH
          AC_MSG_NOTICE([Added $mbedtlslib to LD_LIBRARY_PATH])
        fi
      fi
    fi

  fi dnl mbedTLS not disabled

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"







>






|


|
|
|







2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
         CPPFLAGS=$_cppflags
         LDFLAGS=$_ldflags
       ], -lmbedx509 -lmbedcrypto)
    fi

    if test "x$USE_MBEDTLS" = "xyes"; then
      AC_MSG_NOTICE([detected mbedTLS])
      check_for_ca_bundle=1

      LIBS="-lmbedtls -lmbedx509 -lmbedcrypto $LIBS"

      if test -n "$mbedtlslib"; then
        dnl when shared libs were found in a path that the run-time
        dnl linker doesn't search through, we need to add it to
        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
        dnl due to this
        if test "x$cross_compiling" != "xyes"; then
          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$mbedtlslib"
          export CURL_LIBRARY_PATH
          AC_MSG_NOTICE([Added $mbedtlslib to CURL_LIBRARY_PATH])
        fi
      fi
    fi

  fi dnl mbedTLS not disabled

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
2224
2225
2226
2227
2228
2229
2230






2231
2232
2233
2234
2235
2236
2237

_cppflags=$CPPFLAGS
_ldflags=$LDFLAGS
AC_ARG_WITH(cyassl,dnl
AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: system lib default)])
AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
  OPT_CYASSL=$withval)







if test -z "$ssl_backends" -o "x$OPT_CYASSL" != xno; then
  ssl_msg=

  if test X"$OPT_CYASSL" != Xno; then

    if test "$OPT_CYASSL" = "yes"; then







>
>
>
>
>
>







2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243

_cppflags=$CPPFLAGS
_ldflags=$LDFLAGS
AC_ARG_WITH(cyassl,dnl
AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: system lib default)])
AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
  OPT_CYASSL=$withval)

dnl provide --with-wolfssl as an alias for --with-cyassl
AC_ARG_WITH(wolfssl,dnl
AC_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)])
AC_HELP_STRING([--without-wolfssl], [disable WolfSSL detection]),
  OPT_CYASSL=$withval)

if test -z "$ssl_backends" -o "x$OPT_CYASSL" != xno; then
  ssl_msg=

  if test X"$OPT_CYASSL" != Xno; then

    if test "$OPT_CYASSL" = "yes"; then
2335
2336
2337
2338
2339
2340
2341

2342
2343
2344
2345
2346
2347
2348
         cyassllib=""
       ])
      LIBS="$my_ac_save_LIBS"
    fi

    if test "x$USE_CYASSL" = "xyes"; then
      AC_MSG_NOTICE([detected $cyassllibname])


      dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
      AC_CHECK_SIZEOF(long long)

      dnl Versions since at least 2.6.0 may have options.h
      AC_CHECK_HEADERS(cyassl/options.h)








>







2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
         cyassllib=""
       ])
      LIBS="$my_ac_save_LIBS"
    fi

    if test "x$USE_CYASSL" = "xyes"; then
      AC_MSG_NOTICE([detected $cyassllibname])
      check_for_ca_bundle=1

      dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
      AC_CHECK_SIZEOF(long long)

      dnl Versions since at least 2.6.0 may have options.h
      AC_CHECK_HEADERS(cyassl/options.h)

2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
        AC_CHECK_FUNCS(CyaSSL_CTX_UseSupportedCurve \
                       CyaSSL_get_peer_certificate)
      fi

      if test -n "$cyassllib"; then
        dnl when shared libs were found in a path that the run-time
        dnl linker doesn't search through, we need to add it to
        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
        dnl due to this
        if test "x$cross_compiling" != "xyes"; then
          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
          export LD_LIBRARY_PATH
          AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
        fi
      fi

    fi

  fi dnl CyaSSL not disabled








|


|
|
|







2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
        AC_CHECK_FUNCS(CyaSSL_CTX_UseSupportedCurve \
                       CyaSSL_get_peer_certificate)
      fi

      if test -n "$cyassllib"; then
        dnl when shared libs were found in a path that the run-time
        dnl linker doesn't search through, we need to add it to
        dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
        dnl due to this
        if test "x$cross_compiling" != "xyes"; then
          CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$cyassllib"
          export CURL_LIBRARY_PATH
          AC_MSG_NOTICE([Added $cyassllib to CURL_LIBRARY_PATH])
        fi
      fi

    fi

  fi dnl CyaSSL not disabled

2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513

      dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
      NSS_LIBS=$addlib
      AC_SUBST([NSS_LIBS])

      dnl when shared libs were found in a path that the run-time
      dnl linker doesn't search through, we need to add it to
      dnl LD_LIBRARY_PATH to prevent further configure tests to fail
      dnl due to this
      if test "x$cross_compiling" != "xyes"; then
        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
        export LD_LIBRARY_PATH
        AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
      fi

    fi dnl NSS found

  fi dnl NSS not disabled

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"







|


|
|
|







2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520

      dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
      NSS_LIBS=$addlib
      AC_SUBST([NSS_LIBS])

      dnl when shared libs were found in a path that the run-time
      dnl linker doesn't search through, we need to add it to
      dnl CURL_LIBRARY_PATH to prevent further configure tests to fail
      dnl due to this
      if test "x$cross_compiling" != "xyes"; then
        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$nssprefix/lib$libsuff"
        export CURL_LIBRARY_PATH
        AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to CURL_LIBRARY_PATH])
      fi

    fi dnl NSS found

  fi dnl NSS not disabled

  test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
2550
2551
2552
2553
2554
2555
2556

2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
    esac

    AC_CHECK_LIB(axtls, ssl_version,[
      LIBS="-laxtls $LIBS"
      AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
      AC_SUBST(USE_AXTLS, [1])
      AXTLS_ENABLED=1

      USE_AXTLS="yes"
      ssl_msg="axTLS"
      test axtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes

      if test "x$cross_compiling" != "xyes"; then
        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
        export LD_LIBRARY_PATH
        AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
      fi
      ],[
      LDFLAGS="$CLEANLDFLAGS"
      CPPFLAGS="$CLEANCPPFLAGS"
      LIBS="$CLEANLIBS"
    ])
  fi







>





|
|
|







2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
    esac

    AC_CHECK_LIB(axtls, ssl_version,[
      LIBS="-laxtls $LIBS"
      AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
      AC_SUBST(USE_AXTLS, [1])
      AXTLS_ENABLED=1
      check_for_ca_bundle=1
      USE_AXTLS="yes"
      ssl_msg="axTLS"
      test axtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes

      if test "x$cross_compiling" != "xyes"; then
        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_AXTLS"
        export CURL_LIBRARY_PATH
        AC_MSG_NOTICE([Added $LIB_AXTLS to CURL_LIBRARY_PATH])
      fi
      ],[
      LDFLAGS="$CLEANLDFLAGS"
      CPPFLAGS="$CLEANCPPFLAGS"
      LIBS="$CLEANLIBS"
    ])
  fi
2611
2612
2613
2614
2615
2616
2617

2618

2619
2620
2621
2622
2623
2624
2625
  AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend])
fi

dnl **********************************************************************
dnl Check for the CA bundle
dnl **********************************************************************


CURL_CHECK_CA_BUNDLE


dnl **********************************************************************
dnl Check for libpsl
dnl **********************************************************************

AC_ARG_WITH(libpsl,
           AS_HELP_STRING([--without-libpsl],







>
|
>







2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
  AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend])
fi

dnl **********************************************************************
dnl Check for the CA bundle
dnl **********************************************************************

if test "$check_for_ca_bundle" -gt 0; then
  CURL_CHECK_CA_BUNDLE
fi

dnl **********************************************************************
dnl Check for libpsl
dnl **********************************************************************

AC_ARG_WITH(libpsl,
           AS_HELP_STRING([--without-libpsl],
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
     test "$LIBSSH2_ENABLED" != "1"; then
    AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
  fi

  if test "$LIBSSH2_ENABLED" = "1"; then
    if test -n "$DIR_SSH2"; then
       dnl when the libssh2 shared libs were found in a path that the run-time
       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
       dnl to prevent further configure tests to fail due to this

       if test "x$cross_compiling" != "xyes"; then
         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
         export LD_LIBRARY_PATH
         AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
       fi
    fi
  else
    dnl no libssh2, revert back to clean variables
    LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS







|



|
|
|







2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
     test "$LIBSSH2_ENABLED" != "1"; then
    AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
  fi

  if test "$LIBSSH2_ENABLED" = "1"; then
    if test -n "$DIR_SSH2"; then
       dnl when the libssh2 shared libs were found in a path that the run-time
       dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
       dnl to prevent further configure tests to fail due to this

       if test "x$cross_compiling" != "xyes"; then
         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2"
         export CURL_LIBRARY_PATH
         AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH])
       fi
    fi
  else
    dnl no libssh2, revert back to clean variables
    LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
     test "$LIBSSH_ENABLED" != "1"; then
    AC_MSG_ERROR([libSSH libs and/or directories were not found where specified!])
  fi

  if test "$LIBSSH_ENABLED" = "1"; then
    if test -n "$DIR_SSH"; then
       dnl when the libssh shared libs were found in a path that the run-time
       dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
       dnl to prevent further configure tests to fail due to this

       if test "x$cross_compiling" != "xyes"; then
         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH"
         export LD_LIBRARY_PATH
         AC_MSG_NOTICE([Added $DIR_SSH to LD_LIBRARY_PATH])
       fi
    fi
  else
    dnl no libssh, revert back to clean variables
    LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS







|



|
|
|







2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
     test "$LIBSSH_ENABLED" != "1"; then
    AC_MSG_ERROR([libSSH libs and/or directories were not found where specified!])
  fi

  if test "$LIBSSH_ENABLED" = "1"; then
    if test -n "$DIR_SSH"; then
       dnl when the libssh shared libs were found in a path that the run-time
       dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
       dnl to prevent further configure tests to fail due to this

       if test "x$cross_compiling" != "xyes"; then
         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH"
         export CURL_LIBRARY_PATH
         AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH])
       fi
    fi
  else
    dnl no libssh, revert back to clean variables
    LDFLAGS=$CLEANLDFLAGS
    CPPFLAGS=$CLEANCPPFLAGS
    LIBS=$CLEANLIBS
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
  if test "$tst_links_libidn" = "yes"; then
    AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).])
    dnl different versions of libidn have different setups of these:

    AC_SUBST([IDN_ENABLED], [1])
    curl_idn_msg="enabled (libidn2)"
    if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
      LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
      export LD_LIBRARY_PATH
      AC_MSG_NOTICE([Added $IDN_DIR to LD_LIBRARY_PATH])
    fi
  else
    AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
    CPPFLAGS="$clean_CPPFLAGS"
    LDFLAGS="$clean_LDFLAGS"
    LIBS="$clean_LIBS"
  fi







|
|
|







3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
  if test "$tst_links_libidn" = "yes"; then
    AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).])
    dnl different versions of libidn have different setups of these:

    AC_SUBST([IDN_ENABLED], [1])
    curl_idn_msg="enabled (libidn2)"
    if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
      CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR"
      export CURL_LIBRARY_PATH
      AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH])
    fi
  else
    AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
    CPPFLAGS="$clean_CPPFLAGS"
    LDFLAGS="$clean_LDFLAGS"
    LIBS="$clean_LIBS"
  fi
3487
3488
3489
3490
3491
3492
3493
3494




















3495
3496
3497

3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
])





















AC_MSG_CHECKING([if time_t is unsigned])
AC_RUN_IFELSE([
  AC_LANG_SOURCE([[

  #include <time.h>
  #include <limits.h>
  time_t t = -1;
  return (t > 0);
  ]])] ,[
  AC_MSG_RESULT([yes])
  AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
],[
  AC_MSG_RESULT([no])
],[
  dnl cross-compiling, most systems are unsigned
  AC_MSG_RESULT([no])








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|
<
>




|







3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526

3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
])

# check for sa_family_t
AC_CHECK_TYPE(sa_family_t,
   AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]),
   [
   # The windows name?
   AC_CHECK_TYPE(ADDRESS_FAMILY,
     AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]),
     AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]),
    [
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
    ])
   ],
[
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])

AC_MSG_CHECKING([if time_t is unsigned])
CURL_RUN_IFELSE(

  [
  #include <time.h>
  #include <limits.h>
  time_t t = -1;
  return (t > 0);
  ],[
  AC_MSG_RESULT([yes])
  AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
],[
  AC_MSG_RESULT([no])
],[
  dnl cross-compiling, most systems are unsigned
  AC_MSG_RESULT([no])
Changes to jni/curl/docs/CHECKSRC.md.
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
- `SPACEBEFORECLOSE`: there was a space before a close parenthesis, `text )`.

- `SPACEBEFORECOMMA`: there was a space before a comma, `one , two`.

- `SPACEBEFOREPAREN`: there was a space before an open parenthesis, `if (`,
   where one was not expected

- `SPACESEMILCOLON`: there was a space before semicolon, ` ;`.

- `TABS`: TAB characters are not allowed!

- `TRAILINGSPACE`: Trailing white space on the line

- `UNUSEDIGNORE`: a checksrc inlined warning ignore was asked for but not used,
   that's an ignore that should be removed or changed to get used.







|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
- `SPACEBEFORECLOSE`: there was a space before a close parenthesis, `text )`.

- `SPACEBEFORECOMMA`: there was a space before a comma, `one , two`.

- `SPACEBEFOREPAREN`: there was a space before an open parenthesis, `if (`,
   where one was not expected

- `SPACESEMICOLON`: there was a space before semicolon, ` ;`.

- `TABS`: TAB characters are not allowed!

- `TRAILINGSPACE`: Trailing white space on the line

- `UNUSEDIGNORE`: a checksrc inlined warning ignore was asked for but not used,
   that's an ignore that should be removed or changed to get used.
Changes to jni/curl/docs/CODE_STYLE.md.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# curl C code style

Source code that has a common style is easier to read than code that uses
different styles in different places. It helps making the code feel like one
single code base. Easy-to-read is a very important property of code and helps
making it easier to review when new things are added and it helps debugging
code when developers are trying to figure out why things go wrong. A unified
style is more important than individual contributors having their own personal
tastes satisfied.

Our C code has a few style rules. Most of them are verified and upheld by the
`lib/checksrc.pl` script. Invoked with `make checksrc` or even by default by
the build system when built after `./configure --enable-debug` has been used.

It is normally not a problem for anyone to follow the guidelines, as you just
need to copy the style already used in the source code and there are no
particularly unusual rules in our set of rules.

We also work hard on writing code that are warning-free on all the major
platforms and in general on as many platforms as possible. Code that obviously











|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# curl C code style

Source code that has a common style is easier to read than code that uses
different styles in different places. It helps making the code feel like one
single code base. Easy-to-read is a very important property of code and helps
making it easier to review when new things are added and it helps debugging
code when developers are trying to figure out why things go wrong. A unified
style is more important than individual contributors having their own personal
tastes satisfied.

Our C code has a few style rules. Most of them are verified and upheld by the
"lib/checksrc.pl" script. Invoked with "make checksrc" or even by default by
the build system when built after "./configure --enable-debug" has been used.

It is normally not a problem for anyone to follow the guidelines, as you just
need to copy the style already used in the source code and there are no
particularly unusual rules in our set of rules.

We also work hard on writing code that are warning-free on all the major
platforms and in general on as many platforms as possible. Code that obviously
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
      while(second_statement == fine) {
        moo();
      }
    }

## Comments

Since we write C89 code, `//` comments are not allowed. They weren't
introduced in the C standard until C99. We use only `/*` and `*/` comments:

    /* this is a comment */

## Long lines

Source code in curl may never be wider than 79 columns and there are two
reasons for maintaining this even in the modern era of very large and high







|
|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
      while(second_statement == fine) {
        moo();
      }
    }

## Comments

Since we write C89 code, **//** comments are not allowed. They weren't
introduced in the C standard until C99. We use only **/* comments */**.

    /* this is a comment */

## Long lines

Source code in curl may never be wider than 79 columns and there are two
reasons for maintaining this even in the modern era of very large and high
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
    int main(int argc, char **argv)
    {
      return 1;
    }

## 'else' on the following line

When adding an `else` clause to a conditional expression using braces, we add
it on a new line after the closing brace. Like this:

    if(age < 40) {
      /* clearly a youngster */
    }
    else {
      /* probably grumpy */
    }







|
|







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
    int main(int argc, char **argv)
    {
      return 1;
    }

## 'else' on the following line

When adding an **else** clause to a conditional expression using braces, we
add it on a new line after the closing brace. Like this:

    if(age < 40) {
      /* clearly a youngster */
    }
    else {
      /* probably grumpy */
    }
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
















170
171
172
173
174
175
176
177
178
179

180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

196
197
198
199
200

201
202
203
204
205
206
207
208
209

210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
and NEVER:

    if(a) return TRUE;
    else if(b) return FALSE;

## Space around operators

Please use spaces on both sides of operators in C expressions.  Postfix `(),
[], ->, ., ++, --` and Unary `+, - !, ~, &` operators excluded they should
have no space.

Examples:

    bla = func();
    who = name[0];
    age += 1;
    true = !false;
    size += -2 + 3 * (a + b);
    ptr->member = a++;
    struct.field = b--;
    ptr = &address;
    contents = *pointer;
    complement = ~bits;
    empty = (!*string) ? TRUE : FALSE;

















## Column alignment

Some statements cannot be completed on a single line because the line would
be too long, the statement too hard to read, or due to other style guidelines
above. In such a case the statement will span multiple lines.

If a continuation line is part of an expression or sub-expression then you
should align on the appropriate column so that it's easy to tell what part of
the statement it is. Operators should not start continuation lines. In other
cases follow the 2-space indent guideline. Here are some examples from libcurl:


~~~c
    if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
       (handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
       (handle->set.httpreq == HTTPREQ_GET ||
        handle->set.httpreq == HTTPREQ_HEAD))
      /* didn't ask for HTTP/1.0 and a GET or HEAD */
      return TRUE;
~~~

~~~c
  case CURLOPT_KEEP_SENDING_ON_ERROR:
    data->set.http_keep_sending_on_error = (0 != va_arg(param, long)) ?
                                           TRUE : FALSE;
    break;
~~~


~~~c
    data->set.http_disable_hostname_check_before_authentication =
      (0 != va_arg(param, long)) ? TRUE : FALSE;
~~~


~~~c
  if(option) {
    result = parse_login_details(option, strlen(option),
                                 (userp ? &user : NULL),
                                 (passwdp ? &passwd : NULL),
                                 NULL);
  }
~~~


~~~c
        DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
                     "server response left\n",
                     (int)clipamount));
~~~

## Platform dependent code

Use `#ifdef HAVE_FEATURE` to do conditional code. We avoid checking for
particular operating systems or hardware in the #ifdef lines. The HAVE_FEATURE
shall be generated by the configure script for unix-like systems and they are
hard-coded in the config-[system].h files for the others.

We also encourage use of macros/functions that possibly are empty or defined
to constants when libcurl is built without that feature, to make the code
seamless. Like this style where the `magic()` function works differently
depending on a build-time conditional:

    #ifdef HAVE_MAGIC
    void magic(int a)
    {
      return a + 2;
    }
    #else
    #define magic(x) 1
    #endif

    int content = magic(3);







|
|
















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


|
|





|
>

<






<

<
<
<
<
<
<
>

<


|
>

<
|
|
|
|
|
|
|
>

<
|
|
|
<



|






|












145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

198
199
200
201
202
203

204






205
206

207
208
209
210
211

212
213
214
215
216
217
218
219
220

221
222
223

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
and NEVER:

    if(a) return TRUE;
    else if(b) return FALSE;

## Space around operators

Please use spaces on both sides of operators in C expressions.  Postfix **(),
[], ->, ., ++, --** and Unary **+, - !, ~, &** operators excluded they should
have no space.

Examples:

    bla = func();
    who = name[0];
    age += 1;
    true = !false;
    size += -2 + 3 * (a + b);
    ptr->member = a++;
    struct.field = b--;
    ptr = &address;
    contents = *pointer;
    complement = ~bits;
    empty = (!*string) ? TRUE : FALSE;

## No parentheses for return values

We use the 'return' statement without extra parentheses around the value:

    int works(void)
    {
      return TRUE;
    }

## Parentheses for sizeof arguments

When using the sizeof operator in code, we prefer it to be written with
parentheses around its argument:

    int size = sizeof(int);

## Column alignment

Some statements cannot be completed on a single line because the line would be
too long, the statement too hard to read, or due to other style guidelines
above. In such a case the statement will span multiple lines.

If a continuation line is part of an expression or sub-expression then you
should align on the appropriate column so that it's easy to tell what part of
the statement it is. Operators should not start continuation lines. In other
cases follow the 2-space indent guideline. Here are some examples from
libcurl:


    if(Curl_pipeline_wanted(handle->multi, CURLPIPE_HTTP1) &&
       (handle->set.httpversion != CURL_HTTP_VERSION_1_0) &&
       (handle->set.httpreq == HTTPREQ_GET ||
        handle->set.httpreq == HTTPREQ_HEAD))
      /* didn't ask for HTTP/1.0 and a GET or HEAD */
      return TRUE;








If no parenthesis, use the default indent:


    data->set.http_disable_hostname_check_before_authentication =
      (0 != va_arg(param, long)) ? TRUE : FALSE;

Function invoke with an open parenthesis:


    if(option) {
      result = parse_login_details(option, strlen(option),
                                   (userp ? &user : NULL),
                                   (passwdp ? &passwd : NULL),
                                   NULL);
    }

Align with the "current open" parenthesis:


    DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing "
                 "server response left\n",
                 (int)clipamount));


## Platform dependent code

Use **#ifdef HAVE_FEATURE** to do conditional code. We avoid checking for
particular operating systems or hardware in the #ifdef lines. The HAVE_FEATURE
shall be generated by the configure script for unix-like systems and they are
hard-coded in the config-[system].h files for the others.

We also encourage use of macros/functions that possibly are empty or defined
to constants when libcurl is built without that feature, to make the code
seamless. Like this example where the **magic()** function works differently
depending on a build-time conditional:

    #ifdef HAVE_MAGIC
    void magic(int a)
    {
      return a + 2;
    }
    #else
    #define magic(x) 1
    #endif

    int content = magic(3);
Changes to jni/curl/docs/INSTALL.cmake.
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
   - Doesn't allow different resolver backends (no c-ares build support)
   - No RTMP support built
   - Doesn't allow build curl and libcurl debug enabled
   - Doesn't allow a custom CA bundle path
   - Doesn't allow you to disable specific protocols from the build
   - Doesn't find or use krb4 or GSS
   - Rebuilds test files too eagerly, but still can't run the tests
   - Does't detect the correct strerror_r flavor when cross-compiling (issue #1123)


Command Line CMake
==================
   A CMake build of curl is similar to the autotools build of curl. It
   consists of the following steps after you have unpacked the source.








|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
   - Doesn't allow different resolver backends (no c-ares build support)
   - No RTMP support built
   - Doesn't allow build curl and libcurl debug enabled
   - Doesn't allow a custom CA bundle path
   - Doesn't allow you to disable specific protocols from the build
   - Doesn't find or use krb4 or GSS
   - Rebuilds test files too eagerly, but still can't run the tests
   - Doesn't detect the correct strerror_r flavor when cross-compiling (issue #1123)


Command Line CMake
==================
   A CMake build of curl is similar to the autotools build of curl. It
   consists of the following steps after you have unpacked the source.

Changes to jni/curl/docs/KNOWN_BUGS.
23
24
25
26
27
28
29

30
31
32
33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
 1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM

 2. TLS
 2.1 CURLINFO_SSL_VERIFYRESULT has limited support
 2.2 DER in keychain
 2.3 GnuTLS backend skips really long certificate fields
 2.4 DarwinSSL won't import PKCS#12 client certificates without a password


 3. Email protocols
 3.1 IMAP SEARCH ALL truncated response
 3.2 No disconnect command
 3.3 SMTP to multiple recipients
 3.4 POP3 expects "CRLF.CRLF" eob for some single-line responses

 4. Command line
 4.1 -J with %-encoded file nameas
 4.2 -J with -C - fails
 4.3 --retry and transfer timeouts


 5. Build and portability issues
 5.1 Windows Borland compiler
 5.2 curl-config --libs contains private details
 5.4 AIX shared build with c-ares fails
 5.5 can't handle Unicode arguments in Windows
 5.6 cmake support gaps







>











>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 1.11 CURLOPT_SEEKFUNCTION not called with CURLFORM_STREAM

 2. TLS
 2.1 CURLINFO_SSL_VERIFYRESULT has limited support
 2.2 DER in keychain
 2.3 GnuTLS backend skips really long certificate fields
 2.4 DarwinSSL won't import PKCS#12 client certificates without a password
 2.5 Client cert handling with Issuer DN differs between backends

 3. Email protocols
 3.1 IMAP SEARCH ALL truncated response
 3.2 No disconnect command
 3.3 SMTP to multiple recipients
 3.4 POP3 expects "CRLF.CRLF" eob for some single-line responses

 4. Command line
 4.1 -J with %-encoded file nameas
 4.2 -J with -C - fails
 4.3 --retry and transfer timeouts
 4.4 --upload-file . hang if delay in STDIN

 5. Build and portability issues
 5.1 Windows Borland compiler
 5.2 curl-config --libs contains private details
 5.4 AIX shared build with c-ares fails
 5.5 can't handle Unicode arguments in Windows
 5.6 cmake support gaps
60
61
62
63
64
65
66

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85

86
87
88
89
90
91
92
 7.2 FTP with CONNECT and slow server
 7.3 FTP with NOBODY and FAILONERROR
 7.4 FTP with ACCT
 7.5 ASCII FTP
 7.6 FTP with NULs in URL parts
 7.7 FTP and empty path parts in the URL
 7.8 Premature transfer end but healthy control channel


 8. TELNET
 8.1 TELNET and time limtiations don't work
 8.2 Microsoft telnet server

 9. SFTP and SCP
 9.1 SFTP doesn't do CURLOPT_POSTQUOTE correct

 10. SOCKS
 10.1 SOCKS proxy connections are done blocking
 10.2 SOCKS don't support timeouts
 10.3 FTPS over SOCKS
 10.4 active FTP over a SOCKS

 11. Internals
 11.1 Curl leaks .onion hostnames in DNS
 11.2 error buffer not set if connection to multiple addresses fails
 11.3 c-ares deviates from stock resolver on http://1346569778
 11.4 HTTP test server 'connection-monitor' problems


 12. LDAP and OpenLDAP
 12.1 OpenLDAP hangs after returning results

 13. TCP/IP
 13.1 --interface for ipv6 binds to unusable IP address








>



















>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
 7.2 FTP with CONNECT and slow server
 7.3 FTP with NOBODY and FAILONERROR
 7.4 FTP with ACCT
 7.5 ASCII FTP
 7.6 FTP with NULs in URL parts
 7.7 FTP and empty path parts in the URL
 7.8 Premature transfer end but healthy control channel
 7.9 Passive transfer tries only one IP address

 8. TELNET
 8.1 TELNET and time limtiations don't work
 8.2 Microsoft telnet server

 9. SFTP and SCP
 9.1 SFTP doesn't do CURLOPT_POSTQUOTE correct

 10. SOCKS
 10.1 SOCKS proxy connections are done blocking
 10.2 SOCKS don't support timeouts
 10.3 FTPS over SOCKS
 10.4 active FTP over a SOCKS

 11. Internals
 11.1 Curl leaks .onion hostnames in DNS
 11.2 error buffer not set if connection to multiple addresses fails
 11.3 c-ares deviates from stock resolver on http://1346569778
 11.4 HTTP test server 'connection-monitor' problems
 11.5 Connection information when using TCP Fast Open

 12. LDAP and OpenLDAP
 12.1 OpenLDAP hangs after returning results

 13. TCP/IP
 13.1 --interface for ipv6 binds to unusable IP address

219
220
221
222
223
224
225







226
227
228
229
230
231
232

2.4 DarwinSSL won't import PKCS#12 client certificates without a password

 libcurl calls SecPKCS12Import with the PKCS#12 client certificate, but that
 function rejects certificates that do not have a password.
 https://github.com/curl/curl/issues/1308









3. Email protocols

3.1 IMAP SEARCH ALL truncated response

 IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
 code reveals that pingpong.c contains some truncation code, at line 408, when







>
>
>
>
>
>
>







223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243

2.4 DarwinSSL won't import PKCS#12 client certificates without a password

 libcurl calls SecPKCS12Import with the PKCS#12 client certificate, but that
 function rejects certificates that do not have a password.
 https://github.com/curl/curl/issues/1308

2.5 Client cert handling with Issuer DN differs between backends

 When the specified client certificate doesn't match any of the
 server-specified DNs, the OpenSSL and GnuTLS backends behave differently.
 The github discussion may contain a solution.

 See https://github.com/curl/curl/issues/1411

3. Email protocols

3.1 IMAP SEARCH ALL truncated response

 IMAP "SEARCH ALL" truncates output on large boxes. "A quick search of the
 code reveals that pingpong.c contains some truncation code, at line 408, when
278
279
280
281
282
283
284







285
286
287
288
289
290
291
 If using --retry and the transfer timeouts (possibly due to using -m or
 -y/-Y) the next attempt doesn't resume the transfer properly from what was
 downloaded in the previous attempt but will truncate and restart at the
 original position where it was at before the previous failed attempt. See
 https://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report
 https://qa.mandriva.com/show_bug.cgi?id=22565









5. Build and portability issues

5.1 Windows Borland compiler

 When building with the Windows Borland compiler, it fails because the "tlib"
 tool doesn't support hyphens (minus signs) in file names and we have such in







>
>
>
>
>
>
>







289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
 If using --retry and the transfer timeouts (possibly due to using -m or
 -y/-Y) the next attempt doesn't resume the transfer properly from what was
 downloaded in the previous attempt but will truncate and restart at the
 original position where it was at before the previous failed attempt. See
 https://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report
 https://qa.mandriva.com/show_bug.cgi?id=22565

4.4 --upload-file . hangs if delay in STDIN

 "(echo start; sleep 1; echo end) | curl --upload-file . http://mywebsite -vv"

 ... causes a hang when it shouldn't.

 See https://github.com/curl/curl/issues/2051

5. Build and portability issues

5.1 Windows Borland compiler

 When building with the Windows Borland compiler, it fails because the "tlib"
 tool doesn't support hyphens (minus signs) in file names and we have such in
469
470
471
472
473
474
475












476
477
478
479
480
481
482
 closes the connection assuming it doesn't know the state of the connection so
 it can't be reused for subsequent requests.

 With FTP however, this isn't necessarily true but there are a bunch of
 situations (listed in the ftp_done code) where it *could* keep the connection
 alive even in this situation - but the current code doesn't. Fixing this would
 allow libcurl to reuse FTP connections better.













8. TELNET

8.1 TELNET and time limtiations don't work

 When using telnet, the time limitation options don't work.
 https://curl.haxx.se/bug/view.cgi?id=846







>
>
>
>
>
>
>
>
>
>
>
>







487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
 closes the connection assuming it doesn't know the state of the connection so
 it can't be reused for subsequent requests.

 With FTP however, this isn't necessarily true but there are a bunch of
 situations (listed in the ftp_done code) where it *could* keep the connection
 alive even in this situation - but the current code doesn't. Fixing this would
 allow libcurl to reuse FTP connections better.

7.9 Passive transfer tries only one IP address

 When doing FTP operations through a proxy at localhost, the reported spotted
 that curl only tried to connect once to the proxy, while it had mulitiple
 addresses and a failed connect on one address should make it try the next.

 After switching to passive mode (EPSV), curl should try all IP addresses for
 "localhost". Currently it tries ::1, but it should also try 127.0.0.1.

 See https://github.com/curl/curl/issues/1508


8. TELNET

8.1 TELNET and time limtiations don't work

 When using telnet, the time limitation options don't work.
 https://curl.haxx.se/bug/view.cgi?id=846
556
557
558
559
560
561
562







563
564
565
566
567
568
569

11.4 HTTP test server 'connection-monitor' problems

 The 'connection-monitor' feature of the sws HTTP test server doesn't work
 properly if some tests are run in unexpected order. Like 1509 and then 1525.

 See https://github.com/curl/curl/issues/868









12. LDAP and OpenLDAP

12.1 OpenLDAP hangs after returning results

 By configuration defaults, openldap automatically chase referrals on







>
>
>
>
>
>
>







586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606

11.4 HTTP test server 'connection-monitor' problems

 The 'connection-monitor' feature of the sws HTTP test server doesn't work
 properly if some tests are run in unexpected order. Like 1509 and then 1525.

 See https://github.com/curl/curl/issues/868

11.5 Connection information when using TCP Fast Open

 CURLINFO_LOCAL_PORT (and possibly a few other) fails when TCP Fast Open is
 enabled.

 See https://github.com/curl/curl/issues/1332


12. LDAP and OpenLDAP

12.1 OpenLDAP hangs after returning results

 By configuration defaults, openldap automatically chase referrals on
Changes to jni/curl/docs/SECURITY-PROCESS.md.
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

- The release of the information should be "as soon as possible" and is most
  often synced with an upcoming release that contains the fix. If the
  reporter, or anyone else, thinks the next planned release is too far away
  then a separate earlier release for security reasons should be considered.

- Write a security advisory draft about the problem that explains what the
  problem is, its impact, which versions it affects, solutions or
  workarounds, when the release is out and make sure to credit all
  contributors properly.

- Request a CVE number from
  [distros@openwall](http://oss-security.openwall.org/wiki/mailing-lists/distros)
  when also informing and preparing them for the upcoming public security
  vulnerability announcement - attach the advisory draft for information. Note
  that 'distros' won't accept an embargo longer than 14 days and they do not
  care for Windows-specific flaws. For windows-specific flaws, request CVE







|
|
|







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

- The release of the information should be "as soon as possible" and is most
  often synced with an upcoming release that contains the fix. If the
  reporter, or anyone else, thinks the next planned release is too far away
  then a separate earlier release for security reasons should be considered.

- Write a security advisory draft about the problem that explains what the
  problem is, its impact, which versions it affects, solutions or workarounds,
  when the release is out and make sure to credit all contributors properly.
  Figure out the CWE (Common Weakness Enumeration) number for the flaw.

- Request a CVE number from
  [distros@openwall](http://oss-security.openwall.org/wiki/mailing-lists/distros)
  when also informing and preparing them for the upcoming public security
  vulnerability announcement - attach the advisory draft for information. Note
  that 'distros' won't accept an embargo longer than 14 days and they do not
  care for Windows-specific flaws. For windows-specific flaws, request CVE
110
111
112
113
114
115
116























formal. We basically only require that you have a long-term presence in the
curl project and you have shown an understanding for the project and its way
of working. You must've been around for a good while and you should have no
plans in vanishing in the near future.

We do not make the list of participants public mostly because it tends to vary
somewhat over time and a list somewhere will only risk getting outdated.






























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
formal. We basically only require that you have a long-term presence in the
curl project and you have shown an understanding for the project and its way
of working. You must've been around for a good while and you should have no
plans in vanishing in the near future.

We do not make the list of participants public mostly because it tends to vary
somewhat over time and a list somewhere will only risk getting outdated.

Publishing Security Advisories
------------------------------

1. Write up the security advisory, using markdown syntax. Use the same
   subtitles as last time to maintain consistency.

2. Name the advisory file (and ultimately the URL to be used when the flaw
   gets published), using a randomized component so that third parties that
   are involved in the process for each individual flaw will not be given
   insights about possible *other* flaws worked on in parallel.
   `adv_YEAR_RANDOM.md` has been used before.

3. Add a line on the top of the array in `curl-www/docs/vuln.pm'.

4. Put the new advisory markdown file in the curl-www/docs/ directory. Add it
   to the git repo.  Update the Makefile in the same directory to build the
   HTML representation.

5. Run `make` in your local web checkout and verify that things look fine.

6. On security advisory release day, push the changes on the curl-www
   repository's remote master branch.
Changes to jni/curl/docs/THANKS.
1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
 This project has been alive for many years. Countless people have provided
 feedback that have improved curl. Here follows a list of people that have
 contributed (a-z order).

 If you have contributed but are missing here, please let us know!

"Captain Basil"
"Spoon Man"
Aaro Koskinen
Aaron Oneal
Aaron Orenstein
Abram Pousada

Adam D. Moss
Adam Langley
Adam Light
Adam Marcionek
Adam Piggott
Adam Sampson
Adam Tkac












>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 This project has been alive for many years. Countless people have provided
 feedback that have improved curl. Here follows a list of people that have
 contributed (a-z order).

 If you have contributed but are missing here, please let us know!

"Captain Basil"
"Spoon Man"
Aaro Koskinen
Aaron Oneal
Aaron Orenstein
Abram Pousada
Adam Brown
Adam D. Moss
Adam Langley
Adam Light
Adam Marcionek
Adam Piggott
Adam Sampson
Adam Tkac
33
34
35
36
37
38
39

40
41
42
43
44
45
46
Alejandro Alvarez Ayllon
Aleksandar Milivojevic
Aleksey Tulinov
Ales Mlakar
Ales Novak
Alessandro Ghedini
Alessandro Vesely

Alex Bligh
Alex Chan
Alex Fishman
Alex Gruz
Alex Malinovich
Alex McLellan
Alex Neblett







>







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Alejandro Alvarez Ayllon
Aleksandar Milivojevic
Aleksey Tulinov
Ales Mlakar
Ales Novak
Alessandro Ghedini
Alessandro Vesely
Alex Baines
Alex Bligh
Alex Chan
Alex Fishman
Alex Gruz
Alex Malinovich
Alex McLellan
Alex Neblett
152
153
154
155
156
157
158

159
160
161
162
163
164
165
Axel Tillequin
Balaji Parasuram
Balaji Salunke
Balint Szilakszi
Barry Abrahamson
Bart Whiteley
Bas Mevissen

Basuke Suzuki
Ben Boeckel
Ben Darnell
Ben Greear
Ben Madsen
Ben Noordhuis
Ben Van Hof







>







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
Axel Tillequin
Balaji Parasuram
Balaji Salunke
Balint Szilakszi
Barry Abrahamson
Bart Whiteley
Bas Mevissen
Bas van Schaik
Basuke Suzuki
Ben Boeckel
Ben Darnell
Ben Greear
Ben Madsen
Ben Noordhuis
Ben Van Hof
291
292
293
294
295
296
297

298
299
300
301
302
303
304
Craig A West
Craig Davison
Craig Markwardt
Craig de Stigter
Cris Bailiff
Cristian Rodríguez
Curt Bogmine

Cyrill Osterwalder
Cédric Connes
Cédric Deltheil
D. Flinkmann
Da-Yoon Chung
Dag Ekengren
Dagobert Michelsen







>







294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
Craig A West
Craig Davison
Craig Markwardt
Craig de Stigter
Cris Bailiff
Cristian Rodríguez
Curt Bogmine
Cyril B
Cyrill Osterwalder
Cédric Connes
Cédric Deltheil
D. Flinkmann
Da-Yoon Chung
Dag Ekengren
Dagobert Michelsen
357
358
359
360
361
362
363

364
365
366
367
368
369
370

371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390

391
392
393
394
395
396
397
David Benjamin
David Binderman
David Blaikie
David Byron
David Cohen
David E. Narváez
David Eriksson

David Houlder
David Hull
David J Meyer
David James
David Kalnischkies
David Kierznowski
David Kimdon

David Lang
David LeBlanc
David Lord
David McCreedy
David Meyer
David Odin
David Phillips
David Rosenstrauch
David Ryskalczyk
David Schweikert
David Shaw
David Strauss
David Tarendash
David Thiel
David Walser
David Woodhouse
David Wright
David Yan
Dengminwen
Denis Feklushkin

Dennis Clarke
Derek Higgins
Desmond O. Chang
Detlef Schmier
Didier Brisebourg
Diego Bes
Diego Casorran







>







>




















>







361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
David Benjamin
David Binderman
David Blaikie
David Byron
David Cohen
David E. Narváez
David Eriksson
David Garske
David Houlder
David Hull
David J Meyer
David James
David Kalnischkies
David Kierznowski
David Kimdon
David L.
David Lang
David LeBlanc
David Lord
David McCreedy
David Meyer
David Odin
David Phillips
David Rosenstrauch
David Ryskalczyk
David Schweikert
David Shaw
David Strauss
David Tarendash
David Thiel
David Walser
David Woodhouse
David Wright
David Yan
Dengminwen
Denis Feklushkin
Denis Ollier
Dennis Clarke
Derek Higgins
Desmond O. Chang
Detlef Schmier
Didier Brisebourg
Diego Bes
Diego Casorran
411
412
413
414
415
416
417

418
419
420
421
422
423
424
425


426
427
428
429
430
431
432
Dmitri Tikhonov
Dmitriy Sergeyev
Dmitry Bartsevich
Dmitry Eremin-Solenikov
Dmitry Falko
Dmitry Kostjuchenko
Dmitry Kurochkin

Dmitry Popov
Dmitry Rechkin
Dmitry S. Baikov
Dolbneff A.V
Domenico Andreoli
Dominick Meglio
Dominik Hölzl
Dominique Leuenberger


Doug Kaufman
Doug Porter
Douglas Creager
Douglas E. Wegscheid
Douglas Kilpatrick
Douglas Mencken
Douglas R. Horner







>








>
>







418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
Dmitri Tikhonov
Dmitriy Sergeyev
Dmitry Bartsevich
Dmitry Eremin-Solenikov
Dmitry Falko
Dmitry Kostjuchenko
Dmitry Kurochkin
Dmitry Mikhirev
Dmitry Popov
Dmitry Rechkin
Dmitry S. Baikov
Dolbneff A.V
Domenico Andreoli
Dominick Meglio
Dominik Hölzl
Dominique Leuenberger
Don J Olmstead
Dongliang Mu
Doug Kaufman
Doug Porter
Douglas Creager
Douglas E. Wegscheid
Douglas Kilpatrick
Douglas Mencken
Douglas R. Horner
464
465
466
467
468
469
470

471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488

489
490
491
492
493
494
495
Emil Romanus
Emiliano Ida
Emmanuel Tychon
Enrico Scholz
Enrik Berkhan
Eramoto Masaya
Eric Cooper

Eric Hu
Eric Landes
Eric Lavigne
Eric Lubin
Eric Melville
Eric Mertens
Eric Rautman
Eric Rescorla
Eric Ridge
Eric S. Raymond
Eric Thelin
Eric Vergnaud
Eric Wong
Eric Young
Erick Nuwendam
Erik Janssen
Erik Johansson
Ernest Beinrohr

Erwan Legrand
Erwin Authried
Ethan Glasser Camp
Eugene Kotlyarov
Evan Jordan
Even Rouault
Evert Pot







>


















>







474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
Emil Romanus
Emiliano Ida
Emmanuel Tychon
Enrico Scholz
Enrik Berkhan
Eramoto Masaya
Eric Cooper
Eric Gallager
Eric Hu
Eric Landes
Eric Lavigne
Eric Lubin
Eric Melville
Eric Mertens
Eric Rautman
Eric Rescorla
Eric Ridge
Eric S. Raymond
Eric Thelin
Eric Vergnaud
Eric Wong
Eric Young
Erick Nuwendam
Erik Janssen
Erik Johansson
Ernest Beinrohr
Ernst Sjöstrand
Erwan Legrand
Erwin Authried
Ethan Glasser Camp
Eugene Kotlyarov
Evan Jordan
Even Rouault
Evert Pot
540
541
542
543
544
545
546

547
548
549
550
551
552
553
Gary Maxwell
Gaurav Malhotra
Gautam Kachroo
Gautam Mani
Gavrie Philipson
Gaz Iqbal
Gaël Portay

Geoff Beier
Georg Horn
Georg Huettenegger
Georg Lippitsch
Georg Wicherski
Gerd v. Egidy
Gergely Nagy







>







552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
Gary Maxwell
Gaurav Malhotra
Gautam Kachroo
Gautam Mani
Gavrie Philipson
Gaz Iqbal
Gaël Portay
Geeknik Labs
Geoff Beier
Georg Horn
Georg Huettenegger
Georg Lippitsch
Georg Wicherski
Gerd v. Egidy
Gergely Nagy
845
846
847
848
849
850
851

852
853
854
855
856
857
858
Karl Moerder
Karol Pietrzak
Kartik Mahajan
Kaspar Brand
Katie Wang
Kazuho Oku
Kees Cook

Keith MacDonald
Keith McGuigan
Keith Mok
Ken Hirsch
Ken Rastatter
Kenny To
Kent Boortz







>







858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
Karl Moerder
Karol Pietrzak
Kartik Mahajan
Kaspar Brand
Katie Wang
Kazuho Oku
Kees Cook
Kees Dekker
Keith MacDonald
Keith McGuigan
Keith Mok
Ken Hirsch
Ken Rastatter
Kenny To
Kent Boortz
868
869
870
871
872
873
874

875
876
877
878
879
880
881
Kim Rinnewitz
Kim Vandry
Kimmo Kinnunen
Kjell Ericson
Kjetil Jacobsen
Klaus Stein
Klevtsov Vadim

Konstantin Isakov
Kris Kennaway
Krishnendu Majumdar
Krister Johansen
Kristian Gunstone
Kristian Köhntopp
Kristiyan Tsaklev







>







882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
Kim Rinnewitz
Kim Vandry
Kimmo Kinnunen
Kjell Ericson
Kjetil Jacobsen
Klaus Stein
Klevtsov Vadim
Kobi Gurkan
Konstantin Isakov
Kris Kennaway
Krishnendu Majumdar
Krister Johansen
Kristian Gunstone
Kristian Köhntopp
Kristiyan Tsaklev
895
896
897
898
899
900
901


902
903
904
905
906
907
908
Lars J. Aas
Lars Johannesen
Lars Nilsson
Lars Torben Wilson
Lau Hang Kin
Laurent Rabret
Lauri Kasanen


Lawrence Wagerfield
Legoff Vincent
Lehel Bernadt
Leif W
Leith Bade
Len Krause
Lenaic Lefever







>
>







910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
Lars J. Aas
Lars Johannesen
Lars Nilsson
Lars Torben Wilson
Lau Hang Kin
Laurent Rabret
Lauri Kasanen
Laurie Clark-Michalek
Lawrence Matthews
Lawrence Wagerfield
Legoff Vincent
Lehel Bernadt
Leif W
Leith Bade
Len Krause
Lenaic Lefever
935
936
937
938
939
940
941

942
943
944
945
946
947
948
Lukas Ruzicka
Lukasz Czekierda
Luke Amery
Luke Call
Luke Dashjr
Luo Jinghua
Luong Dinh Dung

Luật Nguyễn
Lyndon Hill
Maciej Karpiuk
Maciej Puzio
Maciej W. Rozycki
Mahmoud Samir Fayed
Maks Naumov







>







952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
Lukas Ruzicka
Lukasz Czekierda
Luke Amery
Luke Call
Luke Dashjr
Luo Jinghua
Luong Dinh Dung
Luz Paz
Luật Nguyễn
Lyndon Hill
Maciej Karpiuk
Maciej Puzio
Maciej W. Rozycki
Mahmoud Samir Fayed
Maks Naumov
1051
1052
1053
1054
1055
1056
1057

1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068

1069
1070
1071
1072
1073
1074
1075
Michael Felt
Michael Gmelin
Michael Goffioul
Michael Jahn
Michael Jerris
Michael Kalinin
Michael Kaufmann

Michael König
Michael Maltese
Michael Mealling
Michael Mueller
Michael Osipov
Michael Smith
Michael Stapelberg
Michael Stillwell
Michael Wallner
Michal Bonino
Michal Marek

Michał Fita
Michał Górny
Michał Janiszewski
Michał Kowalczyk
Michał Piechowski
Michel Promonet
Michele Bini







>











>







1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
Michael Felt
Michael Gmelin
Michael Goffioul
Michael Jahn
Michael Jerris
Michael Kalinin
Michael Kaufmann
Michael Kilburn
Michael König
Michael Maltese
Michael Mealling
Michael Mueller
Michael Osipov
Michael Smith
Michael Stapelberg
Michael Stillwell
Michael Wallner
Michal Bonino
Michal Marek
Michal Trybus
Michał Fita
Michał Górny
Michał Janiszewski
Michał Kowalczyk
Michał Piechowski
Michel Promonet
Michele Bini
1097
1098
1099
1100
1101
1102
1103

1104
1105
1106
1107
1108
1109
1110
Miroslav Spousta
Mitz Wark
Mohamed Lrhazi
Mohammad AlSaleh
Mohun Biswas
Mostyn Bramley-Moore
Moti Avrahami

Myk Taylor
Nach M. S.
Nagai H
Nathan Coulter
Nathan O'Sullivan
Nathanael Nerode
Nathaniel Waisbrot







>







1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
Miroslav Spousta
Mitz Wark
Mohamed Lrhazi
Mohammad AlSaleh
Mohun Biswas
Mostyn Bramley-Moore
Moti Avrahami
Muz Dima
Myk Taylor
Nach M. S.
Nagai H
Nathan Coulter
Nathan O'Sullivan
Nathanael Nerode
Nathaniel Waisbrot
1130
1131
1132
1133
1134
1135
1136

1137
1138
1139
1140
1141
1142
1143
Nicolas Morey-Chaisemartin
Niels van Tongeren
Nikita Schmidt
Nikitinskit Dmitriy
Niklas Angebrand
Nikolai Kondrashov
Nikos Mavrogiannopoulos

Ning Dong
Nir Soffer
Nis Jorgensen
Nobuhiro Ban
Nodak Sodak
Norbert Frese
Norbert Kett







>







1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
Nicolas Morey-Chaisemartin
Niels van Tongeren
Nikita Schmidt
Nikitinskit Dmitriy
Niklas Angebrand
Nikolai Kondrashov
Nikos Mavrogiannopoulos
Nikos Tsipinakis
Ning Dong
Nir Soffer
Nis Jorgensen
Nobuhiro Ban
Nodak Sodak
Norbert Frese
Norbert Kett
1159
1160
1161
1162
1163
1164
1165

1166
1167
1168
1169
1170
1171
1172
Orange Tsai
Oren Souroujon
Oren Tirosh
Orgad Shaneh
Ori Avtalion
Oscar Koeroo
Oscar Norlander

P R Schaffner
Palo Markovic
Paolo Piacentini
Paras Sethia
Pascal Gaudette
Pascal Terjan
Pasha Kuznetsov







>







1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
Orange Tsai
Oren Souroujon
Oren Tirosh
Orgad Shaneh
Ori Avtalion
Oscar Koeroo
Oscar Norlander
Oumph on github
P R Schaffner
Palo Markovic
Paolo Piacentini
Paras Sethia
Pascal Gaudette
Pascal Terjan
Pasha Kuznetsov
1241
1242
1243
1244
1245
1246
1247

1248
1249
1250
1251
1252
1253
1254
Phil Crump
Phil Karn
Phil Lisiecki
Phil Pellouchoud
Philip Craig
Philip Gladstone
Philip Langdale

Philippe Hameau
Philippe Raoult
Philippe Vaucher
Pierre
Pierre Brico
Pierre Chapuis
Pierre Joye







>







1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
Phil Crump
Phil Karn
Phil Lisiecki
Phil Pellouchoud
Philip Craig
Philip Gladstone
Philip Langdale
Philip Prindeville
Philippe Hameau
Philippe Raoult
Philippe Vaucher
Pierre
Pierre Brico
Pierre Chapuis
Pierre Joye
1317
1318
1319
1320
1321
1322
1323

1324
1325
1326
1327

1328
1329
1330
1331
1332
1333
1334
Richard Hsu
Richard Michael
Richard Moore
Richard Prescott
Richard Silverman
Richard van den Berg
Richy Kim

Rick Jones
Rick Richardson
Ricki Hirner
Rider Linden

Rob Cotrone
Rob Crittenden
Rob Davies
Rob Jones
Rob Sanders
Rob Stanzel
Rob Ward







>




>







1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
Richard Hsu
Richard Michael
Richard Moore
Richard Prescott
Richard Silverman
Richard van den Berg
Richy Kim
Rick Deist
Rick Jones
Rick Richardson
Ricki Hirner
Rider Linden
Rikard Falkeborn
Rob Cotrone
Rob Crittenden
Rob Davies
Rob Jones
Rob Sanders
Rob Stanzel
Rob Ward
1444
1445
1446
1447
1448
1449
1450

1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462

1463
1464
1465
1466
1467
1468
1469
Spacen Jasset
Spiridonoff A.V
Spork Schivago
Stadler Stephan
Stan van de Burgt
Stanislav Ivochkin
Stanislav Zidek

Stefan Bühler
Stefan Eissing
Stefan Esser
Stefan Kanthak
Stefan Krause
Stefan Neis
Stefan Teleman
Stefan Tomanek
Stefan Ulrich
Steinar H. Gunderson
Stepan Broz
Stephan Bergmann

Stephen Brokenshire
Stephen Collyer
Stephen Kick
Stephen More
Stephen Toub
Sterling Hughes
Steve Brokenshire







>












>







1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
Spacen Jasset
Spiridonoff A.V
Spork Schivago
Stadler Stephan
Stan van de Burgt
Stanislav Ivochkin
Stanislav Zidek
Stefan Agner
Stefan Bühler
Stefan Eissing
Stefan Esser
Stefan Kanthak
Stefan Krause
Stefan Neis
Stefan Teleman
Stefan Tomanek
Stefan Ulrich
Steinar H. Gunderson
Stepan Broz
Stephan Bergmann
Stephan Mühlstrasser
Stephen Brokenshire
Stephen Collyer
Stephen Kick
Stephen More
Stephen Toub
Sterling Hughes
Steve Brokenshire
1480
1481
1482
1483
1484
1485
1486

1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502

1503
1504
1505
1506
1507
1508
1509
1510
Steven G. Johnson
Steven Gu
Steven M. Schweda
Steven Parkes
Stoned Elipot
Stuart Henderson
Sune Ahlgren

Sven Anders
Sven Neuhaus
Sven Wegener
Svyatoslav Mishyn
Sylvestre Ledru
Symeon Paraschoudis
Sébastien Willemijns
T. Bharath
T. Yamada
TJ Saunders
Tae Hyoung Ahn
Taneli Vähäkangas
Tanguy Fautre
Tatsuhiro Tsujikawa
Temprimus
Terri Oda

TheAssassin at github
Theodore Dubois
Thomas Braun
Thomas Glanzmann
Thomas J. Moore
Thomas Klausner
Thomas L. Shinnick
Thomas Lopatic







>
















>
|







1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
Steven G. Johnson
Steven Gu
Steven M. Schweda
Steven Parkes
Stoned Elipot
Stuart Henderson
Sune Ahlgren
Sunny Purushe
Sven Anders
Sven Neuhaus
Sven Wegener
Svyatoslav Mishyn
Sylvestre Ledru
Symeon Paraschoudis
Sébastien Willemijns
T. Bharath
T. Yamada
TJ Saunders
Tae Hyoung Ahn
Taneli Vähäkangas
Tanguy Fautre
Tatsuhiro Tsujikawa
Temprimus
Terri Oda
Terry Wu
TheAssassin on github
Theodore Dubois
Thomas Braun
Thomas Glanzmann
Thomas J. Moore
Thomas Klausner
Thomas L. Shinnick
Thomas Lopatic
1655
1656
1657
1658
1659
1660
1661

1662
1663
1664
1665
1666
1667

1668
1669
1670
1671
1672
1673
1674
1675

1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695

1696
1697
1698

1699
1700
1701
1702
1703
1704

1705
1706
1707
1708
1709
1710
1711
Zekun Ni
Zenju on github
Zhouyihai Ding
Zmey Petroff
Zvi Har'El
afrind on github
ahodesuka on github

arainchik on github
asavah on github
baumanj on github
bsammon on github
cbartl on github
cmfrolick on github

destman on github
dkjjr89 on github
dpull on github
eXeC64 on github
elelel on github
guitared on github
hsiao yi
imilli on github

jonrumsey on github
joshhe on github
jungle-boogie on github
jveazey on github
ka7 on github
kreshano on github
lijian996 on github
lukaszgn on github
madblobfish on github
marc-groundctl on github
mccormickt12 on github
mkzero on github
moohoorama on github
neex on github
neheb on github
nk
nopjmp on github
olesteban on github
omau on github
ovidiu-benea on github

paulharris on github
silveja1 on github
steelman on github

stootill on github
swalkaus at yahoo.com
tarek112 on github
tommink[at]post.pl
vanillajonathan on github
wmsch on github

wyattoday on github
youngchopin on github
zelinchen on github
İsmail Dönmez
Łukasz Domeradzki
Štefan Kremeň
Никита Дорохин







>






>








>




















>



>






>







1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
Zekun Ni
Zenju on github
Zhouyihai Ding
Zmey Petroff
Zvi Har'El
afrind on github
ahodesuka on github
anshnd on github
arainchik on github
asavah on github
baumanj on github
bsammon on github
cbartl on github
cmfrolick on github
dasimx on github
destman on github
dkjjr89 on github
dpull on github
eXeC64 on github
elelel on github
guitared on github
hsiao yi
imilli on github
iz8mbw on github
jonrumsey on github
joshhe on github
jungle-boogie on github
jveazey on github
ka7 on github
kreshano on github
lijian996 on github
lukaszgn on github
madblobfish on github
marc-groundctl on github
mccormickt12 on github
mkzero on github
moohoorama on github
neex on github
neheb on github
nk
nopjmp on github
olesteban on github
omau on github
ovidiu-benea on github
patelvivekv1993 on github
paulharris on github
silveja1 on github
steelman on github
steini2000 on github
stootill on github
swalkaus at yahoo.com
tarek112 on github
tommink[at]post.pl
vanillajonathan on github
wmsch on github
wncboy on github
wyattoday on github
youngchopin on github
zelinchen on github
İsmail Dönmez
Łukasz Domeradzki
Štefan Kremeň
Никита Дорохин
Changes to jni/curl/docs/TODO.
39
40
41
42
43
44
45

46
47
48
49
50
51
52
 1.20 SRV and URI DNS records
 1.21 API for URL parsing/splitting
 1.23 Offer API to flush the connection pool
 1.24 TCP Fast Open for windows
 1.25 Expose tried IP addresses that failed
 1.26 CURL_REFUSE_CLEARTEXT
 1.27 hardcode the "localhost" addresses


 2. libcurl - multi interface
 2.1 More non-blocking
 2.2 Better support for same name resolves
 2.3 Non-blocking curl_multi_remove_handle()
 2.4 Split connect and authentication process
 2.5 Edge-triggered sockets should work







>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 1.20 SRV and URI DNS records
 1.21 API for URL parsing/splitting
 1.23 Offer API to flush the connection pool
 1.24 TCP Fast Open for windows
 1.25 Expose tried IP addresses that failed
 1.26 CURL_REFUSE_CLEARTEXT
 1.27 hardcode the "localhost" addresses
 1.28 FD_CLOEXEC

 2. libcurl - multi interface
 2.1 More non-blocking
 2.2 Better support for same name resolves
 2.3 Non-blocking curl_multi_remove_handle()
 2.4 Split connect and authentication process
 2.5 Edge-triggered sockets should work
110
111
112
113
114
115
116

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
 13.5 Export session ids
 13.6 Provide callback for cert verification
 13.7 improve configure --with-ssl
 13.8 Support DANE
 13.11 Support intermediate & root pinning for PINNEDPUBLICKEY
 13.12 Support HSTS
 13.13 Support HPKP


 14. GnuTLS
 14.1 SSL engine stuff
 14.2 check connection

 15. WinSSL/SChannel
 15.1 Add support for client certificate authentication
 15.2 Add support for custom server certificate validation
 15.3 Add support for the --ciphers option

 16. SASL
 16.1 Other authentication mechanisms
 16.2 Add QOP support to GSSAPI authentication
 16.3 Support binary messages (i.e.: non-base64)








>







<







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

126
127
128
129
130
131
132
 13.5 Export session ids
 13.6 Provide callback for cert verification
 13.7 improve configure --with-ssl
 13.8 Support DANE
 13.11 Support intermediate & root pinning for PINNEDPUBLICKEY
 13.12 Support HSTS
 13.13 Support HPKP
 13.14 Support the clienthello extension

 14. GnuTLS
 14.1 SSL engine stuff
 14.2 check connection

 15. WinSSL/SChannel
 15.1 Add support for client certificate authentication

 15.3 Add support for the --ciphers option

 16. SASL
 16.1 Other authentication mechanisms
 16.2 Add QOP support to GSSAPI authentication
 16.3 Support binary messages (i.e.: non-base64)

150
151
152
153
154
155
156

157
158
159
160
161
162
163
 18.12 keep running, read instructions from pipe/socket
 18.13 support metalink in http headers
 18.14 --fail without --location should treat 3xx as a failure
 18.15 --retry should resume
 18.16 send only part of --data
 18.17 consider file name from the redirected URL with -O ?
 18.18 retry on network is unreachable


 19. Build
 19.1 roffit
 19.2 Enable PIE and RELRO by default

 20. Test suite
 20.1 SSL tunnel







>







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
 18.12 keep running, read instructions from pipe/socket
 18.13 support metalink in http headers
 18.14 --fail without --location should treat 3xx as a failure
 18.15 --retry should resume
 18.16 send only part of --data
 18.17 consider file name from the redirected URL with -O ?
 18.18 retry on network is unreachable
 18.19 expand ~/ in config files

 19. Build
 19.1 roffit
 19.2 Enable PIE and RELRO by default

 20. Test suite
 20.1 SSL tunnel
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

 A new libcurl option could be added to allow applications to switch off this
 feature and thus avoid a potential risk.

1.2 More data sharing

 curl_share_* functions already exist and work, and they can be extended to
 share more. For example, enable sharing of the ares channel and the
 connection cache.

1.3 struct lifreq

 Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and
 SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
 To support IPv6 interface addresses for network interfaces properly.








|
<







197
198
199
200
201
202
203
204

205
206
207
208
209
210
211

 A new libcurl option could be added to allow applications to switch off this
 feature and thus avoid a potential risk.

1.2 More data sharing

 curl_share_* functions already exist and work, and they can be extended to
 share more. For example, enable sharing of the ares channel.


1.3 struct lifreq

 Use 'struct lifreq' and SIOCGLIFADDR instead of 'struct ifreq' and
 SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete.
 To support IPv6 interface addresses for network interfaces properly.

427
428
429
430
431
432
433








434
435
436
437
438
439
440
 127.0.0.1 and/or ::1 (depending on what IP versions that are requested). This
 is what the browsers probably will do with this hostname.

 https://bugzilla.mozilla.org/show_bug.cgi?id=1220810

 https://tools.ietf.org/html/draft-ietf-dnsop-let-localhost-be-localhost-02









2. libcurl - multi interface

2.1 More non-blocking

 Make sure we don't ever loop because of non-blocking sockets returning
 EWOULDBLOCK or similar. Blocking cases include:








>
>
>
>
>
>
>
>







428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
 127.0.0.1 and/or ::1 (depending on what IP versions that are requested). This
 is what the browsers probably will do with this hostname.

 https://bugzilla.mozilla.org/show_bug.cgi?id=1220810

 https://tools.ietf.org/html/draft-ietf-dnsop-let-localhost-be-localhost-02

1.28 FD_CLOEXEC

 It sets the close-on-exec flag for the file descriptor, which causes the file
 descriptor to be automatically (and atomically) closed when any of the
 exec-family functions succeed. Should probably be set by default?

 https://github.com/curl/curl/issues/2252

2. libcurl - multi interface

2.1 More non-blocking

 Make sure we don't ever loop because of non-blocking sockets returning
 EWOULDBLOCK or similar. Blocking cases include:

706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
 independently of OpenSSL or GnutTLS being used.

13.3 Support in-memory certs/ca certs/keys

 You can specify the private and public keys for SSH/SSL as file paths. Some
 programs want to avoid using files and instead just pass them as in-memory
 data blobs. There's probably a challenge to make this work across the
 plethory of different TLS and SSH backends that curl suppports.
 https://github.com/curl/curl/issues/2310

13.4 Cache/share OpenSSL contexts

 "Look at SSL cafile - quick traces look to me like these are done on every
 request as well, when they should only be necessary once per SSL context (or
 once per handle)". The major improvement we can rather easily do is to make







|







715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
 independently of OpenSSL or GnutTLS being used.

13.3 Support in-memory certs/ca certs/keys

 You can specify the private and public keys for SSH/SSL as file paths. Some
 programs want to avoid using files and instead just pass them as in-memory
 data blobs. There's probably a challenge to make this work across the
 plethory of different TLS and SSH backends that curl supports.
 https://github.com/curl/curl/issues/2310

13.4 Cache/share OpenSSL contexts

 "Look at SSL cafile - quick traces look to me like these are done on every
 request as well, when they should only be necessary once per SSL context (or
 once per handle)". The major improvement we can rather easily do is to make
795
796
797
798
799
800
801










802
803
804
805
806
807
808
 It can be build based on PINNEDPUBLICKEY.

 Wikipedia: https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning
 OWASP: https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning
 Doc: https://developer.mozilla.org/de/docs/Web/Security/Public_Key_Pinning
 RFC: https://tools.ietf.org/html/draft-ietf-websec-key-pinning-21











14. GnuTLS

14.1 SSL engine stuff

 Is this even possible?

14.2 check connection







>
>
>
>
>
>
>
>
>
>







804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
 It can be build based on PINNEDPUBLICKEY.

 Wikipedia: https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning
 OWASP: https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning
 Doc: https://developer.mozilla.org/de/docs/Web/Security/Public_Key_Pinning
 RFC: https://tools.ietf.org/html/draft-ietf-websec-key-pinning-21

13.14 Support the clienthello extension

 Certain stupid networks and middle boxes have a problem with SSL handshake
 pakets that are within a certain size range because how that sets some bits
 that previously (in older TLS version) were not set. The clienthello
 extension adds padding to avoid that size range.

 https://tools.ietf.org/html/rfc7685
 https://github.com/curl/curl/issues/2299

14. GnuTLS

14.1 SSL engine stuff

 Is this even possible?

14.2 check connection
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
 WinSSL/SChannel currently makes use of the OS-level system and user
 certificate and private key stores. This does not allow the application
 or the user to supply a custom client certificate using curl or libcurl.

 Therefore support for the existing -E/--cert and --key options should be
 implemented by supplying a custom certificate to the SChannel APIs, see:
 - Getting a Certificate for Schannel
   https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx

15.2 Add support for custom server certificate validation

 WinSSL/SChannel currently makes use of the OS-level system and user
 certificate trust store. This does not allow the application or user to
 customize the server certificate validation process using curl or libcurl.

 Therefore support for the existing --cacert or --capath options should be
 implemented by supplying a custom certificate to the SChannel APIs, see:
 - Getting a Certificate for Schannel
   https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx

15.3 Add support for the --ciphers option

 The cipher suites used by WinSSL/SChannel are configured on an OS-level
 instead of an application-level. This does not allow the application or
 the user to customize the configured cipher suites using curl or libcurl.







<
<
<
<
<
<
<
<
<
<
<







836
837
838
839
840
841
842











843
844
845
846
847
848
849
 WinSSL/SChannel currently makes use of the OS-level system and user
 certificate and private key stores. This does not allow the application
 or the user to supply a custom client certificate using curl or libcurl.

 Therefore support for the existing -E/--cert and --key options should be
 implemented by supplying a custom certificate to the SChannel APIs, see:
 - Getting a Certificate for Schannel











   https://msdn.microsoft.com/en-us/library/windows/desktop/aa375447.aspx

15.3 Add support for the --ciphers option

 The cipher suites used by WinSSL/SChannel are configured on an OS-level
 instead of an application-level. This does not allow the application or
 the user to customize the configured cipher suites using curl or libcurl.
1058
1059
1060
1061
1062
1063
1064







1065
1066
1067
1068
1069
1070
1071

 Suggestions have been brought to also allow retry on "network is unreachable"
 errors and while totally reasonable, maybe we should consider a way to make
 this more configurable than to add a new option for every new error people
 want to retry for?

 https://github.com/curl/curl/issues/1603








19. Build

19.1 roffit

 Consider extending 'roffit' to produce decent ASCII output, and use that
 instead of (g)nroff when building src/tool_hugehelp.c







>
>
>
>
>
>
>







1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086

 Suggestions have been brought to also allow retry on "network is unreachable"
 errors and while totally reasonable, maybe we should consider a way to make
 this more configurable than to add a new option for every new error people
 want to retry for?

 https://github.com/curl/curl/issues/1603

18.19 expand ~/ in config files

 For example .curlrc could benefit from being able to do this.

 See https://github.com/curl/curl/issues/2317


19. Build

19.1 roffit

 Consider extending 'roffit' to produce decent ASCII output, and use that
 instead of (g)nroff when building src/tool_hugehelp.c
Changes to jni/curl/docs/cmdline-opts/cacert.d.
20
21
22
23
24
25
26





27
28
(libnsspem.so) needs to be available for this option to work properly.

(iOS and macOS only) If curl is built against Secure Transport, then this
option is supported for backward compatibility with other SSL engines, but it
should not be set. If the option is not set, then curl will use the
certificates in the system and user Keychain to verify the peer, which is the
preferred method of verifying the peer's certificate chain.






If this option is used several times, the last one will be used.







>
>
>
>
>


20
21
22
23
24
25
26
27
28
29
30
31
32
33
(libnsspem.so) needs to be available for this option to work properly.

(iOS and macOS only) If curl is built against Secure Transport, then this
option is supported for backward compatibility with other SSL engines, but it
should not be set. If the option is not set, then curl will use the
certificates in the system and user Keychain to verify the peer, which is the
preferred method of verifying the peer's certificate chain.

(Schannel/WinSSL only) This option is supported for WinSSL in Windows 7 or
later with libcurl 7.60 or later. This option is supported for backward
compatibility with other SSL engines; instead it is recommended to use Windows'
store of root certificates (the default for WinSSL).

If this option is used several times, the last one will be used.
Changes to jni/curl/docs/cmdline-opts/cert.d.
24
25
26
27
28
29
30











31
32
be escaped as "\\\\" so that it is not recognized as an escape character.

(iOS and macOS only) If curl is built against Secure Transport, then the
certificate string can either be the name of a certificate/private key in the
system or user keychain, or the path to a PKCS#12-encoded certificate and
private key. If you want to use a file from the current directory, please
precede it with "./" prefix, in order to avoid confusion with a nickname.












If this option is used several times, the last one will be used.







>
>
>
>
>
>
>
>
>
>
>


24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
be escaped as "\\\\" so that it is not recognized as an escape character.

(iOS and macOS only) If curl is built against Secure Transport, then the
certificate string can either be the name of a certificate/private key in the
system or user keychain, or the path to a PKCS#12-encoded certificate and
private key. If you want to use a file from the current directory, please
precede it with "./" prefix, in order to avoid confusion with a nickname.

(Schannel/WinSSL only) Client certificates must be specified by a path
expression to a certificate store. (Loading PFX is not supported; you can
import it to a store first). You can use
"<store location>\\<store name>\\<thumbprint>" to refer to a certificate
in the system certificates store, for example,
"CurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint is
usually a SHA-1 hex string which you can see in certificate details. Following
store locations are supported: CurrentUser, LocalMachine, CurrentService,
Services, CurrentUserGroupPolicy, LocalMachineGroupPolicy,
LocalMachineEnterprise.

If this option is used several times, the last one will be used.
Changes to jni/curl/docs/cmdline-opts/cookie.d.
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
the data previously received from the server in a "Set-Cookie:" line.  The
data should be in the format "NAME1=VALUE1; NAME2=VALUE2".

If no '=' symbol is used in the argument, it is instead treated as a filename
to read previously stored cookie from. This option also activates the cookie
engine which will make curl record incoming cookies, which may be handy if
you're using this in combination with the --location option or do multiple URL
transfers on the same invoke.


The file format of the file to read cookies from should be plain HTTP headers
(Set-Cookie style) or the Netscape/Mozilla cookie file format.

The file specified with --cookie is only used as input. No cookies will be
written to the file. To store cookies, use the --cookie-jar option.








|
>







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
the data previously received from the server in a "Set-Cookie:" line.  The
data should be in the format "NAME1=VALUE1; NAME2=VALUE2".

If no '=' symbol is used in the argument, it is instead treated as a filename
to read previously stored cookie from. This option also activates the cookie
engine which will make curl record incoming cookies, which may be handy if
you're using this in combination with the --location option or do multiple URL
transfers on the same invoke. If the file name is exactly a minus ("-"), curl
will instead the contents from stdin.

The file format of the file to read cookies from should be plain HTTP headers
(Set-Cookie style) or the Netscape/Mozilla cookie file format.

The file specified with --cookie is only used as input. No cookies will be
written to the file. To store cookies, use the --cookie-jar option.

Changes to jni/curl/docs/cmdline-opts/ftp-port.d.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Reverses the default initiator/listener roles when connecting with FTP. This
option makes curl use active mode. curl then tells the server to connect back
to the client's specified address and port, while passive mode asks the server
to setup an IP address and port for it to connect to. <address> should be one
of:
.RS
.IP interface
i.e "eth0" to specify which interface's IP address you want to use (Unix only)
.IP "IP address"
i.e "192.168.10.1" to specify the exact IP address
.IP "host name"
i.e "my.host.domain" to specify the machine
.IP "-"
make curl pick the same IP address that is already used for the control
connection
.RE

If this option is used several times, the last one will be used. Disable the
use of PORT with --ftp-pasv. Disable the attempt to use the EPRT command







|

|

|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Reverses the default initiator/listener roles when connecting with FTP. This
option makes curl use active mode. curl then tells the server to connect back
to the client's specified address and port, while passive mode asks the server
to setup an IP address and port for it to connect to. <address> should be one
of:
.RS
.IP interface
e.g. "eth0" to specify which interface's IP address you want to use (Unix only)
.IP "IP address"
e.g. "192.168.10.1" to specify the exact IP address
.IP "host name"
e.g. "my.host.domain" to specify the machine
.IP "-"
make curl pick the same IP address that is already used for the control
connection
.RE

If this option is used several times, the last one will be used. Disable the
use of PORT with --ftp-pasv. Disable the attempt to use the EPRT command
Changes to jni/curl/docs/cmdline-opts/interface.d.
8
9
10
11
12
13
14
15
16
name, IP address or host name. An example could look like:

 curl --interface eth0:1 https://www.example.com/

If this option is used several times, the last one will be used.

On Linux it can be used to specify a VRF, but the binary needs to either
have CAP_NET_RAW or to be ran as root. More information about Linux VRF:
https://www.kernel.org/doc/Documentation/networking/vrf.txt







|

8
9
10
11
12
13
14
15
16
name, IP address or host name. An example could look like:

 curl --interface eth0:1 https://www.example.com/

If this option is used several times, the last one will be used.

On Linux it can be used to specify a VRF, but the binary needs to either
have CAP_NET_RAW or to be run as root. More information about Linux VRF:
https://www.kernel.org/doc/Documentation/networking/vrf.txt
Changes to jni/curl/docs/cmdline-opts/max-time.d.
1
2
3
4
5
6
7
8
9
10
Long: max-time
Short: m
Arg: <time>
Help: Maximum time allowed for the transfer
See-also: connect-timeout
---
Maximum time in seconds that you allow the whole operation to take.  This is
useful for preventing your batch jobs from hanging for hours due to slow
networks or links going down.  Since 7.32.0, this option accepts decimal
values, but the actual timeout will decrease in accuracy as the specified


|







1
2
3
4
5
6
7
8
9
10
Long: max-time
Short: m
Arg: <seconds>
Help: Maximum time allowed for the transfer
See-also: connect-timeout
---
Maximum time in seconds that you allow the whole operation to take.  This is
useful for preventing your batch jobs from hanging for hours due to slow
networks or links going down.  Since 7.32.0, this option accepts decimal
values, but the actual timeout will decrease in accuracy as the specified
Changes to jni/curl/docs/cmdline-opts/page-footer.
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use for [url-protocol], where the protocol is a
protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
SMTP, LDAP etc.
.IP "ALL_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>"
list of host names that shouldn't go through any proxy. If set to a asterisk
\&'*' only, it matches all hosts.

This environment variable disables use of the proxy even when specified with
the --proxy option. That is
.B NO_PROXY=direct.example.com curl -x http://proxy.example.com
.B http://direct.example.com
accesses the target URL directly, and







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use for [url-protocol], where the protocol is a
protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
SMTP, LDAP etc.
.IP "ALL_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>"
list of host names that shouldn't go through any proxy. If set to an asterisk
\&'*' only, it matches all hosts.

This environment variable disables use of the proxy even when specified with
the --proxy option. That is
.B NO_PROXY=direct.example.com curl -x http://proxy.example.com
.B http://direct.example.com
accesses the target URL directly, and
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
protocol:// prefix to specify alternative proxy protocols.

If no protocol is specified in the proxy string or if the string doesn't match
a supported one, the proxy will be treated as an HTTP proxy.

The supported proxy protocol prefixes are as follows:
.IP "http://"
Makes it use it as a HTTP proxy. The default if no scheme prefix is used.
.IP "https://"
Makes it treated as a \fBHTTPS\fP proxy.
.IP "socks4://"
Makes it the equivalent of --socks4
.IP "socks4a://"
Makes it the equivalent of --socks4a
.IP "socks5://"
Makes it the equivalent of --socks5
.IP "socks5h://"







|

|







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
protocol:// prefix to specify alternative proxy protocols.

If no protocol is specified in the proxy string or if the string doesn't match
a supported one, the proxy will be treated as an HTTP proxy.

The supported proxy protocol prefixes are as follows:
.IP "http://"
Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
.IP "https://"
Makes it treated as an \fBHTTPS\fP proxy.
.IP "socks4://"
Makes it the equivalent of --socks4
.IP "socks4a://"
Makes it the equivalent of --socks4a
.IP "socks5://"
Makes it the equivalent of --socks5
.IP "socks5h://"
Changes to jni/curl/docs/cmdline-opts/page-header.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
.\"
.TH curl 1 "16 Dec 2016" "Curl 7.52.0" "Curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
.B curl [options]
.I [URL...]
.SH DESCRIPTION
.B curl
is a tool to transfer data from or to a server, using one of the supported
protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET
and TFTP). The command is designed to work without user interaction.








|




















|
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

30
31
32
33
34
35
36
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
.\"
.TH curl 1 "16 Dec 2016" "Curl 7.52.0" "Curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
.B curl [options / URLs]

.SH DESCRIPTION
.B curl
is a tool to transfer data from or to a server, using one of the supported
protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET
and TFTP). The command is designed to work without user interaction.

61
62
63
64
65
66
67
68

69
70
71
72
73
74
75

Nested sequences are not supported, but you can use several ones next to each
other:

  http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html

You can specify any amount of URLs on the command line. They will be fetched
in a sequential manner in the specified order.


You can specify a step counter for the ranges to get every Nth number or
letter:

  http://example.com/file[1-100:10].txt

  http://example.com/file[a-z:2].txt







|
>







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

Nested sequences are not supported, but you can use several ones next to each
other:

  http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html

You can specify any amount of URLs on the command line. They will be fetched
in a sequential manner in the specified order. You can specify command line
options and URLs mixed and in any order on the command line.

You can specify a step counter for the ranges to get every Nth number or
letter:

  http://example.com/file[1-100:10].txt

  http://example.com/file[a-z:2].txt
Changes to jni/curl/docs/cmdline-opts/proxy-cert-type.d.
1
2
3
4
5
6
Long: proxy-cert-type
Arg: <type>
Added: 7.52.0
Help: Client certificate type for HTTS proxy
---
Same as --cert-type but used in HTTPS proxy context.



|


1
2
3
4
5
6
Long: proxy-cert-type
Arg: <type>
Added: 7.52.0
Help: Client certificate type for HTTPS proxy
---
Same as --cert-type but used in HTTPS proxy context.
Changes to jni/curl/docs/cmdline-opts/proxytunnel.d.
1
2
3
4
5
6
7
8
9
10
Long: proxytunnel
Short: p
Help: Operate through a HTTP proxy tunnel (using CONNECT)
See-also: proxy
---
When an HTTP proxy is used --proxy, this option will cause non-HTTP protocols
to attempt to tunnel through the proxy instead of merely using it to do
HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT
request and requires that the proxy allows direct connect to the remote port
number curl wants to tunnel through to.


|







1
2
3
4
5
6
7
8
9
10
Long: proxytunnel
Short: p
Help: Operate through an HTTP proxy tunnel (using CONNECT)
See-also: proxy
---
When an HTTP proxy is used --proxy, this option will cause non-HTTP protocols
to attempt to tunnel through the proxy instead of merely using it to do
HTTP-like operations. The tunnel approach is made with the HTTP proxy CONNECT
request and requires that the proxy allows direct connect to the remote port
number curl wants to tunnel through to.
Changes to jni/curl/docs/cmdline-opts/range.d.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Long: range
Short: r
Help: Retrieve only the bytes within RANGE
Arg: <range>
Protocols: HTTP FTP SFTP FILE
---
Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP
server or a local FILE. Ranges can be specified in a number of ways.
.RS
.TP 10
.B 0-499
specifies the first 500 bytes
.TP
.B 500-999






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
Long: range
Short: r
Help: Retrieve only the bytes within RANGE
Arg: <range>
Protocols: HTTP FTP SFTP FILE
---
Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP
server or a local FILE. Ranges can be specified in a number of ways.
.RS
.TP 10
.B 0-499
specifies the first 500 bytes
.TP
.B 500-999
Changes to jni/curl/docs/cmdline-opts/user-agent.d.
1
2
3
4
5
6
7
8
9
10
11
12
Short: A
Long: user-agent
Arg: <name>
Help: Send User-Agent <name> to server
Protocols: HTTP
---

Specify the User-Agent string to send to the HTTP server. To encode blanks in
the string, surround the string with single quote marks. This can also be set
with the --header option of course.

If this option is used several times, the last one will be used.








|
|


1
2
3
4
5
6
7
8
9
10
11
12
Short: A
Long: user-agent
Arg: <name>
Help: Send User-Agent <name> to server
Protocols: HTTP
---

Specify the User-Agent string to send to the HTTP server. To encode blanks in
the string, surround the string with single quote marks. This header can also
be set with the --header or the --proxy-header options.

If this option is used several times, the last one will be used.
Changes to jni/curl/docs/curl-config.1.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl-config 1 "November 30, 2017" "Curl 7.59.0" "curl-config manual"

.SH NAME
curl-config \- Get information about a libcurl installation
.SH SYNOPSIS
.B curl-config [options]
.SH DESCRIPTION
.B curl-config







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl-config 1 "November 30, 2017" "Curl 7.60.0" "curl-config manual"

.SH NAME
curl-config \- Get information about a libcurl installation
.SH SYNOPSIS
.B curl-config [options]
.SH DESCRIPTION
.B curl-config
Changes to jni/curl/docs/curl.1.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
.\"
.TH curl 1 "November 16, 2016" "Curl 7.59.0" "Curl Manual"

.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
.B curl [options]
.I [URL...]
.SH DESCRIPTION
.B curl
is a tool to transfer data from or to a server, using one of the supported
protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET
and TFTP). The command is designed to work without user interaction.








|
















|




|
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

31
32
33
34
35
36
37
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
.\"
.TH curl 1 "November 16, 2016" "Curl 7.60.0" "Curl Manual"

.SH NAME
curl \- transfer a URL
.SH SYNOPSIS
.B curl [options / URLs]

.SH DESCRIPTION
.B curl
is a tool to transfer data from or to a server, using one of the supported
protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET
and TFTP). The command is designed to work without user interaction.

62
63
64
65
66
67
68
69

70
71
72
73
74
75
76

Nested sequences are not supported, but you can use several ones next to each
other:

  http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html

You can specify any amount of URLs on the command line. They will be fetched
in a sequential manner in the specified order.


You can specify a step counter for the ranges to get every Nth number or
letter:

  http://example.com/file[1-100:10].txt

  http://example.com/file[a-z:2].txt







|
>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

Nested sequences are not supported, but you can use several ones next to each
other:

  http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html

You can specify any amount of URLs on the command line. They will be fetched
in a sequential manner in the specified order. You can specify command line
options and URLs mixed and in any order on the command line.

You can specify a step counter for the ranges to get every Nth number or
letter:

  http://example.com/file[1-100:10].txt

  http://example.com/file[a-z:2].txt
192
193
194
195
196
197
198





199
200
201
202
203
204
205
(libnsspem.so) needs to be available for this option to work properly.

(iOS and macOS only) If curl is built against Secure Transport, then this
option is supported for backward compatibility with other SSL engines, but it
should not be set. If the option is not set, then curl will use the
certificates in the system and user Keychain to verify the peer, which is the
preferred method of verifying the peer's certificate chain.






If this option is used several times, the last one will be used.
.IP "--capath <dir>"
(TLS) Tells curl to use the specified certificate directory to verify the
peer. Multiple paths can be provided by separating them with ":" (e.g.
\&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
built against OpenSSL, the directory must have been processed using the







>
>
>
>
>







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
(libnsspem.so) needs to be available for this option to work properly.

(iOS and macOS only) If curl is built against Secure Transport, then this
option is supported for backward compatibility with other SSL engines, but it
should not be set. If the option is not set, then curl will use the
certificates in the system and user Keychain to verify the peer, which is the
preferred method of verifying the peer's certificate chain.

(Schannel/WinSSL only) This option is supported for WinSSL in Windows 7 or
later with libcurl 7.60 or later. This option is supported for backward
compatibility with other SSL engines; instead it is recommended to use Windows'
store of root certificates (the default for WinSSL).

If this option is used several times, the last one will be used.
.IP "--capath <dir>"
(TLS) Tells curl to use the specified certificate directory to verify the
peer. Multiple paths can be provided by separating them with ":" (e.g.
\&"path1:path2:path3"). The certificates must be in PEM format, and if curl is
built against OpenSSL, the directory must have been processed using the
247
248
249
250
251
252
253











254
255
256
257
258
259
260
be escaped as "\\\\" so that it is not recognized as an escape character.

(iOS and macOS only) If curl is built against Secure Transport, then the
certificate string can either be the name of a certificate/private key in the
system or user keychain, or the path to a PKCS#12-encoded certificate and
private key. If you want to use a file from the current directory, please
precede it with "./" prefix, in order to avoid confusion with a nickname.












If this option is used several times, the last one will be used.

See also \fI--cert-type\fP and \fI--key\fP and \fI--key-type\fP.
.IP "--ciphers <list of ciphers>"
(TLS) Specifies which ciphers to use in the connection. The list of ciphers must
specify valid ciphers. Read up on SSL cipher list details on this URL:







>
>
>
>
>
>
>
>
>
>
>







252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
be escaped as "\\\\" so that it is not recognized as an escape character.

(iOS and macOS only) If curl is built against Secure Transport, then the
certificate string can either be the name of a certificate/private key in the
system or user keychain, or the path to a PKCS#12-encoded certificate and
private key. If you want to use a file from the current directory, please
precede it with "./" prefix, in order to avoid confusion with a nickname.

(Schannel/WinSSL only) Client certificates must be specified by a path
expression to a certificate store. (Loading PFX is not supported; you can
import it to a store first). You can use
"<store location>\\<store name>\\<thumbprint>" to refer to a certificate
in the system certificates store, for example,
"CurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint is
usually a SHA-1 hex string which you can see in certificate details. Following
store locations are supported: CurrentUser, LocalMachine, CurrentService,
Services, CurrentUserGroupPolicy, LocalMachineGroupPolicy,
LocalMachineEnterprise.

If this option is used several times, the last one will be used.

See also \fI--cert-type\fP and \fI--key\fP and \fI--key-type\fP.
.IP "--ciphers <list of ciphers>"
(TLS) Specifies which ciphers to use in the connection. The list of ciphers must
specify valid ciphers. Read up on SSL cipher list details on this URL:
391
392
393
394
395
396
397
398

399
400
401
402
403
404
405
the data previously received from the server in a "Set-Cookie:" line.  The
data should be in the format "NAME1=VALUE1; NAME2=VALUE2".

If no '=' symbol is used in the argument, it is instead treated as a filename
to read previously stored cookie from. This option also activates the cookie
engine which will make curl record incoming cookies, which may be handy if
you're using this in combination with the \fI-L, --location\fP option or do multiple URL
transfers on the same invoke.


The file format of the file to read cookies from should be plain HTTP headers
(Set-Cookie style) or the Netscape/Mozilla cookie file format.

The file specified with \fI-b, --cookie\fP is only used as input. No cookies will be
written to the file. To store cookies, use the \fI-c, --cookie-jar\fP option.








|
>







407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
the data previously received from the server in a "Set-Cookie:" line.  The
data should be in the format "NAME1=VALUE1; NAME2=VALUE2".

If no '=' symbol is used in the argument, it is instead treated as a filename
to read previously stored cookie from. This option also activates the cookie
engine which will make curl record incoming cookies, which may be handy if
you're using this in combination with the \fI-L, --location\fP option or do multiple URL
transfers on the same invoke. If the file name is exactly a minus ("-"), curl
will instead the contents from stdin.

The file format of the file to read cookies from should be plain HTTP headers
(Set-Cookie style) or the Netscape/Mozilla cookie file format.

The file specified with \fI-b, --cookie\fP is only used as input. No cookies will be
written to the file. To store cookies, use the \fI-c, --cookie-jar\fP option.

850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
(FTP) Reverses the default initiator/listener roles when connecting with FTP. This
option makes curl use active mode. curl then tells the server to connect back
to the client's specified address and port, while passive mode asks the server
to setup an IP address and port for it to connect to. <address> should be one
of:
.RS
.IP interface
i.e "eth0" to specify which interface's IP address you want to use (Unix only)
.IP "IP address"
i.e "192.168.10.1" to specify the exact IP address
.IP "host name"
i.e "my.host.domain" to specify the machine
.IP "-"
make curl pick the same IP address that is already used for the control
connection
.RE

If this option is used several times, the last one will be used. Disable the
use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command







|

|

|







867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
(FTP) Reverses the default initiator/listener roles when connecting with FTP. This
option makes curl use active mode. curl then tells the server to connect back
to the client's specified address and port, while passive mode asks the server
to setup an IP address and port for it to connect to. <address> should be one
of:
.RS
.IP interface
e.g. "eth0" to specify which interface's IP address you want to use (Unix only)
.IP "IP address"
e.g. "192.168.10.1" to specify the exact IP address
.IP "host name"
e.g. "my.host.domain" to specify the machine
.IP "-"
make curl pick the same IP address that is already used for the control
connection
.RE

If this option is used several times, the last one will be used. Disable the
use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
937
938
939
940
941
942
943









944
945
946
947
948
949
950
"It is RECOMMENDED that connection attempts be paced 150-250 ms apart to
balance human factors against network load." libcurl currently defaults to
200 ms. Firefox and Chrome currently default to 300 ms.

If this option is used several times, the last one will be used.

Added in 7.59.0.









.IP "-I, --head"
(HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses
to get nothing but the header of a document. When used on an FTP or FILE file,
curl displays the file size and last modification time only.
.IP "-H, --header <header/@file>"
(HTTP) Extra header to include in the request when sending HTTP to a server. You may
specify any number of extra headers. Note that if you should add a custom







>
>
>
>
>
>
>
>
>







954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
"It is RECOMMENDED that connection attempts be paced 150-250 ms apart to
balance human factors against network load." libcurl currently defaults to
200 ms. Firefox and Chrome currently default to 300 ms.

If this option is used several times, the last one will be used.

Added in 7.59.0.
.IP "--haproxy-protocol"
(HTTP) Send a HAProxy PROXY protocol header at the beginning of the connection. This
is used by some load balancers and reverse proxies to indicate the client's
true IP address and port.

This option is primarily useful when sending test requests to a service that
expects this header.

Added in 7.60.0.
.IP "-I, --head"
(HTTP FTP FILE) Fetch the headers only! HTTP-servers feature the command HEAD which this uses
to get nothing but the header of a document. When used on an FTP or FILE file,
curl displays the file size and last modification time only.
.IP "-H, --header <header/@file>"
(HTTP) Extra header to include in the request when sending HTTP to a server. You may
specify any number of extra headers. Note that if you should add a custom
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
name, IP address or host name. An example could look like:

 curl --interface eth0:1 https://www.example.com/

If this option is used several times, the last one will be used.

On Linux it can be used to specify a VRF, but the binary needs to either
have CAP_NET_RAW or to be ran as root. More information about Linux VRF:
https://www.kernel.org/doc/Documentation/networking/vrf.txt

See also \fI--dns-interface\fP.
.IP "-4, --ipv4"
This option tells curl to resolve names to IPv4 addresses only, and not for
example try IPv6.








|







1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
name, IP address or host name. An example could look like:

 curl --interface eth0:1 https://www.example.com/

If this option is used several times, the last one will be used.

On Linux it can be used to specify a VRF, but the binary needs to either
have CAP_NET_RAW or to be run as root. More information about Linux VRF:
https://www.kernel.org/doc/Documentation/networking/vrf.txt

See also \fI--dns-interface\fP.
.IP "-4, --ipv4"
This option tells curl to resolve names to IPv4 addresses only, and not for
example try IPv6.

1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
.IP "--max-redirs <num>"
(HTTP) Set maximum number of redirection-followings allowed. When \fI-L, --location\fP is used,
is used to prevent curl from following redirections \&"in absurdum". By
default, the limit is set to 50 redirections. Set this option to -1 to make it
unlimited.

If this option is used several times, the last one will be used.
.IP "-m, --max-time <time>"
Maximum time in seconds that you allow the whole operation to take.  This is
useful for preventing your batch jobs from hanging for hours due to slow
networks or links going down.  Since 7.32.0, this option accepts decimal
values, but the actual timeout will decrease in accuracy as the specified
timeout increases in decimal precision.

If this option is used several times, the last one will be used.







|







1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
.IP "--max-redirs <num>"
(HTTP) Set maximum number of redirection-followings allowed. When \fI-L, --location\fP is used,
is used to prevent curl from following redirections \&"in absurdum". By
default, the limit is set to 50 redirections. Set this option to -1 to make it
unlimited.

If this option is used several times, the last one will be used.
.IP "-m, --max-time <seconds>"
Maximum time in seconds that you allow the whole operation to take.  This is
useful for preventing your batch jobs from hanging for hours due to slow
networks or links going down.  Since 7.32.0, this option accepts decimal
values, but the actual timeout will decrease in accuracy as the specified
timeout increases in decimal precision.

If this option is used several times, the last one will be used.
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
See ln.
.RE
.IP "--random-file <file>"
Specify the path name to file containing what will be considered as random
data. The data may be used to seed the random engine for SSL connections.  See
also the \fI--egd-file\fP option.
.IP "-r, --range <range>"
(HTTP FTP SFTP FILE) Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP
server or a local FILE. Ranges can be specified in a number of ways.
.RS
.TP 10
.B 0-499
specifies the first 500 bytes
.TP
.B 500-999







|







1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
See ln.
.RE
.IP "--random-file <file>"
Specify the path name to file containing what will be considered as random
data. The data may be used to seed the random engine for SSL connections.  See
also the \fI--egd-file\fP option.
.IP "-r, --range <range>"
(HTTP FTP SFTP FILE) Retrieve a byte range (i.e. a partial document) from an HTTP/1.1, FTP or SFTP
server or a local FILE. Ranges can be specified in a number of ways.
.RS
.TP 10
.B 0-499
specifies the first 500 bytes
.TP
.B 500-999
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
.IP "-B, --use-ascii"
(FTP LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using a URL that
ends with ";type=A". This option causes data sent to stdout to be in text mode
for win32 systems.
.IP "-A, --user-agent <name>"
(HTTP) 
Specify the User-Agent string to send to the HTTP server. To encode blanks in
the string, surround the string with single quote marks. This can also be set
with the \fI-H, --header\fP option of course.

If this option is used several times, the last one will be used.
.IP "-u, --user <user:password>"
Specify the user name and password to use for server authentication. Overrides
\fI-n, --netrc\fP and \fI--netrc-optional\fP.

If you simply specify the user name, curl will prompt for a password.







|
|







2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
.IP "-B, --use-ascii"
(FTP LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using a URL that
ends with ";type=A". This option causes data sent to stdout to be in text mode
for win32 systems.
.IP "-A, --user-agent <name>"
(HTTP) 
Specify the User-Agent string to send to the HTTP server. To encode blanks in
the string, surround the string with single quote marks. This header can also
be set with the \fI-H, --header\fP or the \fI--proxy-header\fP options.

If this option is used several times, the last one will be used.
.IP "-u, --user <user:password>"
Specify the user name and password to use for server authentication. Overrides
\fI-n, --netrc\fP and \fI--netrc-optional\fP.

If you simply specify the user name, curl will prompt for a password.
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use for [url-protocol], where the protocol is a
protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
SMTP, LDAP etc.
.IP "ALL_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>"
list of host names that shouldn't go through any proxy. If set to a asterisk
\&'*' only, it matches all hosts.

This environment variable disables use of the proxy even when specified with
the \fI-x, --proxy\fP option. That is
.B NO_PROXY=direct.example.com curl -x http://proxy.example.com
.B http://direct.example.com
accesses the target URL directly, and







|







2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
.IP "[url-protocol]_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use for [url-protocol], where the protocol is a
protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP,
SMTP, LDAP etc.
.IP "ALL_PROXY [protocol://]<host>[:port]"
Sets the proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>"
list of host names that shouldn't go through any proxy. If set to an asterisk
\&'*' only, it matches all hosts.

This environment variable disables use of the proxy even when specified with
the \fI-x, --proxy\fP option. That is
.B NO_PROXY=direct.example.com curl -x http://proxy.example.com
.B http://direct.example.com
accesses the target URL directly, and
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
protocol:// prefix to specify alternative proxy protocols.

If no protocol is specified in the proxy string or if the string doesn't match
a supported one, the proxy will be treated as an HTTP proxy.

The supported proxy protocol prefixes are as follows:
.IP "http://"
Makes it use it as a HTTP proxy. The default if no scheme prefix is used.
.IP "https://"
Makes it treated as a \fBHTTPS\fP proxy.
.IP "socks4://"
Makes it the equivalent of \fI--socks4\fP
.IP "socks4a://"
Makes it the equivalent of \fI--socks4a\fP
.IP "socks5://"
Makes it the equivalent of \fI--socks5\fP
.IP "socks5h://"







|

|







2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
protocol:// prefix to specify alternative proxy protocols.

If no protocol is specified in the proxy string or if the string doesn't match
a supported one, the proxy will be treated as an HTTP proxy.

The supported proxy protocol prefixes are as follows:
.IP "http://"
Makes it use it as an HTTP proxy. The default if no scheme prefix is used.
.IP "https://"
Makes it treated as an \fBHTTPS\fP proxy.
.IP "socks4://"
Makes it the equivalent of \fI--socks4\fP
.IP "socks4a://"
Makes it the equivalent of \fI--socks4a\fP
.IP "socks5://"
Makes it the equivalent of \fI--socks5\fP
.IP "socks5h://"
Changes to jni/curl/docs/examples/curlx.c.
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
    }
  }
  return NULL;
}

/* This is an application verification call back, it does not
   perform any addition verification but tries to find a URL
   in the presented certificat. If found, this will become
   the URL to be used in the POST.
*/

static int ssl_app_verify_callback(X509_STORE_CTX *ctx, void *arg)
{
  sslctxparm * p = (sslctxparm *) arg;
  int ok;







|







179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
    }
  }
  return NULL;
}

/* This is an application verification call back, it does not
   perform any addition verification but tries to find a URL
   in the presented certificate. If found, this will become
   the URL to be used in the POST.
*/

static int ssl_app_verify_callback(X509_STORE_CTX *ctx, void *arg)
{
  sslctxparm * p = (sslctxparm *) arg;
  int ok;
Changes to jni/curl/docs/examples/debug.c.
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
          text, (long)size, (long)size);

  for(i = 0; i<size; i += width) {

    fprintf(stream, "%4.4lx: ", (long)i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stream, "%02x ", ptr[i + c]);
        else







|
|



|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n",
          text, size, size);

  for(i = 0; i<size; i += width) {

    fprintf(stream, "%4.4lx: ", i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stream, "%02x ", ptr[i + c]);
        else
Changes to jni/curl/docs/examples/evhiperfifo.c.
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
/* Create a new easy handle, and add it to the global curl_multi */
static void new_conn(char *url, GlobalInfo *g)
{
  ConnInfo *conn;
  CURLMcode rc;

  conn = calloc(1, sizeof(ConnInfo));
  memset(conn, 0, sizeof(ConnInfo));
  conn->error[0]='\0';

  conn->easy = curl_easy_init();
  if(!conn->easy) {
    fprintf(MSG_OUT, "curl_easy_init() failed, exiting!\n");
    exit(2);
  }







<







332
333
334
335
336
337
338

339
340
341
342
343
344
345
/* Create a new easy handle, and add it to the global curl_multi */
static void new_conn(char *url, GlobalInfo *g)
{
  ConnInfo *conn;
  CURLMcode rc;

  conn = calloc(1, sizeof(ConnInfo));

  conn->error[0]='\0';

  conn->easy = curl_easy_init();
  if(!conn->easy) {
    fprintf(MSG_OUT, "curl_easy_init() failed, exiting!\n");
    exit(2);
  }
Changes to jni/curl/docs/examples/fopen.c.
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
{
  /* this code could check for URLs or types in the 'url' and
     basically use the real fopen() for standard files */

  URL_FILE *file;
  (void)operation;

  file = malloc(sizeof(URL_FILE));
  if(!file)
    return NULL;

  memset(file, 0, sizeof(URL_FILE));

  file->handle.file = fopen(url, operation);
  if(file->handle.file)
    file->type = CFTYPE_FILE; /* marked as URL */

  else {
    file->type = CFTYPE_CURL; /* marked as URL */
    file->handle.curl = curl_easy_init();







|



<
<







233
234
235
236
237
238
239
240
241
242
243


244
245
246
247
248
249
250
{
  /* this code could check for URLs or types in the 'url' and
     basically use the real fopen() for standard files */

  URL_FILE *file;
  (void)operation;

  file = calloc(1, sizeof(URL_FILE));
  if(!file)
    return NULL;



  file->handle.file = fopen(url, operation);
  if(file->handle.file)
    file->type = CFTYPE_FILE; /* marked as URL */

  else {
    file->type = CFTYPE_CURL; /* marked as URL */
    file->handle.curl = curl_easy_init();
Changes to jni/curl/docs/examples/getinmemory.c.
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    /*
     * Now, our chunk.memory points to a memory block that is chunk.size
     * bytes big and contains the remote file.
     *
     * Do something nice with it!
     */

    printf("%lu bytes retrieved\n", (long)chunk.size);
  }

  /* cleanup curl stuff */
  curl_easy_cleanup(curl_handle);

  free(chunk.memory);








|







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    /*
     * Now, our chunk.memory points to a memory block that is chunk.size
     * bytes big and contains the remote file.
     *
     * Do something nice with it!
     */

    printf("%lu bytes retrieved\n", chunk.size);
  }

  /* cleanup curl stuff */
  curl_easy_cleanup(curl_handle);

  free(chunk.memory);

Changes to jni/curl/docs/examples/hiperfifo.c.
62
63
64
65
66
67
68

69
70
71

72





73
74
75
76
77
78
79
80
81
82
83
84
85

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110



























111
112
113
114
115

116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131


132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150

151
152
153
154
155
156
157
158
159
160
161
162
163
164
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <sys/poll.h>
#include <curl/curl.h>
#include <event2/event.h>

#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>








#define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */


/* Global information, common to all connections */
typedef struct _GlobalInfo
{
  struct event_base *evbase;
  struct event *fifo_event;
  struct event *timer_event;
  CURLM *multi;
  int still_running;
  FILE *input;

} GlobalInfo;


/* Information associated with a specific easy handle */
typedef struct _ConnInfo
{
  CURL *easy;
  char *url;
  GlobalInfo *global;
  char error[CURL_ERROR_SIZE];
} ConnInfo;


/* Information associated with a specific socket */
typedef struct _SockInfo
{
  curl_socket_t sockfd;
  CURL *easy;
  int action;
  long timeout;
  struct event *ev;
  int evset;
  GlobalInfo *global;
} SockInfo;




























/* Update the event timer after curl_multi library calls */
static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
{
  struct timeval timeout;
  (void)multi; /* unused */


  timeout.tv_sec = timeout_ms/1000;
  timeout.tv_usec = (timeout_ms%1000)*1000;
  fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);

  /* TODO
   *
   * if timeout_ms is 0, call curl_multi_socket_action() at once!
   *
   * if timeout_ms is -1, just delete the timer
   *
   * for all other values of timeout_ms, this should set or *update*
   * the timer to the new value
   */
  evtimer_add(g->timer_event, &timeout);
  return 0;


}

/* Die if we get a bad CURLMcode somewhere */
static void mcode_or_die(const char *where, CURLMcode code)
{
  if(CURLM_OK != code) {
    const char *s;
    switch(code) {
      case     CURLM_BAD_HANDLE:         s = "CURLM_BAD_HANDLE";         break;
      case     CURLM_BAD_EASY_HANDLE:    s = "CURLM_BAD_EASY_HANDLE";    break;
      case     CURLM_OUT_OF_MEMORY:      s = "CURLM_OUT_OF_MEMORY";      break;
      case     CURLM_INTERNAL_ERROR:     s = "CURLM_INTERNAL_ERROR";     break;
      case     CURLM_UNKNOWN_OPTION:     s = "CURLM_UNKNOWN_OPTION";     break;
      case     CURLM_LAST:               s = "CURLM_LAST";               break;
      default: s = "CURLM_unknown";
        break;
    case     CURLM_BAD_SOCKET:         s = "CURLM_BAD_SOCKET";
      fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
      /* ignore this error */

      return;
    }
    fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
    exit(code);
  }
}



/* Check for completed transfers, and remove their easy handles */
static void check_multi_info(GlobalInfo *g)
{
  char *eff_url;
  CURLMsg *msg;







>



>

>
>
>
>
>








|
|



>




















|
<



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|


<
>














|
|
>
>
|
|
<
<
<
<
<
|
<
<
<
<
<
<
<
|
<
<
<
>
|
|
<
<
<
<
<







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169





170







171



172
173
174





175
176
177
178
179
180
181
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <sys/poll.h>
#include <curl/curl.h>
#include <event2/event.h>
#include <event2/event_struct.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
#include <sys/cdefs.h>

#ifdef __GNUC__
#define _Unused __attribute__((unused))
#else
#define _Unused
#endif

#define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */


/* Global information, common to all connections */
typedef struct _GlobalInfo
{
  struct event_base *evbase;
  struct event fifo_event;
  struct event timer_event;
  CURLM *multi;
  int still_running;
  FILE *input;
  int stopped;
} GlobalInfo;


/* Information associated with a specific easy handle */
typedef struct _ConnInfo
{
  CURL *easy;
  char *url;
  GlobalInfo *global;
  char error[CURL_ERROR_SIZE];
} ConnInfo;


/* Information associated with a specific socket */
typedef struct _SockInfo
{
  curl_socket_t sockfd;
  CURL *easy;
  int action;
  long timeout;
  struct event ev;

  GlobalInfo *global;
} SockInfo;

#define __case(code) \
  case code: s = __STRING(code)

/* Die if we get a bad CURLMcode somewhere */
static void mcode_or_die(const char *where, CURLMcode code)
{
  if(CURLM_OK != code) {
    const char *s;
    switch(code) {
      __case(CURLM_BAD_HANDLE); break;
      __case(CURLM_BAD_EASY_HANDLE); break;
      __case(CURLM_OUT_OF_MEMORY); break;
      __case(CURLM_INTERNAL_ERROR); break;
      __case(CURLM_UNKNOWN_OPTION); break;
      __case(CURLM_LAST); break;
      default: s = "CURLM_unknown"; break;
      __case(CURLM_BAD_SOCKET);
      fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
      /* ignore this error */
      return;
    }
    fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
    exit(code);
  }
}


/* Update the event timer after curl_multi library calls */
static int multi_timer_cb(CURLM *multi _Unused, long timeout_ms, GlobalInfo *g)
{
  struct timeval timeout;

  CURLMcode rc;

  timeout.tv_sec = timeout_ms/1000;
  timeout.tv_usec = (timeout_ms%1000)*1000;
  fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);

  /* TODO
   *
   * if timeout_ms is 0, call curl_multi_socket_action() at once!
   *
   * if timeout_ms is -1, just delete the timer
   *
   * for all other values of timeout_ms, this should set or *update*
   * the timer to the new value
   */
  if(timeout_ms == 0) {
    rc = curl_multi_socket_action(g->multi,
                                  CURL_SOCKET_TIMEOUT, 0, &g->still_running);
    mcode_or_die("multi_timer_cb: curl_multi_socket_action", rc);
  }
  else if(timeout_ms == -1)





    evtimer_del(&g->timer_event);







  else



    evtimer_add(&g->timer_event, &timeout);
  return 0;
}







/* Check for completed transfers, and remove their easy handles */
static void check_multi_info(GlobalInfo *g)
{
  char *eff_url;
  CURLMsg *msg;
177
178
179
180
181
182
183


184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
      fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
      curl_multi_remove_handle(g->multi, easy);
      free(conn->url);
      curl_easy_cleanup(easy);
      free(conn);
    }
  }


}



/* Called by libevent when we get action on a multi socket */
static void event_cb(int fd, short kind, void *userp)
{
  GlobalInfo *g = (GlobalInfo*) userp;
  CURLMcode rc;

  int action =
    (kind & EV_READ ? CURL_CSELECT_IN : 0) |
    (kind & EV_WRITE ? CURL_CSELECT_OUT : 0);

  rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
  mcode_or_die("event_cb: curl_multi_socket_action", rc);

  check_multi_info(g);
  if(g->still_running <= 0) {
    fprintf(MSG_OUT, "last transfer done, kill timeout\n");
    if(evtimer_pending(g->timer_event, NULL)) {
      evtimer_del(g->timer_event);
    }
  }
}



/* Called by libevent when our timeout expires */
static void timer_cb(int fd, short kind, void *userp)
{
  GlobalInfo *g = (GlobalInfo *)userp;
  CURLMcode rc;
  (void)fd;
  (void)kind;

  rc = curl_multi_socket_action(g->multi,
                                  CURL_SOCKET_TIMEOUT, 0, &g->still_running);
  mcode_or_die("timer_cb: curl_multi_socket_action", rc);
  check_multi_info(g);
}



/* Clean up the SockInfo structure */
static void remsock(SockInfo *f)
{
  if(f) {
    if(f->evset)
      event_free(f->ev);
    free(f);
  }
}



/* Assign information to a SockInfo structure */
static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
                    GlobalInfo *g)
{
  int kind =
     (act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0)|EV_PERSIST;

  f->sockfd = s;
  f->action = act;
  f->easy = e;
  if(f->evset)
    event_free(f->ev);
  f->ev = event_new(g->evbase, f->sockfd, kind, event_cb, g);
  f->evset = 1;
  event_add(f->ev, NULL);
}



/* Initialize a new SockInfo structure */
static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
{







>
>




















|
|







|



<
<













|
<
















|
<
|
<
|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235


236
237
238
239
240
241
242
243
244
245
246
247
248
249

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266

267

268
269
270
271
272
273
274
275
      fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
      curl_multi_remove_handle(g->multi, easy);
      free(conn->url);
      curl_easy_cleanup(easy);
      free(conn);
    }
  }
  if(g->still_running == 0 && g->stopped)
    event_base_loopbreak(g->evbase);
}



/* Called by libevent when we get action on a multi socket */
static void event_cb(int fd, short kind, void *userp)
{
  GlobalInfo *g = (GlobalInfo*) userp;
  CURLMcode rc;

  int action =
    (kind & EV_READ ? CURL_CSELECT_IN : 0) |
    (kind & EV_WRITE ? CURL_CSELECT_OUT : 0);

  rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
  mcode_or_die("event_cb: curl_multi_socket_action", rc);

  check_multi_info(g);
  if(g->still_running <= 0) {
    fprintf(MSG_OUT, "last transfer done, kill timeout\n");
    if(evtimer_pending(&g->timer_event, NULL)) {
      evtimer_del(&g->timer_event);
    }
  }
}



/* Called by libevent when our timeout expires */
static void timer_cb(int fd _Unused, short kind _Unused, void *userp)
{
  GlobalInfo *g = (GlobalInfo *)userp;
  CURLMcode rc;



  rc = curl_multi_socket_action(g->multi,
                                  CURL_SOCKET_TIMEOUT, 0, &g->still_running);
  mcode_or_die("timer_cb: curl_multi_socket_action", rc);
  check_multi_info(g);
}



/* Clean up the SockInfo structure */
static void remsock(SockInfo *f)
{
  if(f) {
    event_del(&f->ev);

    free(f);
  }
}



/* Assign information to a SockInfo structure */
static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
                    GlobalInfo *g)
{
  int kind =
     (act&CURL_POLL_IN?EV_READ:0)|(act&CURL_POLL_OUT?EV_WRITE:0)|EV_PERSIST;

  f->sockfd = s;
  f->action = act;
  f->easy = e;
  event_del(&f->ev);

  event_assign(&f->ev, g->evbase, f->sockfd, kind, event_cb, g);

  event_add(&f->ev, NULL);
}



/* Initialize a new SockInfo structure */
static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
{
293
294
295
296
297
298
299
300

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348

349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372






373
374
375
376
377
378
379
380
  }
  return 0;
}



/* CURLOPT_WRITEFUNCTION */
static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)

{
  size_t realsize = size * nmemb;
  ConnInfo *conn = (ConnInfo*) data;
  (void)ptr;
  (void)conn;
  return realsize;
}


/* CURLOPT_PROGRESSFUNCTION */
static int prog_cb(void *p, double dltotal, double dlnow, double ult,
                   double uln)
{
  ConnInfo *conn = (ConnInfo *)p;
  (void)ult;
  (void)uln;

  fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
  return 0;
}


/* Create a new easy handle, and add it to the global curl_multi */
static void new_conn(char *url, GlobalInfo *g)
{
  ConnInfo *conn;
  CURLMcode rc;

  conn = calloc(1, sizeof(ConnInfo));
  memset(conn, 0, sizeof(ConnInfo));
  conn->error[0]='\0';

  conn->easy = curl_easy_init();
  if(!conn->easy) {
    fprintf(MSG_OUT, "curl_easy_init() failed, exiting!\n");
    exit(2);
  }
  conn->global = g;
  conn->url = strdup(url);
  curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
  curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
  curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
  curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
  curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
  curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
  curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 0L);
  curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
  curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);

  fprintf(MSG_OUT,
          "Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
  rc = curl_multi_add_handle(g->multi, conn->easy);
  mcode_or_die("new_conn: curl_multi_add_handle", rc);

  /* note that the add_handle() will set a time-out to trigger very soon so
     that the necessary socket_action() call will be called by this app */
}

/* This gets called whenever data is received from the fifo */
static void fifo_cb(int fd, short event, void *arg)
{
  char s[1024];
  long int rv = 0;
  int n = 0;
  GlobalInfo *g = (GlobalInfo *)arg;
  (void)fd; /* unused */
  (void)event; /* unused */

  do {
    s[0]='\0';
    rv = fscanf(g->input, "%1023s%n", s, &n);
    s[n]='\0';
    if(n && s[0]) {






      new_conn(s, arg);  /* if we read a URL, go get it! */
    }
    else
      break;
  } while(rv != EOF);
}

/* Create a named pipe and tell libevent to monitor it */







|
>


|
|
<





|
|


<
<













<


















>










|





<
<






>
>
>
>
>
>
|







307
308
309
310
311
312
313
314
315
316
317
318
319

320
321
322
323
324
325
326
327
328


329
330
331
332
333
334
335
336
337
338
339
340
341

342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376


377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
  }
  return 0;
}



/* CURLOPT_WRITEFUNCTION */
static size_t write_cb(void *ptr _Unused, size_t size, size_t nmemb,
                       void *data)
{
  size_t realsize = size * nmemb;
  ConnInfo *conn _Unused = (ConnInfo*) data;


  return realsize;
}


/* CURLOPT_PROGRESSFUNCTION */
static int prog_cb(void *p, double dltotal, double dlnow, double ult _Unused,
                   double uln _Unused)
{
  ConnInfo *conn = (ConnInfo *)p;



  fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
  return 0;
}


/* Create a new easy handle, and add it to the global curl_multi */
static void new_conn(char *url, GlobalInfo *g)
{
  ConnInfo *conn;
  CURLMcode rc;

  conn = calloc(1, sizeof(ConnInfo));

  conn->error[0]='\0';

  conn->easy = curl_easy_init();
  if(!conn->easy) {
    fprintf(MSG_OUT, "curl_easy_init() failed, exiting!\n");
    exit(2);
  }
  conn->global = g;
  conn->url = strdup(url);
  curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
  curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
  curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
  curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
  curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
  curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
  curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 0L);
  curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
  curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
  curl_easy_setopt(conn->easy, CURLOPT_FOLLOWLOCATION, 1L);
  fprintf(MSG_OUT,
          "Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
  rc = curl_multi_add_handle(g->multi, conn->easy);
  mcode_or_die("new_conn: curl_multi_add_handle", rc);

  /* note that the add_handle() will set a time-out to trigger very soon so
     that the necessary socket_action() call will be called by this app */
}

/* This gets called whenever data is received from the fifo */
static void fifo_cb(int fd _Unused, short event _Unused, void *arg)
{
  char s[1024];
  long int rv = 0;
  int n = 0;
  GlobalInfo *g = (GlobalInfo *)arg;



  do {
    s[0]='\0';
    rv = fscanf(g->input, "%1023s%n", s, &n);
    s[n]='\0';
    if(n && s[0]) {
      if(!strcmp(s, "stop")) {
        g->stopped = 1;
        if(g->still_running == 0)
          event_base_loopbreak(g->evbase);
      }
      else
        new_conn(s, arg);  /* if we read a URL, go get it! */
    }
    else
      break;
  } while(rv != EOF);
}

/* Create a named pipe and tell libevent to monitor it */
401
402
403
404
405
406
407
408

409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
  if(sockfd == -1) {
    perror("open");
    exit(1);
  }
  g->input = fdopen(sockfd, "r");

  fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
  g->fifo_event = event_new(g->evbase, sockfd, EV_READ|EV_PERSIST, fifo_cb, g);

  event_add(g->fifo_event, NULL);
  return (0);
}

static void clean_fifo(GlobalInfo *g)
{
    event_free(g->fifo_event);
    fclose(g->input);
    unlink(fifo);
}

int main(int argc, char **argv)
{
  GlobalInfo g;
  (void)argc;
  (void)argv;

  memset(&g, 0, sizeof(GlobalInfo));
  g.evbase = event_base_new();
  init_fifo(&g);
  g.multi = curl_multi_init();
  g.timer_event = evtimer_new(g.evbase, timer_cb, &g);

  /* setup the generic multi interface options we want */
  curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
  curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
  curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
  curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);

  /* we don't call any curl_multi_socket*() function yet as we have no handles
     added! */

  event_base_dispatch(g.evbase);

  /* this, of course, won't get called since only way to stop this program is
     via ctrl-C, but it is here to show how cleanup /would/ be done. */
  clean_fifo(&g);
  event_free(g.timer_event);
  event_base_free(g.evbase);
  curl_multi_cleanup(g.multi);
  return 0;
}







|
>
|





|




|


<
<





|















|




417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439


440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
  if(sockfd == -1) {
    perror("open");
    exit(1);
  }
  g->input = fdopen(sockfd, "r");

  fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
  event_assign(&g->fifo_event, g->evbase, sockfd, EV_READ|EV_PERSIST,
               fifo_cb, g);
  event_add(&g->fifo_event, NULL);
  return (0);
}

static void clean_fifo(GlobalInfo *g)
{
    event_del(&g->fifo_event);
    fclose(g->input);
    unlink(fifo);
}

int main(int argc _Unused, char **argv _Unused)
{
  GlobalInfo g;



  memset(&g, 0, sizeof(GlobalInfo));
  g.evbase = event_base_new();
  init_fifo(&g);
  g.multi = curl_multi_init();
  evtimer_assign(&g.timer_event, g.evbase, timer_cb, &g);

  /* setup the generic multi interface options we want */
  curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
  curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
  curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
  curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);

  /* we don't call any curl_multi_socket*() function yet as we have no handles
     added! */

  event_base_dispatch(g.evbase);

  /* this, of course, won't get called since only way to stop this program is
     via ctrl-C, but it is here to show how cleanup /would/ be done. */
  clean_fifo(&g);
  event_del(&g.timer_event);
  event_base_free(g.evbase);
  curl_multi_cleanup(g.multi);
  return 0;
}
Changes to jni/curl/docs/examples/http2-download.c.
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
          num, text, (long)size, (long)size);

  for(i = 0; i<size; i += width) {

    fprintf(stderr, "%4.4lx: ", (long)i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stderr, "%02x ", ptr[i + c]);
        else







|
|



|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stderr, "%d %s, %lu bytes (0x%lx)\n",
          num, text, size, size);

  for(i = 0; i<size; i += width) {

    fprintf(stderr, "%4.4lx: ", i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stderr, "%02x ", ptr[i + c]);
        else
Changes to jni/curl/docs/examples/http2-serverpush.c.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stderr, "%s, %ld bytes (0x%lx)\n",
          text, (long)size, (long)size);

  for(i = 0; i<size; i += width) {

    fprintf(stderr, "%4.4lx: ", (long)i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stderr, "%02x ", ptr[i + c]);
        else







|
|



|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stderr, "%s, %lu bytes (0x%lx)\n",
          text, size, size);

  for(i = 0; i<size; i += width) {

    fprintf(stderr, "%4.4lx: ", i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stderr, "%02x ", ptr[i + c]);
        else
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

  /* here's a new stream, save it in a new file for each new push */
  out = fopen(filename, "wb");

  /* write to this file */
  curl_easy_setopt(easy, CURLOPT_WRITEDATA, out);

  fprintf(stderr, "**** push callback approves stream %u, got %d headers!\n",
          count, (int)num_headers);

  for(i = 0; i<num_headers; i++) {
    headp = curl_pushheader_bynum(headers, i);
    fprintf(stderr, "**** header %u: %s\n", (int)i, headp);
  }

  headp = curl_pushheader_byname(headers, ":path");
  if(headp) {
    fprintf(stderr, "**** The PATH is %s\n", headp /* skip :path + colon */);
  }








|
|



|







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

  /* here's a new stream, save it in a new file for each new push */
  out = fopen(filename, "wb");

  /* write to this file */
  curl_easy_setopt(easy, CURLOPT_WRITEDATA, out);

  fprintf(stderr, "**** push callback approves stream %u, got %lu headers!\n",
          count, num_headers);

  for(i = 0; i<num_headers; i++) {
    headp = curl_pushheader_bynum(headers, i);
    fprintf(stderr, "**** header %lu: %s\n", i, headp);
  }

  headp = curl_pushheader_byname(headers, ":path");
  if(headp) {
    fprintf(stderr, "**** The PATH is %s\n", headp /* skip :path + colon */);
  }

Changes to jni/curl/docs/examples/http2-upload.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
  size_t c;
  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
          num, text, (long)size, (long)size);

  for(i = 0; i<size; i += width) {

    fprintf(stderr, "%4.4lx: ", (long)i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stderr, "%02x ", ptr[i + c]);
        else







|
|



|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
  size_t c;
  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stderr, "%d %s, %lu bytes (0x%lx)\n",
          num, text, size, size);

  for(i = 0; i<size; i += width) {

    fprintf(stderr, "%4.4lx: ", i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stderr, "%02x ", ptr[i + c]);
        else
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
}

static
int my_trace(CURL *handle, curl_infotype type,
             char *data, size_t size,
             void *userp)
{
  char timebuf[20];
  const char *text;
  int num = hnd2num(handle);
  static time_t epoch_offset;
  static int    known_offset;
  struct timeval tv;
  time_t secs;
  struct tm *now;







|







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
}

static
int my_trace(CURL *handle, curl_infotype type,
             char *data, size_t size,
             void *userp)
{
  char timebuf[60];
  const char *text;
  int num = hnd2num(handle);
  static time_t epoch_offset;
  static int    known_offset;
  struct timeval tv;
  time_t secs;
  struct tm *now;
Changes to jni/curl/docs/examples/multi-debugcallback.c.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
          text, (long)size, (long)size);

  for(i = 0; i<size; i += width) {

    fprintf(stream, "%4.4lx: ", (long)i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stream, "%02x ", ptr[i + c]);
        else







|
|



|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n",
          text, size, size);

  for(i = 0; i<size; i += width) {

    fprintf(stream, "%4.4lx: ", i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stream, "%02x ", ptr[i + c]);
        else
Changes to jni/curl/docs/examples/sessioninfo.c.
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
          gnutls_datum_t dn;

          if(GNUTLS_E_SUCCESS == gnutls_x509_crt_init(&cert)) {
            if(GNUTLS_E_SUCCESS ==
               gnutls_x509_crt_import(cert, &chainp[i], GNUTLS_X509_FMT_DER)) {
              if(GNUTLS_E_SUCCESS ==
                 gnutls_x509_crt_print(cert, GNUTLS_CRT_PRINT_FULL, &dn)) {
                fprintf(stderr, "Certificate #%d: %.*s", i, dn.size, dn.data);

                gnutls_free(dn.data);
              }
            }

            gnutls_x509_crt_deinit(cert);
          }







|







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
          gnutls_datum_t dn;

          if(GNUTLS_E_SUCCESS == gnutls_x509_crt_init(&cert)) {
            if(GNUTLS_E_SUCCESS ==
               gnutls_x509_crt_import(cert, &chainp[i], GNUTLS_X509_FMT_DER)) {
              if(GNUTLS_E_SUCCESS ==
                 gnutls_x509_crt_print(cert, GNUTLS_CRT_PRINT_FULL, &dn)) {
                fprintf(stderr, "Certificate #%u: %.*s", i, dn.size, dn.data);

                gnutls_free(dn.data);
              }
            }

            gnutls_x509_crt_deinit(cert);
          }
Changes to jni/curl/docs/examples/sftpuploadresume.c.
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  curl_easy_setopt(curlHandlePtr, CURLOPT_FILETIME, 1);

  result = curl_easy_perform(curlHandlePtr);
  if(CURLE_OK == result) {
    result = curl_easy_getinfo(curlHandlePtr,
                               CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
                               &remoteFileSizeByte);
    printf("filesize: %ld \n", remoteFileSizeByte);
  }
  curl_easy_cleanup(curlHandlePtr);

  return remoteFileSizeByte;
}









|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  curl_easy_setopt(curlHandlePtr, CURLOPT_FILETIME, 1);

  result = curl_easy_perform(curlHandlePtr);
  if(CURLE_OK == result) {
    result = curl_easy_getinfo(curlHandlePtr,
                               CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
                               &remoteFileSizeByte);
    printf("filesize: %" CURL_FORMAT_CURL_OFF_T "\n", remoteFileSizeByte);
  }
  curl_easy_cleanup(curlHandlePtr);

  return remoteFileSizeByte;
}


92
93
94
95
96
97
98

99



100
101
102
103
104
105
106
  }

  curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L);
  curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
  curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc);
  curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);


  fseek(f, remoteFileSizeByte, SEEK_SET);



  curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
  result = curl_easy_perform(curlhandle);

  fclose(f);

  if(result == CURLE_OK)
    return 1;







>
|
>
>
>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
  }

  curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L);
  curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
  curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc);
  curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);

#ifdef _WIN32
  _fseeki64(f, remoteFileSizeByte, SEEK_SET);
#else
  fseek(f, (long)remoteFileSizeByte, SEEK_SET);
#endif
  curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
  result = curl_easy_perform(curlhandle);

  fclose(f);

  if(result == CURLE_OK)
    return 1;
Changes to jni/curl/docs/examples/shared-connection-cache.c.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/
/* <DESC>
 * Connection cache shared between easy handles with the share inteface
 * </DESC>
 */
#include <stdio.h>
#include <curl/curl.h>

static void my_lock(CURL *handle, curl_lock_data data,
                    curl_lock_access laccess, void *useptr)







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/
/* <DESC>
 * Connection cache shared between easy handles with the share interface
 * </DESC>
 */
#include <stdio.h>
#include <curl/curl.h>

static void my_lock(CURL *handle, curl_lock_data data,
                    curl_lock_access laccess, void *useptr)
Changes to jni/curl/docs/libcurl/Makefile.am.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

m4macrodir = $(datadir)/aclocal
dist_m4macro_DATA = libcurl.m4

CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) $(man_DISTMANS) \
  libcurl-symbols.3

EXTRA_DIST = $(man_MANS) index.html ABI symbols-in-versions symbols.pl  \
  mksymbolsmanpage.pl CMakeLists.txt
MAN2HTML= roffit --mandir=. $< >$@

SUFFIXES = .3 .html

libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl
	perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@







|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

m4macrodir = $(datadir)/aclocal
dist_m4macro_DATA = libcurl.m4

CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) $(man_DISTMANS) \
  libcurl-symbols.3

EXTRA_DIST = $(man_MANS) ABI symbols-in-versions symbols.pl  \
  mksymbolsmanpage.pl CMakeLists.txt
MAN2HTML= roffit --mandir=. $< >$@

SUFFIXES = .3 .html

libcurl-symbols.3: $(srcdir)/symbols-in-versions $(srcdir)/mksymbolsmanpage.pl
	perl $(srcdir)/mksymbolsmanpage.pl < $(srcdir)/symbols-in-versions > $@
Changes to jni/curl/docs/libcurl/Makefile.in.
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
HTMLPAGES = $(man_MANS:.3=.html)
PDFPAGES = $(man_MANS:.3=.pdf)
m4macrodir = $(datadir)/aclocal
dist_m4macro_DATA = libcurl.m4
CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) $(man_DISTMANS) \
  libcurl-symbols.3

EXTRA_DIST = $(man_MANS) index.html ABI symbols-in-versions symbols.pl  \
  mksymbolsmanpage.pl CMakeLists.txt

MAN2HTML = roffit --mandir=. $< >$@
SUFFIXES = .3 .html

# Make sure each option man page is referenced in the main man page
TESTS = check-easy check-multi







|







666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
HTMLPAGES = $(man_MANS:.3=.html)
PDFPAGES = $(man_MANS:.3=.pdf)
m4macrodir = $(datadir)/aclocal
dist_m4macro_DATA = libcurl.m4
CLEANFILES = $(HTMLPAGES) $(PDFPAGES) $(TESTS) $(man_DISTMANS) \
  libcurl-symbols.3

EXTRA_DIST = $(man_MANS) ABI symbols-in-versions symbols.pl  \
  mksymbolsmanpage.pl CMakeLists.txt

MAN2HTML = roffit --mandir=. $< >$@
SUFFIXES = .3 .html

# Make sure each option man page is referenced in the main man page
TESTS = check-easy check-multi
Changes to jni/curl/docs/libcurl/curl_easy_cleanup.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_cleanup 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_cleanup - End a libcurl easy handle
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "void curl_easy_cleanup(CURL *" handle ");"







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_cleanup 3 "April 17, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_cleanup - End a libcurl easy handle
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "void curl_easy_cleanup(CURL *" handle ");"
Changes to jni/curl/docs/libcurl/curl_easy_duphandle.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_duphandle 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_duphandle - Clone a libcurl session handle
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "CURL *curl_easy_duphandle(CURL *"handle ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_duphandle 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_duphandle - Clone a libcurl session handle
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "CURL *curl_easy_duphandle(CURL *"handle ");"
Changes to jni/curl/docs/libcurl/curl_easy_escape.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_escape 3 "August 12, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_escape - URL encodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_easy_escape( CURL *" curl ", const char *" string







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_escape 3 "August 12, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_escape - URL encodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_easy_escape( CURL *" curl ", const char *" string
Changes to jni/curl/docs/libcurl/curl_easy_getinfo.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_getinfo 3 "January 25, 2018" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_getinfo - extract information from a curl handle
.SH SYNOPSIS
.B #include <curl/curl.h>

.B "CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );"







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_getinfo 3 "January 25, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_getinfo - extract information from a curl handle
.SH SYNOPSIS
.B #include <curl/curl.h>

.B "CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... );"
Changes to jni/curl/docs/libcurl/curl_easy_init.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_init 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_init - Start a libcurl easy session
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "CURL *curl_easy_init( );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_init 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_init - Start a libcurl easy session
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "CURL *curl_easy_init( );"
Changes to jni/curl/docs/libcurl/curl_easy_pause.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_pause 3 "May 01, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_pause - pause and unpause a connection
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "CURLcode curl_easy_pause(CURL *"handle ", int "bitmask " );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_pause 3 "May 01, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_pause - pause and unpause a connection
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "CURLcode curl_easy_pause(CURL *"handle ", int "bitmask " );"
Changes to jni/curl/docs/libcurl/curl_easy_perform.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_perform 3 "May 02, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_perform - perform a blocking file transfer
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_easy_perform(CURL *" easy_handle ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_perform 3 "May 02, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_perform - perform a blocking file transfer
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_easy_perform(CURL *" easy_handle ");"
Changes to jni/curl/docs/libcurl/curl_easy_recv.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_recv 3 "December 18, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_recv - receives raw data on an "easy" connection
.SH SYNOPSIS
.B #include <curl/easy.h>
.sp
.BI "CURLcode curl_easy_recv( CURL *" curl ", void *" buffer ","







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_recv 3 "December 18, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_recv - receives raw data on an "easy" connection
.SH SYNOPSIS
.B #include <curl/easy.h>
.sp
.BI "CURLcode curl_easy_recv( CURL *" curl ", void *" buffer ","
Changes to jni/curl/docs/libcurl/curl_easy_reset.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_reset 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_reset - reset all options of a libcurl session handle
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "void curl_easy_reset(CURL *"handle ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_reset 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_reset - reset all options of a libcurl session handle
.SH SYNOPSIS
.B #include <curl/curl.h>

.BI "void curl_easy_reset(CURL *"handle ");"
Changes to jni/curl/docs/libcurl/curl_easy_send.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_send 3 "December 18, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_send - sends raw data over an "easy" connection
.SH SYNOPSIS
.B #include <curl/easy.h>
.sp
.BI "CURLcode curl_easy_send( CURL *" curl ", const void *" buffer ","







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_send 3 "December 18, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_send - sends raw data over an "easy" connection
.SH SYNOPSIS
.B #include <curl/easy.h>
.sp
.BI "CURLcode curl_easy_send( CURL *" curl ", const void *" buffer ","
Changes to jni/curl/docs/libcurl/curl_easy_setopt.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_setopt 3 "February 14, 2018" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_setopt \- set options for a curl easy handle
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_setopt 3 "April 17, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_setopt \- set options for a curl easy handle
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
182
183
184
185
186
187
188


189
190
191
192
193
194
195
Socks5 authentication methods. See \fICURLOPT_SOCKS5_AUTH(3)\fP
.IP CURLOPT_SOCKS5_GSSAPI_SERVICE
Socks5 GSSAPI service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP
.IP CURLOPT_SOCKS5_GSSAPI_NEC
Socks5 GSSAPI NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP
.IP CURLOPT_PROXY_SERVICE_NAME
Proxy authentication service name. \fICURLOPT_PROXY_SERVICE_NAME(3)\fP


.IP CURLOPT_SERVICE_NAME
Authentication service name. \fICURLOPT_SERVICE_NAME(3)\fP
.IP CURLOPT_INTERFACE
Bind connection locally to this. See \fICURLOPT_INTERFACE(3)\fP
.IP CURLOPT_LOCALPORT
Bind connection locally to this port. See \fICURLOPT_LOCALPORT(3)\fP
.IP CURLOPT_LOCALPORTRANGE







>
>







182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
Socks5 authentication methods. See \fICURLOPT_SOCKS5_AUTH(3)\fP
.IP CURLOPT_SOCKS5_GSSAPI_SERVICE
Socks5 GSSAPI service name. \fICURLOPT_SOCKS5_GSSAPI_SERVICE(3)\fP
.IP CURLOPT_SOCKS5_GSSAPI_NEC
Socks5 GSSAPI NEC mode. See \fICURLOPT_SOCKS5_GSSAPI_NEC(3)\fP
.IP CURLOPT_PROXY_SERVICE_NAME
Proxy authentication service name. \fICURLOPT_PROXY_SERVICE_NAME(3)\fP
.IP CURLOPT_HAPROXYPROTOCOL
Send an HAProxy PROXY protocol header. See \fICURLOPT_HAPROXYPROTOCOL(3)\fP
.IP CURLOPT_SERVICE_NAME
Authentication service name. \fICURLOPT_SERVICE_NAME(3)\fP
.IP CURLOPT_INTERFACE
Bind connection locally to this. See \fICURLOPT_INTERFACE(3)\fP
.IP CURLOPT_LOCALPORT
Bind connection locally to this port. See \fICURLOPT_LOCALPORT(3)\fP
.IP CURLOPT_LOCALPORTRANGE
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
.IP CURLOPT_UNRESTRICTED_AUTH
Do not restrict authentication to original host. \fICURLOPT_UNRESTRICTED_AUTH(3)\fP
.IP CURLOPT_MAXREDIRS
Maximum number of redirects to follow. See \fICURLOPT_MAXREDIRS(3)\fP
.IP CURLOPT_POSTREDIR
How to act on redirects after POST. See \fICURLOPT_POSTREDIR(3)\fP
.IP CURLOPT_PUT
Issue a HTTP PUT request. See \fICURLOPT_PUT(3)\fP
.IP CURLOPT_POST
Issue a HTTP POST request. See \fICURLOPT_POST(3)\fP
.IP CURLOPT_POSTFIELDS
Send a POST with this data. See \fICURLOPT_POSTFIELDS(3)\fP
.IP CURLOPT_POSTFIELDSIZE
The POST data is this big. See \fICURLOPT_POSTFIELDSIZE(3)\fP
.IP CURLOPT_POSTFIELDSIZE_LARGE
The POST data is this big. See \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP
.IP CURLOPT_COPYPOSTFIELDS







|

|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
.IP CURLOPT_UNRESTRICTED_AUTH
Do not restrict authentication to original host. \fICURLOPT_UNRESTRICTED_AUTH(3)\fP
.IP CURLOPT_MAXREDIRS
Maximum number of redirects to follow. See \fICURLOPT_MAXREDIRS(3)\fP
.IP CURLOPT_POSTREDIR
How to act on redirects after POST. See \fICURLOPT_POSTREDIR(3)\fP
.IP CURLOPT_PUT
Issue an HTTP PUT request. See \fICURLOPT_PUT(3)\fP
.IP CURLOPT_POST
Issue an HTTP POST request. See \fICURLOPT_POST(3)\fP
.IP CURLOPT_POSTFIELDS
Send a POST with this data. See \fICURLOPT_POSTFIELDS(3)\fP
.IP CURLOPT_POSTFIELDSIZE
The POST data is this big. See \fICURLOPT_POSTFIELDSIZE(3)\fP
.IP CURLOPT_POSTFIELDSIZE_LARGE
The POST data is this big. See \fICURLOPT_POSTFIELDSIZE_LARGE(3)\fP
.IP CURLOPT_COPYPOSTFIELDS
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
.IP CURLOPT_COOKIEJAR
File to write cookies to. See \fICURLOPT_COOKIEJAR(3)\fP
.IP CURLOPT_COOKIESESSION
Start a new cookie session. See \fICURLOPT_COOKIESESSION(3)\fP
.IP CURLOPT_COOKIELIST
Add or control cookies. See \fICURLOPT_COOKIELIST(3)\fP
.IP CURLOPT_HTTPGET
Do a HTTP GET request. See \fICURLOPT_HTTPGET(3)\fP
.IP CURLOPT_REQUEST_TARGET
Set the request target. \fICURLOPT_REQUEST_TARGET(3)\fP
.IP CURLOPT_HTTP_VERSION
HTTP version to use. \fICURLOPT_HTTP_VERSION(3)\fP
.IP CURLOPT_IGNORE_CONTENT_LENGTH
Ignore Content-Length. See \fICURLOPT_IGNORE_CONTENT_LENGTH(3)\fP
.IP CURLOPT_HTTP_CONTENT_DECODING







|







307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
.IP CURLOPT_COOKIEJAR
File to write cookies to. See \fICURLOPT_COOKIEJAR(3)\fP
.IP CURLOPT_COOKIESESSION
Start a new cookie session. See \fICURLOPT_COOKIESESSION(3)\fP
.IP CURLOPT_COOKIELIST
Add or control cookies. See \fICURLOPT_COOKIELIST(3)\fP
.IP CURLOPT_HTTPGET
Do an HTTP GET request. See \fICURLOPT_HTTPGET(3)\fP
.IP CURLOPT_REQUEST_TARGET
Set the request target. \fICURLOPT_REQUEST_TARGET(3)\fP
.IP CURLOPT_HTTP_VERSION
HTTP version to use. \fICURLOPT_HTTP_VERSION(3)\fP
.IP CURLOPT_IGNORE_CONTENT_LENGTH
Ignore Content-Length. See \fICURLOPT_IGNORE_CONTENT_LENGTH(3)\fP
.IP CURLOPT_HTTP_CONTENT_DECODING
463
464
465
466
467
468
469


470
471
472
473
474
475
476
Bind name resolves to this interface. See \fICURLOPT_DNS_INTERFACE(3)\fP
.IP CURLOPT_DNS_LOCAL_IP4
Bind name resolves to this IP4 address. See \fICURLOPT_DNS_LOCAL_IP4(3)\fP
.IP CURLOPT_DNS_LOCAL_IP6
Bind name resolves to this IP6 address. See \fICURLOPT_DNS_LOCAL_IP6(3)\fP
.IP CURLOPT_DNS_SERVERS
Preferred DNS servers. See \fICURLOPT_DNS_SERVERS(3)\fP


.IP CURLOPT_ACCEPTTIMEOUT_MS
Timeout for waiting for the server's connect back to be accepted. See \fICURLOPT_ACCEPTTIMEOUT_MS(3)\fP
.IP CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
Timeout for happy eyeballs. See \fICURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS(3)\fP
.SH SSL and SECURITY OPTIONS
.IP CURLOPT_SSLCERT
Client cert. See \fICURLOPT_SSLCERT(3)\fP







>
>







465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
Bind name resolves to this interface. See \fICURLOPT_DNS_INTERFACE(3)\fP
.IP CURLOPT_DNS_LOCAL_IP4
Bind name resolves to this IP4 address. See \fICURLOPT_DNS_LOCAL_IP4(3)\fP
.IP CURLOPT_DNS_LOCAL_IP6
Bind name resolves to this IP6 address. See \fICURLOPT_DNS_LOCAL_IP6(3)\fP
.IP CURLOPT_DNS_SERVERS
Preferred DNS servers. See \fICURLOPT_DNS_SERVERS(3)\fP
.IP CURLOPT_DNS_SHUFFLE_ADDRESSES
Shuffle addresses before use. See \fICURLOPT_DNS_SHUFFLE_ADDRESSES(3)\fP
.IP CURLOPT_ACCEPTTIMEOUT_MS
Timeout for waiting for the server's connect back to be accepted. See \fICURLOPT_ACCEPTTIMEOUT_MS(3)\fP
.IP CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
Timeout for happy eyeballs. See \fICURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS(3)\fP
.SH SSL and SECURITY OPTIONS
.IP CURLOPT_SSLCERT
Client cert. See \fICURLOPT_SSLCERT(3)\fP
Changes to jni/curl/docs/libcurl/curl_easy_strerror.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_strerror 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_strerror - return string describing error code
.SH SYNOPSIS
#include <curl/curl.h>

const char *curl_easy_strerror(CURLcode errornum);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_easy_strerror 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_strerror - return string describing error code
.SH SYNOPSIS
#include <curl/curl.h>

const char *curl_easy_strerror(CURLcode errornum);
Changes to jni/curl/docs/libcurl/curl_easy_unescape.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_unescape 3 "October 04, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_easy_unescape - URL decodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_easy_unescape( CURL *" curl ", const char *" url







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_easy_unescape 3 "October 04, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_easy_unescape - URL decodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_easy_unescape( CURL *" curl ", const char *" url
Changes to jni/curl/docs/libcurl/curl_escape.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_escape 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_escape - URL encodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_escape( const char *" url ", int "length " );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_escape 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_escape - URL encodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_escape( const char *" url ", int "length " );"
Changes to jni/curl/docs/libcurl/curl_formadd.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_formadd 3 "October 08, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_formadd - add a section to a multipart/formdata HTTP POST
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLFORMcode curl_formadd(struct curl_httppost ** " firstitem,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_formadd 3 "October 08, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_formadd - add a section to a multipart/formdata HTTP POST
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLFORMcode curl_formadd(struct curl_httppost ** " firstitem,
Changes to jni/curl/docs/libcurl/curl_formfree.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_formfree 3 "September 02, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_formfree - free a previously build multipart/formdata HTTP POST chain
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_formfree(struct curl_httppost *" form);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_formfree 3 "September 02, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_formfree - free a previously build multipart/formdata HTTP POST chain
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_formfree(struct curl_httppost *" form);
Changes to jni/curl/docs/libcurl/curl_formget.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_formget 3 "September 02, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_formget - serialize a previously built multipart/formdata HTTP POST chain
.SH SYNOPSIS
.nf
.B #include <curl/curl.h>








|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_formget 3 "September 02, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_formget - serialize a previously built multipart/formdata HTTP POST chain
.SH SYNOPSIS
.nf
.B #include <curl/curl.h>

Changes to jni/curl/docs/libcurl/curl_free.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_free 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_free - reclaim memory that has been obtained through a libcurl call
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_free( char *" ptr " );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_free 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_free - reclaim memory that has been obtained through a libcurl call
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_free( char *" ptr " );"
Changes to jni/curl/docs/libcurl/curl_getdate.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_getdate 3 "January 18, 2018" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_getdate - Convert a date string to number of seconds
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "time_t curl_getdate(char *" datestring ", time_t *"now " );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_getdate 3 "January 18, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_getdate - Convert a date string to number of seconds
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "time_t curl_getdate(char *" datestring ", time_t *"now " );"
Changes to jni/curl/docs/libcurl/curl_getenv.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_getenv 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_getenv - return value for environment name
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_getenv(const char *" name ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_getenv 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_getenv - return value for environment name
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_getenv(const char *" name ");"
Changes to jni/curl/docs/libcurl/curl_global_cleanup.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_global_cleanup 3 "September 20, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_global_cleanup - global libcurl cleanup
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_global_cleanup(void);"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_global_cleanup 3 "September 20, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_global_cleanup - global libcurl cleanup
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_global_cleanup(void);"
Changes to jni/curl/docs/libcurl/curl_global_init.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_global_init 3 "January 24, 2018" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_global_init - Global libcurl initialisation
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_global_init(long " flags ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_global_init 3 "April 17, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_global_init - Global libcurl initialisation
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_global_init(long " flags ");"
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(This flag's presence or absence serves no meaning since 7.57.0. The
description below is for older libcurl versions.)

Initialize SSL.

The implication here is that if this bit is not set, the initialization of the
SSL layer needs to be done by the application or at least outside of
libcurl. The exact procedure how to do SSL initializtion depends on the TLS
backend libcurl uses.

Doing TLS based transfers without having the TLS layer initialized may lead to
unexpected behaviors.
.IP CURL_GLOBAL_WIN32
Initialize the Win32 socket libraries.








|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(This flag's presence or absence serves no meaning since 7.57.0. The
description below is for older libcurl versions.)

Initialize SSL.

The implication here is that if this bit is not set, the initialization of the
SSL layer needs to be done by the application or at least outside of
libcurl. The exact procedure how to do SSL initialization depends on the TLS
backend libcurl uses.

Doing TLS based transfers without having the TLS layer initialized may lead to
unexpected behaviors.
.IP CURL_GLOBAL_WIN32
Initialize the Win32 socket libraries.

Changes to jni/curl/docs/libcurl/curl_global_init_mem.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_global_init_mem 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_global_init_mem - Global libcurl initialisation with memory callbacks
.SH SYNOPSIS
.B #include <curl/curl.h>
.nf
.B "CURLcode curl_global_init_mem(long " flags,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_global_init_mem 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_global_init_mem - Global libcurl initialisation with memory callbacks
.SH SYNOPSIS
.B #include <curl/curl.h>
.nf
.B "CURLcode curl_global_init_mem(long " flags,
Changes to jni/curl/docs/libcurl/curl_global_sslset.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_global_sslset 3 "September 21, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_global_sslset - Select SSL backend to use with libcurl
.SH SYNOPSIS
.B #include <curl/curl.h>
.nf








|













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_global_sslset 3 "April 15, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_global_sslset - Select SSL backend to use with libcurl
.SH SYNOPSIS
.B #include <curl/curl.h>
.nf

60
61
62
63
64
65
66



67
68
69
70
71
72
73
\fIname\fP parameter for a case insensitive match (passing -1 as \fIid\fP). If
both \fIid\fP and \fIname\fP are specified, the \fIname\fP will be ignored.

If neither \fIid\fP nor \fPname\fP are specified, the function will fail with
CURLSSLSET_UNKNOWN_BACKEND and set the \fIavail\fP pointer to the
NULL-terminated list of available backends. The available backends are those
that this particular build of libcurl supports.




Upon success, the function returns CURLSSLSET_OK.

If the specified SSL backend is not available, the function returns
CURLSSLSET_UNKNOWN_BACKEND and sets the \fIavail\fP pointer to a
NULL-terminated list of available SSL backends. In this case, you may call the
function again to try to select a different backend.







>
>
>







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
\fIname\fP parameter for a case insensitive match (passing -1 as \fIid\fP). If
both \fIid\fP and \fIname\fP are specified, the \fIname\fP will be ignored.

If neither \fIid\fP nor \fPname\fP are specified, the function will fail with
CURLSSLSET_UNKNOWN_BACKEND and set the \fIavail\fP pointer to the
NULL-terminated list of available backends. The available backends are those
that this particular build of libcurl supports.

Since libcurl 7.60.0, the \fIavail\fP pointer will always be set to the list
of alternatives if non-NULL.

Upon success, the function returns CURLSSLSET_OK.

If the specified SSL backend is not available, the function returns
CURLSSLSET_UNKNOWN_BACKEND and sets the \fIavail\fP pointer to a
NULL-terminated list of available SSL backends. In this case, you may call the
function again to try to select a different backend.
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

.SH AVAILABILITY
This function was added in libcurl 7.56.0. Before this version, there was no
support for choosing SSL backends at runtime.
.SH RETURN VALUE
If this function returns CURLSSLSET_OK, the backend was successfully selected.

If the chosen backend is unknown (or support for the chosed backend has not
been compiled into libcurl), the function returns \fICURLSSLSET_UNKNOWN_BACKEND\fP.

If the backend had been configured previously, or if \fIcurl_global_init(3)\fP
has already been called, the function returns \fICURLSSLSET_TOO_LATE\fP.

If this libcurl was built completely without SSL support, with no backends at
all, this function returns \fICURLSSLSET_NO_BACKENDS\fP.
.SH "SEE ALSO"
.BR curl_global_init "(3), "
.BR libcurl "(3) "







|










84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

.SH AVAILABILITY
This function was added in libcurl 7.56.0. Before this version, there was no
support for choosing SSL backends at runtime.
.SH RETURN VALUE
If this function returns CURLSSLSET_OK, the backend was successfully selected.

If the chosen backend is unknown (or support for the chosen backend has not
been compiled into libcurl), the function returns \fICURLSSLSET_UNKNOWN_BACKEND\fP.

If the backend had been configured previously, or if \fIcurl_global_init(3)\fP
has already been called, the function returns \fICURLSSLSET_TOO_LATE\fP.

If this libcurl was built completely without SSL support, with no backends at
all, this function returns \fICURLSSLSET_NO_BACKENDS\fP.
.SH "SEE ALSO"
.BR curl_global_init "(3), "
.BR libcurl "(3) "
Changes to jni/curl/docs/libcurl/curl_mime_addpart.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_addpart 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_addpart - append a new empty part to a mime structure
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "curl_mimepart * curl_mime_addpart(curl_mime * " mime ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_addpart 3 "September 22, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_addpart - append a new empty part to a mime structure
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "curl_mimepart * curl_mime_addpart(curl_mime * " mime ");"
Changes to jni/curl/docs/libcurl/curl_mime_data.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_data 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_data - set a mime part's body data from memory
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_data(curl_mimepart * " part ", const char * " data







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_data 3 "September 22, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_data - set a mime part's body data from memory
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_data(curl_mimepart * " part ", const char * " data
Changes to jni/curl/docs/libcurl/curl_mime_data_cb.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_data_cb 3 "January 14, 2018" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_data_cb - set a callback-based data source for a mime part's body
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
size_t readfunc(char *buffer, size_t size, size_t nitems, void *arg);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_data_cb 3 "April 17, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_data_cb - set a callback-based data source for a mime part's body
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
size_t readfunc(char *buffer, size_t size, size_t nitems, void *arg);
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
should be filled up with at most \fIsize\fP multiplied with \fInmemb\fP number
of bytes by your function.

Your read function must then return the actual number of bytes that it stored
in that memory area. Returning 0 will signal end-of-file to the library and
cause it to stop the current transfer.

If you stop the current transfer by returning 0 "pre-maturely" (i.e before the
server expected it, like when you've said you will upload N bytes and you
upload less than N bytes), you may experience that the server "hangs" waiting
for the rest of the data that won't come.

The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
code from the transfer.







|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
should be filled up with at most \fIsize\fP multiplied with \fInmemb\fP number
of bytes by your function.

Your read function must then return the actual number of bytes that it stored
in that memory area. Returning 0 will signal end-of-file to the library and
cause it to stop the current transfer.

If you stop the current transfer by returning 0 "pre-maturely" (i.e. before the
server expected it, like when you've said you will upload N bytes and you
upload less than N bytes), you may experience that the server "hangs" waiting
for the rest of the data that won't come.

The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
code from the transfer.
Changes to jni/curl/docs/libcurl/curl_mime_encoder.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_encoder 3 "September 05, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_encoder - set a mime part's encoder and content transfer encoding
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_encoder(curl_mimepart * " part ,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_encoder 3 "September 05, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_encoder - set a mime part's encoder and content transfer encoding
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_encoder(curl_mimepart * " part ,
Changes to jni/curl/docs/libcurl/curl_mime_filedata.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_filedata 3 "January 14, 2018" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_filedata - set a mime part's body data from a file contents
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_filedata(curl_mimepart * " part ,
.BI " const char * " filename ");"
.ad
.SH DESCRIPTION
\fIcurl_mime_filedata(3)\fP sets a mime part's body content from the named
file's contents. This is an alernative to \fIcurl_mime_data(3)\fP for setting
data to a mime part.

\fIpart\fP is the part's to assign contents to.

\fIfilename\fP points to the nul-terminated file's path name. The pointer can
be NULL to detach the previous part contents settings.  Filename storage can be
safely be reused after this call.







|











|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_filedata 3 "April 17, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_filedata - set a mime part's body data from a file contents
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_filedata(curl_mimepart * " part ,
.BI " const char * " filename ");"
.ad
.SH DESCRIPTION
\fIcurl_mime_filedata(3)\fP sets a mime part's body content from the named
file's contents. This is an alternative to \fIcurl_mime_data(3)\fP for setting
data to a mime part.

\fIpart\fP is the part's to assign contents to.

\fIfilename\fP points to the nul-terminated file's path name. The pointer can
be NULL to detach the previous part contents settings.  Filename storage can be
safely be reused after this call.
Changes to jni/curl/docs/libcurl/curl_mime_filename.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_filename 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_filename - set a mime part's remote file name
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_filename(curl_mimepart * " part ,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_filename 3 "September 22, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_filename - set a mime part's remote file name
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_filename(curl_mimepart * " part ,
Changes to jni/curl/docs/libcurl/curl_mime_free.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_free 3 "September 04, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_free - free a previously built mime structure
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_mime_free(curl_mime *" mime);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_free 3 "September 04, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_free - free a previously built mime structure
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_mime_free(curl_mime *" mime);
Changes to jni/curl/docs/libcurl/curl_mime_headers.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_headers 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_headers - set a mime part's custom headers
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_headers(curl_mimepart * " part ,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_headers 3 "September 22, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_headers - set a mime part's custom headers
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_headers(curl_mimepart * " part ,
Changes to jni/curl/docs/libcurl/curl_mime_init.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_init 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_init - create a mime handle
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "curl_mime * curl_mime_init(CURL * " easy_handle ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_init 3 "September 22, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_init - create a mime handle
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "curl_mime * curl_mime_init(CURL * " easy_handle ");"
Changes to jni/curl/docs/libcurl/curl_mime_name.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_name 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_name - set a mime part's name
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_name(curl_mimepart * " part ", const char * " name ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_name 3 "September 22, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_name - set a mime part's name
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_name(curl_mimepart * " part ", const char * " name ");"
Changes to jni/curl/docs/libcurl/curl_mime_subparts.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_subparts 3 "September 05, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_subparts - set subparts of a multipart mime part
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_subparts(curl_mimepart * " part ,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_subparts 3 "September 05, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_subparts - set subparts of a multipart mime part
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_subparts(curl_mimepart * " part ,
Changes to jni/curl/docs/libcurl/curl_mime_type.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_type 3 "September 22, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_mime_type - set a mime part's content type
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_type(curl_mimepart * " part ,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_mime_type 3 "April 17, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_mime_type - set a mime part's content type
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLcode curl_mime_type(curl_mimepart * " part ,
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
only the value set by the last call is retained.

In the absence of a mime type and if needed by the protocol specifications,
a default mime type is determined by the context:
.br
- If set as a custom header, use this value.
.br
- application/form-data for a HTTP form post.
.br
- If a remote file name is set, the mime type is taken from the file name
extension, or application/octet-stream by default.
.br
- For a multipart part, multipart/mixed.
.br
- text/plain in other cases.







|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
only the value set by the last call is retained.

In the absence of a mime type and if needed by the protocol specifications,
a default mime type is determined by the context:
.br
- If set as a custom header, use this value.
.br
- application/form-data for an HTTP form post.
.br
- If a remote file name is set, the mime type is taken from the file name
extension, or application/octet-stream by default.
.br
- For a multipart part, multipart/mixed.
.br
- text/plain in other cases.
Changes to jni/curl/docs/libcurl/curl_mprintf.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_printf 3 "April 01, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf,
curl_mvsprintf - formatted output conversion
.SH SYNOPSIS
.B #include <curl/mprintf.h>







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_printf 3 "April 01, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf
curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf,
curl_mvsprintf - formatted output conversion
.SH SYNOPSIS
.B #include <curl/mprintf.h>
Changes to jni/curl/docs/libcurl/curl_multi_add_handle.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_add_handle 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_add_handle - add an easy handle to a multi session
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_add_handle 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_add_handle - add an easy handle to a multi session
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
Changes to jni/curl/docs/libcurl/curl_multi_assign.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_assign 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_assign \- set data to associate with an internal socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_assign 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_assign \- set data to associate with an internal socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_assign(CURLM *multi_handle, curl_socket_t sockfd,
Changes to jni/curl/docs/libcurl/curl_multi_cleanup.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_cleanup 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_cleanup - close down a multi session
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLMcode curl_multi_cleanup( CURLM *multi_handle );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_cleanup 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_cleanup - close down a multi session
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLMcode curl_multi_cleanup( CURLM *multi_handle );"
Changes to jni/curl/docs/libcurl/curl_multi_fdset.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_fdset 3 "November 09, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_fdset - extracts file descriptor information from a multi handle
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_fdset 3 "November 09, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_fdset - extracts file descriptor information from a multi handle
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/curl_multi_info_read.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_info_read 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_info_read - read multi stack informationals
.SH SYNOPSIS
#include <curl/curl.h>

CURLMsg *curl_multi_info_read( CURLM *multi_handle,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_info_read 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_info_read - read multi stack informationals
.SH SYNOPSIS
#include <curl/curl.h>

CURLMsg *curl_multi_info_read( CURLM *multi_handle,
Changes to jni/curl/docs/libcurl/curl_multi_init.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_init 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_init - create a multi handle
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLM *curl_multi_init( );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_init 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_init - create a multi handle
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLM *curl_multi_init( );"
Changes to jni/curl/docs/libcurl/curl_multi_perform.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_perform 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_perform - reads/writes available data from each easy handle
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_perform 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_perform - reads/writes available data from each easy handle
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
Changes to jni/curl/docs/libcurl/curl_multi_remove_handle.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_remove_handle 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_remove_handle - remove an easy handle from a multi session
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *easy_handle);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_remove_handle 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_remove_handle - remove an easy handle from a multi session
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_remove_handle(CURLM *multi_handle, CURL *easy_handle);
Changes to jni/curl/docs/libcurl/curl_multi_setopt.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_setopt 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_setopt \- set options for a curl multi handle
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_setopt 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_setopt \- set options for a curl multi handle
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM * multi_handle, CURLMoption option, param);
Changes to jni/curl/docs/libcurl/curl_multi_socket.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_socket 3 "December 15, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_socket \- reads/writes available data
.SH SYNOPSIS
.nf
#include <curl/curl.h>
CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_socket 3 "December 15, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_socket \- reads/writes available data
.SH SYNOPSIS
.nf
#include <curl/curl.h>
CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd,
Changes to jni/curl/docs/libcurl/curl_multi_socket_action.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_socket_action 3 "June 07, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_socket_action \- reads/writes available data given an action
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_socket_action 3 "June 07, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_socket_action \- reads/writes available data given an action
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/curl_multi_strerror.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_strerror 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_strerror - return string describing error code
.SH SYNOPSIS
.nf
.B #include <curl/curl.h>
.BI "const char *curl_multi_strerror(CURLMcode " errornum ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_strerror 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_strerror - return string describing error code
.SH SYNOPSIS
.nf
.B #include <curl/curl.h>
.BI "const char *curl_multi_strerror(CURLMcode " errornum ");"
Changes to jni/curl/docs/libcurl/curl_multi_timeout.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_timeout 3 "May 02, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_timeout \- how long to wait for action before proceeding
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_timeout(CURLM *multi_handle, long *timeout);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_timeout 3 "May 02, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_timeout \- how long to wait for action before proceeding
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_timeout(CURLM *multi_handle, long *timeout);
Changes to jni/curl/docs/libcurl/curl_multi_wait.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_wait 3 "March 09, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_multi_wait - polls on all easy handles in a multi handle
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_multi_wait 3 "March 09, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_multi_wait - polls on all easy handles in a multi handle
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/curl_share_cleanup.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_share_cleanup 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_share_cleanup - Clean up a shared object
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLSHcode curl_share_cleanup(CURLSH *" share_handle ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_share_cleanup 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_share_cleanup - Clean up a shared object
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLSHcode curl_share_cleanup(CURLSH *" share_handle ");"
Changes to jni/curl/docs/libcurl/curl_share_init.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_share_init 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_share_init - Create a shared object
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLSH *curl_share_init( );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_share_init 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_share_init - Create a shared object
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "CURLSH *curl_share_init( );"
Changes to jni/curl/docs/libcurl/curl_share_setopt.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_share_setopt 3 "February 23, 2018" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_share_setopt - Set options for a shared object
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_share_setopt 3 "February 23, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_share_setopt - Set options for a shared object
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
Changes to jni/curl/docs/libcurl/curl_share_strerror.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_share_strerror 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_share_strerror - return string describing error code
.SH SYNOPSIS
.nf
.B #include <curl/curl.h>
.BI "const char *curl_share_strerror(CURLSHcode " errornum ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_share_strerror 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_share_strerror - return string describing error code
.SH SYNOPSIS
.nf
.B #include <curl/curl.h>
.BI "const char *curl_share_strerror(CURLSHcode " errornum ");"
Changes to jni/curl/docs/libcurl/curl_slist_append.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_slist_append 3 "May 05, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_slist_append - add a string to an slist
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "struct curl_slist *curl_slist_append(struct curl_slist *" list,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_slist_append 3 "May 05, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_slist_append - add a string to an slist
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "struct curl_slist *curl_slist_append(struct curl_slist *" list,
Changes to jni/curl/docs/libcurl/curl_slist_free_all.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_slist_free_all 3 "May 05, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_slist_free_all - free an entire curl_slist list
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_slist_free_all(struct curl_slist *" list);







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_slist_free_all 3 "May 05, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_slist_free_all - free an entire curl_slist list
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "void curl_slist_free_all(struct curl_slist *" list);
Changes to jni/curl/docs/libcurl/curl_strequal.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_strequal 3 "June 29, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_strequal, curl_strnequal - case insensitive string comparisons
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "int curl_strequal(char *" str1 ", char *" str2 ");"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_strequal 3 "June 29, 2017" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_strequal, curl_strnequal - case insensitive string comparisons
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "int curl_strequal(char *" str1 ", char *" str2 ");"
Changes to jni/curl/docs/libcurl/curl_unescape.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_unescape 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_unescape - URL decodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_unescape( const char *" url ", int "length " );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_unescape 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_unescape - URL decodes the given string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_unescape( const char *" url ", int "length " );"
Changes to jni/curl/docs/libcurl/curl_version.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_version 3 "February 03, 2016" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_version - returns the libcurl version string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_version( );"







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH curl_version 3 "February 03, 2016" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_version - returns the libcurl version string
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "char *curl_version( );"
Changes to jni/curl/docs/libcurl/curl_version_info.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_version_info 3 "December 29, 2017" "libcurl 7.59.0" "libcurl Manual"

.SH NAME
curl_version_info - returns run-time libcurl version info
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "curl_version_info_data *curl_version_info( CURLversion "age ");"







|














|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH curl_version_info 3 "March 17, 2018" "libcurl 7.60.0" "libcurl Manual"

.SH NAME
curl_version_info - returns run-time libcurl version info
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp
.BI "curl_version_info_data *curl_version_info( CURLversion "age ");"
166
167
168
169
170
171
172
173
174

175
176
177
178
179
180
181
.IP CURL_VERSION_MULTI_SSL
libcurl was built with multiple SSL backends. For details, see
\fIcurl_global_sslset(3)\fP.
(Added in 7.56.0)
.IP CURL_VERSION_BROTLI
supports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0)
.RE
\fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
has no SSL support, this is NULL.


\fIssl_version_num\fP is always 0.

\fIlibz_version\fP is an ASCII string (there is no numerical version). If
libcurl has no libz support, this is NULL.

\fIprotocols\fP is a pointer to an array of char * pointers, containing the







|
|
>







166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
.IP CURL_VERSION_MULTI_SSL
libcurl was built with multiple SSL backends. For details, see
\fIcurl_global_sslset(3)\fP.
(Added in 7.56.0)
.IP CURL_VERSION_BROTLI
supports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0)
.RE
\fIssl_version\fP is an ASCII string for the TLS library name + version
used. If libcurl has no SSL support, this is NULL. For example "WinSSL",
\&"SecureTransport" or "OpenSSL/1.1.0g".

\fIssl_version_num\fP is always 0.

\fIlibz_version\fP is an ASCII string (there is no numerical version). If
libcurl has no libz support, this is NULL.

\fIprotocols\fP is a pointer to an array of char * pointers, containing the
Deleted jni/curl/docs/libcurl/index.html.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Index to libcurl documentation</title>
</head>

<body>
<h1 align="center">Index to libcurl documentation</h1>

<h2>Programs</h2>
<p><a href="../index.html">curl and tools</a>

<h2>Overviews</h2>
<A HREF="libcurl.html">libcurl</A>
<br><a href="libcurl-easy.html">libcurl-easy</a>
<br><a href="libcurl-multi.html">libcurl-multi</a>
<br><a href="libcurl-share.html">libcurl-share</a>
<br><a href="libcurl-errors.html">libcurl-errors</a>
<br><a href="libcurl-tutorial.html">libcurl-tutorial</a>
<br><a href="libcurl-thread.html">libcurl-thread</a>

<H2>Library Functions (A-Z)</H2>
<a href="curl_easy_cleanup.html">curl_easy_cleanup</A>
<br><a href="curl_easy_duphandle.html">curl_easy_duphandle</A>
<br><a href="curl_easy_escape.html">curl_easy_escape</A>
<br><a href="curl_easy_getinfo.html">curl_easy_getinfo</A>
<br><a href="curl_easy_init.html">curl_easy_init</A>
<br><a href="curl_easy_pause.html">curl_easy_pause</A>
<br><a href="curl_easy_perform.html">curl_easy_perform</A>
<br><a href="curl_easy_recv.html">curl_easy_recv</A>
<br><a href="curl_easy_reset.html">curl_easy_reset</A>
<br><a href="curl_easy_send.html">curl_easy_send</A>
<br><a href="curl_easy_setopt.html">curl_easy_setopt</A>
<br><a href="curl_easy_strerror.html">curl_easy_strerror</A>
<br><a href="curl_easy_unescape.html">curl_easy_unescape</A>
<br><a href="curl_escape.html">curl_escape</A> (deprecated)
<br><a href="curl_formadd.html">curl_formadd</A>
<br><a href="curl_formfree.html">curl_formfree</A>
<br><a href="curl_formget.html">curl_formget</A>
<br><a href="curl_free.html">curl_free</A>
<br><a href="curl_getdate.html">curl_getdate</A>
<br><a href="curl_getenv.html">curl_getenv</A> (deprecated)
<br><a href="curl_global_cleanup.html">curl_global_cleanup</A>
<br><a href="curl_global_init.html">curl_global_init</A>
<br><a href="curl_global_init_mem.html">curl_global_init_mem</A>
<br><a href="curl_mprintf.html">curl_mprintf</A> (deprecated)
<br><a href="curl_multi_add_handle.html">curl_multi_add_handle</a>
<br><a href="curl_multi_assign.html">curl_multi_assign</a>
<br><a href="curl_multi_cleanup.html">curl_multi_cleanup</a>
<br><a href="curl_multi_fdset.html">curl_multi_fdset</a>
<br><a href="curl_multi_info_read.html">curl_multi_info_read</a>
<br><a href="curl_multi_init.html">curl_multi_init</a>
<br><a href="curl_multi_perform.html">curl_multi_perform</a>
<br><a href="curl_multi_remove_handle.html">curl_multi_remove_handle</a>
<br><a href="curl_multi_setopt.html">curl_multi_setopt</a>
<br><a href="curl_multi_socket.html">curl_multi_socket</a> (deprecated)
<br><a href="curl_multi_socket_action.html">curl_multi_socket_action</a>
<br><a href="curl_multi_strerror.html">curl_multi_strerror</a>
<br><a href="curl_multi_timeout.html">curl_multi_timeout</a> (deprecated)
<br><a href="curl_share_cleanup.html">curl_share_cleanup</A>
<br><a href="curl_share_init.html">curl_share_init</A>
<br><a href="curl_share_setopt.html">curl_share_setopt</A>
<br><a href="curl_share_strerror.html">curl_share_strerror</a>
<br><a href="curl_slist_append.html">curl_slist_append</A>
<br><a href="curl_slist_free_all.html">curl_slist_free_all</A>
<br><a href="curl_strequal.html">curl_strequal and curl_strnequal</A>
<br><a href="curl_unescape.html">curl_unescape</A> (deprecated)
<br><a href="curl_version.html">curl_version</A>
<br><a href="curl_version_info.html">curl_version_info</A>

</body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































Changes to jni/curl/docs/libcurl/libcurl-easy.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl 3 "February 03, 2016" "libcurl 7.59.0" "libcurl easy interface"

.SH NAME
libcurl-easy \- easy interface overview
.SH DESCRIPTION
When using libcurl's "easy" interface you init your session and get a handle
(often referred to as an "easy handle"), which you use as input to the easy
interface functions you use. Use \fIcurl_easy_init(3)\fP to get the handle.







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl 3 "February 03, 2016" "libcurl 7.60.0" "libcurl easy interface"

.SH NAME
libcurl-easy \- easy interface overview
.SH DESCRIPTION
When using libcurl's "easy" interface you init your session and get a handle
(often referred to as an "easy handle"), which you use as input to the easy
interface functions you use. Use \fIcurl_easy_init(3)\fP to get the handle.
Changes to jni/curl/docs/libcurl/libcurl-env.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl-env 3 "January 24, 2018" "libcurl 7.59.0" "libcurl environment variables"

.SH NAME
libcurl-env \- environment variables libcurl understands
.SH DESCRIPTION
libcurl reads and understands a set of environment variables that if set will
control and change behaviors. This is the full list of variables to set and
description of what they do. Also note that curl, the command line tool,







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl-env 3 "April 17, 2018" "libcurl 7.60.0" "libcurl environment variables"

.SH NAME
libcurl-env \- environment variables libcurl understands
.SH DESCRIPTION
libcurl reads and understands a set of environment variables that if set will
control and change behaviors. This is the full list of variables to set and
description of what they do. Also note that curl, the command line tool,
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.IP SSL_DIR
When libcurl runs with the NSS backends for TLS features, this variable is
used to find the directory for NSS PKI database instead of the built-in.
.IP USER
User name to use when invoking the ntlm-wb tool, if NTLMUSER and LOGNAME
weren't set.
.SH "Debug Variables"
There's a set of variables only recognized and used if libcurl was buillt
"debug enabled", which should never be true for a library used in production.
.IP "CURL_GETHOSTNAME"
Debug-only variable.
.IP "CURL_FORCETIME"
Debug-only variable.
.IP "CURL_ENTROPY"
Debug-only variable. Used to set a fixed faked value to use instead of a







|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.IP SSL_DIR
When libcurl runs with the NSS backends for TLS features, this variable is
used to find the directory for NSS PKI database instead of the built-in.
.IP USER
User name to use when invoking the ntlm-wb tool, if NTLMUSER and LOGNAME
weren't set.
.SH "Debug Variables"
There's a set of variables only recognized and used if libcurl was built
"debug enabled", which should never be true for a library used in production.
.IP "CURL_GETHOSTNAME"
Debug-only variable.
.IP "CURL_FORCETIME"
Debug-only variable.
.IP "CURL_ENTROPY"
Debug-only variable. Used to set a fixed faked value to use instead of a
Changes to jni/curl/docs/libcurl/libcurl-errors.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-errors 3 "February 10, 2018" "libcurl 7.59.0" "libcurl errors"

.SH NAME
libcurl-errors \- error codes in libcurl
.SH DESCRIPTION
This man page includes most, if not all, available error codes in libcurl.
Why they occur and possibly what you can do to fix the problem are also included.
.SH "CURLcode"







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-errors 3 "February 10, 2018" "libcurl 7.60.0" "libcurl errors"

.SH NAME
libcurl-errors \- error codes in libcurl
.SH DESCRIPTION
This man page includes most, if not all, available error codes in libcurl.
Why they occur and possibly what you can do to fix the problem are also included.
.SH "CURLcode"
Changes to jni/curl/docs/libcurl/libcurl-multi.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-multi 3 "June 07, 2017" "libcurl 7.59.0" "libcurl multi interface"

.SH NAME
libcurl-multi \- how to use the multi interface
.SH DESCRIPTION
This is an overview on how to use the libcurl multi interface in your C
programs. There are specific man pages for each function mentioned in
here. There's also the \fIlibcurl-tutorial(3)\fP man page for a complete







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-multi 3 "June 07, 2017" "libcurl 7.60.0" "libcurl multi interface"

.SH NAME
libcurl-multi \- how to use the multi interface
.SH DESCRIPTION
This is an overview on how to use the libcurl multi interface in your C
programs. There are specific man pages for each function mentioned in
here. There's also the \fIlibcurl-tutorial(3)\fP man page for a complete
Changes to jni/curl/docs/libcurl/libcurl-security.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-security 3 "February 13, 2018" "libcurl 7.59.0" "libcurl security"

.SH NAME
libcurl-security \- security considerations when using libcurl
.SH "Security"
The libcurl project takes security seriously.  The library is written with
caution and precautions are taken to mitigate many kinds of risks encountered
while operating with potentially malicious servers on the Internet. It is a







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-security 3 "April 17, 2018" "libcurl 7.60.0" "libcurl security"

.SH NAME
libcurl-security \- security considerations when using libcurl
.SH "Security"
The libcurl project takes security seriously.  The library is written with
caution and precautions are taken to mitigate many kinds of risks encountered
while operating with potentially malicious servers on the Internet. It is a
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
first glance, but they very easily "deciphered" by anyone within seconds.

To avoid this problem, use an authentication mechanism or other protocol that
doesn't let snoopers see your password: Digest, CRAM-MD5, Kerberos, SPNEGO or
NTLM authentication. Or even better: use authenticated protocols that protect
the entire connection and everything sent over it.
.SH "Un-authenticated Connections"
Protocols that don't have any form of cryptographic authentication can not
with any certainty know that they communicate with the right remote server.

If your application is using a fixed scheme or fixed host name, it is not safe
as long as the connection is un-authenticated. There can be a
man-in-the-middle or in fact the whole server might have been replaced by an
evil actor.








|







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
first glance, but they very easily "deciphered" by anyone within seconds.

To avoid this problem, use an authentication mechanism or other protocol that
doesn't let snoopers see your password: Digest, CRAM-MD5, Kerberos, SPNEGO or
NTLM authentication. Or even better: use authenticated protocols that protect
the entire connection and everything sent over it.
.SH "Un-authenticated Connections"
Protocols that don't have any form of cryptographic authentication cannot
with any certainty know that they communicate with the right remote server.

If your application is using a fixed scheme or fixed host name, it is not safe
as long as the connection is un-authenticated. There can be a
man-in-the-middle or in fact the whole server might have been replaced by an
evil actor.

Changes to jni/curl/docs/libcurl/libcurl-share.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl-share 3 "November 27, 2017" "libcurl 7.59.0" "libcurl share interface"

.SH NAME
libcurl-share \- how to use the share interface
.SH DESCRIPTION
This is an overview on how to use the libcurl share interface in your C
programs. There are specific man pages for each function mentioned in
here.







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl-share 3 "November 27, 2017" "libcurl 7.60.0" "libcurl share interface"

.SH NAME
libcurl-share \- how to use the share interface
.SH DESCRIPTION
This is an overview on how to use the libcurl share interface in your C
programs. There are specific man pages for each function mentioned in
here.
Changes to jni/curl/docs/libcurl/libcurl-symbols.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl-symbols 3 "mar 14, 2018" "libcurl 7.41.0" "libcurl symbols"
.SH NAME
libcurl-symbols \- libcurl symbol version information
.SH "libcurl symbols"
This man page details version information for public symbols provided in the
libcurl header files. This lists the first version in which the symbol was
introduced and for some symbols two additional information pieces:








|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl-symbols 3 "maj 16, 2018" "libcurl 7.41.0" "libcurl symbols"
.SH NAME
libcurl-symbols \- libcurl symbol version information
.SH "libcurl symbols"
This man page details version information for public symbols provided in the
libcurl header files. This lists the first version in which the symbol was
introduced and for some symbols two additional information pieces:

809
810
811
812
813
814
815


816
817
818
819
820
821
822
Introduced in 7.33.0
.IP CURLOPT_DNS_LOCAL_IP4
Introduced in 7.33.0
.IP CURLOPT_DNS_LOCAL_IP6
Introduced in 7.33.0
.IP CURLOPT_DNS_SERVERS
Introduced in 7.24.0


.IP CURLOPT_DNS_USE_GLOBAL_CACHE
Introduced in 7.9.3
Deprecated since 7.11.1
.IP CURLOPT_EGDSOCKET
Introduced in 7.7
.IP CURLOPT_ENCODING
Introduced in 7.10







>
>







809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
Introduced in 7.33.0
.IP CURLOPT_DNS_LOCAL_IP4
Introduced in 7.33.0
.IP CURLOPT_DNS_LOCAL_IP6
Introduced in 7.33.0
.IP CURLOPT_DNS_SERVERS
Introduced in 7.24.0
.IP CURLOPT_DNS_SHUFFLE_ADDRESSES
Introduced in 7.60.0
.IP CURLOPT_DNS_USE_GLOBAL_CACHE
Introduced in 7.9.3
Deprecated since 7.11.1
.IP CURLOPT_EGDSOCKET
Introduced in 7.7
.IP CURLOPT_ENCODING
Introduced in 7.10
878
879
880
881
882
883
884


885
886
887
888
889
890
891
Introduced in 7.9.2
.IP CURLOPT_FTP_USE_PRET
Introduced in 7.20.0
.IP CURLOPT_GSSAPI_DELEGATION
Introduced in 7.22.0
.IP CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
Introduced in 7.59.0


.IP CURLOPT_HEADER
Introduced in 7.1
.IP CURLOPT_HEADERDATA
Introduced in 7.10
.IP CURLOPT_HEADERFUNCTION
Introduced in 7.7.2
.IP CURLOPT_HEADEROPT







>
>







880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
Introduced in 7.9.2
.IP CURLOPT_FTP_USE_PRET
Introduced in 7.20.0
.IP CURLOPT_GSSAPI_DELEGATION
Introduced in 7.22.0
.IP CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS
Introduced in 7.59.0
.IP CURLOPT_HAPROXYPROTOCOL
Introduced in 7.60.0
.IP CURLOPT_HEADER
Introduced in 7.1
.IP CURLOPT_HEADERDATA
Introduced in 7.10
.IP CURLOPT_HEADERFUNCTION
Introduced in 7.7.2
.IP CURLOPT_HEADEROPT
Changes to jni/curl/docs/libcurl/libcurl-thread.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-thread 3 "August 08, 2017" "libcurl 7.59.0" "libcurl thread safety"

.SH NAME
libcurl-thread \- libcurl thread safety
.SH "Multi-threading with libcurl"
libcurl is thread safe but has no internal thread synchronization. You may have
to provide your own locking should you meet any of the thread safety exceptions
below.







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-thread 3 "August 08, 2017" "libcurl 7.60.0" "libcurl thread safety"

.SH NAME
libcurl-thread \- libcurl thread safety
.SH "Multi-threading with libcurl"
libcurl is thread safe but has no internal thread synchronization. You may have
to provide your own locking should you meet any of the thread safety exceptions
below.
Changes to jni/curl/docs/libcurl/libcurl-tutorial.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-tutorial 3 "February 23, 2018" "libcurl 7.59.0" "libcurl programming"

.SH NAME
libcurl-tutorial \- libcurl programming tutorial
.SH "Objective"
This document attempts to describe the general principles and some basic
approaches to consider when programming with libcurl. The text will focus
mainly on the C interface but might apply fairly well on other interfaces as







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH libcurl-tutorial 3 "April 17, 2018" "libcurl 7.60.0" "libcurl programming"

.SH NAME
libcurl-tutorial \- libcurl programming tutorial
.SH "Objective"
This document attempts to describe the general principles and some basic
approaches to consider when programming with libcurl. The text will focus
mainly on the C interface but might apply fairly well on other interfaces as
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
Getting some in-depth knowledge about the protocols involved is never wrong,
and if you're trying to do funny things, you might very well understand
libcurl and how to use it better if you study the appropriate RFC documents
at least briefly.

.SH "Upload Data to a Remote Site"
libcurl tries to keep a protocol independent approach to most transfers, thus
uploading to a remote FTP site is very similar to uploading data to a HTTP
server with a PUT request.

Of course, first you either create an easy handle or you re-use one existing
one. Then you set the URL to operate on just like before. This is the remote
URL, that we now will upload.

Since we write an application, we most likely want libcurl to get the upload







|







287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
Getting some in-depth knowledge about the protocols involved is never wrong,
and if you're trying to do funny things, you might very well understand
libcurl and how to use it better if you study the appropriate RFC documents
at least briefly.

.SH "Upload Data to a Remote Site"
libcurl tries to keep a protocol independent approach to most transfers, thus
uploading to a remote FTP site is very similar to uploading data to an HTTP
server with a PUT request.

Of course, first you either create an easy handle or you re-use one existing
one. Then you set the URL to operate on just like before. This is the remote
URL, that we now will upload.

Since we write an application, we most likely want libcurl to get the upload
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528

 /* free the post data again */
 curl_mime_free(multipart);
.fi

To post multiple files for a single form field, you must supply each file in
a separate part, all with the same field name. Although function
\fIcurl_mime_subparts(3)\fP implements nested muti-parts, this way of
multiple files posting is deprecated by RFC 7578, chapter 4.3.

To set the data source from an already opened FILE pointer, use:

.nf
 curl_mime_data_cb(part, filesize, (curl_read_callback) fread,
                   (curl_seek_callback) fseek, NULL, filepointer);







|







514
515
516
517
518
519
520
521
522
523
524
525
526
527
528

 /* free the post data again */
 curl_mime_free(multipart);
.fi

To post multiple files for a single form field, you must supply each file in
a separate part, all with the same field name. Although function
\fIcurl_mime_subparts(3)\fP implements nested multi-parts, this way of
multiple files posting is deprecated by RFC 7578, chapter 4.3.

To set the data source from an already opened FILE pointer, use:

.nf
 curl_mime_data_cb(part, filesize, (curl_read_callback) fread,
                   (curl_seek_callback) fseek, NULL, filepointer);
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
libcurl supports SOCKS and HTTP proxies. When a given URL is wanted, libcurl
will ask the proxy for it instead of trying to connect to the actual host
identified in the URL.

If you're using a SOCKS proxy, you may find that libcurl doesn't quite support
all operations through it.

For HTTP proxies: the fact that the proxy is a HTTP proxy puts certain
restrictions on what can actually happen. A requested URL that might not be a
HTTP URL will be still be passed to the HTTP proxy to deliver back to
libcurl. This happens transparently, and an application may not need to
know. I say "may", because at times it is very important to understand that
all operations over a HTTP proxy use the HTTP protocol. For example, you
can't invoke your own custom FTP commands or even proper FTP directory
listings.

.IP "Proxy Options"

To tell libcurl to use a proxy at a given port number:

 curl_easy_setopt(easyhandle, CURLOPT_PROXY, "proxy-host.com:8080");

Some proxies require user authentication before allowing a request, and you
pass that information similar to this:

 curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "user:password");

If you want to, you can specify the host name only in the
\fICURLOPT_PROXY(3)\fP option, and set the port number separately with
\fICURLOPT_PROXYPORT(3)\fP.

Tell libcurl what kind of proxy it is with \fICURLOPT_PROXYTYPE(3)\fP (if not,
it will default to assume a HTTP proxy):

 curl_easy_setopt(easyhandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);

.IP "Environment Variables"

libcurl automatically checks and uses a set of environment variables to know
what proxies to use for certain protocols. The names of the variables are







|




|



















|







788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
libcurl supports SOCKS and HTTP proxies. When a given URL is wanted, libcurl
will ask the proxy for it instead of trying to connect to the actual host
identified in the URL.

If you're using a SOCKS proxy, you may find that libcurl doesn't quite support
all operations through it.

For HTTP proxies: the fact that the proxy is an HTTP proxy puts certain
restrictions on what can actually happen. A requested URL that might not be a
HTTP URL will be still be passed to the HTTP proxy to deliver back to
libcurl. This happens transparently, and an application may not need to
know. I say "may", because at times it is very important to understand that
all operations over an HTTP proxy use the HTTP protocol. For example, you
can't invoke your own custom FTP commands or even proper FTP directory
listings.

.IP "Proxy Options"

To tell libcurl to use a proxy at a given port number:

 curl_easy_setopt(easyhandle, CURLOPT_PROXY, "proxy-host.com:8080");

Some proxies require user authentication before allowing a request, and you
pass that information similar to this:

 curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "user:password");

If you want to, you can specify the host name only in the
\fICURLOPT_PROXY(3)\fP option, and set the port number separately with
\fICURLOPT_PROXYPORT(3)\fP.

Tell libcurl what kind of proxy it is with \fICURLOPT_PROXYTYPE(3)\fP (if not,
it will default to assume an HTTP proxy):

 curl_easy_setopt(easyhandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);

.IP "Environment Variables"

libcurl automatically checks and uses a set of environment variables to know
what proxies to use for certain protocols. The names of the variables are
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
variables, set the proxy name to "" - an empty string - with
\fICURLOPT_PROXY(3)\fP.
.IP "SSL and Proxies"

SSL is for secure point-to-point connections. This involves strong encryption
and similar things, which effectively makes it impossible for a proxy to
operate as a "man in between" which the proxy's task is, as previously
discussed. Instead, the only way to have SSL work over a HTTP proxy is to ask
the proxy to tunnel trough everything without being able to check or fiddle
with the traffic.

Opening an SSL connection over a HTTP proxy is therefore a matter of asking the
proxy for a straight connection to the target host on a specified port. This
is made with the HTTP request CONNECT. ("please mr proxy, connect me to that
remote host").

Because of the nature of this operation, where the proxy has no idea what kind
of data that is passed in and out through this tunnel, this breaks some of the
very few advantages that come from using a proxy, such as caching.  Many
organizations prevent this kind of tunneling to other destination port numbers
than 443 (which is the default HTTPS port number).

.IP "Tunneling Through Proxy"
As explained above, tunneling is required for SSL to work and often even
restricted to the operation intended for SSL; HTTPS.

This is however not the only time proxy-tunneling might offer benefits to
you or your application.

As tunneling opens a direct connection from your application to the remote
machine, it suddenly also re-introduces the ability to do non-HTTP
operations over a HTTP proxy. You can in fact use things such as FTP
upload or FTP custom commands this way.

Again, this is often prevented by the administrators of proxies and is
rarely allowed.

Tell libcurl to use proxy tunneling like this:








|



|



















|







849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
variables, set the proxy name to "" - an empty string - with
\fICURLOPT_PROXY(3)\fP.
.IP "SSL and Proxies"

SSL is for secure point-to-point connections. This involves strong encryption
and similar things, which effectively makes it impossible for a proxy to
operate as a "man in between" which the proxy's task is, as previously
discussed. Instead, the only way to have SSL work over an HTTP proxy is to ask
the proxy to tunnel trough everything without being able to check or fiddle
with the traffic.

Opening an SSL connection over an HTTP proxy is therefore a matter of asking the
proxy for a straight connection to the target host on a specified port. This
is made with the HTTP request CONNECT. ("please mr proxy, connect me to that
remote host").

Because of the nature of this operation, where the proxy has no idea what kind
of data that is passed in and out through this tunnel, this breaks some of the
very few advantages that come from using a proxy, such as caching.  Many
organizations prevent this kind of tunneling to other destination port numbers
than 443 (which is the default HTTPS port number).

.IP "Tunneling Through Proxy"
As explained above, tunneling is required for SSL to work and often even
restricted to the operation intended for SSL; HTTPS.

This is however not the only time proxy-tunneling might offer benefits to
you or your application.

As tunneling opens a direct connection from your application to the remote
machine, it suddenly also re-introduces the ability to do non-HTTP
operations over an HTTP proxy. You can in fact use things such as FTP
upload or FTP custom commands this way.

Again, this is often prevented by the administrators of proxies and is
rarely allowed.

Tell libcurl to use proxy tunneling like this:

1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
 curl_easy_setopt(easyhandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);

.IP "FTP Custom Commands"

Not all protocols are HTTP-like, and thus the above may not help you when
you want to make, for example, your FTP transfers to behave differently.

Sending custom commands to a FTP server means that you need to send the
commands exactly as the FTP server expects them (RFC959 is a good guide
here), and you can only use commands that work on the control-connection
alone. All kinds of commands that require data interchange and thus need
a data-connection must be left to libcurl's own judgement. Also be aware
that libcurl will do its very best to change directory to the target
directory before doing any transfer, so if you change directory (with CWD
or similar) you might confuse libcurl and then it might not attempt to







|







1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
 curl_easy_setopt(easyhandle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);

.IP "FTP Custom Commands"

Not all protocols are HTTP-like, and thus the above may not help you when
you want to make, for example, your FTP transfers to behave differently.

Sending custom commands to an FTP server means that you need to send the
commands exactly as the FTP server expects them (RFC959 is a good guide
here), and you can only use commands that work on the control-connection
alone. All kinds of commands that require data interchange and thus need
a data-connection must be left to libcurl's own judgement. Also be aware
that libcurl will do its very best to change directory to the target
directory before doing any transfer, so if you change directory (with CWD
or similar) you might confuse libcurl and then it might not attempt to
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
will be in "HTTP-style", looking like they do in HTTP.

The option to enable headers or to run custom FTP commands may be useful to
combine with \fICURLOPT_NOBODY(3)\fP. If this option is set, no actual file
content transfer will be performed.

.IP "FTP Custom CUSTOMREQUEST"
If you do want to list the contents of a FTP directory using your own defined
FTP command, \fICURLOPT_CUSTOMREQUEST(3)\fP will do just that. "NLST" is the
default one for listing directories but you're free to pass in your idea of a
good alternative.

.SH "Cookies Without Chocolate Chips"
In the HTTP sense, a cookie is a name with an associated value. A server sends
the name and value to the client, and expects it to get sent back on every







|







1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
will be in "HTTP-style", looking like they do in HTTP.

The option to enable headers or to run custom FTP commands may be useful to
combine with \fICURLOPT_NOBODY(3)\fP. If this option is set, no actual file
content transfer will be performed.

.IP "FTP Custom CUSTOMREQUEST"
If you do want to list the contents of an FTP directory using your own defined
FTP command, \fICURLOPT_CUSTOMREQUEST(3)\fP will do just that. "NLST" is the
default one for listing directories but you're free to pass in your idea of a
good alternative.

.SH "Cookies Without Chocolate Chips"
In the HTTP sense, a cookie is a name with an associated value. A server sends
the name and value to the client, and expects it to get sent back on every
Changes to jni/curl/docs/libcurl/libcurl.3.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl 3 "July 15, 2017" "libcurl 7.59.0" "libcurl overview"

.SH NAME
libcurl \- client-side URL transfers
.SH DESCRIPTION
This is a short overview on how to use libcurl in your C programs. There are
specific man pages for each function mentioned in here. There are also the
\fIlibcurl-easy(3)\fP man page, the \fIlibcurl-multi(3)\fP man page, the







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.TH libcurl 3 "July 15, 2017" "libcurl 7.60.0" "libcurl overview"

.SH NAME
libcurl \- client-side URL transfers
.SH DESCRIPTION
This is a short overview on how to use libcurl in your C programs. There are
specific man pages for each function mentioned in here. There are also the
\fIlibcurl-easy(3)\fP man page, the \fIlibcurl-multi(3)\fP man page, the
Changes to jni/curl/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_ACTIVESOCKET 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_ACTIVESOCKET \- get the active socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_ACTIVESOCKET,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_ACTIVESOCKET 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_ACTIVESOCKET \- get the active socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_ACTIVESOCKET,
Changes to jni/curl/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_APPCONNECT_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_APPCONNECT_TIME \- get the time until the SSL/SSH handshake is completed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_APPCONNECT_TIME, double *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_APPCONNECT_TIME 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_APPCONNECT_TIME \- get the time until the SSL/SSH handshake is completed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_APPCONNECT_TIME, double *timep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_CERTINFO.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CERTINFO 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CERTINFO \- get the TLS certificate chain
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CERTINFO,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CERTINFO 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CERTINFO \- get the TLS certificate chain
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CERTINFO,
Changes to jni/curl/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONDITION_UNMET 3 "February 23, 2018" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONDITION_UNMET \- get info on unmet time conditional
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONDITION_UNMET, long *unmet);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONDITION_UNMET 3 "February 23, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONDITION_UNMET \- get info on unmet time conditional
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONDITION_UNMET, long *unmet);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONNECT_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONNECT_TIME \- get the time until connect
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONNECT_TIME, double *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONNECT_TIME 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONNECT_TIME \- get the time until connect
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONNECT_TIME, double *timep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_LENGTH_DOWNLOAD \- get content-length of download
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "June 15, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_LENGTH_DOWNLOAD \- get content-length of download
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD,
Changes to jni/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T \- get content-length of download
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T \- get content-length of download
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
  res = curl_easy_perform(curl);

  if(!res) {
    /* check the size */
    curl_off_t cl;
    res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
    if(!res) {
      printf("Size: " CURL_FORMAT_CURL_OFF_T "\\n", cl);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_CONTENT_LENGTH_UPLOAD_T "(3), "







|











45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
  res = curl_easy_perform(curl);

  if(!res) {
    /* check the size */
    curl_off_t cl;
    res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
    if(!res) {
      printf("Download size: %" CURL_FORMAT_CURL_OFF_T "\\n", cl);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_CONTENT_LENGTH_UPLOAD_T "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_LENGTH_UPLOAD \- get the specified size of the upload
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "June 15, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_LENGTH_UPLOAD \- get the specified size of the upload
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD,
Changes to jni/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_UPLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_LENGTH_UPLOAD_T \- get the specified size of the upload
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD_T,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_LENGTH_UPLOAD_T 3 "March 31, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_LENGTH_UPLOAD_T \- get the specified size of the upload
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD_T,
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  res = curl_easy_perform(curl);

  if(!res) {
    /* check the size */
    curl_off_t cl;
    res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
    if(!res) {
      printf("Size: " CURL_FORMAT_CURL_OFF_T "\\n", cl);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_CONTENT_LENGTH_DOWNLOAD_T "(3), "







|











44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  res = curl_easy_perform(curl);

  if(!res) {
    /* check the size */
    curl_off_t cl;
    res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
    if(!res) {
      printf("Upload size: %" CURL_FORMAT_CURL_OFF_T "\\n", cl);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_CONTENT_LENGTH_DOWNLOAD_T "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_TYPE 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_TYPE \- get Content-Type
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_TYPE, char **ct);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_CONTENT_TYPE 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_CONTENT_TYPE \- get Content-Type
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_TYPE, char **ct);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_COOKIELIST.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_COOKIELIST 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_COOKIELIST \- get all known cookies
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_COOKIELIST,







|














|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_COOKIELIST 3 "March 20, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_COOKIELIST \- get all known cookies
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_COOKIELIST,
53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
68
69

  if(!res) {
    /* extract all known cookies */
    struct curl_slist *cookies = NULL;
    res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
    if(!res && cookies) {
      /* a linked list of cookies in cookie file format */

      while(cookies) {
        printf("%s", cookies->data);
        cookies = cookies->next;
      }
      /* we must free these cookies when we're done */
      curl_slist_free_all(cookies);
    }
  }
  curl_easy_cleanup(curl);
}







>
|
|
|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

  if(!res) {
    /* extract all known cookies */
    struct curl_slist *cookies = NULL;
    res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
    if(!res && cookies) {
      /* a linked list of cookies in cookie file format */
      struct curl_slist *each = cookies;
      while(each) {
        printf("%s", each->data);
        each = each->next;
      }
      /* we must free these cookies when we're done */
      curl_slist_free_all(cookies);
    }
  }
  curl_easy_cleanup(curl);
}
Changes to jni/curl/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_EFFECTIVE_URL 3 "May 04, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_EFFECTIVE_URL \- get the last used URL
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_EFFECTIVE_URL, char **urlp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_EFFECTIVE_URL 3 "May 04, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_EFFECTIVE_URL \- get the last used URL
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_EFFECTIVE_URL, char **urlp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_FILETIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_FILETIME \- get the remote time of the retrieved document
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME, long *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_FILETIME \- get the remote time of the retrieved document
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME, long *timep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_FILETIME_T.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_FILETIME_T \- get the remote time of the retrieved document
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME_T, curl_off_t *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_FILETIME 3 "January 25, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_FILETIME_T \- get the remote time of the retrieved document
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME_T, curl_off_t *timep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_FTP_ENTRY_PATH 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_FTP_ENTRY_PATH \- get entry path in FTP server
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FTP_ENTRY_PATH, char **path);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_FTP_ENTRY_PATH 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_FTP_ENTRY_PATH \- get entry path in FTP server
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FTP_ENTRY_PATH, char **path);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HEADER_SIZE 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_HEADER_SIZE \- get size of retrieved headers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HEADER_SIZE, long *sizep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HEADER_SIZE 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_HEADER_SIZE \- get size of retrieved headers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HEADER_SIZE, long *sizep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HTTPAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_HTTPAUTH_AVAIL \- get available HTTP authentication methods
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTPAUTH_AVAIL, long *authp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HTTPAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_HTTPAUTH_AVAIL \- get available HTTP authentication methods
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTPAUTH_AVAIL, long *authp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HTTP_CONNECTCODE 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_HTTP_CONNECTCODE \- get the CONNECT response code
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_CONNECTCODE, long *p);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HTTP_CONNECTCODE 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_HTTP_CONNECTCODE \- get the CONNECT response code
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_CONNECTCODE, long *p);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HTTP_VERSION 3 "May 11, 2016" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_HTTP_VERSION \- get the http version used in the connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_VERSION, long *p);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_HTTP_VERSION 3 "May 11, 2016" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_HTTP_VERSION \- get the http version used in the connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_VERSION, long *p);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_LASTSOCKET.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LASTSOCKET 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_LASTSOCKET \- get the last socket used
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LASTSOCKET, long *socket);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LASTSOCKET 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_LASTSOCKET \- get the last socket used
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LASTSOCKET, long *socket);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_LOCAL_IP.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LOCAL_IP 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_LOCAL_IP \- get local IP address of last connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_IP, char **ip);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LOCAL_IP 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_LOCAL_IP \- get local IP address of last connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_IP, char **ip);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LOCAL_PORT 3 "March 16, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_LOCAL_PORT \- get the latest local port number
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_PORT, long *portp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_LOCAL_PORT 3 "March 16, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_LOCAL_PORT \- get the latest local port number
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_PORT, long *portp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_NAMELOOKUP_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_NAMELOOKUP_TIME \- get the name lookup time
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NAMELOOKUP_TIME, double *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_NAMELOOKUP_TIME 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_NAMELOOKUP_TIME \- get the name lookup time
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NAMELOOKUP_TIME, double *timep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_NUM_CONNECTS 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_NUM_CONNECTS \- get number of created connections
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NUM_CONNECTS, long *nump);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_NUM_CONNECTS 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_NUM_CONNECTS \- get number of created connections
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NUM_CONNECTS, long *nump);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_OS_ERRNO.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_OS_ERRNO 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_OS_ERRNO \- get errno number from last connect failure
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_OS_ERRNO, long *errnop);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_OS_ERRNO 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_OS_ERRNO \- get errno number from last connect failure
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_OS_ERRNO, long *errnop);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRETRANSFER_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PRETRANSFER_TIME \- get the time until the file transfer start
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRETRANSFER_TIME, double *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRETRANSFER_TIME 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PRETRANSFER_TIME \- get the time until the file transfer start
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRETRANSFER_TIME, double *timep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIMARY_IP 3 "March 22, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PRIMARY_IP \- get IP address of last connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_IP, char **ip);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIMARY_IP 3 "March 22, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PRIMARY_IP \- get IP address of last connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_IP, char **ip);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIMARY_PORT 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PRIMARY_PORT \- get the latest destination port number
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_PORT, long *portp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIMARY_PORT 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PRIMARY_PORT \- get the latest destination port number
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_PORT, long *portp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_PRIVATE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIVATE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PRIVATE \- get the private pointer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIVATE, char **private);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PRIVATE 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PRIVATE \- get the private pointer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIVATE, char **private);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_PROTOCOL.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33









34
35
36
37
38
39
40
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PROTOCOL 3 "November 23, 2016" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PROTOCOL \- get the protocol used in the connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROTOCOL, long *p);
.SH DESCRIPTION
Pass a pointer to a long to receive the version used in the last http connection.
The returned value will be one of the CURLPROTO_* values.









.SH PROTOCOLS
All
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode res;







|














|








|
|
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PROTOCOL 3 "April 27, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PROTOCOL \- get the protocol used in the connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROTOCOL, long *p);
.SH DESCRIPTION
Pass a pointer to a long to receive the version used in the last http
connection.  The returned value will be exactly one of the CURLPROTO_* values:

.nf
CURLPROTO_DICT, CURLPROTO_FILE, CURLPROTO_FTP, CURLPROTO_FTPS,
CURLPROTO_GOPHER, CURLPROTO_HTTP, CURLPROTO_HTTPS, CURLPROTO_IMAP,
CURLPROTO_IMAPS, CURLPROTO_LDAP, CURLPROTO_LDAPS, CURLPROTO_POP3,
CURLPROTO_POP3S, CURLPROTO_RTMP, CURLPROTO_RTMPE, CURLPROTO_RTMPS,
CURLPROTO_RTMPT, CURLPROTO_RTMPTE, CURLPROTO_RTMPTS, CURLPROTO_RTSP,
CURLPROTO_SCP, CURLPROTO_SFTP, CURLPROTO_SMB, CURLPROTO_SMBS, CURLPROTO_SMTP,
CURLPROTO_SMTPS, CURLPROTO_TELNET, CURLPROTO_TFTP
.SH PROTOCOLS
All
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode res;
Changes to jni/curl/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PROXYAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PROXYAUTH_AVAIL \- get available HTTP proxy authentication methods
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXYAUTH_AVAIL, long *authp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PROXYAUTH_AVAIL 3 "October 07, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PROXYAUTH_AVAIL \- get available HTTP proxy authentication methods
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXYAUTH_AVAIL, long *authp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PROXY_SSL_VERIFYRESULT \- get the result of the proxy certificate verification
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_SSL_VERIFYRESULT, long *result);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_PROXY_SSL_VERIFYRESULT \- get the result of the proxy certificate verification
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_SSL_VERIFYRESULT, long *result);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_COUNT 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_REDIRECT_COUNT \- get the number of redirects
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_COUNT, long *countp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_COUNT 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_REDIRECT_COUNT \- get the number of redirects
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_COUNT, long *countp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_REDIRECT_TIME \- get the time for all redirection steps
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_TIME, double *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_TIME 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_REDIRECT_TIME \- get the time for all redirection steps
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_TIME, double *timep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_URL 3 "June 24, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_REDIRECT_URL \- get the URL a redirect would go to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_URL, char **urlp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REDIRECT_URL 3 "June 24, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_REDIRECT_URL \- get the URL a redirect would go to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_URL, char **urlp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REQUEST_SIZE 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_REQUEST_SIZE \- get size of sent request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REQUEST_SIZE, long *sizep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_REQUEST_SIZE 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_REQUEST_SIZE \- get size of sent request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REQUEST_SIZE, long *sizep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RESPONSE_CODE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RESPONSE_CODE \- get the last response code
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RESPONSE_CODE, long *codep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RESPONSE_CODE 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RESPONSE_CODE \- get the last response code
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RESPONSE_CODE, long *codep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RTSP_CLIENT_CSEQ \- get the next RTSP client CSeq
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_CLIENT_CSEQ, long *cseq);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RTSP_CLIENT_CSEQ \- get the next RTSP client CSeq
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_CLIENT_CSEQ, long *cseq);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_CSEQ_RECV 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RTSP_CSEQ_RECV \- get the recently received CSeq
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_CSEQ_RECV, long *cseq);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_CSEQ_RECV 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RTSP_CSEQ_RECV \- get the recently received CSeq
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_CSEQ_RECV, long *cseq);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RTSP_SERVER_CSEQ \- get the next RTSP server CSeq
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SERVER_CSEQ, long *cseq);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RTSP_SERVER_CSEQ \- get the next RTSP server CSeq
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SERVER_CSEQ, long *cseq);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RTSP_SESSION_ID \- get RTSP session ID
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SESSION_ID, char **id);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_RTSP_SESSION_ID \- get RTSP session ID
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SESSION_ID, char **id);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SCHEME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SCHEME 3 "April 08, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SCHEME \- get the URL scheme (sometimes called protocol) used in the connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SCHEME, char **scheme);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SCHEME 3 "April 08, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SCHEME \- get the URL scheme (sometimes called protocol) used in the connection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SCHEME, char **scheme);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_DOWNLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SIZE_DOWNLOAD \- get the number of downloaded bytes
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DOWNLOAD, double *dlp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_DOWNLOAD 3 "June 15, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SIZE_DOWNLOAD \- get the number of downloaded bytes
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DOWNLOAD, double *dlp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_DOWNLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SIZE_DOWNLOAD_T \- get the number of downloaded bytes
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DOWNLOAD_T, curl_off_t *dlp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SIZE_DOWNLOAD_T \- get the number of downloaded bytes
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DOWNLOAD_T, curl_off_t *dlp);
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  res = curl_easy_perform(curl);

  if(!res) {
    /* check the size */
    curl_off_t dl;
    res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl);
    if(!res) {
      printf("Downloaded " CURL_FORMAT_CURL_OFF_T " bytes\\n", cl);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SIZE_DOWNLOAD "(3), "
.BR CURLINFO_SIZE_UPLOAD_T "(3), "







|












46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  res = curl_easy_perform(curl);

  if(!res) {
    /* check the size */
    curl_off_t dl;
    res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl);
    if(!res) {
      printf("Downloaded %" CURL_FORMAT_CURL_OFF_T " bytes\\n", dl);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SIZE_DOWNLOAD "(3), "
.BR CURLINFO_SIZE_UPLOAD_T "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_UPLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SIZE_UPLOAD \- get the number of uploaded bytes
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD, double *uploadp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_UPLOAD 3 "June 15, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SIZE_UPLOAD \- get the number of uploaded bytes
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD, double *uploadp);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_UPLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SIZE_UPLOAD_T \- get the number of uploaded bytes
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD_T, curl_off_t *uploadp);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SIZE_UPLOAD_T 3 "March 31, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SIZE_UPLOAD_T \- get the number of uploaded bytes
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD_T, curl_off_t *uploadp);
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
  /* Perform the request */
  res = curl_easy_perform(curl);

  if(!res) {
    curl_off_t ul;
    res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
    if(!res) {
      printf("Uploaded " CURL_FORMAT_CURL_OFF_T " bytes\\n", ul);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SIZE_DOWNLOAD_T "(3), " CURLINFO_SIZE_UPLOAD "(3), "







|











42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
  /* Perform the request */
  res = curl_easy_perform(curl);

  if(!res) {
    curl_off_t ul;
    res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
    if(!res) {
      printf("Uploaded %" CURL_FORMAT_CURL_OFF_T " bytes\\n", ul);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SIZE_DOWNLOAD_T "(3), " CURLINFO_SIZE_UPLOAD "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_DOWNLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SPEED_DOWNLOAD \- get download speed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD, double *speed);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_DOWNLOAD 3 "June 15, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SPEED_DOWNLOAD \- get download speed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD, double *speed);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_DOWNLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SPEED_DOWNLOAD_T \- get download speed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD_T, curl_off_t *speed);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_DOWNLOAD_T 3 "March 31, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SPEED_DOWNLOAD_T \- get download speed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD_T, curl_off_t *speed);
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
  /* Perform the request */
  res = curl_easy_perform(curl);

  if(!res) {
    curl_off_t speed;
    res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
    if(!res) {
      printf("Download speed " CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", ul);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SPEED_UPLOAD "(3), "
.BR CURLINFO_SIZE_UPLOAD_T "(3), "







|












41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
  /* Perform the request */
  res = curl_easy_perform(curl);

  if(!res) {
    curl_off_t speed;
    res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
    if(!res) {
      printf("Download speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", speed);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SPEED_UPLOAD "(3), "
.BR CURLINFO_SIZE_UPLOAD_T "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_UPLOAD 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SPEED_UPLOAD \- get upload speed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD, double *speed);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_UPLOAD 3 "June 15, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SPEED_UPLOAD \- get upload speed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD, double *speed);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_UPLOAD_T 3 "June 15, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SPEED_UPLOAD_T \- get upload speed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD_T, curl_off_t *speed);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SPEED_UPLOAD_T 3 "March 31, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SPEED_UPLOAD_T \- get upload speed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD_T, curl_off_t *speed);
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  /* Perform the request */
  res = curl_easy_perform(curl);

  if(!res) {
    curl_off_t speed;
    res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
    if(!res) {
      printf("Upload speed " CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", ul);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SPEED_DOWNLOAD_T "(3), "







|











41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  /* Perform the request */
  res = curl_easy_perform(curl);

  if(!res) {
    curl_off_t speed;
    res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
    if(!res) {
      printf("Upload speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", speed);
    }
  }
}
.fi
.SH AVAILABILITY
Added in 7.55.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
.BR CURLINFO_SPEED_DOWNLOAD_T "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SSL_ENGINES 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SSL_ENGINES \- get an slist of OpenSSL crypto-engines
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_ENGINES,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SSL_ENGINES 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SSL_ENGINES \- get an slist of OpenSSL crypto-engines
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_ENGINES,
Changes to jni/curl/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SSL_VERIFYRESULT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SSL_VERIFYRESULT \- get the result of the certificate verification
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_VERIFYRESULT, long *result);
.SH DESCRIPTION
Pass a pointer to a long to receive the result of the server SSL certificate
verification that was requested (using the \fICURLOPT_SSL_VERIFYPEER(3)\fP
option.


.SH PROTOCOLS
All using TLS
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode res;
  long verifyresult;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  res = curl_easy_perform(curl);
  curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &verifyresult);
  printf("The peer verification said %s\\n", verifyresult?
         "fine":"BAAAD");
  curl_easy_cleanup(curl);
}
.fi
.SH AVAILABILITY
Added in 7.5
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "







|














|











>
>












|




|




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_SSL_VERIFYRESULT 3 "March 21, 2018" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_SSL_VERIFYRESULT \- get the result of the certificate verification
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_VERIFYRESULT, long *result);
.SH DESCRIPTION
Pass a pointer to a long to receive the result of the server SSL certificate
verification that was requested (using the \fICURLOPT_SSL_VERIFYPEER(3)\fP
option.

0 is a positive result. Non-zero is an error.
.SH PROTOCOLS
All using TLS
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode res;
  long verifyresult;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  res = curl_easy_perform(curl);
  curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &verifyresult);
  printf("The peer verification said %s\\n", verifyresult?
         "BAAAD":"fine");
  curl_easy_cleanup(curl);
}
.fi
.SH AVAILABILITY
Added in 7.5. Only set by the OpenSSL/libressl/boringssl and NSS backends.
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR curl_easy_getinfo "(3), " curl_easy_setopt "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_STARTTRANSFER_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_STARTTRANSFER_TIME \- get the time until the first byte is received
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_STARTTRANSFER_TIME, double *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_STARTTRANSFER_TIME 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_STARTTRANSFER_TIME \- get the time until the first byte is received
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_STARTTRANSFER_TIME, double *timep);
Changes to jni/curl/docs/libcurl/opts/CURLINFO_TLS_SESSION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_TLS_SESSION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_TLS_SESSION \- get TLS session info
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_TLS_SESSION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_TLS_SESSION \- get TLS session info
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_TLS_SSL_PTR 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_TLS_SESSION, CURLINFO_TLS_SSL_PTR \- get TLS session info
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_TLS_SSL_PTR 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_TLS_SESSION, CURLINFO_TLS_SSL_PTR \- get TLS session info
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_TOTAL_TIME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_TOTAL_TIME \- get total time of previous transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TOTAL_TIME, double *timep);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLINFO_TOTAL_TIME 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_getinfo options"

.SH NAME
CURLINFO_TOTAL_TIME \- get total time of previous transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TOTAL_TIME, double *timep);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, long size);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, long size);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, long size);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, long size);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_MAXCONNECTS 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_MAXCONNECTS \- set size of connection cache
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAXCONNECTS, long max);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_MAXCONNECTS 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_MAXCONNECTS \- set size of connection cache
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAXCONNECTS, long max);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_MAX_HOST_CONNECTIONS \- set max number of connections to a single host
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_HOST_CONNECTIONS, long max);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_MAX_HOST_CONNECTIONS \- set max number of connections to a single host
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_HOST_CONNECTIONS, long max);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH, long max);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH, long max);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, long amount);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, long amount);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_PIPELINING.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PIPELINING 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PIPELINING \- enable HTTP pipelining and multiplexing
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PIPELINING 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PIPELINING \- enable HTTP pipelining and multiplexing
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long bitmask);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PIPELINING_SERVER_BL 3 "February 03, 2016" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PIPELINING_SERVER_BL \- pipelining server blacklist
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SERVER_BL, char **servers);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PIPELINING_SERVER_BL 3 "February 03, 2016" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PIPELINING_SERVER_BL \- pipelining server blacklist
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SERVER_BL, char **servers);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PIPELINING_SITE_BL 3 "February 03, 2016" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PIPELINING_SITE_BL \- pipelining host blacklist
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SITE_BL, char **hosts);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PIPELINING_SITE_BL 3 "February 03, 2016" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PIPELINING_SITE_BL \- pipelining host blacklist
.SH SYNOPSIS
#include <curl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SITE_BL, char **hosts);
Changes to jni/curl/docs/libcurl/opts/CURLMOPT_PUSHDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PUSHDATA 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PUSHDATA \- pointer to pass to push callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PUSHDATA 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PUSHDATA \- pointer to pass to push callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PUSHFUNCTION 3 "February 03, 2016" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PUSHFUNCTION \- callback that approves or denies server pushes
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_PUSHFUNCTION 3 "February 03, 2016" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_PUSHFUNCTION \- callback that approves or denies server pushes
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_SOCKETDATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_SOCKETDATA \- custom pointer passed to the socket callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_SOCKETDATA 3 "May 31, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_SOCKETDATA \- custom pointer passed to the socket callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_SOCKETFUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_SOCKETFUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLMOPT_TIMERDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_TIMERDATA 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_TIMERDATA \- custom pointer to pass to timer callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_TIMERDATA 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_TIMERDATA \- custom pointer to pass to timer callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_TIMERFUNCTION 3 "May 27, 2017" "libcurl 7.59.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLMOPT_TIMERFUNCTION 3 "May 27, 2017" "libcurl 7.60.0" "curl_multi_setopt options"

.SH NAME
CURLMOPT_TIMERFUNCTION \- set callback to receive timeout values
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "January 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ABSTRACT_UNIX_SOCKET \- set an abstract Unix domain socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ABSTRACT_UNIX_SOCKET, char *path);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "January 09, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ABSTRACT_UNIX_SOCKET \- set an abstract Unix domain socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ABSTRACT_UNIX_SOCKET, char *path);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "March 06, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "March 06, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ACCEPT_ENCODING 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ACCEPT_ENCODING \- enables automatic decompression of HTTP downloads
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);
.SH DESCRIPTION
Pass a char * argument specifying what encoding you'd like.

Sets the contents of the Accept-Encoding: header sent in a HTTP request, and
enables decoding of a response when a Content-Encoding: header is received.
Three encodings are supported: \fIidentity\fP, meaning non-compressed,
\fIdeflate\fP which requests the server to compress its response using the
zlib algorithm, and \fIgzip\fP which requests the gzip algorithm.

If a zero-length string is set like "", then an Accept-Encoding: header
containing all built-in supported encodings is sent.







|










|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ACCEPT_ENCODING 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ACCEPT_ENCODING \- enables automatic decompression of HTTP downloads
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);
.SH DESCRIPTION
Pass a char * argument specifying what encoding you'd like.

Sets the contents of the Accept-Encoding: header sent in an HTTP request, and
enables decoding of a response when a Content-Encoding: header is received.
Three encodings are supported: \fIidentity\fP, meaning non-compressed,
\fIdeflate\fP which requests the server to compress its response using the
zlib algorithm, and \fIgzip\fP which requests the gzip algorithm.

If a zero-length string is set like "", then an Accept-Encoding: header
containing all built-in supported encodings is sent.
Changes to jni/curl/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ADDRESS_SCOPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ADDRESS_SCOPE \- set scope for local IPv6 addresses
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ADDRESS_SCOPE, long scope);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ADDRESS_SCOPE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ADDRESS_SCOPE \- set scope for local IPv6 addresses
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ADDRESS_SCOPE, long scope);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_APPEND.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_APPEND 3 "March 06, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_APPEND \- enable appending to the remote file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_APPEND 3 "March 06, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_APPEND \- enable appending to the remote file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_AUTOREFERER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_AUTOREFERER 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_AUTOREFERER \- automatically update the referer header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AUTOREFERER, long autorefer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_AUTOREFERER 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_AUTOREFERER \- automatically update the referer header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AUTOREFERER, long autorefer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_BUFFERSIZE 3 "May 13, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_BUFFERSIZE \- set preferred receive buffer size
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_BUFFERSIZE, long size);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_BUFFERSIZE 3 "May 13, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_BUFFERSIZE \- set preferred receive buffer size
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_BUFFERSIZE, long size);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CAINFO.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CAINFO 3 "May 27, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CAINFO \- path to Certificate Authority (CA) bundle
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAINFO, char *path);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CAINFO 3 "March 10, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CAINFO \- path to Certificate Authority (CA) bundle
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAINFO, char *path);
48
49
50
51
52
53
54





55
56
57
58
59
60
61
about distrusted certificates.

(iOS and macOS only) If curl is built against Secure Transport, then this
option is supported for backward compatibility with other SSL engines, but it
should not be set. If the option is not set, then curl will use the
certificates in the system and user Keychain to verify the peer, which is the
preferred method of verifying the peer's certificate chain.






The application does not have to keep the string around after setting this
option.
.SH DEFAULT
Built-in system specific
.SH PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.







>
>
>
>
>







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
about distrusted certificates.

(iOS and macOS only) If curl is built against Secure Transport, then this
option is supported for backward compatibility with other SSL engines, but it
should not be set. If the option is not set, then curl will use the
certificates in the system and user Keychain to verify the peer, which is the
preferred method of verifying the peer's certificate chain.

(Schannel/WinSSL only) This option is supported for WinSSL in Windows 7 or
later with libcurl 7.60 or later. This option is supported for backward
compatibility with other SSL engines; instead it is recommended to use Windows'
store of root certificates (the default for WinSSL).

The application does not have to keep the string around after setting this
option.
.SH DEFAULT
Built-in system specific
.SH PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CAPATH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CAPATH 3 "September 10, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CAPATH \- specify directory holding CA certificates
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAPATH, char *capath);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CAPATH 3 "September 10, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CAPATH \- specify directory holding CA certificates
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAPATH, char *capath);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CERTINFO.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CERTINFO 3 "May 27, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CERTINFO \- request SSL certificate information
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CERTINFO, long certinfo);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CERTINFO 3 "May 27, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CERTINFO \- request SSL certificate information
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CERTINFO, long certinfo);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CHUNK_BGN_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcardmatch
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CHUNK_BGN_FUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CHUNK_BGN_FUNCTION \- callback before a transfer with FTP wildcardmatch
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_CHUNK_DATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CHUNK_DATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CHUNK_DATA \- custom pointer to the FTP chunk callbacks
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_DATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CHUNK_DATA 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CHUNK_DATA \- custom pointer to the FTP chunk callbacks
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CHUNK_DATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CHUNK_END_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CHUNK_END_FUNCTION \- callback after a transfer with FTP wildcardmatch
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CHUNK_END_FUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CHUNK_END_FUNCTION \- callback after a transfer with FTP wildcardmatch
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_CLOSESOCKETDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CLOSESOCKETDATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CLOSESOCKETDATA \- pointer passed to the socket close callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CLOSESOCKETDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CLOSESOCKETDATA 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CLOSESOCKETDATA \- pointer passed to the socket close callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CLOSESOCKETDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CLOSESOCKETFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CLOSESOCKETFUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CLOSESOCKETFUNCTION \- callback to socket close replacement function
.SH SYNOPSIS
#include <curl/curl.h>

int closesocket_callback(void *clientp, curl_socket_t item);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CLOSESOCKETFUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CLOSESOCKETFUNCTION \- callback to socket close replacement function
.SH SYNOPSIS
#include <curl/curl.h>

int closesocket_callback(void *clientp, curl_socket_t item);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONNECTTIMEOUT 3 "October 03, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONNECTTIMEOUT \- timeout for the connect phase
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT, long timeout);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONNECTTIMEOUT 3 "October 03, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONNECTTIMEOUT \- timeout for the connect phase
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT, long timeout);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CONNECTTIMEOUT_MS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONNECTTIMEOUT_MS 3 "September 24, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONNECTTIMEOUT_MS \- timeout for the connect phase
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT_MS, long timeout);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONNECTTIMEOUT_MS 3 "September 24, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONNECTTIMEOUT_MS \- timeout for the connect phase
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECTTIMEOUT_MS, long timeout);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CONNECT_ONLY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONNECT_ONLY 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONNECT_ONLY \- stop when connected to target server
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECT_ONLY, long only);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONNECT_ONLY 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONNECT_ONLY \- stop when connected to target server
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONNECT_ONLY, long only);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CONNECT_TO.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at http://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONNECT_TO 3 "May 20, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONNECT_TO \- Connect to a specific host and port instead of the URL's host and port
.SH SYNOPSIS
.nf
#include <curl/curl.h>












|










|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONNECT_TO 3 "May 05, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONNECT_TO \- Connect to a specific host and port instead of the URL's host and port
.SH SYNOPSIS
.nf
#include <curl/curl.h>

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
to the same multi handle.

The "connect to" host and port are ignored if they are equal to the host and
the port in the request URL, because connecting to the host and the port in
the request URL is the default behavior.

If an HTTP proxy is used for a request having a special "connect to" host or
port, and the "connect to" host or port differs from the requests's host and
port, the HTTP proxy is automatically switched to tunnel mode for this
specific request. This is necessary because it is not possible to connect to a
specific host or port in normal (non-tunnel) mode.

When this option is passed to \fIcurl_easy_setopt(3)\fP, libcurl will not copy
the entire list so you \fBmust\fP keep it around until you no longer use this
\fIhandle\fP for a transfer before you call \fIcurl_slist_free_all(3)\fP on







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
to the same multi handle.

The "connect to" host and port are ignored if they are equal to the host and
the port in the request URL, because connecting to the host and the port in
the request URL is the default behavior.

If an HTTP proxy is used for a request having a special "connect to" host or
port, and the "connect to" host or port differs from the request's host and
port, the HTTP proxy is automatically switched to tunnel mode for this
specific request. This is necessary because it is not possible to connect to a
specific host or port in normal (non-tunnel) mode.

When this option is passed to \fIcurl_easy_setopt(3)\fP, libcurl will not copy
the entire list so you \fBmust\fP keep it around until you no longer use this
\fIhandle\fP for a transfer before you call \fIcurl_slist_free_all(3)\fP on
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CONV_FROM_NETWORK_FUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONV_FROM_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONV_FROM_NETWORK_FUNCTION \- convert data from network to host encoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONV_FROM_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONV_FROM_NETWORK_FUNCTION \- convert data from network to host encoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_CONV_FROM_UTF8_FUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONV_FROM_UTF8_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONV_FROM_UTF8_FUNCTION \- convert data from UTF8 to host encoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONV_FROM_UTF8_FUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONV_FROM_UTF8_FUNCTION \- convert data from UTF8 to host encoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_CONV_TO_NETWORK_FUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONV_TO_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONV_TO_NETWORK_FUNCTION \- convert data to network from host encoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CONV_TO_NETWORK_FUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CONV_TO_NETWORK_FUNCTION \- convert data to network from host encoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_COOKIE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIE 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIE \- set contents of HTTP Cookie header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIE, char *cookie);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIE 3 "December 21, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIE \- set contents of HTTP Cookie header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIE, char *cookie);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_COOKIEFILE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIEFILE 3 "March 13, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIEFILE \- file name to read cookies from
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEFILE, char *filename);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIEFILE 3 "March 13, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIEFILE \- file name to read cookies from
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEFILE, char *filename);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_COOKIEJAR.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIEJAR 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIEJAR \- file name to store cookies to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEJAR, char *filename);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIEJAR 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIEJAR \- file name to store cookies to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIEJAR, char *filename);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_COOKIELIST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIELIST 3 "April 26, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIELIST \- add to or manipulate cookies held in memory
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIELIST 3 "April 26, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIELIST \- add to or manipulate cookies held in memory
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_COOKIESESSION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIESESSION 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIESESSION \- start a new cookie session
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIESESSION, long init);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COOKIESESSION 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COOKIESESSION \- start a new cookie session
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COOKIESESSION, long init);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COPYPOSTFIELDS 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COPYPOSTFIELDS \- have libcurl copy data to POST
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COPYPOSTFIELDS, char *data);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_COPYPOSTFIELDS 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_COPYPOSTFIELDS \- have libcurl copy data to POST
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_COPYPOSTFIELDS, char *data);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CRLF.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CRLF 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CRLF \- enable/disable CRLF conversion
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CRLF 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CRLF \- enable/disable CRLF conversion
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLF, long conv);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CRLFILE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CRLFILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CRLFILE \- specify a Certificate Revocation List file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLFILE, char *file);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CRLFILE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CRLFILE \- specify a Certificate Revocation List file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CRLFILE, char *file);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_CUSTOMREQUEST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CUSTOMREQUEST 3 "June 21, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CUSTOMREQUEST \- custom string for request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CUSTOMREQUEST, char *request);
.SH DESCRIPTION
Pass a pointer to a zero terminated string as parameter.

When you change the request method by setting \fICURLOPT_CUSTOMREQUEST(3)\fP
to something, you don't actually change how libcurl behaves or acts in regards
to the particular request method, it will only change the actual string sent
in the request.

Restore to the internal default by setting this to NULL.

This option can be used to specify the request:
.IP HTTP
Instead of GET or HEAD when performing HTTP based requests. This is
particularly useful, for example, for performing a HTTP DELETE request.

For example:

When you tell libcurl to do a HEAD request, but then specify a GET though a
custom request libcurl will still act as if it sent a HEAD. To switch to a
proper HEAD use \fICURLOPT_NOBODY(3)\fP, to switch to a proper POST use
\fICURLOPT_POST(3)\fP or \fICURLOPT_POSTFIELDS(3)\fP and to switch to a proper







|




















|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_CUSTOMREQUEST 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_CUSTOMREQUEST \- custom string for request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CUSTOMREQUEST, char *request);
.SH DESCRIPTION
Pass a pointer to a zero terminated string as parameter.

When you change the request method by setting \fICURLOPT_CUSTOMREQUEST(3)\fP
to something, you don't actually change how libcurl behaves or acts in regards
to the particular request method, it will only change the actual string sent
in the request.

Restore to the internal default by setting this to NULL.

This option can be used to specify the request:
.IP HTTP
Instead of GET or HEAD when performing HTTP based requests. This is
particularly useful, for example, for performing an HTTP DELETE request.

For example:

When you tell libcurl to do a HEAD request, but then specify a GET though a
custom request libcurl will still act as if it sent a HEAD. To switch to a
proper HEAD use \fICURLOPT_NOBODY(3)\fP, to switch to a proper POST use
\fICURLOPT_POST(3)\fP or \fICURLOPT_POSTFIELDS(3)\fP and to switch to a proper
Changes to jni/curl/docs/libcurl/opts/CURLOPT_DEBUGDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DEBUGDATA 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DEBUGDATA \- custom pointer for debug callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEBUGDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DEBUGDATA 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DEBUGDATA \- custom pointer for debug callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DEBUGDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DEBUGFUNCTION 3 "October 06, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DEBUGFUNCTION \- debug callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DEBUGFUNCTION 3 "October 06, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DEBUGFUNCTION \- debug callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_DEFAULT_PROTOCOL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DEFAULT_PROTOCOL 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DEFAULT_PROTOCOL \- default protocol to use if the URL is missing a
scheme name
.SH SYNOPSIS
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DEFAULT_PROTOCOL 3 "December 21, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DEFAULT_PROTOCOL \- default protocol to use if the URL is missing a
scheme name
.SH SYNOPSIS
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_DIRLISTONLY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DIRLISTONLY 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DIRLISTONLY \- ask for names only in a directory listing
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DIRLISTONLY, long listonly);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DIRLISTONLY 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DIRLISTONLY \- ask for names only in a directory listing
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DIRLISTONLY, long listonly);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_DNS_CACHE_TIMEOUT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "December 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_CACHE_TIMEOUT \- set life-time for DNS cache entries
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_CACHE_TIMEOUT, long age);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "December 09, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_CACHE_TIMEOUT \- set life-time for DNS cache entries
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_CACHE_TIMEOUT, long age);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_DNS_INTERFACE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_INTERFACE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_INTERFACE \- set interface to speak DNS over
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_INTERFACE, char *ifname);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_INTERFACE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_INTERFACE \- set interface to speak DNS over
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_INTERFACE, char *ifname);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP4.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_LOCAL_IP4 3 "December 10, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_LOCAL_IP4 \- IPv4 address to bind DNS resolves to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP4, char *address);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_LOCAL_IP4 3 "December 10, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_LOCAL_IP4 \- IPv4 address to bind DNS resolves to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP4, char *address);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_DNS_LOCAL_IP6.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_LOCAL_IP6 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_LOCAL_IP6 \- IPv6 address to bind DNS resolves to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP6, char *address);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_LOCAL_IP6 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_LOCAL_IP6 \- IPv6 address to bind DNS resolves to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP6, char *address);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_DNS_SERVERS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_SERVERS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_SERVERS \- set preferred DNS servers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_SERVERS, char *servers);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_SERVERS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_SERVERS \- set preferred DNS servers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_SERVERS, char *servers);
Added jni/curl/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3.












































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_SHUFFLE_ADDRESSES 3 "March 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_SHUFFLE_ADDRESSES \- Shuffle addresses when a hostname returns more than one
.SH SYNOPSIS
.nf
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_SHUFFLE_ADDRESSES, long onoff);
.fi
.SH DESCRIPTION
When a name is resolved and more than one IP address is returned, shuffle the
order of all returned addresses so that they will be used in a random order.
This is similar to the ordering behavior of gethostbyname which is no longer
used on most platforms.

Addresses will not be reshuffled if a name resolution is completed using the
DNS cache. \fICURLOPT_DNS_CACHE_TIMEOUT(3)\fP can be used together with this
option to reduce DNS cache timeout or disable caching entirely if frequent
reshuffling is needed.

Since the addresses returned will be reordered randomly, their order will not
be in accordance with RFC 3484 or any other deterministic order that may be
generated by the system's name resolution implementation. This may have
performance impacts and may cause IPv4 to be used before IPv6 or vice versa.
.SH DEFAULT
0 (disabled)
.SH PROTOCOLS
All
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
  curl_easy_setopt(curl, CURLOPT_DNS_SHUFFLE_ADDRESSES, 1L);

  curl_easy_perform(curl);

  /* always cleanup */
  curl_easy_cleanup(curl);
}
.fi
.SH AVAILABILITY
Added in 7.60.0
.SH RETURN VALUE
CURLE_OK or an error such as CURLE_UNKNOWN_OPTION.
.SH "SEE ALSO"
.BR CURLOPT_DNS_CACHE_TIMEOUT "(3), " CURLOPT_IPRESOLVE "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLOPT_DNS_USE_GLOBAL_CACHE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_USE_GLOBAL_CACHE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_USE_GLOBAL_CACHE \- enable/disable global DNS cache
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_USE_GLOBAL_CACHE,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_DNS_USE_GLOBAL_CACHE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_DNS_USE_GLOBAL_CACHE \- enable/disable global DNS cache
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_USE_GLOBAL_CACHE,
Changes to jni/curl/docs/libcurl/opts/CURLOPT_EGDSOCKET.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_EGDSOCKET 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_EGDSOCKET \- set EGD socket path
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EGDSOCKET, char *path);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_EGDSOCKET 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_EGDSOCKET \- set EGD socket path
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EGDSOCKET, char *path);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_ERRORBUFFER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41





42
43
44
45
46
47
48
49
50
51
52
53
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ERRORBUFFER 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ERRORBUFFER \- set error buffer for error messages
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ERRORBUFFER, char *buf);
.SH DESCRIPTION
Pass a char * to a buffer that the libcurl may store human readable error
messages in on failures or problems. This may be more helpful than just the
return code from \fIcurl_easy_perform(3)\fP and related functions. The buffer
\fBmust be at least CURL_ERROR_SIZE bytes big\fP.

You must keep the associated buffer available until libcurl no longer needs
it. Failing to do so will cause very odd behavior or even crashes. libcurl
will need it until you call \fIcurl_easy_cleanup(3)\fP or you set the same
option again to use a different pointer.






Consider \fICURLOPT_VERBOSE(3)\fP and \fICURLOPT_DEBUGFUNCTION(3)\fP to better
debug and trace why errors happen.

If the library does not return an error, the buffer may not have been
touched. Do not rely on the contents in those cases.
.SH DEFAULT
NULL
.SH PROTOCOLS
All
.SH EXAMPLE
.nf
curl = curl_easy_init();







|








|
|








>
>
>
>
>


<
<
<







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48



49
50
51
52
53
54
55
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ERRORBUFFER 3 "March 13, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ERRORBUFFER \- set error buffer for error messages
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ERRORBUFFER, char *buf);
.SH DESCRIPTION
Pass a char * to a buffer that libcurl \fBmay\fP store human readable error
messages on failures or problems. This may be more helpful than just the
return code from \fIcurl_easy_perform(3)\fP and related functions. The buffer
\fBmust be at least CURL_ERROR_SIZE bytes big\fP.

You must keep the associated buffer available until libcurl no longer needs
it. Failing to do so will cause very odd behavior or even crashes. libcurl
will need it until you call \fIcurl_easy_cleanup(3)\fP or you set the same
option again to use a different pointer.

Do not rely on the contents of the buffer unless an error code was returned.
Since 7.60.0 libcurl will initialize the contents of the error buffer to an
empty string before performing the transfer. For earlier versions if an error
code was returned but there was no error detail then the buffer is untouched.

Consider \fICURLOPT_VERBOSE(3)\fP and \fICURLOPT_DEBUGFUNCTION(3)\fP to better
debug and trace why errors happen.



.SH DEFAULT
NULL
.SH PROTOCOLS
All
.SH EXAMPLE
.nf
curl = curl_easy_init();
Changes to jni/curl/docs/libcurl/opts/CURLOPT_EXPECT_100_TIMEOUT_MS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_EXPECT_100_TIMEOUT_MS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_EXPECT_100_TIMEOUT_MS \- timeout for Expect: 100-continue response
.SH SYNOPSIS
.nf
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EXPECT_100_TIMEOUT_MS,
                          long milliseconds);
.SH DESCRIPTION
Pass a long to tell libcurl the number of \fImilliseconds\fP to wait for a
server response with the HTTP status 100 (Continue), 417 (Expectation Failed)
or similar after sending a HTTP request containing an Expect: 100-continue
header. If this times out before a response is received, the request body is
sent anyway.
.SH DEFAULT
1000 milliseconds
.SH PROTOCOLS
HTTP
.SH EXAMPLE







|












|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_EXPECT_100_TIMEOUT_MS 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_EXPECT_100_TIMEOUT_MS \- timeout for Expect: 100-continue response
.SH SYNOPSIS
.nf
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_EXPECT_100_TIMEOUT_MS,
                          long milliseconds);
.SH DESCRIPTION
Pass a long to tell libcurl the number of \fImilliseconds\fP to wait for a
server response with the HTTP status 100 (Continue), 417 (Expectation Failed)
or similar after sending an HTTP request containing an Expect: 100-continue
header. If this times out before a response is received, the request body is
sent anyway.
.SH DEFAULT
1000 milliseconds
.SH PROTOCOLS
HTTP
.SH EXAMPLE
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FAILONERROR.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FAILONERROR 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FAILONERROR \- request failure on HTTP response >= 400
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FAILONERROR, long fail);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FAILONERROR 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FAILONERROR \- request failure on HTTP response >= 400
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FAILONERROR, long fail);
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
  ret = curl_easy_perform(curl);
  if(ret == CURLE_HTTP_RETURNED_ERROR) {
    /* a HTTP response error problem */
  }
}
.fi
.SH AVAILABILITY
Along with HTTP.
.SH RETURN VALUE
Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_HTTP200ALIASES "(3), " CURLOPT_KEEP_SENDING_ON_ERROR "(3), "







|









52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
  ret = curl_easy_perform(curl);
  if(ret == CURLE_HTTP_RETURNED_ERROR) {
    /* an HTTP response error problem */
  }
}
.fi
.SH AVAILABILITY
Along with HTTP.
.SH RETURN VALUE
Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_HTTP200ALIASES "(3), " CURLOPT_KEEP_SENDING_ON_ERROR "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FILETIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FILETIME 3 "April 03, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FILETIME \- get the modification time of the remote resource
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FILETIME, long gettime);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FILETIME 3 "April 03, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FILETIME \- get the modification time of the remote resource
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FILETIME, long gettime);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FNMATCH_DATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FNMATCH_DATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FNMATCH_DATA \- custom pointer to fnmatch callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FNMATCH_DATA 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FNMATCH_DATA \- custom pointer to fnmatch callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_FNMATCH_FUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FNMATCH_FUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FNMATCH_FUNCTION \- wildcard matching function callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FNMATCH_FUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FNMATCH_FUNCTION \- wildcard matching function callback
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_FOLLOWLOCATION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FOLLOWLOCATION 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable);
.SH DESCRIPTION
A long parameter set to 1 tells the library to follow any Location: header
that the server sends as part of a HTTP header in a 3xx response. The
Location: header can specify a relative or an absolute URL to follow.

libcurl will issue another request for the new URL and follow new Location:
headers all the way until no more such headers are returned.
\fICURLOPT_MAXREDIRS(3)\fP can be used to limit the number of redirects
libcurl will follow.








|









|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FOLLOWLOCATION 3 "May 02, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FOLLOWLOCATION \- follow HTTP 3xx redirects
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FOLLOWLOCATION, long enable);
.SH DESCRIPTION
A long parameter set to 1 tells the library to follow any Location: header
that the server sends as part of an HTTP header in a 3xx response. The
Location: header can specify a relative or an absolute URL to follow.

libcurl will issue another request for the new URL and follow new Location:
headers all the way until no more such headers are returned.
\fICURLOPT_MAXREDIRS(3)\fP can be used to limit the number of redirects
libcurl will follow.

74
75
76
77
78
79
80
81
.SH AVAILABILITY
Along with HTTP
.SH RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_PROTOCOLS "(3), "
.BR CURLOPT_POSTREDIR "(3), "
.BR CURLINFO_REDIRECT_URL "(3), ", CURLINFO_REDIRECT_COUNT "(3), "







|
74
75
76
77
78
79
80
81
.SH AVAILABILITY
Along with HTTP
.SH RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_REDIR_PROTOCOLS "(3), " CURLOPT_PROTOCOLS "(3), "
.BR CURLOPT_POSTREDIR "(3), "
.BR CURLINFO_REDIRECT_URL "(3), " CURLINFO_REDIRECT_COUNT "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FORBID_REUSE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FORBID_REUSE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FORBID_REUSE \- make connection get closed at once after use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FORBID_REUSE, long close);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FORBID_REUSE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FORBID_REUSE \- make connection get closed at once after use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FORBID_REUSE, long close);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FRESH_CONNECT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FRESH_CONNECT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FRESH_CONNECT \- force a new connection to be used
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FRESH_CONNECT, long fresh);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FRESH_CONNECT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FRESH_CONNECT \- force a new connection to be used
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FRESH_CONNECT, long fresh);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTPPORT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTPPORT 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTPPORT \- make FTP transfer active
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPPORT, char *spec);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTPPORT 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTPPORT \- make FTP transfer active
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPPORT, char *spec);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTPSSLAUTH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTPSSLAUTH 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTPSSLAUTH \- set order in which to attempt TLS vs SSL when using FTP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPSSLAUTH, long order);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTPSSLAUTH 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTPSSLAUTH \- set order in which to attempt TLS vs SSL when using FTP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTPSSLAUTH, long order);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_ACCOUNT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_ACCOUNT 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_ACCOUNT \- set account info for FTP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char *account);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_ACCOUNT 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_ACCOUNT \- set account info for FTP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char *account);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_ALTERNATIVE_TO_USER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_ALTERNATIVE_TO_USER \- command to use instead of USER with FTP
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_ALTERNATIVE_TO_USER 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_ALTERNATIVE_TO_USER \- command to use instead of USER with FTP
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_CREATE_MISSING_DIRS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing dirs for FTP and SFTP
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_CREATE_MISSING_DIRS 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_CREATE_MISSING_DIRS \- create missing dirs for FTP and SFTP
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_FILEMETHOD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_FILEMETHOD 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_FILEMETHOD \- select directory traversing method for FTP
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_FILEMETHOD 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_FILEMETHOD \- select directory traversing method for FTP
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_RESPONSE_TIMEOUT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "October 03, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_RESPONSE_TIMEOUT \- time allowed to wait for FTP response
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_RESPONSE_TIMEOUT, long timeout);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_RESPONSE_TIMEOUT 3 "October 03, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_RESPONSE_TIMEOUT \- time allowed to wait for FTP response
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_RESPONSE_TIMEOUT, long timeout);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_SKIP_PASV_IP 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_SKIP_PASV_IP \- ignore the IP address in the PASV response
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SKIP_PASV_IP, long skip);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_SKIP_PASV_IP 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_SKIP_PASV_IP \- ignore the IP address in the PASV response
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SKIP_PASV_IP, long skip);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_SSL_CCC.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_SSL_CCC 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_SSL_CCC \- switch off SSL again with FTP after auth
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SSL_CCC,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_SSL_CCC 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_SSL_CCC \- switch off SSL again with FTP after auth
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SSL_CCC,
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_USE_EPRT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_USE_EPRT 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_USE_EPRT \- enable/disable use of EPRT with FTP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPRT, long enabled);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_USE_EPRT 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_USE_EPRT \- enable/disable use of EPRT with FTP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPRT, long enabled);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_USE_EPSV.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_USE_EPSV 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_USE_EPSV \- enable/disable use of EPSV
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPSV, long epsv);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_USE_EPSV 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_USE_EPSV \- enable/disable use of EPSV
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPSV, long epsv);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_FTP_USE_PRET.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_USE_PRET 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_USE_PRET \- enable the PRET command
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_PRET, long enable);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_FTP_USE_PRET 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_FTP_USE_PRET \- enable the PRET command
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_PRET, long enable);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_GSSAPI_DELEGATION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_GSSAPI_DELEGATION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_GSSAPI_DELEGATION \- set allowed GSS-API delegation
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_GSSAPI_DELEGATION, long level);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_GSSAPI_DELEGATION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_GSSAPI_DELEGATION \- set allowed GSS-API delegation
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_GSSAPI_DELEGATION, long level);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 3 "February 21, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS \- head start for ipv6 for happy eyeballs
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, long timeout);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 3 "February 21, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS \- head start for ipv6 for happy eyeballs
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, long timeout);
Added jni/curl/docs/libcurl/opts/CURLOPT_HAPROXYPROTOCOL.3.




















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HAPROXYPROTOCOL 3 "December 01, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HAPROXYPROTOCOL \- send HAProxy PROXY protocol header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HAPROXYPROTOCOL,
                          long haproxy_protocol);
.SH DESCRIPTION
A long parameter set to 1 tells the library to send an HAProxy PROXY
protocol header at beginning of the connection. The default action is not to
send this header.

This option is primarily useful when sending test requests to a service that
expects this header.

Most applications do not need this option.
.SH DEFAULT
0, do not send HAProxy PROXY protocol header
.SH PROTOCOLS
HTTP
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_HAPROXYPROTOCOL, 1L);
  ret = curl_easy_perform(curl);
}
.fi
.SH AVAILABILITY
Along with HTTP. Added in 7.60.0.
.SH RETURN VALUE
Returns CURLE_OK if HTTP is enabled, and CURLE_UNKNOWN_OPTION if not.
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HEADER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HEADER 3 "February 16, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HEADER \- pass headers to the data stream
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADER, long onoff);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HEADER 3 "February 16, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HEADER \- pass headers to the data stream
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADER, long onoff);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HEADERDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HEADERDATA 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HEADERDATA \- pointer to pass to header callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADERDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HEADERDATA 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HEADERDATA \- pointer to pass to header callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADERDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HEADERFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HEADERFUNCTION 3 "February 16, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HEADERFUNCTION \- callback that receives header data
.SH SYNOPSIS
#include <curl/curl.h>

size_t header_callback(char *buffer,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HEADERFUNCTION 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HEADERFUNCTION \- callback that receives header data
.SH SYNOPSIS
#include <curl/curl.h>

size_t header_callback(char *buffer,
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
all responses received after initiating a request and not just the final
response. This includes all responses which occur during authentication
negotiation. If you need to operate on only the headers from the final
response, you will need to collect headers in the callback yourself and use
HTTP status lines, for example, to delimit response boundaries.

When a server sends a chunked encoded transfer, it may contain a trailer. That
trailer is identical to a HTTP header and if such a trailer is received it is
passed to the application using this callback as well. There are several ways
to detect it being a trailer and not an ordinary header: 1) it comes after the
response-body. 2) it comes after the final header line (CR LF) 3) a Trailer:
header among the regular response-headers mention what header(s) to expect in
the trailer.

For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will get







|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
all responses received after initiating a request and not just the final
response. This includes all responses which occur during authentication
negotiation. If you need to operate on only the headers from the final
response, you will need to collect headers in the callback yourself and use
HTTP status lines, for example, to delimit response boundaries.

When a server sends a chunked encoded transfer, it may contain a trailer. That
trailer is identical to an HTTP header and if such a trailer is received it is
passed to the application using this callback as well. There are several ways
to detect it being a trailer and not an ordinary header: 1) it comes after the
response-body. 2) it comes after the final header line (CR LF) 3) a Trailer:
header among the regular response-headers mention what header(s) to expect in
the trailer.

For non-HTTP protocols like FTP, POP3, IMAP and SMTP this function will get
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HEADEROPT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HEADEROPT 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HEADEROPT \- set how to send HTTP headers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADEROPT, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HEADEROPT 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HEADEROPT \- set how to send HTTP headers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HEADEROPT, long bitmask);
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
sent to a server and not to a proxy. Proxy headers must be set with
\fICURLOPT_PROXYHEADER(3)\fP to get used. Note that if a non-CONNECT request
is sent to a proxy, libcurl will send both server headers and proxy
headers. When doing CONNECT, libcurl will send \fICURLOPT_PROXYHEADER(3)\fP
headers only to the proxy and then \fICURLOPT_HTTPHEADER(3)\fP headers only to
the server.
.SH DEFAULT
CURLHEADER_SEPARATE (changed in 7.42.1, ased CURLHEADER_UNIFIED before then)
.SH PROTOCOLS
HTTP
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;







|







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
sent to a server and not to a proxy. Proxy headers must be set with
\fICURLOPT_PROXYHEADER(3)\fP to get used. Note that if a non-CONNECT request
is sent to a proxy, libcurl will send both server headers and proxy
headers. When doing CONNECT, libcurl will send \fICURLOPT_PROXYHEADER(3)\fP
headers only to the proxy and then \fICURLOPT_HTTPHEADER(3)\fP headers only to
the server.
.SH DEFAULT
CURLHEADER_SEPARATE (changed in 7.42.1, used CURLHEADER_UNIFIED before then)
.SH PROTOCOLS
HTTP
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTP200ALIASES.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTP200ALIASES 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTP200ALIASES \- specify alternative matches for HTTP 200 OK
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTP200ALIASES 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTP200ALIASES \- specify alternative matches for HTTP 200 OK
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTPAUTH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPAUTH 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPAUTH \- set HTTP server authentication methods to try
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPAUTH 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPAUTH \- set HTTP server authentication methods to try
.SH SYNOPSIS
.nf
#include <curl/curl.h>

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  curl_easy_setopt(curl, CURLOPT_USERPWD, "james:bond");
  ret = curl_easy_perform(curl);
}
.fi
.SH AVAILABILITY
Option Added in 7.10.6.

CURLAUTH_DIGEST_IE was added added in 7.19.3

CURLAUTH_ONLY was added in 7.21.3

CURLAUTH_NTLM_WB was added in 7.22.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
methods.
.SH "SEE ALSO"
.BR CURLOPT_PROXYAUTH "(3), " CURLOPT_USERPWD "(3), "







|










110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  curl_easy_setopt(curl, CURLOPT_USERPWD, "james:bond");
  ret = curl_easy_perform(curl);
}
.fi
.SH AVAILABILITY
Option Added in 7.10.6.

CURLAUTH_DIGEST_IE was added in 7.19.3

CURLAUTH_ONLY was added in 7.21.3

CURLAUTH_NTLM_WB was added in 7.22.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
CURLE_NOT_BUILT_IN if the bitmask specified no supported authentication
methods.
.SH "SEE ALSO"
.BR CURLOPT_PROXYAUTH "(3), " CURLOPT_USERPWD "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTPGET.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPGET 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPGET \- ask for a HTTP GET request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPGET, long useget);
.SH DESCRIPTION
Pass a long. If \fIuseget\fP is 1, this forces the HTTP request to get back to
using GET. Usable if a POST, HEAD, PUT, etc has been used previously using the







|


|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPGET 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPGET \- ask for an HTTP GET request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPGET, long useget);
.SH DESCRIPTION
Pass a long. If \fIuseget\fP is 1, this forces the HTTP request to get back to
using GET. Usable if a POST, HEAD, PUT, etc has been used previously using the
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTPHEADER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPHEADER 3 "January 23, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPHEADER \- set custom HTTP headers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPHEADER, struct curl_slist *headers);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPHEADER 3 "January 23, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPHEADER \- set custom HTTP headers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPHEADER, struct curl_slist *headers);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTPPOST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPPOST 3 "September 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPPOST \- specify the multipart formpost content
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPPOST 3 "September 02, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPPOST \- specify the multipart formpost content
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTPPROXYTUNNEL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPPROXYTUNNEL 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPPROXYTUNNEL \- tunnel through HTTP proxy
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPPROXYTUNNEL, long tunnel);
.SH DESCRIPTION
Set the \fBtunnel\fP parameter to 1L to make libcurl tunnel all operations
through the HTTP proxy (set with \fICURLOPT_PROXY(3)\fP). There is a big
difference between using a proxy and to tunnel through it.

Tunneling means that a HTTP CONNECT request is sent to the proxy, asking it
to connect to a remote host on a specific port number and then the traffic is
just passed through the proxy. Proxies tend to white-list specific port numbers
it allows CONNECT requests to and often only port 80 and 443 are allowed.

To suppress proxy CONNECT response headers from user callbacks use
\fICURLOPT_SUPPRESS_CONNECT_HEADERS(3)\fP.

HTTP proxies can generally only speak HTTP (for obvious reasons), which makes
libcurl convert non-HTTP requests to HTTP when using an HTTP proxy without
this tunnel option set. For example, asking for an FTP URL and specifying an
HTTP proxy will make libcurl send an FTP URL in a HTTP GET request to the
proxy. By instead tunneling through the proxy, you avoid that conversion (that
rarely works through the proxy anyway).
.SH DEFAULT
0
.SH PROTOCOLS
All network protocols
.SH EXAMPLE







|












|










|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTPPROXYTUNNEL 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTPPROXYTUNNEL \- tunnel through HTTP proxy
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPPROXYTUNNEL, long tunnel);
.SH DESCRIPTION
Set the \fBtunnel\fP parameter to 1L to make libcurl tunnel all operations
through the HTTP proxy (set with \fICURLOPT_PROXY(3)\fP). There is a big
difference between using a proxy and to tunnel through it.

Tunneling means that an HTTP CONNECT request is sent to the proxy, asking it
to connect to a remote host on a specific port number and then the traffic is
just passed through the proxy. Proxies tend to white-list specific port numbers
it allows CONNECT requests to and often only port 80 and 443 are allowed.

To suppress proxy CONNECT response headers from user callbacks use
\fICURLOPT_SUPPRESS_CONNECT_HEADERS(3)\fP.

HTTP proxies can generally only speak HTTP (for obvious reasons), which makes
libcurl convert non-HTTP requests to HTTP when using an HTTP proxy without
this tunnel option set. For example, asking for an FTP URL and specifying an
HTTP proxy will make libcurl send an FTP URL in an HTTP GET request to the
proxy. By instead tunneling through the proxy, you avoid that conversion (that
rarely works through the proxy anyway).
.SH DEFAULT
0
.SH PROTOCOLS
All network protocols
.SH EXAMPLE
Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTP_CONTENT_DECODING.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTP_CONTENT_DECODING 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTP_CONTENT_DECODING \- enable/disable HTTP content decoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTP_CONTENT_DECODING 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTP_CONTENT_DECODING \- enable/disable HTTP content decoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTP_TRANSFER_DECODING.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTP_TRANSFER_DECODING 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTP_TRANSFER_DECODING \- enable/disable HTTP transfer decoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTP_TRANSFER_DECODING 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTP_TRANSFER_DECODING \- enable/disable HTTP transfer decoding
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_HTTP_VERSION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTP_VERSION 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_HTTP_VERSION 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_HTTP_VERSION \- specify HTTP protocol version to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTP_VERSION, long version);
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
  ret = curl_easy_perform(curl);
  if(ret == CURLE_HTTP_RETURNED_ERROR) {
    /* a HTTP response error problem */
  }
}
.fi
.SH AVAILABILITY
Along with HTTP
.SH RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_SSLVERSION "(3), " CURLOPT_HTTP200ALIASES "(3), "







|









69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
CURL *curl = curl_easy_init();
if(curl) {
  CURLcode ret;
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
  ret = curl_easy_perform(curl);
  if(ret == CURLE_HTTP_RETURNED_ERROR) {
    /* an HTTP response error problem */
  }
}
.fi
.SH AVAILABILITY
Along with HTTP
.SH RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_SSLVERSION "(3), " CURLOPT_HTTP200ALIASES "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLOPT_IGNORE_CONTENT_LENGTH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_IGNORE_CONTENT_LENGTH \- ignore content length
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_IGNORE_CONTENT_LENGTH 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_IGNORE_CONTENT_LENGTH \- ignore content length
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_INFILESIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INFILESIZE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INFILESIZE \- set size of the input file to send off
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INFILESIZE, long filesize);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INFILESIZE 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INFILESIZE \- set size of the input file to send off
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INFILESIZE, long filesize);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_INFILESIZE_LARGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INFILESIZE_LARGE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INFILESIZE_LARGE \- set size of the input file to send off
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INFILESIZE_LARGE 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INFILESIZE_LARGE \- set size of the input file to send off
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_INTERFACE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INTERFACE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INTERFACE \- source interface for outgoing traffic
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERFACE, char *interface);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INTERFACE 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INTERFACE \- source interface for outgoing traffic
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERFACE, char *interface);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_INTERLEAVEDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INTERLEAVEDATA 3 "September 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INTERLEAVEDATA \- custom pointer passed to RTSP interleave callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INTERLEAVEDATA 3 "September 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INTERLEAVEDATA \- custom pointer passed to RTSP interleave callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INTERLEAVEFUNCTION 3 "September 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INTERLEAVEFUNCTION \- callback function for RTSP interleaved data
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_INTERLEAVEFUNCTION 3 "September 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_INTERLEAVEFUNCTION \- callback function for RTSP interleaved data
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_IOCTLDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_IOCTLDATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_IOCTLDATA \- custom pointer passed to I/O callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IOCTLDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_IOCTLDATA 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_IOCTLDATA \- custom pointer passed to I/O callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IOCTLDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_IOCTLFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_IOCTLFUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_IOCTLFUNCTION \- callback for I/O operations
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_IOCTLFUNCTION 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_IOCTLFUNCTION \- callback for I/O operations
.SH SYNOPSIS
.nf
#include <curl/curl.h>

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.SH DESCRIPTION
Pass a pointer to your callback function, which should match the prototype
shown above.

This callback function gets called by libcurl when something special
I/O-related needs to be done that the library can't do by itself. For now,
rewinding the read data stream is the only action it can request. The
rewinding of the read data stream may be necessary when doing a HTTP PUT or
POST with a multi-pass authentication method.

The callback MUST return \fICURLIOE_UNKNOWNCMD\fP if the input \fIcmd\fP is
not \fICURLIOCMD_RESTARTREAD\fP.

The \fIclientp\fP argument to the callback is set with the
\fICURLOPT_IOCTLDATA(3)\fP option.







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.SH DESCRIPTION
Pass a pointer to your callback function, which should match the prototype
shown above.

This callback function gets called by libcurl when something special
I/O-related needs to be done that the library can't do by itself. For now,
rewinding the read data stream is the only action it can request. The
rewinding of the read data stream may be necessary when doing an HTTP PUT or
POST with a multi-pass authentication method.

The callback MUST return \fICURLIOE_UNKNOWNCMD\fP if the input \fIcmd\fP is
not \fICURLIOCMD_RESTARTREAD\fP.

The \fIclientp\fP argument to the callback is set with the
\fICURLOPT_IOCTLDATA(3)\fP option.
Changes to jni/curl/docs/libcurl/opts/CURLOPT_IPRESOLVE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_IPRESOLVE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_IPRESOLVE \- specify which IP protocol version to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IPRESOLVE, long resolve);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_IPRESOLVE 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_IPRESOLVE \- specify which IP protocol version to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_IPRESOLVE, long resolve);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_ISSUERCERT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ISSUERCERT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ISSUERCERT \- issuer SSL certificate filename
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ISSUERCERT, char *file);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_ISSUERCERT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_ISSUERCERT \- issuer SSL certificate filename
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ISSUERCERT, char *file);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_KEEP_SENDING_ON_ERROR.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_KEEP_SENDING_ON_ERROR 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_KEEP_SENDING_ON_ERROR \- keep sending on early HTTP response >= 300
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KEEP_SENDING_ON_ERROR,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_KEEP_SENDING_ON_ERROR 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_KEEP_SENDING_ON_ERROR \- keep sending on early HTTP response >= 300
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KEEP_SENDING_ON_ERROR,
Changes to jni/curl/docs/libcurl/opts/CURLOPT_KEYPASSWD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_KEYPASSWD 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_KEYPASSWD \- set passphrase to private key
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KEYPASSWD, char *pwd);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_KEYPASSWD 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_KEYPASSWD \- set passphrase to private key
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KEYPASSWD, char *pwd);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_KRBLEVEL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_KRBLEVEL 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_KRBLEVEL \- set FTP kerberos security level
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KRBLEVEL, char *level);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_KRBLEVEL 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_KRBLEVEL \- set FTP kerberos security level
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KRBLEVEL, char *level);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_LOCALPORT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOCALPORT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOCALPORT \- set local port number to use for socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORT, long port);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOCALPORT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOCALPORT \- set local port number to use for socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORT, long port);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_LOCALPORTRANGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOCALPORTRANGE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOCALPORTRANGE \- number of additional local ports to try
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORTRANGE,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOCALPORTRANGE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOCALPORTRANGE \- number of additional local ports to try
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOCALPORTRANGE,
Changes to jni/curl/docs/libcurl/opts/CURLOPT_LOGIN_OPTIONS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOGIN_OPTIONS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOGIN_OPTIONS \- set login options
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char *options);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOGIN_OPTIONS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOGIN_OPTIONS \- set login options
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char *options);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_LOW_SPEED_LIMIT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOW_SPEED_LIMIT 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOW_SPEED_LIMIT \- set low speed limit in bytes per second
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_LIMIT, long speedlimit);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOW_SPEED_LIMIT 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOW_SPEED_LIMIT \- set low speed limit in bytes per second
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_LIMIT, long speedlimit);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_LOW_SPEED_TIME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOW_SPEED_TIME 3 "May 06, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOW_SPEED_TIME \- set low speed limit time period
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_TIME, long speedtime);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_LOW_SPEED_TIME 3 "May 06, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_LOW_SPEED_TIME \- set low speed limit time period
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOW_SPEED_TIME, long speedtime);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAIL_AUTH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAIL_AUTH 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAIL_AUTH \- SMTP authentication address
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_AUTH, char *auth);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAIL_AUTH 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAIL_AUTH \- SMTP authentication address
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_AUTH, char *auth);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAIL_FROM.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAIL_FROM 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAIL_FROM \- SMTP sender address
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_FROM, char *from);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAIL_FROM 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAIL_FROM \- SMTP sender address
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_FROM, char *from);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAIL_RCPT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAIL_RCPT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAIL_RCPT \- list of SMTP mail recipients
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAIL_RCPT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAIL_RCPT \- list of SMTP mail recipients
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAXCONNECTS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAXCONNECTS 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAXCONNECTS \- maximum connection cache size
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXCONNECTS, long amount);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAXCONNECTS 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAXCONNECTS \- maximum connection cache size
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXCONNECTS, long amount);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAXFILESIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAXFILESIZE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAXFILESIZE \- maximum file size allowed to download
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXFILESIZE, long size);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAXFILESIZE 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAXFILESIZE \- maximum file size allowed to download
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXFILESIZE, long size);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAXFILESIZE_LARGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAXFILESIZE_LARGE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAXFILESIZE_LARGE \- maximum file size allowed to download
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAXFILESIZE_LARGE 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAXFILESIZE_LARGE \- maximum file size allowed to download
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAXREDIRS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAXREDIRS 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAXREDIRS \- maximum number of redirects allowed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXREDIRS, long amount);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAXREDIRS 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAXREDIRS \- maximum number of redirects allowed
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAXREDIRS, long amount);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAX_RECV_SPEED_LARGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAX_RECV_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAX_RECV_SPEED_LARGE \- rate limit data download speed
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAX_RECV_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAX_RECV_SPEED_LARGE \- rate limit data download speed
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_MAX_SEND_SPEED_LARGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAX_SEND_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAX_SEND_SPEED_LARGE \- rate limit data upload speed
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MAX_SEND_SPEED_LARGE 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MAX_SEND_SPEED_LARGE \- rate limit data upload speed
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_MIMEPOST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MIMEPOST 3 "September 04, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MIMEPOST \- set post/send data from mime structure
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_MIMEPOST 3 "September 04, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_MIMEPOST \- set post/send data from mime structure
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_NETRC.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NETRC 3 "August 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NETRC \- request that .netrc is used
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC, long level);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NETRC 3 "May 02, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NETRC \- request that .netrc is used
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC, long level);
77
78
79
80
81
82
83
84
}
.fi
.SH AVAILABILITY
Always
.SH RETURN VALUE
Returns CURLE_OK
.SH "SEE ALSO"
.BR CURLOPT_USERPWD "(3), " CURLOPT_USERNAME "(3), ", CURLOPT_NETRC_FILE "(3), "







|
77
78
79
80
81
82
83
84
}
.fi
.SH AVAILABILITY
Always
.SH RETURN VALUE
Returns CURLE_OK
.SH "SEE ALSO"
.BR CURLOPT_USERPWD "(3), " CURLOPT_USERNAME "(3), " CURLOPT_NETRC_FILE "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLOPT_NETRC_FILE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NETRC_FILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NETRC_FILE \- file name to read .netrc info from
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC_FILE, char *file);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NETRC_FILE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NETRC_FILE \- file name to read .netrc info from
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NETRC_FILE, char *file);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_NEW_DIRECTORY_PERMS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NEW_DIRECTORY_PERMS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NEW_DIRECTORY_PERMS \- permissions for remotely created directories
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NEW_DIRECTORY_PERMS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NEW_DIRECTORY_PERMS \- permissions for remotely created directories
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_NEW_FILE_PERMS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NEW_FILE_PERMS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NEW_FILE_PERMS \- permissions for remotely created files
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NEW_FILE_PERMS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NEW_FILE_PERMS \- permissions for remotely created files
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_NOBODY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NOBODY 3 "June 21, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NOBODY \- do the download request without getting the body
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOBODY, long opt);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NOBODY 3 "June 21, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NOBODY \- do the download request without getting the body
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOBODY, long opt);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_NOPROGRESS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NOPROGRESS 3 "October 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NOPROGRESS \- switch off the progress meter
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROGRESS, long onoff);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NOPROGRESS 3 "October 09, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NOPROGRESS \- switch off the progress meter
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROGRESS, long onoff);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_NOPROXY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NOPROXY 3 "March 03, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NOPROXY \- disable proxy use for specific hosts
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROXY, char *noproxy);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NOPROXY 3 "March 03, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NOPROXY \- disable proxy use for specific hosts
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOPROXY, char *noproxy);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_NOSIGNAL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NOSIGNAL 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NOSIGNAL \- skip all signal handling
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOSIGNAL, long onoff);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_NOSIGNAL 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_NOSIGNAL \- skip all signal handling
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOSIGNAL, long onoff);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_OPENSOCKETDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_OPENSOCKETDATA 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_OPENSOCKETDATA \- custom pointer passed to open socket callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_OPENSOCKETDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_OPENSOCKETDATA 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_OPENSOCKETDATA \- custom pointer passed to open socket callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_OPENSOCKETDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_OPENSOCKETFUNCTION 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_OPENSOCKETFUNCTION \- set callback for opening sockets
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_OPENSOCKETFUNCTION 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_OPENSOCKETFUNCTION \- set callback for opening sockets
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_PASSWORD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PASSWORD 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PASSWORD \- password to use in authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PASSWORD, char *pwd);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PASSWORD 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PASSWORD \- password to use in authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PASSWORD, char *pwd);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PATH_AS_IS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PATH_AS_IS 3 "February 14, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PATH_AS_IS \- do not handle dot dot sequences
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PATH_AS_IS, long leaveit);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PATH_AS_IS 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PATH_AS_IS \- do not handle dot dot sequences
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PATH_AS_IS, long leaveit);
53
54
55
56
57
58
59
60
61
62
63
64
65
66

  curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, 1L);

  curl_easy_perform(curl);
}
.fi
.SH AVAILABILITY
Aded in 7.42.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
.BR CURLOPT_URL "(3), "








|






53
54
55
56
57
58
59
60
61
62
63
64
65
66

  curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, 1L);

  curl_easy_perform(curl);
}
.fi
.SH AVAILABILITY
Added in 7.42.0
.SH RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
.SH "SEE ALSO"
.BR CURLOPT_STDERR "(3), " CURLOPT_DEBUGFUNCTION "(3), "
.BR CURLOPT_URL "(3), "

Changes to jni/curl/docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PINNEDPUBLICKEY 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PINNEDPUBLICKEY \- set pinned public key
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PINNEDPUBLICKEY, char *pinnedpubkey);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PINNEDPUBLICKEY 3 "January 25, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PINNEDPUBLICKEY \- set pinned public key
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PINNEDPUBLICKEY, char *pinnedpubkey);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PIPEWAIT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PIPEWAIT 3 "May 01, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PIPEWAIT \- wait for pipelining/multiplexing
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PIPEWAIT, long wait);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PIPEWAIT 3 "May 01, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PIPEWAIT \- wait for pipelining/multiplexing
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PIPEWAIT, long wait);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PORT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PORT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PORT \- set remote port number to work with
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PORT, long number);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PORT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PORT \- set remote port number to work with
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PORT, long number);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_POST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POST 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POST \- request a HTTP POST
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POST, long post);
.SH DESCRIPTION
A parameter set to 1 tells libcurl to do a regular HTTP post. This will also
make the library use a "Content-Type: application/x-www-form-urlencoded"







|


|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POST 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POST \- request an HTTP POST
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POST, long post);
.SH DESCRIPTION
A parameter set to 1 tells libcurl to do a regular HTTP post. This will also
make the library use a "Content-Type: application/x-www-form-urlencoded"
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

You can override the default POST Content-Type: header by setting your own
with \fICURLOPT_HTTPHEADER(3)\fP.

Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.

If you use POST to a HTTP 1.1 server, you can send data without knowing the
size before starting the POST if you use chunked encoding. You enable this by
adding a header like "Transfer-Encoding: chunked" with
\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
must specify the size in the request.

When setting \fICURLOPT_POST(3)\fP to 1, it will automatically set
\fICURLOPT_NOBODY(3)\fP to 0.







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

You can override the default POST Content-Type: header by setting your own
with \fICURLOPT_HTTPHEADER(3)\fP.

Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.

If you use POST to an HTTP 1.1 server, you can send data without knowing the
size before starting the POST if you use chunked encoding. You enable this by
adding a header like "Transfer-Encoding: chunked" with
\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
must specify the size in the request.

When setting \fICURLOPT_POST(3)\fP to 1, it will automatically set
\fICURLOPT_NOBODY(3)\fP to 0.
Changes to jni/curl/docs/libcurl/opts/CURLOPT_POSTFIELDS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTFIELDS 3 "July 07, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTFIELDS \- specify data to POST to server
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDS, char *postdata);
.SH DESCRIPTION
Pass a char * as parameter, pointing to the full data to send in a HTTP POST
operation. You must make sure that the data is formatted the way you want the
server to receive it. libcurl will not convert or encode it for you in any
way. For example, the web server may assume that this data is url-encoded.

The data pointed to is NOT copied by the library: as a consequence, it must be
preserved by the calling application until the associated transfer finishes.
This behaviour can be changed (so libcurl does copy the data) by setting the







|








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTFIELDS 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTFIELDS \- specify data to POST to server
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDS, char *postdata);
.SH DESCRIPTION
Pass a char * as parameter, pointing to the full data to send in an HTTP POST
operation. You must make sure that the data is formatted the way you want the
server to receive it. libcurl will not convert or encode it for you in any
way. For example, the web server may assume that this data is url-encoded.

The data pointed to is NOT copied by the library: as a consequence, it must be
preserved by the calling application until the associated transfer finishes.
This behaviour can be changed (so libcurl does copy the data) by setting the
Changes to jni/curl/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTFIELDSIZE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTFIELDSIZE \- size of POST data pointed to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE, long size);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTFIELDSIZE 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTFIELDSIZE \- size of POST data pointed to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTFIELDSIZE, long size);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_POSTFIELDSIZE_LARGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTFIELDSIZE_LARGE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTFIELDSIZE_LARGE \- size of POST data pointed to
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTFIELDSIZE_LARGE 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTFIELDSIZE_LARGE \- size of POST data pointed to
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_POSTQUOTE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTQUOTE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTQUOTE \- (S)FTP commands to run after the transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTQUOTE, struct curl_slist *cmds);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTQUOTE 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTQUOTE \- (S)FTP commands to run after the transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTQUOTE, struct curl_slist *cmds);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_POSTREDIR.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTREDIR 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTREDIR \- how to act on a HTTP POST redirect
.SH SYNOPSIS
.nf
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTREDIR,
                          long bitmask);
.SH DESCRIPTION







|


|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_POSTREDIR 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_POSTREDIR \- how to act on an HTTP POST redirect
.SH SYNOPSIS
.nf
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTREDIR,
                          long bitmask);
.SH DESCRIPTION
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PREQUOTE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PREQUOTE 3 "June 18, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PREQUOTE \- commands to run before an FTP transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PREQUOTE 3 "June 18, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PREQUOTE \- commands to run before an FTP transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PREQUOTE,
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PRE_PROXY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PRE_PROXY 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PRE_PROXY \- set pre-proxy to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRE_PROXY, char *preproxy);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PRE_PROXY 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PRE_PROXY \- set pre-proxy to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRE_PROXY, char *preproxy);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PRIVATE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PRIVATE 3 "December 08, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PRIVATE \- store a private pointer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRIVATE, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PRIVATE 3 "December 08, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PRIVATE \- store a private pointer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRIVATE, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROGRESSDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROGRESSDATA 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROGRESSDATA \- custom pointer passed to the progress callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROGRESSDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROGRESSDATA 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROGRESSDATA \- custom pointer passed to the progress callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROGRESSDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROGRESSFUNCTION 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROGRESSFUNCTION \- callback to progress meter function
.SH SYNOPSIS
#include <curl/curl.h>

int progress_callback(void *clientp,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROGRESSFUNCTION 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROGRESSFUNCTION \- callback to progress meter function
.SH SYNOPSIS
#include <curl/curl.h>

int progress_callback(void *clientp,
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROTOCOLS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROTOCOLS 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROTOCOLS \- set allowed protocols
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROTOCOLS, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROTOCOLS 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROTOCOLS \- set allowed protocols
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROTOCOLS, long bitmask);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY 3 "September 24, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY \- set proxy to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY, char *proxy);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY \- set proxy to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY, char *proxy);
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
.IP socks5h://
SOCKS5 Proxy. Proxy resolves URL hostname.
.RE

Without a scheme prefix, \fICURLOPT_PROXYTYPE(3)\fP can be used to specify
which kind of proxy the string identifies.

When you tell the library to use a HTTP proxy, libcurl will transparently
convert operations to HTTP even if you specify an FTP URL etc. This may have
an impact on what other features of the library you can use, such as
\fICURLOPT_QUOTE(3)\fP and similar FTP specifics that don't work unless you
tunnel through the HTTP proxy. Such tunneling is activated with
\fICURLOPT_HTTPPROXYTUNNEL(3)\fP.

Setting the proxy string to "" (an empty string) will explicitly disable the







|







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
.IP socks5h://
SOCKS5 Proxy. Proxy resolves URL hostname.
.RE

Without a scheme prefix, \fICURLOPT_PROXYTYPE(3)\fP can be used to specify
which kind of proxy the string identifies.

When you tell the library to use an HTTP proxy, libcurl will transparently
convert operations to HTTP even if you specify an FTP URL etc. This may have
an impact on what other features of the library you can use, such as
\fICURLOPT_QUOTE(3)\fP and similar FTP specifics that don't work unless you
tunnel through the HTTP proxy. Such tunneling is activated with
\fICURLOPT_HTTPPROXYTUNNEL(3)\fP.

Setting the proxy string to "" (an empty string) will explicitly disable the
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXYAUTH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYAUTH 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYAUTH \- set HTTP proxy authentication methods to try
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYAUTH, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYAUTH 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYAUTH \- set HTTP proxy authentication methods to try
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYAUTH, long bitmask);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXYHEADER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYHEADER 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYHEADER \- custom HTTP headers to pass to proxy
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYHEADER 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYHEADER \- custom HTTP headers to pass to proxy
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXYPASSWORD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYPASSWORD 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYPASSWORD \- password to use with proxy authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPASSWORD, char *pwd);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYPASSWORD 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYPASSWORD \- password to use with proxy authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPASSWORD, char *pwd);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXYPORT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYPORT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYPORT \- port number the proxy listens on
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPORT, long port);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYPORT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYPORT \- port number the proxy listens on
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPORT, long port);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXYTYPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYTYPE 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYTYPE \- proxy protocol type
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYTYPE, long type);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYTYPE 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYTYPE \- proxy protocol type
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYTYPE, long type);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXYUSERNAME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYUSERNAME 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYUSERNAME \- user name to use for proxy authentication
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYUSERNAME 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYUSERNAME \- user name to use for proxy authentication
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXYUSERPWD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYUSERPWD 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYUSERPWD \- user name and password to use for proxy authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYUSERPWD, char *userpwd);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXYUSERPWD 3 "May 30, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXYUSERPWD \- user name and password to use for proxy authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYUSERPWD, char *userpwd);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_CAINFO.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_CAINFO 3 "May 30, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_CAINFO \- path to proxy Certificate Authority (CA) bundle
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAINFO, char *path);
.SH DESCRIPTION
This option is for connecting to a HTTPS proxy, not a HTTPS server.

Pass a char * to a zero terminated string naming a file holding one or more
certificates to verify the HTTPS proxy with.

If \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
server's certificate, \fICURLOPT_PROXY_CAINFO(3)\fP need not even indicate an
accessible file.







|








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_CAINFO 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_CAINFO \- path to proxy Certificate Authority (CA) bundle
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAINFO, char *path);
.SH DESCRIPTION
This option is for connecting to an HTTPS proxy, not an HTTPS server.

Pass a char * to a zero terminated string naming a file holding one or more
certificates to verify the HTTPS proxy with.

If \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
server's certificate, \fICURLOPT_PROXY_CAINFO(3)\fP need not even indicate an
accessible file.
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.SH PROTOCOLS
Used with HTTPS proxy
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  /* using a HTTPS proxy */
  curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
  curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "/etc/certs/cabundle.pem");
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}
.fi
.SH AVAILABILITY







|







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.SH PROTOCOLS
Used with HTTPS proxy
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  /* using an HTTPS proxy */
  curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
  curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO, "/etc/certs/cabundle.pem");
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}
.fi
.SH AVAILABILITY
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_CAPATH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_CAPATH 3 "September 10, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_CAPATH \- specify directory holding proxy CA certificates
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAPATH, char *capath);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_CAPATH 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_CAPATH \- specify directory holding proxy CA certificates
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAPATH, char *capath);
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.SH PROTOCOLS
Everything used over an HTTPS proxy
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  /* using a HTTPS proxy */
  curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
  curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}
.fi
.SH AVAILABILITY







|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.SH PROTOCOLS
Everything used over an HTTPS proxy
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  /* using an HTTPS proxy */
  curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
  curl_easy_setopt(curl, CURLOPT_PROXY_CAPATH, "/etc/cert-dir");
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}
.fi
.SH AVAILABILITY
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_CRLFILE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_CRLFILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_CRLFILE \- specify a proxy Certificate Revocation List file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CRLFILE, char *file);
.SH DESCRIPTION
This option is for connecting to a HTTPS proxy, not a HTTPS server.

Pass a char * to a zero terminated string naming a \fIfile\fP with the
concatenation of CRL (in PEM format) to use in the certificate validation that
occurs during the SSL exchange.

When curl is built to use NSS or GnuTLS, there is no way to influence the use
of CRL passed to help in the verification process. When libcurl is built with







|








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_CRLFILE 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_CRLFILE \- specify a proxy Certificate Revocation List file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CRLFILE, char *file);
.SH DESCRIPTION
This option is for connecting to an HTTPS proxy, not an HTTPS server.

Pass a char * to a zero terminated string naming a \fIfile\fP with the
concatenation of CRL (in PEM format) to use in the certificate validation that
occurs during the SSL exchange.

When curl is built to use NSS or GnuTLS, there is no way to influence the use
of CRL passed to help in the verification process. When libcurl is built with
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_KEYPASSWD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_KEYPASSWD 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_KEYPASSWD \- set passphrase to proxy private key
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_KEYPASSWD, char *pwd);
.SH DESCRIPTION
This option is for connecting to a HTTPS proxy, not a HTTPS server.

Pass a pointer to a zero terminated string as parameter. It will be used as
the password required to use the \fICURLOPT_PROXY_SSLKEY(3)\fP private key.
You never needed a pass phrase to load a certificate but you need one to load
your private key.

The application does not have to keep the string around after setting this







|








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_KEYPASSWD 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_KEYPASSWD \- set passphrase to proxy private key
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_KEYPASSWD, char *pwd);
.SH DESCRIPTION
This option is for connecting to an HTTPS proxy, not an HTTPS server.

Pass a pointer to a zero terminated string as parameter. It will be used as
the password required to use the \fICURLOPT_PROXY_SSLKEY(3)\fP private key.
You never needed a pass phrase to load a certificate but you need one to load
your private key.

The application does not have to keep the string around after setting this
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_PINNEDPUBLICKEY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_PINNEDPUBLICKEY 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_PINNEDPUBLICKEY \- set pinned public key for https proxy
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_PINNEDPUBLICKEY, char *pinnedpubkey);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_PINNEDPUBLICKEY 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_PINNEDPUBLICKEY \- set pinned public key for https proxy
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_PINNEDPUBLICKEY, char *pinnedpubkey);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SERVICE_NAME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SERVICE_NAME \- proxy authentication service name
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SERVICE_NAME, char *name);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SERVICE_NAME \- proxy authentication service name
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SERVICE_NAME, char *name);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSLCERT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLCERT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLCERT \- set SSL proxy client certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERT, char *cert);
.SH DESCRIPTION
This option is for connecting to a HTTPS proxy, not a HTTPS server.

Pass a pointer to a zero terminated string as parameter. The string should be
the file name of your client certificate used to connect to the HTTPS proxy.
The default format is "P12" on Secure Transport and "PEM" on other engines,
and can be changed with \fICURLOPT_PROXY_SSLCERTTYPE(3)\fP.

With NSS or Secure Transport, this can also be the nickname of the certificate







|








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLCERT 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLCERT \- set SSL proxy client certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERT, char *cert);
.SH DESCRIPTION
This option is for connecting to an HTTPS proxy, not an HTTPS server.

Pass a pointer to a zero terminated string as parameter. The string should be
the file name of your client certificate used to connect to the HTTPS proxy.
The default format is "P12" on Secure Transport and "PEM" on other engines,
and can be changed with \fICURLOPT_PROXY_SSLCERTTYPE(3)\fP.

With NSS or Secure Transport, this can also be the nickname of the certificate
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSLCERTTYPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLCERTTYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLCERTTYPE \- specify type of the proxy client SSL certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERTTYPE, char *type);
.SH DESCRIPTION
Pass a pointer to a zero terminated string as parameter. The string should be
the format of your client certificate used when connecting to a HTTPS proxy.

Supported formats are "PEM" and "DER", except with Secure Transport. OpenSSL
(versions 0.9.3 and later) and Secure Transport (on iOS 5 or later, or OS X
10.7 or later) also support "P12" for PKCS#12-encoded files.

The application does not have to keep the string around after setting this
option.







|









|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLCERTTYPE 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLCERTTYPE \- specify type of the proxy client SSL certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLCERTTYPE, char *type);
.SH DESCRIPTION
Pass a pointer to a zero terminated string as parameter. The string should be
the format of your client certificate used when connecting to an HTTPS proxy.

Supported formats are "PEM" and "DER", except with Secure Transport. OpenSSL
(versions 0.9.3 and later) and Secure Transport (on iOS 5 or later, or OS X
10.7 or later) also support "P12" for PKCS#12-encoded files.

The application does not have to keep the string around after setting this
option.
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSLKEY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLKEY 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLKEY \- specify private keyfile for TLS and SSL proxy client cert
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEY, char *keyfile);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLKEY 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLKEY \- specify private keyfile for TLS and SSL proxy client cert
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEY, char *keyfile);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSLKEYTYPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLKEYTYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLKEYTYPE \- set type of the proxy private key file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEYTYPE, char *type);
.SH DESCRIPTION
This option is for connecting to a HTTPS proxy, not a HTTPS server.

Pass a pointer to a zero terminated string as parameter. The string should be
the format of your private key. Supported formats are "PEM", "DER" and "ENG".

The application does not have to keep the string around after setting this
option.
.SH PROTOCOLS







|








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLKEYTYPE 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLKEYTYPE \- set type of the proxy private key file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLKEYTYPE, char *type);
.SH DESCRIPTION
This option is for connecting to an HTTPS proxy, not an HTTPS server.

Pass a pointer to a zero terminated string as parameter. The string should be
the format of your private key. Supported formats are "PEM", "DER" and "ENG".

The application does not have to keep the string around after setting this
option.
.SH PROTOCOLS
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSLVERSION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLVERSION 3 "January 10, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLVERSION \- set preferred proxy TLS/SSL version
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLVERSION, long version);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSLVERSION 3 "January 10, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSLVERSION \- set preferred proxy TLS/SSL version
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSLVERSION, long version);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSL_CIPHER_LIST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSL_CIPHER_LIST 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSL_CIPHER_LIST \- specify ciphers to use for proxy TLS
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_CIPHER_LIST, char *list);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSL_CIPHER_LIST 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSL_CIPHER_LIST \- specify ciphers to use for proxy TLS
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_CIPHER_LIST, char *list);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSL_OPTIONS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSL_OPTIONS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSL_OPTIONS \- set proxy SSL behavior options
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_OPTIONS, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSL_OPTIONS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSL_OPTIONS \- set proxy SSL behavior options
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_OPTIONS, long bitmask);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYHOST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSL_VERIFYHOST 3 "December 16, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSL_VERIFYHOST \- verify the proxy certificate's name against host
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_VERIFYHOST, long verify);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSL_VERIFYHOST 3 "May 02, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSL_VERIFYHOST \- verify the proxy certificate's name against host
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_VERIFYHOST, long verify);
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
of the proxy certificate.  If libcurl is built against NSS and
\fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is zero,
\fICURLOPT_PROXY_SSL_VERIFYHOST(3)\fP is also set to zero and cannot be
overridden.
.SH DEFAULT
2
.SH PROTOCOLS
All protocols when used over a HTTPS proxy.
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");

  /* Set the default value: strict name check please */







|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
of the proxy certificate.  If libcurl is built against NSS and
\fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is zero,
\fICURLOPT_PROXY_SSL_VERIFYHOST(3)\fP is also set to zero and cannot be
overridden.
.SH DEFAULT
2
.SH PROTOCOLS
All protocols when used over an HTTPS proxy.
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");

  /* Set the default value: strict name check please */
75
76
77
78
79
80
81
82
83

If built TLS enabled.
.SH RETURN VALUE
Returns CURLE_OK if TLS is supported, and CURLE_UNKNOWN_OPTION if not.

If 1 is set as argument, \fICURLE_BAD_FUNCTION_ARGUMENT\fP is returned.
.SH "SEE ALSO"
.BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), " CURLOPT_PROXY_CAINFO "(3), ",
.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_CAINFO "(3), ",







|
|
75
76
77
78
79
80
81
82
83

If built TLS enabled.
.SH RETURN VALUE
Returns CURLE_OK if TLS is supported, and CURLE_UNKNOWN_OPTION if not.

If 1 is set as argument, \fICURLE_BAD_FUNCTION_ARGUMENT\fP is returned.
.SH "SEE ALSO"
.BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), " CURLOPT_PROXY_CAINFO "(3), "
.BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_CAINFO "(3), "
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_SSL_VERIFYPEER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "December 16, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSL_VERIFYPEER \- verify the proxy's SSL certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_VERIFYPEER, long verify);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_SSL_VERIFYPEER 3 "December 16, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_SSL_VERIFYPEER \- verify the proxy's SSL certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_SSL_VERIFYPEER, long verify);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_PASSWORD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_TLSAUTH_PASSWORD \- password to use for proxy TLS authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_PASSWORD, char *pwd);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_TLSAUTH_PASSWORD \- password to use for proxy TLS authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_PASSWORD, char *pwd);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_TYPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_TLSAUTH_TYPE \- set proxy TLS authentication methods
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_TYPE, char *type);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_TLSAUTH_TYPE \- set proxy TLS authentication methods
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_TYPE, char *type);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_TLSAUTH_USERNAME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_TLSAUTH_USERNAME \- user name to use for proxy TLS authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_USERNAME, char *user);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_TLSAUTH_USERNAME \- user name to use for proxy TLS authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TLSAUTH_USERNAME, char *user);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PROXY_TRANSFER_MODE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_TRANSFER_MODE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_TRANSFER_MODE \- append FTP transfer mode to URL for proxy
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TRANSFER_MODE, long enabled);
.SH DESCRIPTION
Pass a long. If the value is set to 1 (one), it tells libcurl to set the
transfer mode (binary or ASCII) for FTP transfers done via a HTTP proxy, by
appending ;type=a or ;type=i to the URL. Without this setting, or it being set
to 0 (zero, the default), \fICURLOPT_TRANSFERTEXT(3)\fP has no effect when
doing FTP via a proxy. Beware that not all proxies support this feature.
.SH DEFAULT
0, disabled
.SH PROTOCOLS
FTP over proxy







|









|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PROXY_TRANSFER_MODE 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PROXY_TRANSFER_MODE \- append FTP transfer mode to URL for proxy
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TRANSFER_MODE, long enabled);
.SH DESCRIPTION
Pass a long. If the value is set to 1 (one), it tells libcurl to set the
transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by
appending ;type=a or ;type=i to the URL. Without this setting, or it being set
to 0 (zero, the default), \fICURLOPT_TRANSFERTEXT(3)\fP has no effect when
doing FTP via a proxy. Beware that not all proxies support this feature.
.SH DEFAULT
0, disabled
.SH PROTOCOLS
FTP over proxy
Changes to jni/curl/docs/libcurl/opts/CURLOPT_PUT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PUT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PUT \- make a HTTP PUT request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PUT, long put);
.SH DESCRIPTION
A parameter set to 1 tells the library to use HTTP PUT to transfer data. The
data should be set with \fICURLOPT_READDATA(3)\fP and







|


|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_PUT 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_PUT \- make an HTTP PUT request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PUT, long put);
.SH DESCRIPTION
A parameter set to 1 tells the library to use HTTP PUT to transfer data. The
data should be set with \fICURLOPT_READDATA(3)\fP and
Changes to jni/curl/docs/libcurl/opts/CURLOPT_QUOTE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_QUOTE 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_QUOTE \- (S)FTP commands to run before transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_QUOTE, struct curl_slist *cmds);
.SH DESCRIPTION
Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
prior to your request. This will be done before any other commands are issued
(even before the CWD command for FTP). The linked list should be a fully valid
list of 'struct curl_slist' structs properly filled in with text strings. Use
\fIcurl_slist_append(3)\fP to append strings (commands) to the list, and clear
the entire list afterwards with \fIcurl_slist_free_all(3)\fP. Disable this
operation again by setting a NULL to this option. When speaking to a FTP
server, prefix the command with an asterisk (*) to make libcurl continue even
if the command fails as by default libcurl will stop at first failure.

The set of valid FTP commands depends on the server (see RFC959 for a list of
mandatory commands).

The valid SFTP commands are:







|














|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_QUOTE 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_QUOTE \- (S)FTP commands to run before transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_QUOTE, struct curl_slist *cmds);
.SH DESCRIPTION
Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
prior to your request. This will be done before any other commands are issued
(even before the CWD command for FTP). The linked list should be a fully valid
list of 'struct curl_slist' structs properly filled in with text strings. Use
\fIcurl_slist_append(3)\fP to append strings (commands) to the list, and clear
the entire list afterwards with \fIcurl_slist_free_all(3)\fP. Disable this
operation again by setting a NULL to this option. When speaking to an FTP
server, prefix the command with an asterisk (*) to make libcurl continue even
if the command fails as by default libcurl will stop at first failure.

The set of valid FTP commands depends on the server (see RFC959 for a list of
mandatory commands).

The valid SFTP commands are:
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RANDOM_FILE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RANDOM_FILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RANDOM_FILE \- specify a source for random data
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char *path);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RANDOM_FILE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RANDOM_FILE \- specify a source for random data
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANDOM_FILE, char *path);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RANGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RANGE 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RANGE \- set byte range to request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANGE, char *range);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RANGE 3 "December 21, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RANGE \- set byte range to request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RANGE, char *range);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_READDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_READDATA 3 "May 01, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_READDATA \- custom pointer passed to the read callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_READDATA 3 "May 01, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_READDATA \- custom pointer passed to the read callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_READFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_READFUNCTION 3 "December 13, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_READFUNCTION \- read callback for data uploads
.SH SYNOPSIS
#include <curl/curl.h>

size_t read_callback(char *buffer, size_t size, size_t nitems, void *instream);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_READFUNCTION 3 "December 13, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_READFUNCTION \- read callback for data uploads
.SH SYNOPSIS
#include <curl/curl.h>

size_t read_callback(char *buffer, size_t size, size_t nitems, void *instream);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_REDIR_PROTOCOLS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_REDIR_PROTOCOLS 3 "September 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_REDIR_PROTOCOLS \- set protocols allowed to redirect to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REDIR_PROTOCOLS, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_REDIR_PROTOCOLS 3 "September 21, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_REDIR_PROTOCOLS \- set protocols allowed to redirect to
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REDIR_PROTOCOLS, long bitmask);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_REFERER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_REFERER 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_REFERER \- set the HTTP referer header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REFERER, char *where);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_REFERER 3 "December 21, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_REFERER \- set the HTTP referer header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REFERER, char *where);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_REQUEST_TARGET.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_REQUEST_TARGET 3 "June 21, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_REQUEST_TARGET \- specify an alternative target for this request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REQUEST_TARGET, string);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_REQUEST_TARGET 3 "June 21, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_REQUEST_TARGET \- specify an alternative target for this request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_REQUEST_TARGET, string);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RESOLVE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESOLVE 3 "January 30, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESOLVE \- provide custom host name to IP address resolves
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESOLVE 3 "January 30, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESOLVE \- provide custom host name to IP address resolves
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_RESOLVER_START_DATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESOLVER_START_DATA 3 "February 14, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESOLVER_START_DATA \- custom pointer passed to the resolver start callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESOLVER_START_DATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESOLVER_START_DATA 3 "February 14, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESOLVER_START_DATA \- custom pointer passed to the resolver start callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESOLVER_START_DATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RESOLVER_START_FUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESOLVER_START_FUNCTION 3 "February 14, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESOLVER_START_FUNCTION \- set callback to be called before a new resolve request is started
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESOLVER_START_FUNCTION 3 "February 14, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESOLVER_START_FUNCTION \- set callback to be called before a new resolve request is started
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_RESUME_FROM.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESUME_FROM 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESUME_FROM \- set a point to resume transfer from
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESUME_FROM, long from);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESUME_FROM 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESUME_FROM \- set a point to resume transfer from
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RESUME_FROM, long from);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RESUME_FROM_LARGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESUME_FROM_LARGE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESUME_FROM_LARGE \- set a point to resume transfer from
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RESUME_FROM_LARGE 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RESUME_FROM_LARGE \- set a point to resume transfer from
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_RTSP_CLIENT_CSEQ.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_CLIENT_CSEQ 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_CLIENT_CSEQ \- set the RTSP client CSEQ number
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_CLIENT_CSEQ, long cseq);
.SH DESCRIPTION
Pass a long to set the the CSEQ number to issue for the next RTSP
request. Useful if the application is resuming a previously broken
connection. The CSEQ will increment from this new number henceforth.
.SH DEFAULT
0
.SH PROTOCOLS
RTSP
.SH EXAMPLE







|








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_CLIENT_CSEQ 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_CLIENT_CSEQ \- set the RTSP client CSEQ number
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_CLIENT_CSEQ, long cseq);
.SH DESCRIPTION
Pass a long to set the CSEQ number to issue for the next RTSP
request. Useful if the application is resuming a previously broken
connection. The CSEQ will increment from this new number henceforth.
.SH DEFAULT
0
.SH PROTOCOLS
RTSP
.SH EXAMPLE
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RTSP_REQUEST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_REQUEST 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_REQUEST \- specify RTSP request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_REQUEST, long request);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_REQUEST 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_REQUEST \- specify RTSP request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_REQUEST, long request);
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
application/sdp'\fP. Time-condition headers will be added to Describe requests
if the \fICURLOPT_TIMECONDITION(3)\fP option is active. \fB(The session ID is
not needed for this method)\fP
.IP CURL_RTSPREQ_ANNOUNCE
When sent by a client, this method changes the description of the session. For
example, if a client is using the server to record a meeting, the client can
use Announce to inform the server of all the meta-information about the
session.  ANNOUNCE acts like a HTTP PUT or POST just like
\fICURL_RTSPREQ_SET_PARAMETER\fP
.IP CURL_RTSPREQ_SETUP
Setup is used to initialize the transport layer for the session. The
application must set the desired Transport options for a session by using the
\fICURLOPT_RTSP_TRANSPORT(3)\fP option prior to calling setup. If no session
ID is currently set with \fICURLOPT_RTSP_SESSION_ID(3)\fP, libcurl will
extract and use the session ID in the response to this request. \fB(The







|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
application/sdp'\fP. Time-condition headers will be added to Describe requests
if the \fICURLOPT_TIMECONDITION(3)\fP option is active. \fB(The session ID is
not needed for this method)\fP
.IP CURL_RTSPREQ_ANNOUNCE
When sent by a client, this method changes the description of the session. For
example, if a client is using the server to record a meeting, the client can
use Announce to inform the server of all the meta-information about the
session.  ANNOUNCE acts like an HTTP PUT or POST just like
\fICURL_RTSPREQ_SET_PARAMETER\fP
.IP CURL_RTSPREQ_SETUP
Setup is used to initialize the transport layer for the session. The
application must set the desired Transport options for a session by using the
\fICURLOPT_RTSP_TRANSPORT(3)\fP option prior to calling setup. If no session
ID is currently set with \fICURLOPT_RTSP_SESSION_ID(3)\fP, libcurl will
extract and use the session ID in the response to this request. \fB(The
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.IP CURL_RTSPREQ_TEARDOWN
This command terminates an RTSP session. Simply closing a connection does not
terminate the RTSP session since it is valid to control an RTSP session over
different connections.
.IP CURL_RTSPREQ_GET_PARAMETER
Retrieve a parameter from the server. By default, libcurl will automatically
include a \fIContent-Type: text/parameters\fP header on all non-empty requests
unless a custom one is set. GET_PARAMETER acts just like a HTTP PUT or POST
(see \fICURL_RTSPREQ_SET_PARAMETER\fP).
Applications wishing to send a heartbeat message (e.g. in the presence of a
server-specified timeout) should send use an empty GET_PARAMETER request.
.IP CURL_RTSPREQ_SET_PARAMETER
Set a parameter on the server. By default, libcurl will automatically include
a \fIContent-Type: text/parameters\fP header unless a custom one is set. The
interaction with SET_PARAMETER is much like a HTTP PUT or POST. An application
may either use \fICURLOPT_UPLOAD(3)\fP with \fICURLOPT_READDATA(3)\fP like a
HTTP PUT, or it may use \fICURLOPT_POSTFIELDS(3)\fP like a HTTP POST. No
chunked transfers are allowed, so the application must set the
\fICURLOPT_INFILESIZE(3)\fP in the former and \fICURLOPT_POSTFIELDSIZE(3)\fP
in the latter. Also, there is no use of multi-part POSTs within RTSP.
.IP CURL_RTSPREQ_RECORD
Used to tell the server to record a session. Use the \fICURLOPT_RANGE(3)\fP
option to modify the record time.
.IP CURL_RTSPREQ_RECEIVE







|






|

|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
.IP CURL_RTSPREQ_TEARDOWN
This command terminates an RTSP session. Simply closing a connection does not
terminate the RTSP session since it is valid to control an RTSP session over
different connections.
.IP CURL_RTSPREQ_GET_PARAMETER
Retrieve a parameter from the server. By default, libcurl will automatically
include a \fIContent-Type: text/parameters\fP header on all non-empty requests
unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST
(see \fICURL_RTSPREQ_SET_PARAMETER\fP).
Applications wishing to send a heartbeat message (e.g. in the presence of a
server-specified timeout) should send use an empty GET_PARAMETER request.
.IP CURL_RTSPREQ_SET_PARAMETER
Set a parameter on the server. By default, libcurl will automatically include
a \fIContent-Type: text/parameters\fP header unless a custom one is set. The
interaction with SET_PARAMETER is much like an HTTP PUT or POST. An application
may either use \fICURLOPT_UPLOAD(3)\fP with \fICURLOPT_READDATA(3)\fP like a
HTTP PUT, or it may use \fICURLOPT_POSTFIELDS(3)\fP like an HTTP POST. No
chunked transfers are allowed, so the application must set the
\fICURLOPT_INFILESIZE(3)\fP in the former and \fICURLOPT_POSTFIELDSIZE(3)\fP
in the latter. Also, there is no use of multi-part POSTs within RTSP.
.IP CURL_RTSPREQ_RECORD
Used to tell the server to record a session. Use the \fICURLOPT_RANGE(3)\fP
option to modify the record time.
.IP CURL_RTSPREQ_RECEIVE
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RTSP_SERVER_CSEQ.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_SERVER_CSEQ \- set the RTSP server CSEQ number
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SERVER_CSEQ, long cseq);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_SERVER_CSEQ 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_SERVER_CSEQ \- set the RTSP server CSEQ number
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SERVER_CSEQ, long cseq);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RTSP_SESSION_ID.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_SESSION_ID \- set RTSP session ID
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SESSION_ID, char *id);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_SESSION_ID 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_SESSION_ID \- set RTSP session ID
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SESSION_ID, char *id);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RTSP_STREAM_URI.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_STREAM_URI 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_STREAM_URI \- set RTSP stream URI
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_STREAM_URI, char *URI);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_STREAM_URI 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_STREAM_URI \- set RTSP stream URI
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_STREAM_URI, char *URI);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_RTSP_TRANSPORT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_TRANSPORT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_TRANSPORT \- set RTSP Transport: header
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_RTSP_TRANSPORT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_RTSP_TRANSPORT \- set RTSP Transport: header
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SASL_IR.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SASL_IR 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SASL_IR \- enable sending initial response in first packet
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_IR, long enable);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SASL_IR 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SASL_IR \- enable sending initial response in first packet
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_IR, long enable);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SEEKDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SEEKDATA 3 "August 12, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SEEKDATA \- custom pointer passed to the seek callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SEEKDATA 3 "August 12, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SEEKDATA \- custom pointer passed to the seek callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SEEKDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SEEKFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SEEKFUNCTION 3 "August 12, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SEEKFUNCTION \- user callback for seeking in input stream
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SEEKFUNCTION 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SEEKFUNCTION \- user callback for seeking in input stream
.SH SYNOPSIS
.nf
#include <curl/curl.h>

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
shown above.

This function gets called by libcurl to seek to a certain position in the
input stream and can be used to fast forward a file in a resumed upload
(instead of reading all uploaded bytes with the normal read
function/callback). It is also called to rewind a stream when data has already
been sent to the server and needs to be sent again. This may happen when doing
a HTTP PUT or POST with a multi-pass authentication method, or when an
existing HTTP connection is reused too late and the server closes the
connection. The function shall work like fseek(3) or lseek(3) and it gets
SEEK_SET, SEEK_CUR or SEEK_END as argument for \fIorigin\fP, although libcurl
currently only passes SEEK_SET.

\fIuserp\fP is the pointer you set with \fICURLOPT_SEEKDATA(3)\fP.








|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
shown above.

This function gets called by libcurl to seek to a certain position in the
input stream and can be used to fast forward a file in a resumed upload
(instead of reading all uploaded bytes with the normal read
function/callback). It is also called to rewind a stream when data has already
been sent to the server and needs to be sent again. This may happen when doing
an HTTP PUT or POST with a multi-pass authentication method, or when an
existing HTTP connection is reused too late and the server closes the
connection. The function shall work like fseek(3) or lseek(3) and it gets
SEEK_SET, SEEK_CUR or SEEK_END as argument for \fIorigin\fP, although libcurl
currently only passes SEEK_SET.

\fIuserp\fP is the pointer you set with \fICURLOPT_SEEKDATA(3)\fP.

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SERVICE_NAME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SERVICE_NAME \- authentication service name
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SERVICE_NAME, char *name);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SERVICE_NAME 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SERVICE_NAME \- authentication service name
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SERVICE_NAME, char *name);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SHARE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SHARE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SHARE \- specify share handle to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SHARE, CURLSH *share);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SHARE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SHARE \- specify share handle to use
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SHARE, CURLSH *share);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SOCKOPTDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKOPTDATA 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKOPTDATA \- custom pointer to pass to sockopt callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKOPTDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKOPTDATA 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKOPTDATA \- custom pointer to pass to sockopt callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKOPTDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SOCKOPTFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKOPTFUNCTION 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKOPTFUNCTION \- set callback for setting socket options
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKOPTFUNCTION 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKOPTFUNCTION \- set callback for setting socket options
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SOCKS5_AUTH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKS5_AUTH 3 "April 27, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKS5_AUTH \- set allowed methods for SOCKS5 proxy authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_AUTH, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKS5_AUTH 3 "April 27, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKS5_AUTH \- set allowed methods for SOCKS5 proxy authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_AUTH, long bitmask);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_NEC.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKS5_GSSAPI_NEC 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKS5_GSSAPI_NEC \- set socks proxy gssapi negotiation protection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_NEC, long nec);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKS5_GSSAPI_NEC 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKS5_GSSAPI_NEC \- set socks proxy gssapi negotiation protection
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_NEC, long nec);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SOCKS5_GSSAPI_SERVICE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKS5_GSSAPI_SERVICE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKS5_GSSAPI_SERVICE \- SOCKS5 proxy authentication service name
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_SERVICE, char *name);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SOCKS5_GSSAPI_SERVICE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SOCKS5_GSSAPI_SERVICE \- SOCKS5 proxy authentication service name
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SOCKS5_GSSAPI_SERVICE, char *name);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSH_AUTH_TYPES.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_AUTH_TYPES 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_AUTH_TYPES \- set desired auth types for SFTP and SCP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_AUTH_TYPES, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_AUTH_TYPES 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_AUTH_TYPES \- set desired auth types for SFTP and SCP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_AUTH_TYPES, long bitmask);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSH_COMPRESSION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_COMPRESSION 3 "August 17, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_COMPRESSION \- enables automatic decompression of HTTP downloads
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long enable);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_COMPRESSION 3 "August 17, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_COMPRESSION \- enables automatic decompression of HTTP downloads
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long enable);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSH_HOST_PUBLIC_KEY_MD5.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 \- checksum of SSH server public key
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 \- checksum of SSH server public key
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSH_KEYDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_KEYDATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_KEYDATA \- pointer to pass to the SSH key callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KEYDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_KEYDATA 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_KEYDATA \- pointer to pass to the SSH key callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KEYDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSH_KEYFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_KEYFUNCTION 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_KEYFUNCTION \- callback for known host matching logic
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_KEYFUNCTION 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_KEYFUNCTION \- callback for known host matching logic
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSH_KNOWNHOSTS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_KNOWNHOSTS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_KNOWNHOSTS \- file name holding the SSH known hosts
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KNOWNHOSTS, char *fname);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_KNOWNHOSTS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_KNOWNHOSTS \- file name holding the SSH known hosts
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_KNOWNHOSTS, char *fname);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_PRIVATE_KEYFILE \- set private key file for SSH auth
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_PRIVATE_KEYFILE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_PRIVATE_KEYFILE \- set private key file for SSH auth
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_PUBLIC_KEYFILE \- set public key file for SSH auth
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSH_PUBLIC_KEYFILE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSH_PUBLIC_KEYFILE \- set public key file for SSH auth
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSLCERT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40











41
42
43
44
45
46
47
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLCERT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLCERT \- set SSL client certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERT, char *cert);
.SH DESCRIPTION
Pass a pointer to a zero terminated string as parameter. The string should be
the file name of your client certificate. The default format is "P12" on
Secure Transport and "PEM" on other engines, and can be changed with
\fICURLOPT_SSLCERTTYPE(3)\fP.

With NSS or Secure Transport, this can also be the nickname of the certificate
you wish to authenticate with as it is named in the security database. If you
want to use a file from the current directory, please precede it with "./"
prefix, in order to avoid confusion with a nickname.












When using a client certificate, you most likely also need to provide a
private key with \fICURLOPT_SSLKEY(3)\fP.

The application does not have to keep the string around after setting this
option.
.SH DEFAULT







|

















>
>
>
>
>
>
>
>
>
>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLCERT 3 "April 18, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLCERT \- set SSL client certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERT, char *cert);
.SH DESCRIPTION
Pass a pointer to a zero terminated string as parameter. The string should be
the file name of your client certificate. The default format is "P12" on
Secure Transport and "PEM" on other engines, and can be changed with
\fICURLOPT_SSLCERTTYPE(3)\fP.

With NSS or Secure Transport, this can also be the nickname of the certificate
you wish to authenticate with as it is named in the security database. If you
want to use a file from the current directory, please precede it with "./"
prefix, in order to avoid confusion with a nickname.

(Schannel/WinSSL only) Client certificates must be specified by a path
expression to a certificate store. (Loading PFX is not supported; you can
import it to a store first). You can use
"<store location>\\<store name>\\<thumbprint>" to refer to a certificate
in the system certificates store, for example,
"CurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint is
usually a SHA-1 hex string which you can see in certificate details. Following
store locations are supported: CurrentUser, LocalMachine, CurrentService,
Services, CurrentUserGroupPolicy, LocalMachineGroupPolicy,
LocalMachineEnterprise.

When using a client certificate, you most likely also need to provide a
private key with \fICURLOPT_SSLKEY(3)\fP.

The application does not have to keep the string around after setting this
option.
.SH DEFAULT
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSLCERTTYPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLCERTTYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLCERTTYPE \- specify type of the client SSL certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERTTYPE, char *type);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLCERTTYPE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLCERTTYPE \- specify type of the client SSL certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERTTYPE, char *type);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSLENGINE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLENGINE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLENGINE \- set SSL engine identifier
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE, char *id);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLENGINE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLENGINE \- set SSL engine identifier
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE, char *id);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSLENGINE_DEFAULT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLENGINE_DEFAULT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLENGINE_DEFAULT \- make SSL engine default
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE_DEFAULT, long val);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLENGINE_DEFAULT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLENGINE_DEFAULT \- make SSL engine default
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLENGINE_DEFAULT, long val);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSLKEY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLKEY 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLKEY \- specify private keyfile for TLS and SSL client cert
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLKEY, char *keyfile);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLKEY 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLKEY \- specify private keyfile for TLS and SSL client cert
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLKEY, char *keyfile);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSLKEYTYPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLKEYTYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLKEYTYPE \- set type of the private key file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLKEYTYPE, char *type);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLKEYTYPE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLKEYTYPE \- set type of the private key file
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLKEYTYPE, char *type);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSLVERSION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLVERSION 3 "January 10, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLVERSION \- set preferred TLS/SSL version
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLVERSION, long version);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSLVERSION 3 "January 10, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSLVERSION \- set preferred TLS/SSL version
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLVERSION, long version);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_CIPHER_LIST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_CIPHER_LIST 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_CIPHER_LIST \- specify ciphers to use for TLS
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CIPHER_LIST, char *list);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_CIPHER_LIST 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_CIPHER_LIST \- specify ciphers to use for TLS
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CIPHER_LIST, char *list);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_CTX_DATA 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_CTX_DATA \- custom pointer passed to ssl_ctx callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_DATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_CTX_DATA 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_CTX_DATA \- custom pointer passed to ssl_ctx callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_DATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_CTX_FUNCTION 3 "December 19, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL, wolfSSL/CyaSSL or mbedTLS
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_CTX_FUNCTION 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL, wolfSSL/CyaSSL or mbedTLS
.SH SYNOPSIS
.nf
#include <curl/curl.h>

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
This function will get called on all new connections made to a server, during
the SSL negotiation. The \fIssl_ctx\fP will point to a newly initialized object
each time, but note the pointer may be the same as from a prior call.

To use this properly, a non-trivial amount of knowledge of your SSL library is
necessary. For example, you can use this function to call library-specific
callbacks to add additional validation code for certificates, and even to
change the actual URI of a HTTPS request.
.SH DEFAULT
NULL
.SH PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
.SH EXAMPLE
See cacertinmem.c in docs/examples directory for usage example.








|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
This function will get called on all new connections made to a server, during
the SSL negotiation. The \fIssl_ctx\fP will point to a newly initialized object
each time, but note the pointer may be the same as from a prior call.

To use this properly, a non-trivial amount of knowledge of your SSL library is
necessary. For example, you can use this function to call library-specific
callbacks to add additional validation code for certificates, and even to
change the actual URI of an HTTPS request.
.SH DEFAULT
NULL
.SH PROTOCOLS
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
.SH EXAMPLE
See cacertinmem.c in docs/examples directory for usage example.

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_ENABLE_ALPN.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_ENABLE_ALPN 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_ENABLE_ALPN \- enable ALPN
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_ALPN, long npn);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_ENABLE_ALPN 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_ENABLE_ALPN \- enable ALPN
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_ALPN, long npn);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_ENABLE_NPN.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_ENABLE_NPN 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_ENABLE_NPN \- enable NPN
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_NPN, long npn);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_ENABLE_NPN 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_ENABLE_NPN \- enable NPN
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_ENABLE_NPN, long npn);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_FALSESTART.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_FALSESTART 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_FALSESTART \- enable TLS false start
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_FALSESTART, long enable);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_FALSESTART 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_FALSESTART \- enable TLS false start
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_FALSESTART, long enable);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_OPTIONS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_OPTIONS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_OPTIONS \- set SSL behavior options
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_OPTIONS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_OPTIONS \- set SSL behavior options
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_OPTIONS, long bitmask);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_SESSIONID_CACHE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_SESSIONID_CACHE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_SESSIONID_CACHE \- enable/disable use of the SSL session-ID cache
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_SESSIONID_CACHE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_SESSIONID_CACHE \- enable/disable use of the SSL session-ID cache
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_VERIFYHOST.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_VERIFYHOST 3 "February 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_VERIFYHOST \- verify the certificate's name against host
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYHOST, long verify);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_VERIFYHOST 3 "February 02, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_VERIFYHOST \- verify the certificate's name against host
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYHOST, long verify);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_VERIFYPEER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_VERIFYPEER 3 "February 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_VERIFYPEER \- verify the peer's SSL certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYPEER, long verify);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_VERIFYPEER 3 "February 09, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_VERIFYPEER \- verify the peer's SSL certificate
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYPEER, long verify);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SSL_VERIFYSTATUS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_VERIFYSTATUS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_VERIFYSTATUS \- verify the certificate's status
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long verify);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SSL_VERIFYSTATUS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SSL_VERIFYSTATUS \- verify the certificate's status
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYSTATUS, long verify);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_STDERR.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_STDERR 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_STDERR \- redirect stderr to another stream
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_STDERR 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_STDERR \- redirect stderr to another stream
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STDERR, FILE *stream);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_STREAM_DEPENDS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_STREAM_DEPENDS \- set stream this transfer depends on
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS, CURL *dephandle);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_STREAM_DEPENDS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_STREAM_DEPENDS \- set stream this transfer depends on
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS, CURL *dephandle);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_STREAM_DEPENDS_E.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_STREAM_DEPENDS_E 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_STREAM_DEPENDS_E \- set stream this transfer depends on execlusively
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS_E, CURL *dephandle);
.SH DESCRIPTION
Pass a CURL * pointer in \fIdephandle\fP to identify the stream within the
same connection that this stream is depending upon exclusively. That means it







|


|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_STREAM_DEPENDS_E 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_STREAM_DEPENDS_E \- set stream this transfer depends on exclusively
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS_E, CURL *dephandle);
.SH DESCRIPTION
Pass a CURL * pointer in \fIdephandle\fP to identify the stream within the
same connection that this stream is depending upon exclusively. That means it
Changes to jni/curl/docs/libcurl/opts/CURLOPT_STREAM_WEIGHT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_STREAM_WEIGHT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_STREAM_WEIGHT \- set numerical stream weight
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_WEIGHT, long weight);
.SH DESCRIPTION
Set the long \fIweight\fP to a number between 1 and 256.

When using HTTP/2, this option sets the individual weight for this particular
stream used by the easy \fIhandle\fP. Setting and using weights only makes
sense and is only usable when doing multiple streams over the same
connections, which thus implies that you use \fICURLMOPT_PIPELINING(3)\fP.

This option can be set during transfer and will then cause the updated weight
info get sent to the server the next time a HTTP/2 frame is sent to the
server.

See section 5.3 of RFC 7540 for protocol details:
https://httpwg.github.io/specs/rfc7540.html#StreamPriority

Streams with the same parent should be allocated resources proportionally
based on their weight. So if you have two streams going, stream A with weight







|
















|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_STREAM_WEIGHT 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_STREAM_WEIGHT \- set numerical stream weight
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_WEIGHT, long weight);
.SH DESCRIPTION
Set the long \fIweight\fP to a number between 1 and 256.

When using HTTP/2, this option sets the individual weight for this particular
stream used by the easy \fIhandle\fP. Setting and using weights only makes
sense and is only usable when doing multiple streams over the same
connections, which thus implies that you use \fICURLMOPT_PIPELINING(3)\fP.

This option can be set during transfer and will then cause the updated weight
info get sent to the server the next time an HTTP/2 frame is sent to the
server.

See section 5.3 of RFC 7540 for protocol details:
https://httpwg.github.io/specs/rfc7540.html#StreamPriority

Streams with the same parent should be allocated resources proportionally
based on their weight. So if you have two streams going, stream A with weight
Changes to jni/curl/docs/libcurl/opts/CURLOPT_SUPPRESS_CONNECT_HEADERS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SUPPRESS_CONNECT_HEADERS 3 "April 28, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SUPPRESS_CONNECT_HEADERS \- Suppress proxy CONNECT response headers from user callbacks
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_SUPPRESS_CONNECT_HEADERS 3 "April 28, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_SUPPRESS_CONNECT_HEADERS \- Suppress proxy CONNECT response headers from user callbacks
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_TCP_FASTOPEN.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_FASTOPEN 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_FASTOPEN \- enable TCP Fast Open
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_FASTOPEN, long enable);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_FASTOPEN 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_FASTOPEN \- enable TCP Fast Open
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_FASTOPEN, long enable);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TCP_KEEPALIVE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_KEEPALIVE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_KEEPALIVE \- enable TCP keep-alive probing
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPALIVE, long probe);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_KEEPALIVE 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_KEEPALIVE \- enable TCP keep-alive probing
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPALIVE, long probe);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TCP_KEEPIDLE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_KEEPIDLE 3 "January 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_KEEPIDLE \- set TCP keep-alive idle time wait
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPIDLE, long delay);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_KEEPIDLE 3 "January 02, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_KEEPIDLE \- set TCP keep-alive idle time wait
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPIDLE, long delay);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TCP_KEEPINTVL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_KEEPINTVL 3 "January 02, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_KEEPINTVL \- set TCP keep-alive interval
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPINTVL, long interval);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_KEEPINTVL 3 "January 02, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_KEEPINTVL \- set TCP keep-alive interval
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPINTVL, long interval);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TCP_NODELAY.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_NODELAY 3 "January 15, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_NODELAY, long nodelay);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TCP_NODELAY 3 "January 15, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_NODELAY, long nodelay);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TELNETOPTIONS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TELNETOPTIONS 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TELNETOPTIONS \- custom telnet options
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TELNETOPTIONS,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TELNETOPTIONS 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TELNETOPTIONS \- custom telnet options
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TELNETOPTIONS,
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TFTP_BLKSIZE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TFTP_BLKSIZE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TFTP_BLKSIZE \- TFTP block size
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_BLKSIZE, long blocksize);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TFTP_BLKSIZE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TFTP_BLKSIZE \- TFTP block size
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_BLKSIZE, long blocksize);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TFTP_NO_OPTIONS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TFTP_NO_OPTIONS 3 "April 06, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TFTP_NO_OPTIONS \- Do not send TFTP options requests.
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_NO_OPTIONS, long onoff);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TFTP_NO_OPTIONS 3 "April 06, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TFTP_NO_OPTIONS \- Do not send TFTP options requests.
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TFTP_NO_OPTIONS, long onoff);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TIMECONDITION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMECONDITION 3 "April 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMECONDITION \- select condition for a time request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMECONDITION, long cond);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMECONDITION 3 "April 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMECONDITION \- select condition for a time request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMECONDITION, long cond);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TIMEOUT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMEOUT 3 "October 03, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMEOUT \- set maximum time the request is allowed to take
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT, long timeout);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMEOUT 3 "October 03, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMEOUT \- set maximum time the request is allowed to take
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT, long timeout);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TIMEOUT_MS.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMEOUT_MS 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMEOUT_MS \- set maximum time the request is allowed to take
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT_MS, long timeout);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMEOUT_MS 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMEOUT_MS \- set maximum time the request is allowed to take
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT_MS, long timeout);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TIMEVALUE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMEVALUE 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMEVALUE \- set time value for conditional
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE, long val);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMEVALUE 3 "January 25, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMEVALUE \- set time value for conditional
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE, long val);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TIMEVALUE_LARGE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMEVALUE_LARGE 3 "January 25, 2018" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMEVALUE_LARGE \- set time value for conditional
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE_LARGE, curl_off_t val);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TIMEVALUE_LARGE 3 "January 25, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TIMEVALUE_LARGE \- set time value for conditional
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEVALUE_LARGE, curl_off_t val);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TLSAUTH_PASSWORD \- password to use for TLS authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_PASSWORD, char *pwd);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TLSAUTH_PASSWORD 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TLSAUTH_PASSWORD \- password to use for TLS authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_PASSWORD, char *pwd);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TLSAUTH_TYPE \- set TLS authentication methods
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_TYPE, char *type);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TLSAUTH_TYPE 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TLSAUTH_TYPE \- set TLS authentication methods
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_TYPE, char *type);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TLSAUTH_USERNAME \- user name to use for TLS authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_USERNAME, char *user);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TLSAUTH_USERNAME 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TLSAUTH_USERNAME \- user name to use for TLS authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_USERNAME, char *user);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TRANSFERTEXT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TRANSFERTEXT 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TRANSFERTEXT \- request a text based transfer for FTP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFERTEXT, long text);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TRANSFERTEXT 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TRANSFERTEXT \- request a text based transfer for FTP
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFERTEXT, long text);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TRANSFER_ENCODING 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TRANSFER_ENCODING \- ask for HTTP Transfer Encoding
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFER_ENCODING, long enable);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_TRANSFER_ENCODING 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_TRANSFER_ENCODING \- ask for HTTP Transfer Encoding
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFER_ENCODING, long enable);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_UNIX_SOCKET_PATH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_UNIX_SOCKET_PATH 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_UNIX_SOCKET_PATH \- set Unix domain socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UNIX_SOCKET_PATH, char *path);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_UNIX_SOCKET_PATH 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_UNIX_SOCKET_PATH \- set Unix domain socket
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UNIX_SOCKET_PATH, char *path);
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.SH DEFAULT
Default is NULL, meaning that no Unix domain sockets are used.
.SH PROTOCOLS
All protocols except for file:// and FTP are supported in theory. HTTP, IMAP,
POP3 and SMTP should in particular work (including their SSL/TLS variants).
.SH EXAMPLE
Given that you have an nginx server running, listening on /tmp/nginx.sock, you
can request a HTTP resource with:

.nf
    curl_easy_setopt(curl_handle, CURLOPT_UNIX_SOCKET_PATH, "/tmp/nginx.sock");
    curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/");
.fi

If you are on Linux and somehow have a need for paths larger than 107 bytes, you







|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.SH DEFAULT
Default is NULL, meaning that no Unix domain sockets are used.
.SH PROTOCOLS
All protocols except for file:// and FTP are supported in theory. HTTP, IMAP,
POP3 and SMTP should in particular work (including their SSL/TLS variants).
.SH EXAMPLE
Given that you have an nginx server running, listening on /tmp/nginx.sock, you
can request an HTTP resource with:

.nf
    curl_easy_setopt(curl_handle, CURLOPT_UNIX_SOCKET_PATH, "/tmp/nginx.sock");
    curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/");
.fi

If you are on Linux and somehow have a need for paths larger than 107 bytes, you
Changes to jni/curl/docs/libcurl/opts/CURLOPT_UNRESTRICTED_AUTH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_UNRESTRICTED_AUTH 3 "May 15, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_UNRESTRICTED_AUTH \- send credentials to other hosts too
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_UNRESTRICTED_AUTH 3 "May 15, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_UNRESTRICTED_AUTH \- send credentials to other hosts too
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_UPLOAD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_UPLOAD 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_UPLOAD \- enable data upload
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UPLOAD, long upload);
.SH DESCRIPTION
The long parameter \fIupload\fP set to 1 tells the library to prepare for and
perform an upload. The \fICURLOPT_READDATA(3)\fP and
\fICURLOPT_INFILESIZE(3)\fP or \fICURLOPT_INFILESIZE_LARGE(3)\fP options are
also interesting for uploads. If the protocol is HTTP, uploading means using
the PUT request unless you tell libcurl otherwise.

Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.

If you use PUT to a HTTP 1.1 server, you can upload data without knowing the
size before starting the transfer if you use chunked encoding. You enable this
by adding a header like "Transfer-Encoding: chunked" with
\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
must specify the size.
.SH DEFAULT
0, default is download
.SH PROTOCOLS







|

















|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_UPLOAD 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_UPLOAD \- enable data upload
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_UPLOAD, long upload);
.SH DESCRIPTION
The long parameter \fIupload\fP set to 1 tells the library to prepare for and
perform an upload. The \fICURLOPT_READDATA(3)\fP and
\fICURLOPT_INFILESIZE(3)\fP or \fICURLOPT_INFILESIZE_LARGE(3)\fP options are
also interesting for uploads. If the protocol is HTTP, uploading means using
the PUT request unless you tell libcurl otherwise.

Using PUT with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
You can disable this header with \fICURLOPT_HTTPHEADER(3)\fP as usual.

If you use PUT to an HTTP 1.1 server, you can upload data without knowing the
size before starting the transfer if you use chunked encoding. You enable this
by adding a header like "Transfer-Encoding: chunked" with
\fICURLOPT_HTTPHEADER(3)\fP. With HTTP 1.0 or without chunked transfer, you
must specify the size.
.SH DEFAULT
0, default is download
.SH PROTOCOLS
Changes to jni/curl/docs/libcurl/opts/CURLOPT_URL.3.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_URL 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_URL \- provide the URL to use in the request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_URL, char *URL);







|














|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" **************************************************************************
.\" *                                  _   _ ____  _
.\" *  Project                     ___| | | |  _ \| |
.\" *                             / __| | | | |_) | |
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
.\" *
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
.\" * copies of the Software, and permit persons to whom the Software is
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_URL 3 "April 30, 2018" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_URL \- provide the URL to use in the request
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_URL, char *URL);
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
smtp://mail.example.com:587/ - This will connect to a SMTP server on the
alternative mail port.

The path part of the URL is protocol specific and whilst some examples are
given below this list is not conclusive:

.IP HTTP
The path part of a HTTP request specifies the file to retrieve and from what
directory. If the directory is not specified then the web server's root
directory is used. If the file is omitted then the default document will be
retrieved for either the directory specified or the root directory. The exact
resource returned for each URL is entirely dependent on the server's
configuration.

http://www.example.com - This gets the main page from the web server.







|







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
smtp://mail.example.com:587/ - This will connect to a SMTP server on the
alternative mail port.

The path part of the URL is protocol specific and whilst some examples are
given below this list is not conclusive:

.IP HTTP
The path part of an HTTP request specifies the file to retrieve and from what
directory. If the directory is not specified then the web server's root
directory is used. If the file is omitted then the default document will be
retrieved for either the directory specified or the root directory. The exact
resource returned for each URL is entirely dependent on the server's
configuration.

http://www.example.com - This gets the main page from the web server.
283
284
285
286
287
288
289










290
291
292
293
294
295
296
user wants to pass in a '#' (hash) character it will be treated as a fragment
and get cut off by libcurl if provided literally. You will instead have to
escape it by providing it as backslash and its ASCII value in hexadecimal:
"\\23".

The application does not have to keep the string around after setting this
option.










.SH DEFAULT
There is no default URL. If this option isn't set, no transfer can be
performed.
.SH SECURITY CONCERNS
Applications may at times find it convenient to allow users to specify URLs
for various purposes and that string would then end up fed to this option.








>
>
>
>
>
>
>
>
>
>







283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
user wants to pass in a '#' (hash) character it will be treated as a fragment
and get cut off by libcurl if provided literally. You will instead have to
escape it by providing it as backslash and its ASCII value in hexadecimal:
"\\23".

The application does not have to keep the string around after setting this
option.
.SH ENCODING
The string pointed to in the \fICURLOPT_URL(3)\fP argument is generally
expected to be a sequence of characters using an ASCII compatible encoding.

If libcurl is built with IDN support, the server name part of the URL can use
an "international name" by using the current encoding (according to locale) or
UTF-8 (when winidn is used).

If libcurl is built without IDN support, the server name is used exactly as
specified when passed to the name resolver functions.
.SH DEFAULT
There is no default URL. If this option isn't set, no transfer can be
performed.
.SH SECURITY CONCERNS
Applications may at times find it convenient to allow users to specify URLs
for various purposes and that string would then end up fed to this option.

Changes to jni/curl/docs/libcurl/opts/CURLOPT_USERAGENT.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_USERAGENT 3 "December 21, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_USERAGENT \- set HTTP user-agent header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERAGENT, char *ua);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_USERAGENT 3 "December 21, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_USERAGENT \- set HTTP user-agent header
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERAGENT, char *ua);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_USERNAME.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_USERNAME 3 "May 05, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_USERNAME \- user name to use in authentication
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_USERNAME 3 "May 05, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_USERNAME \- user name to use in authentication
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_USERPWD.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_USERPWD 3 "August 24, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_USERPWD \- user name and password to use in authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERPWD, char *userpwd);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_USERPWD 3 "August 24, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_USERPWD \- user name and password to use in authentication
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USERPWD, char *userpwd);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_USE_SSL.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_USE_SSL 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_USE_SSL \- request using SSL / TLS for the transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USE_SSL, long level);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_USE_SSL 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_USE_SSL \- request using SSL / TLS for the transfer
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_USE_SSL, long level);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_VERBOSE.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_VERBOSE 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_VERBOSE \- set verbose mode on/off
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_VERBOSE, long onoff);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_VERBOSE 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_VERBOSE \- set verbose mode on/off
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_VERBOSE, long onoff);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_WILDCARDMATCH 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_WILDCARDMATCH \- enable directory wildcard transfers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WILDCARDMATCH, long onoff);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_WILDCARDMATCH 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_WILDCARDMATCH \- enable directory wildcard transfers
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WILDCARDMATCH, long onoff);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_WRITEDATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_WRITEDATA 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_WRITEDATA \- custom pointer passed to the write callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WRITEDATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_WRITEDATA 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_WRITEDATA \- custom pointer passed to the write callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_WRITEDATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_WRITEFUNCTION 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_WRITEFUNCTION \- set callback for writing received data
.SH SYNOPSIS
.nf
#include <curl/curl.h>








|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_WRITEFUNCTION 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_WRITEFUNCTION \- set callback for writing received data
.SH SYNOPSIS
.nf
#include <curl/curl.h>

Changes to jni/curl/docs/libcurl/opts/CURLOPT_XFERINFODATA.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_XFERINFODATA 3 "October 09, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_XFERINFODATA \- custom pointer passed to the progress callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XFERINFODATA, void *pointer);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_XFERINFODATA 3 "October 09, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_XFERINFODATA \- custom pointer passed to the progress callback
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XFERINFODATA, void *pointer);
Changes to jni/curl/docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_XFERINFOFUNCTION 3 "February 03, 2016" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_XFERINFOFUNCTION \- callback to progress meter function
.SH SYNOPSIS
#include <curl/curl.h>

int progress_callback(void *clientp,







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_XFERINFOFUNCTION 3 "February 03, 2016" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_XFERINFOFUNCTION \- callback to progress meter function
.SH SYNOPSIS
#include <curl/curl.h>

int progress_callback(void *clientp,
Changes to jni/curl/docs/libcurl/opts/CURLOPT_XOAUTH2_BEARER.3.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_XOAUTH2_BEARER 3 "May 31, 2017" "libcurl 7.59.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_XOAUTH2_BEARER \- specify OAuth 2.0 access token
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XOAUTH2_BEARER, char *token);







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH CURLOPT_XOAUTH2_BEARER 3 "May 31, 2017" "libcurl 7.60.0" "curl_easy_setopt options"

.SH NAME
CURLOPT_XOAUTH2_BEARER \- specify OAuth 2.0 access token
.SH SYNOPSIS
#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_XOAUTH2_BEARER, char *token);
Changes to jni/curl/docs/libcurl/opts/Makefile.in.
505
506
507
508
509
510
511

512
513
514
515
516
517
518
  CURLOPT_DEFAULT_PROTOCOL.3                    \
  CURLOPT_DIRLISTONLY.3                         \
  CURLOPT_DNS_CACHE_TIMEOUT.3                   \
  CURLOPT_DNS_INTERFACE.3                       \
  CURLOPT_DNS_LOCAL_IP4.3                       \
  CURLOPT_DNS_LOCAL_IP6.3                       \
  CURLOPT_DNS_SERVERS.3                         \

  CURLOPT_DNS_USE_GLOBAL_CACHE.3                \
  CURLOPT_EGDSOCKET.3                           \
  CURLOPT_ERRORBUFFER.3                         \
  CURLOPT_EXPECT_100_TIMEOUT_MS.3               \
  CURLOPT_FAILONERROR.3                         \
  CURLOPT_FILETIME.3                            \
  CURLOPT_FNMATCH_DATA.3                        \







>







505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
  CURLOPT_DEFAULT_PROTOCOL.3                    \
  CURLOPT_DIRLISTONLY.3                         \
  CURLOPT_DNS_CACHE_TIMEOUT.3                   \
  CURLOPT_DNS_INTERFACE.3                       \
  CURLOPT_DNS_LOCAL_IP4.3                       \
  CURLOPT_DNS_LOCAL_IP6.3                       \
  CURLOPT_DNS_SERVERS.3                         \
  CURLOPT_DNS_SHUFFLE_ADDRESSES.3               \
  CURLOPT_DNS_USE_GLOBAL_CACHE.3                \
  CURLOPT_EGDSOCKET.3                           \
  CURLOPT_ERRORBUFFER.3                         \
  CURLOPT_EXPECT_100_TIMEOUT_MS.3               \
  CURLOPT_FAILONERROR.3                         \
  CURLOPT_FILETIME.3                            \
  CURLOPT_FNMATCH_DATA.3                        \
530
531
532
533
534
535
536

537
538
539
540
541
542
543
  CURLOPT_FTP_SKIP_PASV_IP.3                    \
  CURLOPT_FTP_SSL_CCC.3                         \
  CURLOPT_FTP_USE_EPRT.3                        \
  CURLOPT_FTP_USE_EPSV.3                        \
  CURLOPT_FTP_USE_PRET.3                        \
  CURLOPT_GSSAPI_DELEGATION.3                   \
  CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3           \

  CURLOPT_HEADER.3                              \
  CURLOPT_HEADERDATA.3                          \
  CURLOPT_HEADERFUNCTION.3                      \
  CURLOPT_HEADEROPT.3                           \
  CURLOPT_HTTP200ALIASES.3                      \
  CURLOPT_HTTPAUTH.3                            \
  CURLOPT_HTTPGET.3                             \







>







531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
  CURLOPT_FTP_SKIP_PASV_IP.3                    \
  CURLOPT_FTP_SSL_CCC.3                         \
  CURLOPT_FTP_USE_EPRT.3                        \
  CURLOPT_FTP_USE_EPSV.3                        \
  CURLOPT_FTP_USE_PRET.3                        \
  CURLOPT_GSSAPI_DELEGATION.3                   \
  CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3           \
  CURLOPT_HAPROXYPROTOCOL.3                     \
  CURLOPT_HEADER.3                              \
  CURLOPT_HEADERDATA.3                          \
  CURLOPT_HEADERFUNCTION.3                      \
  CURLOPT_HEADEROPT.3                           \
  CURLOPT_HTTP200ALIASES.3                      \
  CURLOPT_HTTPAUTH.3                            \
  CURLOPT_HTTPGET.3                             \
Changes to jni/curl/docs/libcurl/opts/Makefile.inc.
108
109
110
111
112
113
114

115
116
117
118
119
120
121
  CURLOPT_DEFAULT_PROTOCOL.3                    \
  CURLOPT_DIRLISTONLY.3                         \
  CURLOPT_DNS_CACHE_TIMEOUT.3                   \
  CURLOPT_DNS_INTERFACE.3                       \
  CURLOPT_DNS_LOCAL_IP4.3                       \
  CURLOPT_DNS_LOCAL_IP6.3                       \
  CURLOPT_DNS_SERVERS.3                         \

  CURLOPT_DNS_USE_GLOBAL_CACHE.3                \
  CURLOPT_EGDSOCKET.3                           \
  CURLOPT_ERRORBUFFER.3                         \
  CURLOPT_EXPECT_100_TIMEOUT_MS.3               \
  CURLOPT_FAILONERROR.3                         \
  CURLOPT_FILETIME.3                            \
  CURLOPT_FNMATCH_DATA.3                        \







>







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
  CURLOPT_DEFAULT_PROTOCOL.3                    \
  CURLOPT_DIRLISTONLY.3                         \
  CURLOPT_DNS_CACHE_TIMEOUT.3                   \
  CURLOPT_DNS_INTERFACE.3                       \
  CURLOPT_DNS_LOCAL_IP4.3                       \
  CURLOPT_DNS_LOCAL_IP6.3                       \
  CURLOPT_DNS_SERVERS.3                         \
  CURLOPT_DNS_SHUFFLE_ADDRESSES.3               \
  CURLOPT_DNS_USE_GLOBAL_CACHE.3                \
  CURLOPT_EGDSOCKET.3                           \
  CURLOPT_ERRORBUFFER.3                         \
  CURLOPT_EXPECT_100_TIMEOUT_MS.3               \
  CURLOPT_FAILONERROR.3                         \
  CURLOPT_FILETIME.3                            \
  CURLOPT_FNMATCH_DATA.3                        \
133
134
135
136
137
138
139

140
141
142
143
144
145
146
  CURLOPT_FTP_SKIP_PASV_IP.3                    \
  CURLOPT_FTP_SSL_CCC.3                         \
  CURLOPT_FTP_USE_EPRT.3                        \
  CURLOPT_FTP_USE_EPSV.3                        \
  CURLOPT_FTP_USE_PRET.3                        \
  CURLOPT_GSSAPI_DELEGATION.3                   \
  CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3           \

  CURLOPT_HEADER.3                              \
  CURLOPT_HEADERDATA.3                          \
  CURLOPT_HEADERFUNCTION.3                      \
  CURLOPT_HEADEROPT.3                           \
  CURLOPT_HTTP200ALIASES.3                      \
  CURLOPT_HTTPAUTH.3                            \
  CURLOPT_HTTPGET.3                             \







>







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
  CURLOPT_FTP_SKIP_PASV_IP.3                    \
  CURLOPT_FTP_SSL_CCC.3                         \
  CURLOPT_FTP_USE_EPRT.3                        \
  CURLOPT_FTP_USE_EPSV.3                        \
  CURLOPT_FTP_USE_PRET.3                        \
  CURLOPT_GSSAPI_DELEGATION.3                   \
  CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3           \
  CURLOPT_HAPROXYPROTOCOL.3                     \
  CURLOPT_HEADER.3                              \
  CURLOPT_HEADERDATA.3                          \
  CURLOPT_HEADERFUNCTION.3                      \
  CURLOPT_HEADEROPT.3                           \
  CURLOPT_HTTP200ALIASES.3                      \
  CURLOPT_HTTPAUTH.3                            \
  CURLOPT_HTTPGET.3                             \
Changes to jni/curl/docs/libcurl/symbols-in-versions.
369
370
371
372
373
374
375

376
377
378
379
380
381
382
CURLOPT_DEFAULT_PROTOCOL        7.45.0
CURLOPT_DIRLISTONLY             7.17.0
CURLOPT_DNS_CACHE_TIMEOUT       7.9.3
CURLOPT_DNS_INTERFACE           7.33.0
CURLOPT_DNS_LOCAL_IP4           7.33.0
CURLOPT_DNS_LOCAL_IP6           7.33.0
CURLOPT_DNS_SERVERS             7.24.0

CURLOPT_DNS_USE_GLOBAL_CACHE    7.9.3         7.11.1
CURLOPT_EGDSOCKET               7.7
CURLOPT_ENCODING                7.10
CURLOPT_ERRORBUFFER             7.1
CURLOPT_EXPECT_100_TIMEOUT_MS   7.36.0
CURLOPT_FAILONERROR             7.1
CURLOPT_FILE                    7.1           7.9.7







>







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
CURLOPT_DEFAULT_PROTOCOL        7.45.0
CURLOPT_DIRLISTONLY             7.17.0
CURLOPT_DNS_CACHE_TIMEOUT       7.9.3
CURLOPT_DNS_INTERFACE           7.33.0
CURLOPT_DNS_LOCAL_IP4           7.33.0
CURLOPT_DNS_LOCAL_IP6           7.33.0
CURLOPT_DNS_SERVERS             7.24.0
CURLOPT_DNS_SHUFFLE_ADDRESSES   7.60.0
CURLOPT_DNS_USE_GLOBAL_CACHE    7.9.3         7.11.1
CURLOPT_EGDSOCKET               7.7
CURLOPT_ENCODING                7.10
CURLOPT_ERRORBUFFER             7.1
CURLOPT_EXPECT_100_TIMEOUT_MS   7.36.0
CURLOPT_FAILONERROR             7.1
CURLOPT_FILE                    7.1           7.9.7
400
401
402
403
404
405
406

407
408
409
410
411
412
413
CURLOPT_FTP_SSL                 7.11.0        7.16.4
CURLOPT_FTP_SSL_CCC             7.16.1
CURLOPT_FTP_USE_EPRT            7.10.5
CURLOPT_FTP_USE_EPSV            7.9.2
CURLOPT_FTP_USE_PRET            7.20.0
CURLOPT_GSSAPI_DELEGATION       7.22.0
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 7.59.0

CURLOPT_HEADER                  7.1
CURLOPT_HEADERDATA              7.10
CURLOPT_HEADERFUNCTION          7.7.2
CURLOPT_HEADEROPT               7.37.0
CURLOPT_HTTP200ALIASES          7.10.3
CURLOPT_HTTPAUTH                7.10.6
CURLOPT_HTTPGET                 7.8.1







>







401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
CURLOPT_FTP_SSL                 7.11.0        7.16.4
CURLOPT_FTP_SSL_CCC             7.16.1
CURLOPT_FTP_USE_EPRT            7.10.5
CURLOPT_FTP_USE_EPSV            7.9.2
CURLOPT_FTP_USE_PRET            7.20.0
CURLOPT_GSSAPI_DELEGATION       7.22.0
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS 7.59.0
CURLOPT_HAPROXYPROTOCOL         7.60.0
CURLOPT_HEADER                  7.1
CURLOPT_HEADERDATA              7.10
CURLOPT_HEADERFUNCTION          7.7.2
CURLOPT_HEADEROPT               7.37.0
CURLOPT_HTTP200ALIASES          7.10.3
CURLOPT_HTTPAUTH                7.10.6
CURLOPT_HTTPGET                 7.8.1
Changes to jni/curl/include/curl/curl.h.
1836
1837
1838
1839
1840
1841
1842






1843
1844
1845
1846
1847
1848
1849
  CINIT(HAPPY_EYEBALLS_TIMEOUT_MS, LONG, 271),

  /* Function that will be called before a resolver request is made */
  CINIT(RESOLVER_START_FUNCTION, FUNCTIONPOINT, 272),

  /* User data to pass to the resolver start callback. */
  CINIT(RESOLVER_START_DATA, OBJECTPOINT, 273),







  CURLOPT_LASTENTRY /* the last unused */
} CURLoption;

#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
                          the obsolete stuff removed! */








>
>
>
>
>
>







1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
  CINIT(HAPPY_EYEBALLS_TIMEOUT_MS, LONG, 271),

  /* Function that will be called before a resolver request is made */
  CINIT(RESOLVER_START_FUNCTION, FUNCTIONPOINT, 272),

  /* User data to pass to the resolver start callback. */
  CINIT(RESOLVER_START_DATA, OBJECTPOINT, 273),

  /* send HAProxy PROXY protocol header? */
  CINIT(HAPROXYPROTOCOL, LONG, 274),

  /* shuffle addresses before use when DNS returns multiple */
  CINIT(DNS_SHUFFLE_ADDRESSES, LONG, 275),

  CURLOPT_LASTENTRY /* the last unused */
} CURLoption;

#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
                          the obsolete stuff removed! */

Changes to jni/curl/include/curl/curlver.h.
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
   a script at release-time. This was made its own header file in 7.11.2 */

/* This is the global package copyright */
#define LIBCURL_COPYRIGHT "1996 - 2018 Daniel Stenberg, <daniel@haxx.se>."

/* This is the version number of the libcurl package from which this header
   file origins: */
#define LIBCURL_VERSION "7.59.0"

/* The numeric version number is also available "in parts" by using these
   defines: */
#define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 59
#define LIBCURL_VERSION_PATCH 0

/* This is the numeric version of the libcurl version number, meant for easier
   parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
   always follow this syntax:

         0xXXYYZZ







|




|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
   a script at release-time. This was made its own header file in 7.11.2 */

/* This is the global package copyright */
#define LIBCURL_COPYRIGHT "1996 - 2018 Daniel Stenberg, <daniel@haxx.se>."

/* This is the version number of the libcurl package from which this header
   file origins: */
#define LIBCURL_VERSION "7.60.0"

/* The numeric version number is also available "in parts" by using these
   defines: */
#define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 60
#define LIBCURL_VERSION_PATCH 0

/* This is the numeric version of the libcurl version number, meant for easier
   parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
   always follow this syntax:

         0xXXYYZZ
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
   and it is always a greater number in a more recent release. It makes
   comparisons with greater than and less than work.

   Note: This define is the full hex number and _does not_ use the
   CURL_VERSION_BITS() macro since curl's own configure script greps for it
   and needs it to contain the full number.
*/
#define LIBCURL_VERSION_NUM 0x073b00

/*
 * This is the date and time when the full source package was created. The
 * timestamp is not stored in git, as the timestamp is properly set in the
 * tarballs by the maketgz script.
 *
 * The format of the date follows this template:
 *
 * "2007-11-23"
 */
#define LIBCURL_TIMESTAMP "2018-03-14"

#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
#define CURL_AT_LEAST_VERSION(x,y,z) \
  (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))

#endif /* __CURL_CURLVER_H */







|










|






53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
   and it is always a greater number in a more recent release. It makes
   comparisons with greater than and less than work.

   Note: This define is the full hex number and _does not_ use the
   CURL_VERSION_BITS() macro since curl's own configure script greps for it
   and needs it to contain the full number.
*/
#define LIBCURL_VERSION_NUM 0x073c00

/*
 * This is the date and time when the full source package was created. The
 * timestamp is not stored in git, as the timestamp is properly set in the
 * tarballs by the maketgz script.
 *
 * The format of the date follows this template:
 *
 * "2007-11-23"
 */
#define LIBCURL_TIMESTAMP "2018-05-16"

#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
#define CURL_AT_LEAST_VERSION(x,y,z) \
  (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))

#endif /* __CURL_CURLVER_H */
Changes to jni/curl/include/curl/system.h.
296
297
298
299
300
301
302


303
304
305
306
307
308
309
310
#  define CURL_SUFFIX_CURL_OFF_TU    ULL
#  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
#  define CURL_PULL_SYS_TYPES_H      1
#  define CURL_PULL_SYS_SOCKET_H     1

#elif defined(__SUNPRO_C) /* Oracle Solaris Studio */
#  if !defined(__LP64) && (defined(__ILP32) ||                          \


                           defined(__i386) || defined(__sparcv8))
#    define CURL_TYPEOF_CURL_OFF_T     long long
#    define CURL_FORMAT_CURL_OFF_T     "lld"
#    define CURL_FORMAT_CURL_OFF_TU    "llu"
#    define CURL_SUFFIX_CURL_OFF_T     LL
#    define CURL_SUFFIX_CURL_OFF_TU    ULL
#  elif defined(__LP64) || \
        defined(__amd64) || defined(__sparcv9)







>
>
|







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
#  define CURL_SUFFIX_CURL_OFF_TU    ULL
#  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
#  define CURL_PULL_SYS_TYPES_H      1
#  define CURL_PULL_SYS_SOCKET_H     1

#elif defined(__SUNPRO_C) /* Oracle Solaris Studio */
#  if !defined(__LP64) && (defined(__ILP32) ||                          \
                           defined(__i386) ||                           \
                           defined(__sparcv8) ||                        \
                           defined(__sparcv8plus))
#    define CURL_TYPEOF_CURL_OFF_T     long long
#    define CURL_FORMAT_CURL_OFF_T     "lld"
#    define CURL_FORMAT_CURL_OFF_TU    "llu"
#    define CURL_SUFFIX_CURL_OFF_T     LL
#    define CURL_SUFFIX_CURL_OFF_TU    ULL
#  elif defined(__LP64) || \
        defined(__amd64) || defined(__sparcv9)
Changes to jni/curl/lib/Makefile.in.
237
238
239
240
241
242
243
244

245
246
247
248
249
250
251
252
	vauth/libcurl_la-oauth2.lo vauth/libcurl_la-spnego_gssapi.lo \
	vauth/libcurl_la-spnego_sspi.lo
am__objects_3 = vtls/libcurl_la-openssl.lo vtls/libcurl_la-gtls.lo \
	vtls/libcurl_la-vtls.lo vtls/libcurl_la-nss.lo \
	vtls/libcurl_la-polarssl.lo \
	vtls/libcurl_la-polarssl_threadlock.lo \
	vtls/libcurl_la-axtls.lo vtls/libcurl_la-cyassl.lo \
	vtls/libcurl_la-schannel.lo vtls/libcurl_la-darwinssl.lo \

	vtls/libcurl_la-gskit.lo vtls/libcurl_la-mbedtls.lo
am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3)
am__objects_5 =
am__objects_6 = $(am__objects_5) $(am__objects_5) $(am__objects_5)
am_libcurl_la_OBJECTS = $(am__objects_4) $(am__objects_6)
libcurl_la_OBJECTS = $(am_libcurl_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)







|
>
|







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
	vauth/libcurl_la-oauth2.lo vauth/libcurl_la-spnego_gssapi.lo \
	vauth/libcurl_la-spnego_sspi.lo
am__objects_3 = vtls/libcurl_la-openssl.lo vtls/libcurl_la-gtls.lo \
	vtls/libcurl_la-vtls.lo vtls/libcurl_la-nss.lo \
	vtls/libcurl_la-polarssl.lo \
	vtls/libcurl_la-polarssl_threadlock.lo \
	vtls/libcurl_la-axtls.lo vtls/libcurl_la-cyassl.lo \
	vtls/libcurl_la-schannel.lo vtls/libcurl_la-schannel_verify.lo \
	vtls/libcurl_la-darwinssl.lo vtls/libcurl_la-gskit.lo \
	vtls/libcurl_la-mbedtls.lo
am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3)
am__objects_5 =
am__objects_6 = $(am__objects_5) $(am__objects_5) $(am__objects_5)
am_libcurl_la_OBJECTS = $(am__objects_4) $(am__objects_6)
libcurl_la_OBJECTS = $(am_libcurl_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
317
318
319
320
321
322
323
324


325
326
327
328
329
330
331
332
	vauth/libcurlu_la-spnego_gssapi.lo \
	vauth/libcurlu_la-spnego_sspi.lo
am__objects_9 = vtls/libcurlu_la-openssl.lo vtls/libcurlu_la-gtls.lo \
	vtls/libcurlu_la-vtls.lo vtls/libcurlu_la-nss.lo \
	vtls/libcurlu_la-polarssl.lo \
	vtls/libcurlu_la-polarssl_threadlock.lo \
	vtls/libcurlu_la-axtls.lo vtls/libcurlu_la-cyassl.lo \
	vtls/libcurlu_la-schannel.lo vtls/libcurlu_la-darwinssl.lo \


	vtls/libcurlu_la-gskit.lo vtls/libcurlu_la-mbedtls.lo
am__objects_10 = $(am__objects_7) $(am__objects_8) $(am__objects_9)
am_libcurlu_la_OBJECTS = $(am__objects_10) $(am__objects_6)
libcurlu_la_OBJECTS = $(am_libcurlu_la_OBJECTS)
libcurlu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcurlu_la_CFLAGS) \
	$(CFLAGS) $(libcurlu_la_LDFLAGS) $(LDFLAGS) -o $@
@BUILD_UNITTESTS_TRUE@am_libcurlu_la_rpath =







|
>
>
|







318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
	vauth/libcurlu_la-spnego_gssapi.lo \
	vauth/libcurlu_la-spnego_sspi.lo
am__objects_9 = vtls/libcurlu_la-openssl.lo vtls/libcurlu_la-gtls.lo \
	vtls/libcurlu_la-vtls.lo vtls/libcurlu_la-nss.lo \
	vtls/libcurlu_la-polarssl.lo \
	vtls/libcurlu_la-polarssl_threadlock.lo \
	vtls/libcurlu_la-axtls.lo vtls/libcurlu_la-cyassl.lo \
	vtls/libcurlu_la-schannel.lo \
	vtls/libcurlu_la-schannel_verify.lo \
	vtls/libcurlu_la-darwinssl.lo vtls/libcurlu_la-gskit.lo \
	vtls/libcurlu_la-mbedtls.lo
am__objects_10 = $(am__objects_7) $(am__objects_8) $(am__objects_9)
am_libcurlu_la_OBJECTS = $(am__objects_10) $(am__objects_6)
libcurlu_la_OBJECTS = $(am_libcurlu_la_OBJECTS)
libcurlu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcurlu_la_CFLAGS) \
	$(CFLAGS) $(libcurlu_la_LDFLAGS) $(LDFLAGS) -o $@
@BUILD_UNITTESTS_TRUE@am_libcurlu_la_rpath =
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
  vauth/digest.c vauth/digest_sspi.c vauth/krb5_gssapi.c                \
  vauth/krb5_sspi.c vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c       \
  vauth/spnego_gssapi.c vauth/spnego_sspi.c

LIB_VAUTH_HFILES = vauth/vauth.h vauth/digest.h vauth/ntlm.h
LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \
  vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c               \
  vtls/cyassl.c vtls/schannel.c vtls/darwinssl.c vtls/gskit.c           \
  vtls/mbedtls.c

LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h                \
  vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h   \
  vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h           \
  vtls/mbedtls.h

LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \







|
|







685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
  vauth/digest.c vauth/digest_sspi.c vauth/krb5_gssapi.c                \
  vauth/krb5_sspi.c vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c       \
  vauth/spnego_gssapi.c vauth/spnego_sspi.c

LIB_VAUTH_HFILES = vauth/vauth.h vauth/digest.h vauth/ntlm.h
LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \
  vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c               \
  vtls/cyassl.c vtls/schannel.c vtls/schannel_verify.c                  \
  vtls/darwinssl.c vtls/gskit.c vtls/mbedtls.c

LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h                \
  vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h   \
  vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h           \
  vtls/mbedtls.h

LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \
888
889
890
891
892
893
894


895
896
897
898
899
900
901
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-axtls.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-cyassl.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-schannel.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)


vtls/libcurl_la-darwinssl.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-gskit.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-mbedtls.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)








>
>







891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-axtls.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-cyassl.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-schannel.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-schannel_verify.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-darwinssl.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-gskit.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurl_la-mbedtls.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)

938
939
940
941
942
943
944


945
946
947
948
949
950
951
vtls/libcurlu_la-polarssl_threadlock.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-axtls.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-cyassl.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-schannel.lo: vtls/$(am__dirstamp) \


	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-darwinssl.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-gskit.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-mbedtls.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)







>
>







943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
vtls/libcurlu_la-polarssl_threadlock.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-axtls.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-cyassl.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-schannel.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-schannel_verify.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-darwinssl.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-gskit.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
vtls/libcurlu_la-mbedtls.lo: vtls/$(am__dirstamp) \
	vtls/$(DEPDIR)/$(am__dirstamp)
1210
1211
1212
1213
1214
1215
1216

1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228

1229
1230
1231
1232
1233
1234
1235
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-gtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-mbedtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-nss.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-openssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-polarssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-polarssl_threadlock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-schannel.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-vtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-axtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-cyassl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-darwinssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-gskit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-gtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-mbedtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-nss.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-openssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-polarssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-polarssl_threadlock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-schannel.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-vtls.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@







>












>







1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-gtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-mbedtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-nss.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-openssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-polarssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-polarssl_threadlock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-schannel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-schannel_verify.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurl_la-vtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-axtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-cyassl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-darwinssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-gskit.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-gtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-mbedtls.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-nss.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-openssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-polarssl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-polarssl_threadlock.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-schannel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-schannel_verify.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@vtls/$(DEPDIR)/libcurlu_la-vtls.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
2151
2152
2153
2154
2155
2156
2157







2158
2159
2160
2161
2162
2163
2164
vtls/libcurl_la-schannel.lo: vtls/schannel.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT vtls/libcurl_la-schannel.lo -MD -MP -MF vtls/$(DEPDIR)/libcurl_la-schannel.Tpo -c -o vtls/libcurl_la-schannel.lo `test -f 'vtls/schannel.c' || echo '$(srcdir)/'`vtls/schannel.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurl_la-schannel.Tpo vtls/$(DEPDIR)/libcurl_la-schannel.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/schannel.c' object='vtls/libcurl_la-schannel.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurl_la-schannel.lo `test -f 'vtls/schannel.c' || echo '$(srcdir)/'`vtls/schannel.c








vtls/libcurl_la-darwinssl.lo: vtls/darwinssl.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT vtls/libcurl_la-darwinssl.lo -MD -MP -MF vtls/$(DEPDIR)/libcurl_la-darwinssl.Tpo -c -o vtls/libcurl_la-darwinssl.lo `test -f 'vtls/darwinssl.c' || echo '$(srcdir)/'`vtls/darwinssl.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurl_la-darwinssl.Tpo vtls/$(DEPDIR)/libcurl_la-darwinssl.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/darwinssl.c' object='vtls/libcurl_la-darwinssl.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurl_la-darwinssl.lo `test -f 'vtls/darwinssl.c' || echo '$(srcdir)/'`vtls/darwinssl.c








>
>
>
>
>
>
>







2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
vtls/libcurl_la-schannel.lo: vtls/schannel.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT vtls/libcurl_la-schannel.lo -MD -MP -MF vtls/$(DEPDIR)/libcurl_la-schannel.Tpo -c -o vtls/libcurl_la-schannel.lo `test -f 'vtls/schannel.c' || echo '$(srcdir)/'`vtls/schannel.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurl_la-schannel.Tpo vtls/$(DEPDIR)/libcurl_la-schannel.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/schannel.c' object='vtls/libcurl_la-schannel.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurl_la-schannel.lo `test -f 'vtls/schannel.c' || echo '$(srcdir)/'`vtls/schannel.c

vtls/libcurl_la-schannel_verify.lo: vtls/schannel_verify.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT vtls/libcurl_la-schannel_verify.lo -MD -MP -MF vtls/$(DEPDIR)/libcurl_la-schannel_verify.Tpo -c -o vtls/libcurl_la-schannel_verify.lo `test -f 'vtls/schannel_verify.c' || echo '$(srcdir)/'`vtls/schannel_verify.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurl_la-schannel_verify.Tpo vtls/$(DEPDIR)/libcurl_la-schannel_verify.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/schannel_verify.c' object='vtls/libcurl_la-schannel_verify.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurl_la-schannel_verify.lo `test -f 'vtls/schannel_verify.c' || echo '$(srcdir)/'`vtls/schannel_verify.c

vtls/libcurl_la-darwinssl.lo: vtls/darwinssl.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT vtls/libcurl_la-darwinssl.lo -MD -MP -MF vtls/$(DEPDIR)/libcurl_la-darwinssl.Tpo -c -o vtls/libcurl_la-darwinssl.lo `test -f 'vtls/darwinssl.c' || echo '$(srcdir)/'`vtls/darwinssl.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurl_la-darwinssl.Tpo vtls/$(DEPDIR)/libcurl_la-darwinssl.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/darwinssl.c' object='vtls/libcurl_la-darwinssl.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurl_la-darwinssl.lo `test -f 'vtls/darwinssl.c' || echo '$(srcdir)/'`vtls/darwinssl.c

3075
3076
3077
3078
3079
3080
3081







3082
3083
3084
3085
3086
3087
3088
vtls/libcurlu_la-schannel.lo: vtls/schannel.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT vtls/libcurlu_la-schannel.lo -MD -MP -MF vtls/$(DEPDIR)/libcurlu_la-schannel.Tpo -c -o vtls/libcurlu_la-schannel.lo `test -f 'vtls/schannel.c' || echo '$(srcdir)/'`vtls/schannel.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurlu_la-schannel.Tpo vtls/$(DEPDIR)/libcurlu_la-schannel.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/schannel.c' object='vtls/libcurlu_la-schannel.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurlu_la-schannel.lo `test -f 'vtls/schannel.c' || echo '$(srcdir)/'`vtls/schannel.c








vtls/libcurlu_la-darwinssl.lo: vtls/darwinssl.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT vtls/libcurlu_la-darwinssl.lo -MD -MP -MF vtls/$(DEPDIR)/libcurlu_la-darwinssl.Tpo -c -o vtls/libcurlu_la-darwinssl.lo `test -f 'vtls/darwinssl.c' || echo '$(srcdir)/'`vtls/darwinssl.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurlu_la-darwinssl.Tpo vtls/$(DEPDIR)/libcurlu_la-darwinssl.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/darwinssl.c' object='vtls/libcurlu_la-darwinssl.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurlu_la-darwinssl.lo `test -f 'vtls/darwinssl.c' || echo '$(srcdir)/'`vtls/darwinssl.c








>
>
>
>
>
>
>







3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
vtls/libcurlu_la-schannel.lo: vtls/schannel.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT vtls/libcurlu_la-schannel.lo -MD -MP -MF vtls/$(DEPDIR)/libcurlu_la-schannel.Tpo -c -o vtls/libcurlu_la-schannel.lo `test -f 'vtls/schannel.c' || echo '$(srcdir)/'`vtls/schannel.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurlu_la-schannel.Tpo vtls/$(DEPDIR)/libcurlu_la-schannel.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/schannel.c' object='vtls/libcurlu_la-schannel.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurlu_la-schannel.lo `test -f 'vtls/schannel.c' || echo '$(srcdir)/'`vtls/schannel.c

vtls/libcurlu_la-schannel_verify.lo: vtls/schannel_verify.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT vtls/libcurlu_la-schannel_verify.lo -MD -MP -MF vtls/$(DEPDIR)/libcurlu_la-schannel_verify.Tpo -c -o vtls/libcurlu_la-schannel_verify.lo `test -f 'vtls/schannel_verify.c' || echo '$(srcdir)/'`vtls/schannel_verify.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurlu_la-schannel_verify.Tpo vtls/$(DEPDIR)/libcurlu_la-schannel_verify.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/schannel_verify.c' object='vtls/libcurlu_la-schannel_verify.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurlu_la-schannel_verify.lo `test -f 'vtls/schannel_verify.c' || echo '$(srcdir)/'`vtls/schannel_verify.c

vtls/libcurlu_la-darwinssl.lo: vtls/darwinssl.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT vtls/libcurlu_la-darwinssl.lo -MD -MP -MF vtls/$(DEPDIR)/libcurlu_la-darwinssl.Tpo -c -o vtls/libcurlu_la-darwinssl.lo `test -f 'vtls/darwinssl.c' || echo '$(srcdir)/'`vtls/darwinssl.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) vtls/$(DEPDIR)/libcurlu_la-darwinssl.Tpo vtls/$(DEPDIR)/libcurlu_la-darwinssl.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='vtls/darwinssl.c' object='vtls/libcurlu_la-darwinssl.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o vtls/libcurlu_la-darwinssl.lo `test -f 'vtls/darwinssl.c' || echo '$(srcdir)/'`vtls/darwinssl.c

Changes to jni/curl/lib/Makefile.inc.
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  vauth/krb5_sspi.c vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c       \
  vauth/spnego_gssapi.c vauth/spnego_sspi.c

LIB_VAUTH_HFILES = vauth/vauth.h vauth/digest.h vauth/ntlm.h

LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \
  vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c               \
  vtls/cyassl.c vtls/schannel.c vtls/darwinssl.c vtls/gskit.c           \
  vtls/mbedtls.c

LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h                \
  vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h   \
  vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h           \
  vtls/mbedtls.h

LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \







|
|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  vauth/krb5_sspi.c vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c       \
  vauth/spnego_gssapi.c vauth/spnego_sspi.c

LIB_VAUTH_HFILES = vauth/vauth.h vauth/digest.h vauth/ntlm.h

LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \
  vtls/polarssl.c vtls/polarssl_threadlock.c vtls/axtls.c               \
  vtls/cyassl.c vtls/schannel.c vtls/schannel_verify.c                  \
  vtls/darwinssl.c vtls/gskit.c vtls/mbedtls.c

LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h                \
  vtls/nssg.h vtls/polarssl.h vtls/polarssl_threadlock.h vtls/axtls.h   \
  vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h           \
  vtls/mbedtls.h

LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \
Changes to jni/curl/lib/asyn-thread.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
75
76
77
78
79
80
81




82
83
84
85
86
87
88
#include "curl_threads.h"
#include "connect.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"





/*
 * Curl_resolver_global_init()
 * Called from curl_global_init() to initialize global resolver environment.
 * Does nothing here.
 */
int Curl_resolver_global_init(void)
{







>
>
>
>







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include "curl_threads.h"
#include "connect.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"

struct resdata {
  struct curltime start;
};

/*
 * Curl_resolver_global_init()
 * Called from curl_global_init() to initialize global resolver environment.
 * Does nothing here.
 */
int Curl_resolver_global_init(void)
{
98
99
100
101
102
103
104
105
106
107
108

109

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
}

/*
 * Curl_resolver_init()
 * Called from curl_easy_init() -> Curl_open() to initialize resolver
 * URL-state specific environment ('resolver' member of the UrlState
 * structure).  Does nothing here.
 */
CURLcode Curl_resolver_init(void **resolver)
{

  (void)resolver;

  return CURLE_OK;
}

/*
 * Curl_resolver_cleanup()
 * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
 * URL-state specific environment ('resolver' member of the UrlState
 * structure).  Does nothing here.
 */
void Curl_resolver_cleanup(void *resolver)
{
  (void)resolver;
}

/*
 * Curl_resolver_duphandle()
 * Called from curl_easy_duphandle() to duplicate resolver URL state-specific
 * environment ('resolver' member of the UrlState structure).  Does nothing
 * here.
 */
int Curl_resolver_duphandle(void **to, void *from)
{
  (void)to;
  (void)from;
  return CURLE_OK;
}

static void destroy_async_data(struct Curl_async *);

/*
 * Cancel all possibly still on-going resolves for this connection.
 */







|



>
|
>







|



|





|
<



<

|







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

134
135
136

137
138
139
140
141
142
143
144
145
{
}

/*
 * Curl_resolver_init()
 * Called from curl_easy_init() -> Curl_open() to initialize resolver
 * URL-state specific environment ('resolver' member of the UrlState
 * structure).
 */
CURLcode Curl_resolver_init(void **resolver)
{
  *resolver = calloc(1, sizeof(struct resdata));
  if(!*resolver)
    return CURLE_OUT_OF_MEMORY;
  return CURLE_OK;
}

/*
 * Curl_resolver_cleanup()
 * Called from curl_easy_cleanup() -> Curl_close() to cleanup resolver
 * URL-state specific environment ('resolver' member of the UrlState
 * structure).
 */
void Curl_resolver_cleanup(void *resolver)
{
  free(resolver);
}

/*
 * Curl_resolver_duphandle()
 * Called from curl_easy_duphandle() to duplicate resolver URL state-specific
 * environment ('resolver' member of the UrlState structure).

 */
int Curl_resolver_duphandle(void **to, void *from)
{

  (void)from;
  return Curl_resolver_init(to);
}

static void destroy_async_data(struct Curl_async *);

/*
 * Cancel all possibly still on-going resolves for this connection.
 */
557
558
559
560
561
562
563


564

565
566










567
568
569
570
571
572
573
574
575
576
577
578
579


580
581
582
583
584
585


586
587
588
589
590
591
592

593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611


612
613
614
615
616
617
618
  return CURLE_OK;
}

int Curl_resolver_getsock(struct connectdata *conn,
                          curl_socket_t *socks,
                          int numsocks)
{


  (void)conn;

  (void)socks;
  (void)numsocks;










  return 0;
}

#ifndef HAVE_GETADDRINFO
/*
 * Curl_getaddrinfo() - for platforms without getaddrinfo
 */
Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
                                         const char *hostname,
                                         int port,
                                         int *waitp)
{
  struct in_addr in;



  *waitp = 0; /* default to synchronous response */

  if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
    /* This is a dotted IP address 123.123.123.123-style */
    return Curl_ip2addr(AF_INET, &in, hostname, port);



  /* fire up a new resolver thread! */
  if(init_resolve_thread(conn, hostname, port, NULL)) {
    *waitp = 1; /* expect asynchronous response */
    return NULL;
  }


  /* fall-back to blocking version */
  return Curl_ipv4_resolve_r(hostname, port);
}

#else /* !HAVE_GETADDRINFO */

/*
 * Curl_resolver_getaddrinfo() - for getaddrinfo
 */
Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
                                         const char *hostname,
                                         int port,
                                         int *waitp)
{
  struct addrinfo hints;
  Curl_addrinfo *res;
  int error;
  char sbuf[12];
  int pf = PF_INET;



  *waitp = 0; /* default to synchronous response */

#ifndef USE_RESOLVE_ON_IPS
  {
    struct in_addr in;
    /* First check if this is an IPv4 address string */







>
>
|
>


>
>
>
>
>
>
>
>
>
>













>
>






>
>







>
|
|













<
<


>
>







561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629


630
631
632
633
634
635
636
637
638
639
640
  return CURLE_OK;
}

int Curl_resolver_getsock(struct connectdata *conn,
                          curl_socket_t *socks,
                          int numsocks)
{
  time_t milli;
  timediff_t ms;
  struct Curl_easy *data = conn->data;
  struct resdata *reslv = (struct resdata *)data->state.resolver;
  (void)socks;
  (void)numsocks;
  ms = Curl_timediff(Curl_now(), reslv->start);
  if(ms < 10)
    milli = ms/3;
  else if(ms <= 50)
    milli = 10;
  else if(ms <= 250)
    milli = 50;
  else
    milli = 200;
  Curl_expire(data, milli, EXPIRE_ASYNC_NAME);
  return 0;
}

#ifndef HAVE_GETADDRINFO
/*
 * Curl_getaddrinfo() - for platforms without getaddrinfo
 */
Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
                                         const char *hostname,
                                         int port,
                                         int *waitp)
{
  struct in_addr in;
  struct Curl_easy *data = conn->data;
  struct resdata *reslv = (struct resdata *)data->state.resolver;

  *waitp = 0; /* default to synchronous response */

  if(Curl_inet_pton(AF_INET, hostname, &in) > 0)
    /* This is a dotted IP address 123.123.123.123-style */
    return Curl_ip2addr(AF_INET, &in, hostname, port);

  reslv->start = Curl_now();

  /* fire up a new resolver thread! */
  if(init_resolve_thread(conn, hostname, port, NULL)) {
    *waitp = 1; /* expect asynchronous response */
    return NULL;
  }

  failf(conn->data, "getaddrinfo() thread failed\n");

  return NULL;
}

#else /* !HAVE_GETADDRINFO */

/*
 * Curl_resolver_getaddrinfo() - for getaddrinfo
 */
Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
                                         const char *hostname,
                                         int port,
                                         int *waitp)
{
  struct addrinfo hints;


  char sbuf[12];
  int pf = PF_INET;
  struct Curl_easy *data = conn->data;
  struct resdata *reslv = (struct resdata *)data->state.resolver;

  *waitp = 0; /* default to synchronous response */

#ifndef USE_RESOLVE_ON_IPS
  {
    struct in_addr in;
    /* First check if this is an IPv4 address string */
654
655
656
657
658
659
660

661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688

  memset(&hints, 0, sizeof(hints));
  hints.ai_family = pf;
  hints.ai_socktype = conn->socktype;

  snprintf(sbuf, sizeof(sbuf), "%d", port);


  /* fire up a new resolver thread! */
  if(init_resolve_thread(conn, hostname, port, &hints)) {
    *waitp = 1; /* expect asynchronous response */
    return NULL;
  }

  /* fall-back to blocking version */
  infof(conn->data, "init_resolve_thread() failed for %s; %s\n",
        hostname, Curl_strerror(conn, errno));

  error = Curl_getaddrinfo_ex(hostname, sbuf, &hints, &res);
  if(error) {
    infof(conn->data, "getaddrinfo() failed for %s:%d; %s\n",
          hostname, port, Curl_strerror(conn, SOCKERRNO));
    return NULL;
  }
  else {
    Curl_addrinfo_set_port(res, port);
  }

  return res;
}

#endif /* !HAVE_GETADDRINFO */

CURLcode Curl_set_dns_servers(struct Curl_easy *data,
                              char *servers)
{







>






<
<
<
<
<
<
|
<
|
|
<
<
<
<
<







676
677
678
679
680
681
682
683
684
685
686
687
688
689






690

691
692





693
694
695
696
697
698
699

  memset(&hints, 0, sizeof(hints));
  hints.ai_family = pf;
  hints.ai_socktype = conn->socktype;

  snprintf(sbuf, sizeof(sbuf), "%d", port);

  reslv->start = Curl_now();
  /* fire up a new resolver thread! */
  if(init_resolve_thread(conn, hostname, port, &hints)) {
    *waitp = 1; /* expect asynchronous response */
    return NULL;
  }







  failf(data, "getaddrinfo() thread failed to start\n");

  return NULL;






}

#endif /* !HAVE_GETADDRINFO */

CURLcode Curl_set_dns_servers(struct Curl_easy *data,
                              char *servers)
{
Changes to jni/curl/lib/checksrc.pl.
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    'SPACEAFTERPAREN'  => 'space after open parenthesis',
    'SPACEBEFORECLOSE' => 'space before a close parenthesis',
    'SPACEBEFORECOMMA' => 'space before a comma',
    'RETURNNOSPACE'    => 'return without space',
    'COMMANOSPACE'     => 'comma without following space',
    'BRACEELSE'        => '} else on the same line',
    'PARENBRACE'       => '){ without sufficient space',
    'SPACESEMILCOLON'  => 'space before semicolon',
    'BANNEDFUNC'       => 'a banned function was used',
    'FOPENMODE'        => 'fopen needs a macro for the mode string',
    'BRACEPOS'         => 'wrong position for an open brace',
    'INDENTATION'      => 'wrong start column for code',
    'COPYRIGHT'        => 'file missing a copyright statement',
    'BADCOMMAND'       => 'bad !checksrc! instruction',
    'UNUSEDIGNORE'     => 'a warning ignore was not used',







|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    'SPACEAFTERPAREN'  => 'space after open parenthesis',
    'SPACEBEFORECLOSE' => 'space before a close parenthesis',
    'SPACEBEFORECOMMA' => 'space before a comma',
    'RETURNNOSPACE'    => 'return without space',
    'COMMANOSPACE'     => 'comma without following space',
    'BRACEELSE'        => '} else on the same line',
    'PARENBRACE'       => '){ without sufficient space',
    'SPACESEMICOLON'   => 'space before semicolon',
    'BANNEDFUNC'       => 'a banned function was used',
    'FOPENMODE'        => 'fopen needs a macro for the mode string',
    'BRACEPOS'         => 'wrong position for an open brace',
    'INDENTATION'      => 'wrong start column for code',
    'COPYRIGHT'        => 'file missing a copyright statement',
    'BADCOMMAND'       => 'bad !checksrc! instruction',
    'UNUSEDIGNORE'     => 'a warning ignore was not used',
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
        if($l =~ /^(.*)\)\{/) {
            checkwarn("PARENBRACE",
                      $line, length($1)+1, $file, $l, "missing space after close paren");
        }

        # check for space before the semicolon last in a line
        if($l =~ /^(.*[^ ].*) ;$/) {
            checkwarn("SPACESEMILCOLON",
                      $line, length($1), $file, $ol, "space before last semicolon");
        }

        # scan for use of banned functions
        if($l =~ /^(.*\W)
                   (gets|
	            strtok|
                    v?sprintf|
                    (str|_mbs|_tcs|_wcs)n?cat|
                    LoadLibrary(Ex)?(A|W)?)
                   \s*\(
                 /x) {
            checkwarn("BANNEDFUNC",
                      $line, length($1), $file, $ol,







|






|







458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
        if($l =~ /^(.*)\)\{/) {
            checkwarn("PARENBRACE",
                      $line, length($1)+1, $file, $l, "missing space after close paren");
        }

        # check for space before the semicolon last in a line
        if($l =~ /^(.*[^ ].*) ;$/) {
            checkwarn("SPACESEMICOLON",
                      $line, length($1), $file, $ol, "space before last semicolon");
        }

        # scan for use of banned functions
        if($l =~ /^(.*\W)
                   (gets|
                    strtok|
                    v?sprintf|
                    (str|_mbs|_tcs|_wcs)n?cat|
                    LoadLibrary(Ex)?(A|W)?)
                   \s*\(
                 /x) {
            checkwarn("BANNEDFUNC",
                      $line, length($1), $file, $ol,
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
        # line
        if((($prevl =~ /\)\z/) && ($prevl !~ /^ *#/)) && ($l =~ /^( +)\{/)) {
            checkwarn("BRACEPOS",
                      $line, length($1), $file, $ol, "badly placed open brace");
        }

        # if the previous line starts with if/while/for AND ends with an open
        # brace, check that this line is indented $indent more steps, if not
        # a cpp line
        if($prevl =~ /^( *)(if|while|for)\(.*\{\z/) {
            my $first = length($1);

            # this line has some character besides spaces
            if(($l !~ /^ *#/) && ($l =~ /^( *)[^ ]/)) {
                my $second = length($1);
                my $expect = $first+$indent;
                if($expect != $second) {
                    my $diff = $second - $first;
                    checkwarn("INDENTATION", $line, length($1), $file, $ol,
                              "not indented $indent steps, uses $diff)");

                }
            }
        }

        # check for 'char * name'
        if(($l =~ /(^.*(char|int|long|void|curl_slist|CURL|CURLM|CURLMsg|curl_httppost) *(\*+)) (\w+)/) && ($4 ne "const")) {







|
|
|









|







495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
        # line
        if((($prevl =~ /\)\z/) && ($prevl !~ /^ *#/)) && ($l =~ /^( +)\{/)) {
            checkwarn("BRACEPOS",
                      $line, length($1), $file, $ol, "badly placed open brace");
        }

        # if the previous line starts with if/while/for AND ends with an open
        # brace, or an else statement, check that this line is indented $indent
        # more steps, if not a cpp line
        if($prevl =~ /^( *)((if|while|for)\(.*\{|else)\z/) {
            my $first = length($1);

            # this line has some character besides spaces
            if(($l !~ /^ *#/) && ($l =~ /^( *)[^ ]/)) {
                my $second = length($1);
                my $expect = $first+$indent;
                if($expect != $second) {
                    my $diff = $second - $first;
                    checkwarn("INDENTATION", $line, length($1), $file, $ol,
                              "not indented $indent steps (uses $diff)");

                }
            }
        }

        # check for 'char * name'
        if(($l =~ /(^.*(char|int|long|void|curl_slist|CURL|CURLM|CURLMsg|curl_httppost) *(\*+)) (\w+)/) && ($4 ne "const")) {
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
                      "no space before plus sign");
        }

        # check for semicolons without space next to it
        if($nostr =~ /(.*)\;[a-z0-9]/i) {
            checkwarn("SEMINOSPACE",
                      $line, length($1)+1, $file, $ol,
                      "no space after semilcolon");
        }

        # check for more than one consecutive space before open brace or
        # question mark. Skip lines containing strings since they make it hard
        # due to artificially getting multiple spaces
        if(($l eq $nostr) &&
           $nostr =~ /^(.*(\S)) + [{?]/i) {







|







569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
                      "no space before plus sign");
        }

        # check for semicolons without space next to it
        if($nostr =~ /(.*)\;[a-z0-9]/i) {
            checkwarn("SEMINOSPACE",
                      $line, length($1)+1, $file, $ol,
                      "no space after semicolon");
        }

        # check for more than one consecutive space before open brace or
        # question mark. Skip lines containing strings since they make it hard
        # due to artificially getting multiple spaces
        if(($l eq $nostr) &&
           $nostr =~ /^(.*(\S)) + [{?]/i) {
Changes to jni/curl/lib/content_encoding.c.
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886

/* Create an unencoding writer stage using the given handler. */
static contenc_writer *new_unencoding_writer(struct connectdata *conn,
                                             const content_encoding *handler,
                                             contenc_writer *downstream)
{
  size_t sz = offsetof(contenc_writer, params) + handler->paramsize;
  contenc_writer *writer = (contenc_writer *) malloc(sz);

  if(writer) {
    memset(writer, 0, sz);
    writer->handler = handler;
    writer->downstream = downstream;
    if(handler->init_writer(conn, writer)) {
      free(writer);
      writer = NULL;
    }
  }







|


<







869
870
871
872
873
874
875
876
877
878

879
880
881
882
883
884
885

/* Create an unencoding writer stage using the given handler. */
static contenc_writer *new_unencoding_writer(struct connectdata *conn,
                                             const content_encoding *handler,
                                             contenc_writer *downstream)
{
  size_t sz = offsetof(contenc_writer, params) + handler->paramsize;
  contenc_writer *writer = (contenc_writer *) calloc(1, sz);

  if(writer) {

    writer->handler = handler;
    writer->downstream = downstream;
    if(handler->init_writer(conn, writer)) {
      free(writer);
      writer = NULL;
    }
  }
Changes to jni/curl/lib/cookie.c.
137
138
139
140
141
142
143






















144
145
146
147
148
149
150
   */
  if(hostname_len == cookie_domain_len)
    return TRUE;
  if('.' == *(hostname + hostname_len - cookie_domain_len - 1))
    return TRUE;
  return FALSE;
}























/*
 * matching cookie path and url path
 * RFC6265 5.1.4 Paths and Path-Match
 */
static bool pathmatch(const char *cookie_path, const char *request_uri)
{







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
   */
  if(hostname_len == cookie_domain_len)
    return TRUE;
  if('.' == *(hostname + hostname_len - cookie_domain_len - 1))
    return TRUE;
  return FALSE;
}

/*
 * Return true if the given string is an IP(v4|v6) address.
 */
static bool isip(const char *domain)
{
  struct in_addr addr;
#ifdef ENABLE_IPV6
  struct in6_addr addr6;
#endif

  if(Curl_inet_pton(AF_INET, domain, &addr)
#ifdef ENABLE_IPV6
     || Curl_inet_pton(AF_INET6, domain, &addr6)
#endif
    ) {
    /* domain name given as IP address */
    return TRUE;
  }

  return FALSE;
}

/*
 * matching cookie path and url path
 * RFC6265 5.1.4 Paths and Path-Match
 */
static bool pathmatch(const char *cookie_path, const char *request_uri)
{
212
213
214
215
216
217
218
























































219
220
221
222
223
224
225

  ret = FALSE;

pathmatched:
  free(uri_path);
  return ret;
}

























































/*
 * cookie path sanitize
 */
static char *sanitize_cookie_path(const char *cookie_path)
{
  size_t len;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303

  ret = FALSE;

pathmatched:
  free(uri_path);
  return ret;
}

/*
 * Return the top-level domain, for optimal hashing.
 */
static const char *get_top_domain(const char * const domain, size_t *outlen)
{
  size_t len;
  const char *first = NULL, *last;

  if(!domain)
    return NULL;

  len = strlen(domain);
  last = memrchr(domain, '.', len);
  if(last) {
    first = memrchr(domain, '.', (size_t) (last - domain));
    if(first)
      len -= (size_t) (++first - domain);
  }

  if(outlen)
    *outlen = len;

  return first? first: domain;
}

/*
 * A case-insensitive hash for the cookie domains.
 */
static size_t cookie_hash_domain(const char *domain, const size_t len)
{
  const char *end = domain + len;
  size_t h = 5381;

  while(domain < end) {
    h += h << 5;
    h ^= Curl_raw_toupper(*domain++);
  }

  return (h % COOKIE_HASH_SIZE);
}

/*
 * Hash this domain.
 */
static size_t cookiehash(const char * const domain)
{
  const char *top;
  size_t len;

  if(!domain || isip(domain))
    return 0;

  top = get_top_domain(domain, &len);
  return cookie_hash_domain(top, len);
}

/*
 * cookie path sanitize
 */
static char *sanitize_cookie_path(const char *cookie_path)
{
  size_t len;
299
300
301
302
303
304
305

306

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
/*
 * remove_expired() removes expired cookies.
 */
static void remove_expired(struct CookieInfo *cookies)
{
  struct Cookie *co, *nx, *pv;
  curl_off_t now = (curl_off_t)time(NULL);



  co = cookies->cookies;
  pv = NULL;
  while(co) {
    nx = co->next;
    if(co->expires && co->expires < now) {
      if(!pv) {
        cookies->cookies = co->next;
      }
      else {
        pv->next = co->next;
      }
      cookies->numcookies--;
      freecookie(co);
    }
    else {
      pv = co;
    }
    co = nx;
  }
}

/*
 * Return true if the given string is an IP(v4|v6) address.
 */
static bool isip(const char *domain)
{
  struct in_addr addr;
#ifdef ENABLE_IPV6
  struct in6_addr addr6;
#endif

  if(Curl_inet_pton(AF_INET, domain, &addr)
#ifdef ENABLE_IPV6
     || Curl_inet_pton(AF_INET6, domain, &addr6)
#endif
    ) {
    /* domain name given as IP address */
    return TRUE;
  }

  return FALSE;
}

/****************************************************************************
 *
 * Curl_cookie_add()
 *
 * Add a single cookie line to the cookie keeping object.







>

>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406





















407
408
409
410
411
412
413
/*
 * remove_expired() removes expired cookies.
 */
static void remove_expired(struct CookieInfo *cookies)
{
  struct Cookie *co, *nx, *pv;
  curl_off_t now = (curl_off_t)time(NULL);
  unsigned int i;

  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
    co = cookies->cookies[i];
    pv = NULL;
    while(co) {
      nx = co->next;
      if(co->expires && co->expires < now) {
        if(!pv) {
          cookies->cookies[i] = co->next;
        }
        else {
          pv->next = co->next;
        }
        cookies->numcookies--;
        freecookie(co);
      }
      else {
        pv = co;
      }
      co = nx;
    }
  }





















}

/****************************************************************************
 *
 * Curl_cookie_add()
 *
 * Add a single cookie line to the cookie keeping object.
364
365
366
367
368
369
370

371
372
373
374
375
376
377
378
379
380
381
382

383
384
385
386
387
388
389
Curl_cookie_add(struct Curl_easy *data,
                /* The 'data' pointer here may be NULL at times, and thus
                   must only be used very carefully for things that can deal
                   with data being NULL. Such as infof() and similar */

                struct CookieInfo *c,
                bool httpheader, /* TRUE if HTTP header-style line */

                char *lineptr,   /* first character of the line */
                const char *domain, /* default domain */
                const char *path)   /* full path used when this cookie is set,
                                       used to get default path for the cookie
                                       unless set */
{
  struct Cookie *clist;
  struct Cookie *co;
  struct Cookie *lastc = NULL;
  time_t now = time(NULL);
  bool replace_old = FALSE;
  bool badcookie = FALSE; /* cookies are good by default. mmmmm yummy */


#ifdef USE_LIBPSL
  const psl_ctx_t *psl;
#endif

#ifdef CURL_DISABLE_VERBOSE_STRINGS
  (void)data;







>












>







423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
Curl_cookie_add(struct Curl_easy *data,
                /* The 'data' pointer here may be NULL at times, and thus
                   must only be used very carefully for things that can deal
                   with data being NULL. Such as infof() and similar */

                struct CookieInfo *c,
                bool httpheader, /* TRUE if HTTP header-style line */
                bool noexpire, /* if TRUE, skip remove_expired() */
                char *lineptr,   /* first character of the line */
                const char *domain, /* default domain */
                const char *path)   /* full path used when this cookie is set,
                                       used to get default path for the cookie
                                       unless set */
{
  struct Cookie *clist;
  struct Cookie *co;
  struct Cookie *lastc = NULL;
  time_t now = time(NULL);
  bool replace_old = FALSE;
  bool badcookie = FALSE; /* cookies are good by default. mmmmm yummy */
  size_t myhash;

#ifdef USE_LIBPSL
  const psl_ctx_t *psl;
#endif

#ifdef CURL_DISABLE_VERBOSE_STRINGS
  (void)data;
463
464
465
466
467
468
469
470
471





472
473

474
475
476
477
478
479
480
        }

        /* Skip leading whitespace from the 'what' */
        whatptr = what;
        while(*whatptr && ISBLANK(*whatptr))
          whatptr++;

        if(!co->name && sep) {
          /* The very first name/value pair is the actual cookie name */





          co->name = strdup(name);
          co->value = strdup(whatptr);

          if(!co->name || !co->value) {
            badcookie = TRUE;
            break;
          }
        }
        else if(!len) {
          /* this was a "<name>=" with no content, and we must allow







|

>
>
>
>
>


>







524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
        }

        /* Skip leading whitespace from the 'what' */
        whatptr = what;
        while(*whatptr && ISBLANK(*whatptr))
          whatptr++;

        if(!co->name) {
          /* The very first name/value pair is the actual cookie name */
          if(!sep) {
            /* Bad name/value pair. */
            badcookie = TRUE;
            break;
          }
          co->name = strdup(name);
          co->value = strdup(whatptr);
          done = TRUE;
          if(!co->name || !co->value) {
            badcookie = TRUE;
            break;
          }
        }
        else if(!len) {
          /* this was a "<name>=" with no content, and we must allow
815
816
817
818
819
820
821

822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838

839
840
841
842
843
844
845
846
  co->livecookie = c->running;

  /* now, we have parsed the incoming line, we must now check if this
     superceeds an already existing cookie, which it may if the previous have
     the same domain and path as this */

  /* at first, remove expired cookies */

  remove_expired(c);

#ifdef USE_LIBPSL
  /* Check if the domain is a Public Suffix and if yes, ignore the cookie.
     This needs a libpsl compiled with builtin data. */
  if(domain && co->domain && !isip(co->domain)) {
    psl = psl_builtin();
    if(psl && !psl_is_cookie_domain_acceptable(psl, domain, co->domain)) {
      infof(data,
            "cookie '%s' dropped, domain '%s' must not set cookies for '%s'\n",
            co->name, domain, co->domain);
      freecookie(co);
      return NULL;
    }
  }
#endif


  clist = c->cookies;
  replace_old = FALSE;
  while(clist) {
    if(strcasecompare(clist->name, co->name)) {
      /* the names are identical */

      if(clist->domain && co->domain) {
        if(strcasecompare(clist->domain, co->domain) &&







>
|
















>
|







882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
  co->livecookie = c->running;

  /* now, we have parsed the incoming line, we must now check if this
     superceeds an already existing cookie, which it may if the previous have
     the same domain and path as this */

  /* at first, remove expired cookies */
  if(!noexpire)
    remove_expired(c);

#ifdef USE_LIBPSL
  /* Check if the domain is a Public Suffix and if yes, ignore the cookie.
     This needs a libpsl compiled with builtin data. */
  if(domain && co->domain && !isip(co->domain)) {
    psl = psl_builtin();
    if(psl && !psl_is_cookie_domain_acceptable(psl, domain, co->domain)) {
      infof(data,
            "cookie '%s' dropped, domain '%s' must not set cookies for '%s'\n",
            co->name, domain, co->domain);
      freecookie(co);
      return NULL;
    }
  }
#endif

  myhash = cookiehash(co->domain);
  clist = c->cookies[myhash];
  replace_old = FALSE;
  while(clist) {
    if(strcasecompare(clist->name, co->name)) {
      /* the names are identical */

      if(clist->domain && co->domain) {
        if(strcasecompare(clist->domain, co->domain) &&
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
          co->domain, co->path, co->expires);

  if(!replace_old) {
    /* then make the last item point on this new one */
    if(lastc)
      lastc->next = co;
    else
      c->cookies = co;
    c->numcookies++; /* one more cookie in the jar */
  }

  return co;
}

/*







|







987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
          co->domain, co->path, co->expires);

  if(!replace_old) {
    /* then make the last item point on this new one */
    if(lastc)
      lastc->next = co;
    else
      c->cookies[myhash] = co;
    c->numcookies++; /* one more cookie in the jar */
  }

  return co;
}

/*
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031

1032
1033
1034
1035
1036
1037
1038
      else {
        lineptr = line;
        headerline = FALSE;
      }
      while(*lineptr && ISBLANK(*lineptr))
        lineptr++;

      Curl_cookie_add(data, c, headerline, lineptr, NULL, NULL);
    }
    free(line); /* free the line buffer */


    if(fromfile)
      fclose(fp);
  }

  c->running = TRUE;          /* now, we're running */








|


>







1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
      else {
        lineptr = line;
        headerline = FALSE;
      }
      while(*lineptr && ISBLANK(*lineptr))
        lineptr++;

      Curl_cookie_add(data, c, headerline, TRUE, lineptr, NULL, NULL);
    }
    free(line); /* free the line buffer */
    remove_expired(c); /* run this once, not on every cookie */

    if(fromfile)
      fclose(fp);
  }

  c->running = TRUE;          /* now, we're running */

1130
1131
1132
1133
1134
1135
1136

1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
{
  struct Cookie *newco;
  struct Cookie *co;
  time_t now = time(NULL);
  struct Cookie *mainco = NULL;
  size_t matches = 0;
  bool is_ip;


  if(!c || !c->cookies)
    return NULL; /* no cookie struct or no cookies in the struct */

  /* at first, remove expired cookies */
  remove_expired(c);

  /* check if host is an IP(v4|v6) address */
  is_ip = isip(host);

  co = c->cookies;

  while(co) {
    /* only process this cookie if it is not expired or had no expire
       date AND that if the cookie requires we're secure we must only
       continue if we are! */
    if((!co->expires || (co->expires > now)) &&
       (co->secure?secure:TRUE)) {







>

|








|







1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
{
  struct Cookie *newco;
  struct Cookie *co;
  time_t now = time(NULL);
  struct Cookie *mainco = NULL;
  size_t matches = 0;
  bool is_ip;
  const size_t myhash = cookiehash(host);

  if(!c || !c->cookies[myhash])
    return NULL; /* no cookie struct or no cookies in the struct */

  /* at first, remove expired cookies */
  remove_expired(c);

  /* check if host is an IP(v4|v6) address */
  is_ip = isip(host);

  co = c->cookies[myhash];

  while(co) {
    /* only process this cookie if it is not expired or had no expire
       date AND that if the cookie requires we're secure we must only
       continue if we are! */
    if((!co->expires || (co->expires > now)) &&
       (co->secure?secure:TRUE)) {
1228
1229
1230
1231
1232
1233
1234


1235
1236

1237
1238
1239
1240
1241
1242
1243
 *
 * Clear all existing cookies and reset the counter.
 *
 ****************************************************************************/
void Curl_cookie_clearall(struct CookieInfo *cookies)
{
  if(cookies) {


    Curl_cookie_freelist(cookies->cookies);
    cookies->cookies = NULL;

    cookies->numcookies = 0;
  }
}

/*****************************************************************************
 *
 * Curl_cookie_freelist()







>
>
|
|
>







1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
 *
 * Clear all existing cookies and reset the counter.
 *
 ****************************************************************************/
void Curl_cookie_clearall(struct CookieInfo *cookies)
{
  if(cookies) {
    unsigned int i;
    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
      Curl_cookie_freelist(cookies->cookies[i]);
      cookies->cookies[i] = NULL;
    }
    cookies->numcookies = 0;
  }
}

/*****************************************************************************
 *
 * Curl_cookie_freelist()
1263
1264
1265
1266
1267
1268
1269

1270
1271
1272
1273




1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294

1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306


1307
1308

1309
1310
1311
1312
1313
1314
1315
1316
 *
 * Free all session cookies in the cookies list.
 *
 ****************************************************************************/
void Curl_cookie_clearsess(struct CookieInfo *cookies)
{
  struct Cookie *first, *curr, *next, *prev = NULL;


  if(!cookies || !cookies->cookies)
    return;





  first = curr = prev = cookies->cookies;

  for(; curr; curr = next) {
    next = curr->next;
    if(!curr->expires) {
      if(first == curr)
        first = next;

      if(prev == curr)
        prev = next;
      else
        prev->next = next;

      freecookie(curr);
      cookies->numcookies--;
    }
    else
      prev = curr;
  }

  cookies->cookies = first;

}


/*****************************************************************************
 *
 * Curl_cookie_cleanup()
 *
 * Free a "cookie object" previous created with Curl_cookie_init().
 *
 ****************************************************************************/
void Curl_cookie_cleanup(struct CookieInfo *c)
{


  if(c) {
    free(c->filename);

    Curl_cookie_freelist(c->cookies);
    free(c); /* free the base struct as well */
  }
}

/* get_netscape_format()
 *
 * Formats a string for Netscape output file, w/o a newline at the end.







>

|


>
>
>
>
|

|
|
|
|
|

|
|
|
|

|
|
|
|
|
|

|
>












>
>


>
|







1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
 *
 * Free all session cookies in the cookies list.
 *
 ****************************************************************************/
void Curl_cookie_clearsess(struct CookieInfo *cookies)
{
  struct Cookie *first, *curr, *next, *prev = NULL;
  unsigned int i;

  if(!cookies)
    return;

  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
    if(!cookies->cookies[i])
      continue;

    first = curr = prev = cookies->cookies[i];

    for(; curr; curr = next) {
      next = curr->next;
      if(!curr->expires) {
        if(first == curr)
          first = next;

        if(prev == curr)
          prev = next;
        else
          prev->next = next;

        freecookie(curr);
        cookies->numcookies--;
      }
      else
        prev = curr;
    }

    cookies->cookies[i] = first;
  }
}


/*****************************************************************************
 *
 * Curl_cookie_cleanup()
 *
 * Free a "cookie object" previous created with Curl_cookie_init().
 *
 ****************************************************************************/
void Curl_cookie_cleanup(struct CookieInfo *c)
{
  unsigned int i;

  if(c) {
    free(c->filename);
    for(i = 0; i < COOKIE_HASH_SIZE; i++)
      Curl_cookie_freelist(c->cookies[i]);
    free(c); /* free the base struct as well */
  }
}

/* get_netscape_format()
 *
 * Formats a string for Netscape output file, w/o a newline at the end.
1351
1352
1353
1354
1355
1356
1357

1358
1359
1360
1361
1362
1363
1364
1365




1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382

1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394

1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408

1409
1410
1411
1412
1413

1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428

1429
1430
1431
1432
1433
1434
1435
 */
static int cookie_output(struct CookieInfo *c, const char *dumphere)
{
  struct Cookie *co;
  FILE *out;
  bool use_stdout = FALSE;
  char *format_ptr;


  if((NULL == c) || (0 == c->numcookies))
    /* If there are no known cookies, we don't write or even create any
       destination file */
    return 0;

  /* at first, remove expired cookies */
  remove_expired(c);





  if(!strcmp("-", dumphere)) {
    /* use stdout */
    out = stdout;
    use_stdout = TRUE;
  }
  else {
    out = fopen(dumphere, FOPEN_WRITETEXT);
    if(!out)
      return 1; /* failure */
  }

  fputs("# Netscape HTTP Cookie File\n"
        "# https://curl.haxx.se/docs/http-cookies.html\n"
        "# This file was generated by libcurl! Edit at your own risk.\n\n",
        out);


  for(co = c->cookies; co; co = co->next) {
    if(!co->domain)
      continue;
    format_ptr = get_netscape_format(co);
    if(format_ptr == NULL) {
      fprintf(out, "#\n# Fatal libcurl error\n");
      if(!use_stdout)
        fclose(out);
      return 1;
    }
    fprintf(out, "%s\n", format_ptr);
    free(format_ptr);

  }

  if(!use_stdout)
    fclose(out);

  return 0;
}

static struct curl_slist *cookie_list(struct Curl_easy *data)
{
  struct curl_slist *list = NULL;
  struct curl_slist *beg;
  struct Cookie *c;
  char *line;


  if((data->cookies == NULL) ||
      (data->cookies->numcookies == 0))
    return NULL;


  for(c = data->cookies->cookies; c; c = c->next) {
    if(!c->domain)
      continue;
    line = get_netscape_format(c);
    if(!line) {
      curl_slist_free_all(list);
      return NULL;
    }
    beg = Curl_slist_append_nodup(list, line);
    if(!beg) {
      free(line);
      curl_slist_free_all(list);
      return NULL;
    }
    list = beg;

  }

  return list;
}

struct curl_slist *Curl_cookie_list(struct Curl_easy *data)
{







>








>
>
>
>

















>
|
|
|
|
|
|
|
|
|
|
|
|
>














>





>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
 */
static int cookie_output(struct CookieInfo *c, const char *dumphere)
{
  struct Cookie *co;
  FILE *out;
  bool use_stdout = FALSE;
  char *format_ptr;
  unsigned int i;

  if((NULL == c) || (0 == c->numcookies))
    /* If there are no known cookies, we don't write or even create any
       destination file */
    return 0;

  /* at first, remove expired cookies */
  remove_expired(c);

  /* make sure we still have cookies after expiration */
  if(0 == c->numcookies)
    return 0;

  if(!strcmp("-", dumphere)) {
    /* use stdout */
    out = stdout;
    use_stdout = TRUE;
  }
  else {
    out = fopen(dumphere, FOPEN_WRITETEXT);
    if(!out)
      return 1; /* failure */
  }

  fputs("# Netscape HTTP Cookie File\n"
        "# https://curl.haxx.se/docs/http-cookies.html\n"
        "# This file was generated by libcurl! Edit at your own risk.\n\n",
        out);

  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
    for(co = c->cookies[i]; co; co = co->next) {
      if(!co->domain)
        continue;
      format_ptr = get_netscape_format(co);
      if(format_ptr == NULL) {
        fprintf(out, "#\n# Fatal libcurl error\n");
        if(!use_stdout)
          fclose(out);
        return 1;
      }
      fprintf(out, "%s\n", format_ptr);
      free(format_ptr);
    }
  }

  if(!use_stdout)
    fclose(out);

  return 0;
}

static struct curl_slist *cookie_list(struct Curl_easy *data)
{
  struct curl_slist *list = NULL;
  struct curl_slist *beg;
  struct Cookie *c;
  char *line;
  unsigned int i;

  if((data->cookies == NULL) ||
      (data->cookies->numcookies == 0))
    return NULL;

  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
    for(c = data->cookies->cookies[i]; c; c = c->next) {
      if(!c->domain)
        continue;
      line = get_netscape_format(c);
      if(!line) {
        curl_slist_free_all(list);
        return NULL;
      }
      beg = Curl_slist_append_nodup(list, line);
      if(!beg) {
        free(line);
        curl_slist_free_all(list);
        return NULL;
      }
      list = beg;
    }
  }

  return list;
}

struct curl_slist *Curl_cookie_list(struct Curl_easy *data)
{
Changes to jni/curl/lib/cookie.h.
41
42
43
44
45
46
47


48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

84
85
86
87
88
89
90
  char *maxage;      /* Max-Age = <value> */

  bool secure;       /* whether the 'secure' keyword was used */
  bool livecookie;   /* updated from a server, not a stored file */
  bool httponly;     /* true if the httponly directive is present */
};



struct CookieInfo {
  /* linked list of cookies we know of */
  struct Cookie *cookies;

  char *filename;  /* file we read from/write to */
  bool running;    /* state info, for cookie adding information */
  long numcookies; /* number of cookies in the "jar" */
  bool newsession; /* new session, discard session cookies on load */
};

/* This is the maximum line length we accept for a cookie line. RFC 2109
   section 6.3 says:

   "at least 4096 bytes per cookie (as measured by the size of the characters
   that comprise the cookie non-terminal in the syntax description of the
   Set-Cookie header)"

   We allow max 5000 bytes cookie header. Max 4095 bytes length per cookie
   name and value. Name + value may not exceed 4096 bytes.

*/
#define MAX_COOKIE_LINE 5000
#define MAX_COOKIE_LINE_TXT "4999"

/* This is the maximum length of a cookie name or content we deal with: */
#define MAX_NAME 4096
#define MAX_NAME_TXT "4095"

struct Curl_easy;
/*
 * Add a cookie to the internal list of cookies. The domain and path arguments
 * are only used if the header boolean is TRUE.
 */

struct Cookie *Curl_cookie_add(struct Curl_easy *data,
                               struct CookieInfo *, bool header, char *lineptr,

                               const char *domain, const char *path);

struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *,
                                   const char *, bool);
void Curl_cookie_freelist(struct Cookie *cookies);
void Curl_cookie_clearall(struct CookieInfo *cookies);
void Curl_cookie_clearsess(struct CookieInfo *cookies);







>
>


|



















<












|
>







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
  char *maxage;      /* Max-Age = <value> */

  bool secure;       /* whether the 'secure' keyword was used */
  bool livecookie;   /* updated from a server, not a stored file */
  bool httponly;     /* true if the httponly directive is present */
};

#define COOKIE_HASH_SIZE 256

struct CookieInfo {
  /* linked list of cookies we know of */
  struct Cookie *cookies[COOKIE_HASH_SIZE];

  char *filename;  /* file we read from/write to */
  bool running;    /* state info, for cookie adding information */
  long numcookies; /* number of cookies in the "jar" */
  bool newsession; /* new session, discard session cookies on load */
};

/* This is the maximum line length we accept for a cookie line. RFC 2109
   section 6.3 says:

   "at least 4096 bytes per cookie (as measured by the size of the characters
   that comprise the cookie non-terminal in the syntax description of the
   Set-Cookie header)"

   We allow max 5000 bytes cookie header. Max 4095 bytes length per cookie
   name and value. Name + value may not exceed 4096 bytes.

*/
#define MAX_COOKIE_LINE 5000


/* This is the maximum length of a cookie name or content we deal with: */
#define MAX_NAME 4096
#define MAX_NAME_TXT "4095"

struct Curl_easy;
/*
 * Add a cookie to the internal list of cookies. The domain and path arguments
 * are only used if the header boolean is TRUE.
 */

struct Cookie *Curl_cookie_add(struct Curl_easy *data,
                               struct CookieInfo *, bool header, bool noexpiry,
                               char *lineptr,
                               const char *domain, const char *path);

struct Cookie *Curl_cookie_getlist(struct CookieInfo *, const char *,
                                   const char *, bool);
void Curl_cookie_freelist(struct Cookie *cookies);
void Curl_cookie_clearall(struct CookieInfo *cookies);
void Curl_cookie_clearsess(struct CookieInfo *cookies);
Changes to jni/curl/lib/curl_addrinfo.c.
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
    /* leave the rest of the struct filled with zero */

    switch(ai->ai_family) {
    case AF_INET:
      addr = (void *)ai->ai_addr; /* storage area for this info */

      memcpy(&addr->sin_addr, curr, sizeof(struct in_addr));
      addr->sin_family = (unsigned short)(he->h_addrtype);
      addr->sin_port = htons((unsigned short)port);
      break;

#ifdef ENABLE_IPV6
    case AF_INET6:
      addr6 = (void *)ai->ai_addr; /* storage area for this info */

      memcpy(&addr6->sin6_addr, curr, sizeof(struct in6_addr));
      addr6->sin6_family = (unsigned short)(he->h_addrtype);
      addr6->sin6_port = htons((unsigned short)port);
      break;
#endif
    }

    prevai = ai;
  }







|








|







341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
    /* leave the rest of the struct filled with zero */

    switch(ai->ai_family) {
    case AF_INET:
      addr = (void *)ai->ai_addr; /* storage area for this info */

      memcpy(&addr->sin_addr, curr, sizeof(struct in_addr));
      addr->sin_family = (CURL_SA_FAMILY_T)(he->h_addrtype);
      addr->sin_port = htons((unsigned short)port);
      break;

#ifdef ENABLE_IPV6
    case AF_INET6:
      addr6 = (void *)ai->ai_addr; /* storage area for this info */

      memcpy(&addr6->sin6_addr, curr, sizeof(struct in6_addr));
      addr6->sin6_family = (CURL_SA_FAMILY_T)(he->h_addrtype);
      addr6->sin6_port = htons((unsigned short)port);
      break;
#endif
    }

    prevai = ai;
  }
Changes to jni/curl/lib/curl_config.h.cmake.
393
394
395
396
397
398
399



400
401
402
403
404
405
406
#cmakedefine HAVE_LIBSSH2_H 1

/* Define to 1 if you have the `ssl' library (-lssl). */
#cmakedefine HAVE_LIBSSL 1

/* if zlib is available */
#cmakedefine HAVE_LIBZ 1




/* if your compiler supports LL */
#cmakedefine HAVE_LL 1

/* Define to 1 if you have the <locale.h> header file. */
#cmakedefine HAVE_LOCALE_H 1








>
>
>







393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
#cmakedefine HAVE_LIBSSH2_H 1

/* Define to 1 if you have the `ssl' library (-lssl). */
#cmakedefine HAVE_LIBSSL 1

/* if zlib is available */
#cmakedefine HAVE_LIBZ 1

/* if brotli is available */
#cmakedefine HAVE_BROTLI 1

/* if your compiler supports LL */
#cmakedefine HAVE_LL 1

/* Define to 1 if you have the <locale.h> header file. */
#cmakedefine HAVE_LOCALE_H 1

Changes to jni/curl/lib/curl_config.h.in.
1



2
3
4
5
6
7
8
/* lib/curl_config.h.in.  Generated from configure.ac by autoheader.  */




/* Location of default ca bundle */
#undef CURL_CA_BUNDLE

/* define "1" to use built in CA store of SSL library */
#undef CURL_CA_FALLBACK


>
>
>







1
2
3
4
5
6
7
8
9
10
11
/* lib/curl_config.h.in.  Generated from configure.ac by autoheader.  */

/* to enable curl debug memory tracking */
#undef CURLDEBUG

/* Location of default ca bundle */
#undef CURL_CA_BUNDLE

/* define "1" to use built in CA store of SSL library */
#undef CURL_CA_FALLBACK

70
71
72
73
74
75
76



77
78
79



80
81
82
83
84
85
86
#undef CURL_DISABLE_TLS_SRP

/* to disable verbose strings */
#undef CURL_DISABLE_VERBOSE_STRINGS

/* Definition to make a library symbol externally visible. */
#undef CURL_EXTERN_SYMBOL




/* built with multiple SSL backends */
#undef CURL_WITH_MULTI_SSL




/* your Entropy Gathering Daemon socket pathname */
#undef EGD_SOCKET

/* Define if you want to enable IPv6 support */
#undef ENABLE_IPV6








>
>
>



>
>
>







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#undef CURL_DISABLE_TLS_SRP

/* to disable verbose strings */
#undef CURL_DISABLE_VERBOSE_STRINGS

/* Definition to make a library symbol externally visible. */
#undef CURL_EXTERN_SYMBOL

/* IP address type in sockaddr */
#undef CURL_SA_FAMILY_T

/* built with multiple SSL backends */
#undef CURL_WITH_MULTI_SSL

/* enable debug build options */
#undef DEBUGBUILD

/* your Entropy Gathering Daemon socket pathname */
#undef EGD_SOCKET

/* Define if you want to enable IPv6 support */
#undef ENABLE_IPV6

Changes to jni/curl/lib/curl_ctype.c.
18
19
20
21
22
23
24


25
26
27
28
29
30
31
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/

#include "curl_setup.h"



#undef _U
#define _U (1<<0) /* upper case */
#undef _L
#define _L (1<<1) /* lower case */
#undef _N
#define _N (1<<2) /* decimal numerical digit */
#undef _S







>
>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/

#include "curl_setup.h"

#ifndef CURL_DOES_CONVERSIONS

#undef _U
#define _U (1<<0) /* upper case */
#undef _L
#define _L (1<<1) /* lower case */
#undef _N
#define _N (1<<2) /* decimal numerical digit */
#undef _S
116
117
118
119
120
121
122










int Curl_islower(int c)
{
  if((c < 0) || (c >= 0x80))
    return FALSE;
  return (ascii[c] & (_L));
}
















>
>
>
>
>
>
>
>
>
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

int Curl_islower(int c)
{
  if((c < 0) || (c >= 0x80))
    return FALSE;
  return (ascii[c] & (_L));
}

int Curl_iscntrl(int c)
{
  if((c < 0) || (c >= 0x80))
    return FALSE;
  return (ascii[c] & (_C));
}

#endif /* !CURL_DOES_CONVERSIONS */
Changes to jni/curl/lib/curl_ctype.h.
17
18
19
20
21
22
23




























24
25
26
27
28
29
30
31
32
33

34
35
36
37
38
39
40
41
42
43

44



45
46
47
48
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/





























int Curl_isspace(int c);
int Curl_isdigit(int c);
int Curl_isalnum(int c);
int Curl_isxdigit(int c);
int Curl_isgraph(int c);
int Curl_isprint(int c);
int Curl_isalpha(int c);
int Curl_isupper(int c);
int Curl_islower(int c);


#define ISSPACE(x)  (Curl_isspace((int)  ((unsigned char)x)))
#define ISDIGIT(x)  (Curl_isdigit((int)  ((unsigned char)x)))
#define ISALNUM(x)  (Curl_isalnum((int)  ((unsigned char)x)))
#define ISXDIGIT(x) (Curl_isxdigit((int) ((unsigned char)x)))
#define ISGRAPH(x)  (Curl_isgraph((int)  ((unsigned char)x)))
#define ISALPHA(x)  (Curl_isalpha((int)  ((unsigned char)x)))
#define ISPRINT(x)  (Curl_isprint((int)  ((unsigned char)x)))
#define ISUPPER(x)  (Curl_isupper((int)  ((unsigned char)x)))
#define ISLOWER(x)  (Curl_islower((int)  ((unsigned char)x)))

#define ISASCII(x)  (((x) >= 0) && ((x) <= 0x80))



#define ISBLANK(x)  (int)((((unsigned char)x) == ' ') ||        \
                          (((unsigned char)x) == '\t'))

#endif /* HEADER_CURL_CTYPE_H */







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










>










>

>
>
>




17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/

#include "curl_setup.h"

#ifdef CURL_DOES_CONVERSIONS

/*
 * Uppercase macro versions of ANSI/ISO is*() functions/macros which
 * avoid negative number inputs with argument byte codes > 127.
 *
 * For non-ASCII platforms the C library character classification routines
 * are used despite being locale-dependent, because this is better than
 * not to work at all.
 */
#include <ctype.h>

#define ISSPACE(x)  (isspace((int)  ((unsigned char)x)))
#define ISDIGIT(x)  (isdigit((int)  ((unsigned char)x)))
#define ISALNUM(x)  (isalnum((int)  ((unsigned char)x)))
#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
#define ISGRAPH(x)  (isgraph((int)  ((unsigned char)x)))
#define ISALPHA(x)  (isalpha((int)  ((unsigned char)x)))
#define ISPRINT(x)  (isprint((int)  ((unsigned char)x)))
#define ISUPPER(x)  (isupper((int)  ((unsigned char)x)))
#define ISLOWER(x)  (islower((int)  ((unsigned char)x)))
#define ISCNTRL(x)  (iscntrl((int)  ((unsigned char)x)))
#define ISASCII(x)  (isascii((int)  ((unsigned char)x)))

#else

int Curl_isspace(int c);
int Curl_isdigit(int c);
int Curl_isalnum(int c);
int Curl_isxdigit(int c);
int Curl_isgraph(int c);
int Curl_isprint(int c);
int Curl_isalpha(int c);
int Curl_isupper(int c);
int Curl_islower(int c);
int Curl_iscntrl(int c);

#define ISSPACE(x)  (Curl_isspace((int)  ((unsigned char)x)))
#define ISDIGIT(x)  (Curl_isdigit((int)  ((unsigned char)x)))
#define ISALNUM(x)  (Curl_isalnum((int)  ((unsigned char)x)))
#define ISXDIGIT(x) (Curl_isxdigit((int) ((unsigned char)x)))
#define ISGRAPH(x)  (Curl_isgraph((int)  ((unsigned char)x)))
#define ISALPHA(x)  (Curl_isalpha((int)  ((unsigned char)x)))
#define ISPRINT(x)  (Curl_isprint((int)  ((unsigned char)x)))
#define ISUPPER(x)  (Curl_isupper((int)  ((unsigned char)x)))
#define ISLOWER(x)  (Curl_islower((int)  ((unsigned char)x)))
#define ISCNTRL(x)  (Curl_iscntrl((int)  ((unsigned char)x)))
#define ISASCII(x)  (((x) >= 0) && ((x) <= 0x80))

#endif

#define ISBLANK(x)  (int)((((unsigned char)x) == ' ') ||        \
                          (((unsigned char)x) == '\t'))

#endif /* HEADER_CURL_CTYPE_H */
Changes to jni/curl/lib/curl_memrchr.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
40
41
42
43
44
45
46

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 * backwards from the end of the n bytes pointed to by s instead of forward
 * from the beginning.
 */

void *
Curl_memrchr(const void *s, int c, size_t n)
{

  const unsigned char *p = s;
  const unsigned char *q = s;

  p += n - 1;

  while(p >= q) {
    if(*p == (unsigned char)c)
      return (void *)p;
    p--;
  }

  return NULL;
}

#endif /* HAVE_MEMRCHR */







>
|
|

|

|
|
|
|
|
|




40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 * backwards from the end of the n bytes pointed to by s instead of forward
 * from the beginning.
 */

void *
Curl_memrchr(const void *s, int c, size_t n)
{
  if(n > 0) {
    const unsigned char *p = s;
    const unsigned char *q = s;

    p += n - 1;

    while(p >= q) {
      if(*p == (unsigned char)c)
        return (void *)p;
      p--;
    }
  }
  return NULL;
}

#endif /* HAVE_MEMRCHR */
Changes to jni/curl/lib/curl_ntlm_core.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664

  /* Finalise the digest */
  Curl_HMAC_final(ctxt, output);

  return CURLE_OK;
}

#ifndef SIZE_T_MAX
/* some limits.h headers have this defined, some don't */
#if defined(SIZEOF_SIZE_T) && (SIZEOF_SIZE_T > 4)
#define SIZE_T_MAX 18446744073709551615U
#else
#define SIZE_T_MAX 4294967295U
#endif
#endif

/* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode
 * (uppercase UserName + Domain) as the data
 */
CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen,
                                       const char *domain, size_t domlen,
                                       unsigned char *ntlmhash,
                                       unsigned char *ntlmv2hash)







<
<
<
<
<
<
<
<
<







642
643
644
645
646
647
648









649
650
651
652
653
654
655

  /* Finalise the digest */
  Curl_HMAC_final(ctxt, output);

  return CURLE_OK;
}










/* This creates the NTLMv2 hash by using NTLM hash as the key and Unicode
 * (uppercase UserName + Domain) as the data
 */
CURLcode Curl_ntlm_core_mk_ntlmv2_hash(const char *user, size_t userlen,
                                       const char *domain, size_t domlen,
                                       unsigned char *ntlmhash,
                                       unsigned char *ntlmv2hash)
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
#endif
    tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000;

  /* Calculate the response len */
  len = NTLM_HMAC_MD5_LEN + NTLMv2_BLOB_LEN;

  /* Allocate the response */
  ptr = malloc(len);
  if(!ptr)
    return CURLE_OUT_OF_MEMORY;

  memset(ptr, 0, len);

  /* Create the BLOB structure */
  snprintf((char *)ptr + NTLM_HMAC_MD5_LEN, NTLMv2_BLOB_LEN,
           "%c%c%c%c"   /* NTLMv2_BLOB_SIGNATURE */
           "%c%c%c%c",  /* Reserved = 0 */
           NTLMv2_BLOB_SIGNATURE[0], NTLMv2_BLOB_SIGNATURE[1],
           NTLMv2_BLOB_SIGNATURE[2], NTLMv2_BLOB_SIGNATURE[3],
           0, 0, 0, 0);







|



<
<







741
742
743
744
745
746
747
748
749
750
751


752
753
754
755
756
757
758
#endif
    tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000;

  /* Calculate the response len */
  len = NTLM_HMAC_MD5_LEN + NTLMv2_BLOB_LEN;

  /* Allocate the response */
  ptr = calloc(1, len);
  if(!ptr)
    return CURLE_OUT_OF_MEMORY;



  /* Create the BLOB structure */
  snprintf((char *)ptr + NTLM_HMAC_MD5_LEN, NTLMv2_BLOB_LEN,
           "%c%c%c%c"   /* NTLMv2_BLOB_SIGNATURE */
           "%c%c%c%c",  /* Reserved = 0 */
           NTLMv2_BLOB_SIGNATURE[0], NTLMv2_BLOB_SIGNATURE[1],
           NTLMv2_BLOB_SIGNATURE[2], NTLMv2_BLOB_SIGNATURE[3],
           0, 0, 0, 0);
Changes to jni/curl/lib/curl_path.h.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
>
>







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_PATH_H
#define HEADER_CURL_PATH_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
38
39
40
41
42
43
44

#endif

CURLcode Curl_getworkingpath(struct connectdata *conn,
                             char *homedir,
                             char **path);

CURLcode Curl_get_pathname(const char **cpp, char **path, char *homedir);








>
40
41
42
43
44
45
46
47
#endif

CURLcode Curl_getworkingpath(struct connectdata *conn,
                             char *homedir,
                             char **path);

CURLcode Curl_get_pathname(const char **cpp, char **path, char *homedir);
#endif
Changes to jni/curl/lib/curl_sasl.c.
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
  char *resp = NULL;
  size_t len = 0;
  saslstate state1 = SASL_STOP;
  saslstate state2 = SASL_FINAL;
  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
    conn->host.name;
  const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
#if defined(USE_KERBEROS5)
  const char *service = data->set.str[STRING_SERVICE_NAME] ?
    data->set.str[STRING_SERVICE_NAME] :
    sasl->params->service;
#endif

  sasl->force_ir = force_ir;    /* Latch for future use */
  sasl->authused = 0;           /* No mechanism used yet */







|







261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
  char *resp = NULL;
  size_t len = 0;
  saslstate state1 = SASL_STOP;
  saslstate state2 = SASL_FINAL;
  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
    conn->host.name;
  const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
#if defined(USE_KERBEROS5) || defined(USE_NTLM)
  const char *service = data->set.str[STRING_SERVICE_NAME] ?
    data->set.str[STRING_SERVICE_NAME] :
    sasl->params->service;
#endif

  sasl->force_ir = force_ir;    /* Latch for future use */
  sasl->authused = 0;           /* No mechanism used yet */
329
330
331
332
333
334
335


336

337
338
339
340
341
342
343
      state1 = SASL_NTLM;
      state2 = SASL_NTLM_TYPE2MSG;
      sasl->authused = SASL_MECH_NTLM;

      if(force_ir || data->set.sasl_ir)
        result = Curl_auth_create_ntlm_type1_message(data,
                                                     conn->user, conn->passwd,


                                                     &conn->ntlm, &resp, &len);

      }
    else
#endif
    if((enabledmechs & SASL_MECH_OAUTHBEARER) && conn->oauth_bearer) {
      mech = SASL_MECH_STRING_OAUTHBEARER;
      state1 = SASL_OAUTH2;
      state2 = SASL_OAUTH2_RESP;







>
>
|
>







329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
      state1 = SASL_NTLM;
      state2 = SASL_NTLM_TYPE2MSG;
      sasl->authused = SASL_MECH_NTLM;

      if(force_ir || data->set.sasl_ir)
        result = Curl_auth_create_ntlm_type1_message(data,
                                                     conn->user, conn->passwd,
                                                     service,
                                                     hostname,
                                                     &conn->ntlm, &resp,
                                                     &len);
      }
    else
#endif
    if((enabledmechs & SASL_MECH_OAUTHBEARER) && conn->oauth_bearer) {
      mech = SASL_MECH_STRING_OAUTHBEARER;
      state1 = SASL_OAUTH2;
      state2 = SASL_OAUTH2_RESP;
415
416
417
418
419
420
421
422

423
424
425
426
427
428
429
430
431
432
433
434
435
  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
    conn->host.name;
  const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
#if !defined(CURL_DISABLE_CRYPTO_AUTH)
  char *chlg = NULL;
  size_t chlglen = 0;
#endif
#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5)

  const char *service = data->set.str[STRING_SERVICE_NAME] ?
                        data->set.str[STRING_SERVICE_NAME] :
                        sasl->params->service;
#endif
#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \
    defined(USE_NTLM)
  char *serverdata;
#endif
  size_t len = 0;

  *progress = SASL_INPROGRESS;

  if(sasl->state == SASL_FINAL) {







|
>



<
<
<







418
419
420
421
422
423
424
425
426
427
428
429



430
431
432
433
434
435
436
  const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name :
    conn->host.name;
  const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
#if !defined(CURL_DISABLE_CRYPTO_AUTH)
  char *chlg = NULL;
  size_t chlglen = 0;
#endif
#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \
    defined(USE_NTLM)
  const char *service = data->set.str[STRING_SERVICE_NAME] ?
                        data->set.str[STRING_SERVICE_NAME] :
                        sasl->params->service;



  char *serverdata;
#endif
  size_t len = 0;

  *progress = SASL_INPROGRESS;

  if(sasl->state == SASL_FINAL) {
492
493
494
495
496
497
498

499
500
501
502
503
504
505
#endif

#ifdef USE_NTLM
  case SASL_NTLM:
    /* Create the type-1 message */
    result = Curl_auth_create_ntlm_type1_message(data,
                                                 conn->user, conn->passwd,

                                                 &conn->ntlm, &resp, &len);
    newstate = SASL_NTLM_TYPE2MSG;
    break;
  case SASL_NTLM_TYPE2MSG:
    /* Decode the type-2 message */
    sasl->params->getmessage(data->state.buffer, &serverdata);
    result = Curl_auth_decode_ntlm_type2_message(data, serverdata,







>







493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
#endif

#ifdef USE_NTLM
  case SASL_NTLM:
    /* Create the type-1 message */
    result = Curl_auth_create_ntlm_type1_message(data,
                                                 conn->user, conn->passwd,
                                                 service, hostname,
                                                 &conn->ntlm, &resp, &len);
    newstate = SASL_NTLM_TYPE2MSG;
    break;
  case SASL_NTLM_TYPE2MSG:
    /* Decode the type-2 message */
    sasl->params->getmessage(data->state.buffer, &serverdata);
    result = Curl_auth_decode_ntlm_type2_message(data, serverdata,
Changes to jni/curl/lib/curl_setup.h.
443
444
445
446
447
448
449









450
451
452
453
454
455
456
#  define TIME_T_MIN 0
#  else
#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
#  define TIME_T_MIN (-TIME_T_MAX - 1)
#  endif
#endif










/*
 * Arg 2 type for gethostname in case it hasn't been defined in config file.
 */

#ifndef GETHOSTNAME_TYPE_ARG2
#  ifdef USE_WINSOCK
#    define GETHOSTNAME_TYPE_ARG2 int







>
>
>
>
>
>
>
>
>







443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
#  define TIME_T_MIN 0
#  else
#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
#  define TIME_T_MIN (-TIME_T_MAX - 1)
#  endif
#endif

#ifndef SIZE_T_MAX
/* some limits.h headers have this defined, some don't */
#if defined(SIZEOF_SIZE_T) && (SIZEOF_SIZE_T > 4)
#define SIZE_T_MAX 18446744073709551615U
#else
#define SIZE_T_MAX 4294967295U
#endif
#endif

/*
 * Arg 2 type for gethostname in case it hasn't been defined in config file.
 */

#ifndef GETHOSTNAME_TYPE_ARG2
#  ifdef USE_WINSOCK
#    define GETHOSTNAME_TYPE_ARG2 int
781
782
783
784
785
786
787
788





789
  defined(WINAPI_FAMILY)
#  include <winapifamily.h>
#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) &&  \
     !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#    define CURL_WINDOWS_APP
#  endif
# endif






#endif /* HEADER_CURL_SETUP_H */








>
>
>
>
>

790
791
792
793
794
795
796
797
798
799
800
801
802
803
  defined(WINAPI_FAMILY)
#  include <winapifamily.h>
#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) &&  \
     !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#    define CURL_WINDOWS_APP
#  endif
# endif

/* for systems that don't detect this in configure, use a sensible default */
#ifndef CURL_SA_FAMILY_T
#define CURL_SA_FAMILY_T unsigned short
#endif

#endif /* HEADER_CURL_SETUP_H */
Changes to jni/curl/lib/curl_threads.h.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
#elif defined(USE_THREADS_WIN32)
#  define CURL_STDCALL           __stdcall
#  define curl_mutex_t           CRITICAL_SECTION
#  define curl_thread_t          HANDLE
#  define curl_thread_t_null     (HANDLE)0
#  define Curl_mutex_init(m)   InitializeCriticalSection(m)
#  define Curl_mutex_acquire(m)  EnterCriticalSection(m)
#  define Curl_mutex_release(m)  LeaveCriticalSection(m)
#  define Curl_mutex_destroy(m)  DeleteCriticalSection(m)
#endif

#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)








|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
#elif defined(USE_THREADS_WIN32)
#  define CURL_STDCALL           __stdcall
#  define curl_mutex_t           CRITICAL_SECTION
#  define curl_thread_t          HANDLE
#  define curl_thread_t_null     (HANDLE)0
#  define Curl_mutex_init(m)     InitializeCriticalSection(m)
#  define Curl_mutex_acquire(m)  EnterCriticalSection(m)
#  define Curl_mutex_release(m)  LeaveCriticalSection(m)
#  define Curl_mutex_destroy(m)  DeleteCriticalSection(m)
#endif

#if defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)

Changes to jni/curl/lib/easy.c.
742
743
744
745
746
747
748




749
750
751
752
753
754
755
  CURLMcode mcode;
  CURLcode result = CURLE_OK;
  SIGPIPE_VARIABLE(pipe_st);

  if(!data)
    return CURLE_BAD_FUNCTION_ARGUMENT;





  if(data->multi) {
    failf(data, "easy handle already used in multi handle");
    return CURLE_FAILED_INIT;
  }

  if(data->multi_easy)
    multi = data->multi_easy;







>
>
>
>







742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
  CURLMcode mcode;
  CURLcode result = CURLE_OK;
  SIGPIPE_VARIABLE(pipe_st);

  if(!data)
    return CURLE_BAD_FUNCTION_ARGUMENT;

  if(data->set.errorbuffer)
    /* clear this as early as possible */
    data->set.errorbuffer[0] = 0;

  if(data->multi) {
    failf(data, "easy handle already used in multi handle");
    return CURLE_FAILED_INIT;
  }

  if(data->multi_easy)
    multi = data->multi_easy;
884
885
886
887
888
889
890



891
892
893
894
895
896
897
    /* point to the new copy */
    dst->set.postfields = dst->set.str[i];
  }

  /* Duplicate mime data. */
  result = Curl_mime_duppart(&dst->set.mimepost, &src->set.mimepost);




  return result;
}

/*
 * curl_easy_duphandle() is an external interface to allow duplication of a
 * given input easy handle. The returned handle will be a new working handle
 * with all options set exactly as the input source handle.







>
>
>







888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
    /* point to the new copy */
    dst->set.postfields = dst->set.str[i];
  }

  /* Duplicate mime data. */
  result = Curl_mime_duppart(&dst->set.mimepost, &src->set.mimepost);

  if(src->set.resolve)
    dst->change.resolve = dst->set.resolve;

  return result;
}

/*
 * curl_easy_duphandle() is an external interface to allow duplication of a
 * given input easy handle. The returned handle will be a new working handle
 * with all options set exactly as the input source handle.
1094
1095
1096
1097
1098
1099
1100




1101
1102
1103
1104
1105
1106
1107

  /* if there's no error and we're not pausing both directions, we want
     to have this handle checked soon */
  if(!result &&
     ((newstate&(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
      (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) )
    Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */





  return result;
}


static CURLcode easy_connection(struct Curl_easy *data,
                                curl_socket_t *sfd,







>
>
>
>







1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118

  /* if there's no error and we're not pausing both directions, we want
     to have this handle checked soon */
  if(!result &&
     ((newstate&(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
      (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) )
    Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */

  /* This transfer may have been moved in or out of the bundle, update
     the corresponding socket callback, if used */
  Curl_updatesocket(data);

  return result;
}


static CURLcode easy_connection(struct Curl_easy *data,
                                curl_socket_t *sfd,
Changes to jni/curl/lib/fileinfo.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "memdebug.h"

struct fileinfo *Curl_fileinfo_alloc(void)
{
  return calloc(1, sizeof(struct fileinfo));
}

void Curl_fileinfo_dtor(void *user, void *element)
{
  struct fileinfo *finfo = element;
  (void) user;
  if(!finfo)
    return;

  Curl_safefree(finfo->info.b_data);

  free(finfo);
}







|

<
<




<


29
30
31
32
33
34
35
36
37


38
39
40
41

42
43
#include "memdebug.h"

struct fileinfo *Curl_fileinfo_alloc(void)
{
  return calloc(1, sizeof(struct fileinfo));
}

void Curl_fileinfo_cleanup(struct fileinfo *finfo)
{


  if(!finfo)
    return;

  Curl_safefree(finfo->info.b_data);

  free(finfo);
}
Changes to jni/curl/lib/fileinfo.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_FILEINFO_H
#define HEADER_CURL_FILEINFO_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_FILEINFO_H
#define HEADER_CURL_FILEINFO_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
27
28
29
30
31
32
33
34
35
36
37

struct fileinfo {
  struct curl_fileinfo info;
  struct curl_llist_element list;
};

struct fileinfo *Curl_fileinfo_alloc(void);

void Curl_fileinfo_dtor(void *, void *);

#endif /* HEADER_CURL_FILEINFO_H */







<
|


27
28
29
30
31
32
33

34
35
36

struct fileinfo {
  struct curl_fileinfo info;
  struct curl_llist_element list;
};

struct fileinfo *Curl_fileinfo_alloc(void);

void Curl_fileinfo_cleanup(struct fileinfo *finfo);

#endif /* HEADER_CURL_FILEINFO_H */
Changes to jni/curl/lib/ftp.c.
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
    data->set.ftp_append = TRUE;

    /* Let's read off the proper amount of bytes from the input. */
    if(conn->seek_func) {
      Curl_set_in_callback(data, true);
      seekerr = conn->seek_func(conn->seek_client, data->state.resume_from,
                                SEEK_SET);
      Curl_set_in_callback(data, true);
    }

    if(seekerr != CURL_SEEKFUNC_OK) {
      curl_off_t passed = 0;
      if(seekerr != CURL_SEEKFUNC_CANTSEEK) {
        failf(data, "Could not seek stream");
        return CURLE_FTP_COULDNT_USE_REST;







|







1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
    data->set.ftp_append = TRUE;

    /* Let's read off the proper amount of bytes from the input. */
    if(conn->seek_func) {
      Curl_set_in_callback(data, true);
      seekerr = conn->seek_func(conn->seek_client, data->state.resume_from,
                                SEEK_SET);
      Curl_set_in_callback(data, false);
    }

    if(seekerr != CURL_SEEKFUNC_OK) {
      curl_off_t passed = 0;
      if(seekerr != CURL_SEEKFUNC_CANTSEEK) {
        failf(data, "Could not seek stream");
        return CURLE_FTP_COULDNT_USE_REST;
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798

/* called from ftp_state_pasv_resp to switch to PASV in case of EPSV
   problems */
static CURLcode ftp_epsv_disable(struct connectdata *conn)
{
  CURLcode result = CURLE_OK;

  if(conn->bits.ipv6) {
    /* We can't disable EPSV when doing IPv6, so this is instead a fail */
    failf(conn->data, "Failed EPSV attempt, exiting\n");
    return CURLE_WEIRD_SERVER_REPLY;
  }

  infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n");
  /* disable it for next transfer */







|







1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798

/* called from ftp_state_pasv_resp to switch to PASV in case of EPSV
   problems */
static CURLcode ftp_epsv_disable(struct connectdata *conn)
{
  CURLcode result = CURLE_OK;

  if(conn->bits.ipv6 && !(conn->bits.tunnel_proxy || conn->bits.socksproxy)) {
    /* We can't disable EPSV when doing IPv6, so this is instead a fail */
    failf(conn->data, "Failed EPSV attempt, exiting\n");
    return CURLE_WEIRD_SERVER_REPLY;
  }

  infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n");
  /* disable it for next transfer */
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
      return CURLE_FTP_WEIRD_227_FORMAT;
    }

    /* we got OK from server */
    if(data->set.ftp_skip_ip) {
      /* told to ignore the remotely given IP but instead use the host we used
         for the control connection */
      infof(data, "Skip %d.%d.%d.%d for data connection, re-use %s instead\n",
            ip[0], ip[1], ip[2], ip[3],
            conn->host.name);
      ftpc->newhost = strdup(control_address(conn));
    }
    else
      ftpc->newhost = aprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);

    if(!ftpc->newhost)
      return CURLE_OUT_OF_MEMORY;

    ftpc->newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff);
  }
  else if(ftpc->count1 == 0) {







|





|







1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
      return CURLE_FTP_WEIRD_227_FORMAT;
    }

    /* we got OK from server */
    if(data->set.ftp_skip_ip) {
      /* told to ignore the remotely given IP but instead use the host we used
         for the control connection */
      infof(data, "Skip %u.%u.%u.%u for data connection, re-use %s instead\n",
            ip[0], ip[1], ip[2], ip[3],
            conn->host.name);
      ftpc->newhost = strdup(control_address(conn));
    }
    else
      ftpc->newhost = aprintf("%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);

    if(!ftpc->newhost)
      return CURLE_OUT_OF_MEMORY;

    ftpc->newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff);
  }
  else if(ftpc->count1 == 0) {
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
    DEBUGF(infof(conn->data, "DO phase is complete1\n"));

  return result;
}

static void wc_data_dtor(void *ptr)
{
  struct ftp_wc_tmpdata *tmp = ptr;
  if(tmp)
    Curl_ftp_parselist_data_free(&tmp->parser);
  free(tmp);
}

static CURLcode init_wc_data(struct connectdata *conn)
{
  char *last_slash;
  char *path = conn->data->state.path;
  struct WildcardData *wildcard = &(conn->data->wildcard);
  CURLcode result = CURLE_OK;
  struct ftp_wc_tmpdata *ftp_tmp;

  last_slash = strrchr(conn->data->state.path, '/');
  if(last_slash) {
    last_slash++;
    if(last_slash[0] == '\0') {
      wildcard->state = CURLWC_CLEAN;
      result = ftp_parse_url_path(conn);







|
|
|
|








|







3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
    DEBUGF(infof(conn->data, "DO phase is complete1\n"));

  return result;
}

static void wc_data_dtor(void *ptr)
{
  struct ftp_wc *ftpwc = ptr;
  if(ftpwc && ftpwc->parser)
    Curl_ftp_parselist_data_free(&ftpwc->parser);
  free(ftpwc);
}

static CURLcode init_wc_data(struct connectdata *conn)
{
  char *last_slash;
  char *path = conn->data->state.path;
  struct WildcardData *wildcard = &(conn->data->wildcard);
  CURLcode result = CURLE_OK;
  struct ftp_wc *ftpwc = NULL;

  last_slash = strrchr(conn->data->state.path, '/');
  if(last_slash) {
    last_slash++;
    if(last_slash[0] == '\0') {
      wildcard->state = CURLWC_CLEAN;
      result = ftp_parse_url_path(conn);
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738

3739
3740
3741
3742
3743
3744
3745
3746

3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772

3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785










3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
      return result;
    }
  }

  /* program continues only if URL is not ending with slash, allocate needed
     resources for wildcard transfer */

  /* allocate ftp protocol specific temporary wildcard data */
  ftp_tmp = calloc(1, sizeof(struct ftp_wc_tmpdata));
  if(!ftp_tmp) {
    Curl_safefree(wildcard->pattern);
    return CURLE_OUT_OF_MEMORY;

  }

  /* INITIALIZE parselist structure */
  ftp_tmp->parser = Curl_ftp_parselist_data_alloc();
  if(!ftp_tmp->parser) {
    Curl_safefree(wildcard->pattern);
    free(ftp_tmp);
    return CURLE_OUT_OF_MEMORY;

  }

  wildcard->tmp = ftp_tmp; /* put it to the WildcardData tmp pointer */
  wildcard->tmp_dtor = wc_data_dtor;

  /* wildcard does not support NOCWD option (assert it?) */
  if(conn->data->set.ftp_filemethod == FTPFILE_NOCWD)
    conn->data->set.ftp_filemethod = FTPFILE_MULTICWD;

  /* try to parse ftp url */
  result = ftp_parse_url_path(conn);
  if(result) {
    Curl_safefree(wildcard->pattern);
    wildcard->tmp_dtor(wildcard->tmp);
    wildcard->tmp_dtor = ZERO_NULL;
    wildcard->tmp = NULL;
    return result;
  }

  wildcard->path = strdup(conn->data->state.path);
  if(!wildcard->path) {
    Curl_safefree(wildcard->pattern);
    wildcard->tmp_dtor(wildcard->tmp);
    wildcard->tmp_dtor = ZERO_NULL;
    wildcard->tmp = NULL;
    return CURLE_OUT_OF_MEMORY;

  }

  /* backup old write_function */
  ftp_tmp->backup.write_function = conn->data->set.fwrite_func;
  /* parsing write function */
  conn->data->set.fwrite_func = Curl_ftp_parselist;
  /* backup old file descriptor */
  ftp_tmp->backup.file_descriptor = conn->data->set.out;
  /* let the writefunc callback know what curl pointer is working with */
  conn->data->set.out = conn;

  infof(conn->data, "Wildcard - Parsing started\n");
  return CURLE_OK;










}

/* This is called recursively */
static CURLcode wc_statemach(struct connectdata *conn)
{
  struct WildcardData * const wildcard = &(conn->data->wildcard);
  CURLcode result = CURLE_OK;

  switch(wildcard->state) {
  case CURLWC_INIT:
    result = init_wc_data(conn);
    if(wildcard->state == CURLWC_CLEAN)
      /* only listing! */
      break;
    wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING;
    break;

  case CURLWC_MATCHING: {
    /* In this state is LIST response successfully parsed, so lets restore
       previous WRITEFUNCTION callback and WRITEDATA pointer */
    struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp;
    conn->data->set.fwrite_func = ftp_tmp->backup.write_function;
    conn->data->set.out = ftp_tmp->backup.file_descriptor;
    ftp_tmp->backup.write_function = ZERO_NULL;
    ftp_tmp->backup.file_descriptor = NULL;
    wildcard->state = CURLWC_DOWNLOADING;

    if(Curl_ftp_parselist_geterror(ftp_tmp->parser)) {
      /* error found in LIST parsing */
      wildcard->state = CURLWC_CLEAN;
      return wc_statemach(conn);
    }
    if(wildcard->filelist.size == 0) {
      /* no corresponding file */
      wildcard->state = CURLWC_CLEAN;







|
|
|
<
|
>



|
|
<
<
|
>


|
|








<
<
<
|
<




<
<
<
<
|
>



|



|





>
>
>
>
>
>
>
>
>
>




















|
|
|
|
|


|







3727
3728
3729
3730
3731
3732
3733
3734
3735
3736

3737
3738
3739
3740
3741
3742
3743


3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757



3758

3759
3760
3761
3762




3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
      return result;
    }
  }

  /* program continues only if URL is not ending with slash, allocate needed
     resources for wildcard transfer */

  /* allocate ftp protocol specific wildcard data */
  ftpwc = calloc(1, sizeof(struct ftp_wc));
  if(!ftpwc) {

    result = CURLE_OUT_OF_MEMORY;
    goto fail;
  }

  /* INITIALIZE parselist structure */
  ftpwc->parser = Curl_ftp_parselist_data_alloc();
  if(!ftpwc->parser) {


    result = CURLE_OUT_OF_MEMORY;
    goto fail;
  }

  wildcard->protdata = ftpwc; /* put it to the WildcardData tmp pointer */
  wildcard->dtor = wc_data_dtor;

  /* wildcard does not support NOCWD option (assert it?) */
  if(conn->data->set.ftp_filemethod == FTPFILE_NOCWD)
    conn->data->set.ftp_filemethod = FTPFILE_MULTICWD;

  /* try to parse ftp url */
  result = ftp_parse_url_path(conn);
  if(result) {



    goto fail;

  }

  wildcard->path = strdup(conn->data->state.path);
  if(!wildcard->path) {




    result = CURLE_OUT_OF_MEMORY;
    goto fail;
  }

  /* backup old write_function */
  ftpwc->backup.write_function = conn->data->set.fwrite_func;
  /* parsing write function */
  conn->data->set.fwrite_func = Curl_ftp_parselist;
  /* backup old file descriptor */
  ftpwc->backup.file_descriptor = conn->data->set.out;
  /* let the writefunc callback know what curl pointer is working with */
  conn->data->set.out = conn;

  infof(conn->data, "Wildcard - Parsing started\n");
  return CURLE_OK;

  fail:
  if(ftpwc) {
    Curl_ftp_parselist_data_free(&ftpwc->parser);
    free(ftpwc);
  }
  Curl_safefree(wildcard->pattern);
  wildcard->dtor = ZERO_NULL;
  wildcard->protdata = NULL;
  return result;
}

/* This is called recursively */
static CURLcode wc_statemach(struct connectdata *conn)
{
  struct WildcardData * const wildcard = &(conn->data->wildcard);
  CURLcode result = CURLE_OK;

  switch(wildcard->state) {
  case CURLWC_INIT:
    result = init_wc_data(conn);
    if(wildcard->state == CURLWC_CLEAN)
      /* only listing! */
      break;
    wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING;
    break;

  case CURLWC_MATCHING: {
    /* In this state is LIST response successfully parsed, so lets restore
       previous WRITEFUNCTION callback and WRITEDATA pointer */
    struct ftp_wc *ftpwc = wildcard->protdata;
    conn->data->set.fwrite_func = ftpwc->backup.write_function;
    conn->data->set.out = ftpwc->backup.file_descriptor;
    ftpwc->backup.write_function = ZERO_NULL;
    ftpwc->backup.file_descriptor = NULL;
    wildcard->state = CURLWC_DOWNLOADING;

    if(Curl_ftp_parselist_geterror(ftpwc->parser)) {
      /* error found in LIST parsing */
      wildcard->state = CURLWC_CLEAN;
      return wc_statemach(conn);
    }
    if(wildcard->filelist.size == 0) {
      /* no corresponding file */
      wildcard->state = CURLWC_CLEAN;
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905


3906
3907
3908
3909
3910
3911
3912
    Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL);
    wildcard->state = (wildcard->filelist.size == 0) ?
                      CURLWC_CLEAN : CURLWC_DOWNLOADING;
    return wc_statemach(conn);
  }

  case CURLWC_CLEAN: {
    struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp;
    result = CURLE_OK;
    if(ftp_tmp)
      result = Curl_ftp_parselist_geterror(ftp_tmp->parser);

    wildcard->state = result ? CURLWC_ERROR : CURLWC_DONE;
  } break;

  case CURLWC_DONE:
  case CURLWC_ERROR:
  case CURLWC_CLEAR:


    break;
  }

  return result;
}

/***********************************************************************







|

|
|







>
>







3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
    Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL);
    wildcard->state = (wildcard->filelist.size == 0) ?
                      CURLWC_CLEAN : CURLWC_DOWNLOADING;
    return wc_statemach(conn);
  }

  case CURLWC_CLEAN: {
    struct ftp_wc *ftpwc = wildcard->protdata;
    result = CURLE_OK;
    if(ftpwc)
      result = Curl_ftp_parselist_geterror(ftpwc->parser);

    wildcard->state = result ? CURLWC_ERROR : CURLWC_DONE;
  } break;

  case CURLWC_DONE:
  case CURLWC_ERROR:
  case CURLWC_CLEAR:
    if(wildcard->dtor)
      wildcard->dtor(wildcard->protdata);
    break;
  }

  return result;
}

/***********************************************************************
Changes to jni/curl/lib/ftp.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_FTP_H
#define HEADER_CURL_FTP_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_FTP_H
#define HEADER_CURL_FTP_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
  FTP_STOR, /* generic state for STOR and APPE */
  FTP_QUIT,
  FTP_LAST  /* never used */
} ftpstate;

struct ftp_parselist_data; /* defined later in ftplistparser.c */

struct ftp_wc_tmpdata {
  struct ftp_parselist_data *parser;

  struct {
    curl_write_callback write_function;
    FILE *file_descriptor;
  } backup;
};







|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
  FTP_STOR, /* generic state for STOR and APPE */
  FTP_QUIT,
  FTP_LAST  /* never used */
} ftpstate;

struct ftp_parselist_data; /* defined later in ftplistparser.c */

struct ftp_wc {
  struct ftp_parselist_data *parser;

  struct {
    curl_write_callback write_function;
    FILE *file_descriptor;
  } backup;
};
Changes to jni/curl/lib/ftplistparser.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
181
182
183
184
185
186
187
188
189



190
191
192
193
194
195
196
197
198

struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void)
{
  return calloc(1, sizeof(struct ftp_parselist_data));
}


void Curl_ftp_parselist_data_free(struct ftp_parselist_data **pl_data)
{



  free(*pl_data);
  *pl_data = NULL;
}


CURLcode Curl_ftp_parselist_geterror(struct ftp_parselist_data *pl_data)
{
  return pl_data->error;
}







|

>
>
>
|
|







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201

struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void)
{
  return calloc(1, sizeof(struct ftp_parselist_data));
}


void Curl_ftp_parselist_data_free(struct ftp_parselist_data **parserp)
{
  struct ftp_parselist_data *parser = *parserp;
  if(parser)
    Curl_fileinfo_cleanup(parser->file_data);
  free(parser);
  *parserp = NULL;
}


CURLcode Curl_ftp_parselist_geterror(struct ftp_parselist_data *pl_data)
{
  return pl_data->error;
}
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
}

static CURLcode ftp_pl_insert_finfo(struct connectdata *conn,
                                    struct fileinfo *infop)
{
  curl_fnmatch_callback compare;
  struct WildcardData *wc = &conn->data->wildcard;
  struct ftp_wc_tmpdata *tmpdata = wc->tmp;
  struct curl_llist *llist = &wc->filelist;
  struct ftp_parselist_data *parser = tmpdata->parser;
  bool add = TRUE;
  struct curl_fileinfo *finfo = &infop->info;

  /* move finfo pointers to b_data */
  char *str = finfo->b_data;
  finfo->filename       = str + parser->offsets.filename;
  finfo->strings.group  = parser->offsets.group ?







|

|







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
}

static CURLcode ftp_pl_insert_finfo(struct connectdata *conn,
                                    struct fileinfo *infop)
{
  curl_fnmatch_callback compare;
  struct WildcardData *wc = &conn->data->wildcard;
  struct ftp_wc *ftpwc = wc->protdata;
  struct curl_llist *llist = &wc->filelist;
  struct ftp_parselist_data *parser = ftpwc->parser;
  bool add = TRUE;
  struct curl_fileinfo *finfo = &infop->info;

  /* move finfo pointers to b_data */
  char *str = finfo->b_data;
  finfo->filename       = str + parser->offsets.filename;
  finfo->strings.group  = parser->offsets.group ?
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
  }
  Curl_set_in_callback(conn->data, false);

  if(add) {
    Curl_llist_insert_next(llist, llist->tail, finfo, &infop->list);
  }
  else {
    Curl_fileinfo_dtor(NULL, finfo);
  }

  tmpdata->parser->file_data = NULL;
  return CURLE_OK;
}

size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
                          void *connptr)
{
  size_t bufflen = size*nmemb;
  struct connectdata *conn = (struct connectdata *)connptr;
  struct ftp_wc_tmpdata *tmpdata = conn->data->wildcard.tmp;
  struct ftp_parselist_data *parser = tmpdata->parser;
  struct fileinfo *infop;
  struct curl_fileinfo *finfo;
  unsigned long i = 0;
  CURLcode result;
  size_t retsize = bufflen;

  if(parser->error) { /* error in previous call */







|


|








|
|







312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
  }
  Curl_set_in_callback(conn->data, false);

  if(add) {
    Curl_llist_insert_next(llist, llist->tail, finfo, &infop->list);
  }
  else {
    Curl_fileinfo_cleanup(infop);
  }

  ftpwc->parser->file_data = NULL;
  return CURLE_OK;
}

size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
                          void *connptr)
{
  size_t bufflen = size*nmemb;
  struct connectdata *conn = (struct connectdata *)connptr;
  struct ftp_wc *ftpwc = conn->data->wildcard.protdata;
  struct ftp_parselist_data *parser = ftpwc->parser;
  struct fileinfo *infop;
  struct curl_fileinfo *finfo;
  unsigned long i = 0;
  CURLcode result;
  size_t retsize = bufflen;

  if(parser->error) { /* error in previous call */
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
      char *tmp = realloc(finfo->b_data,
                          finfo->b_size + FTP_BUFFER_ALLOCSIZE);
      if(tmp) {
        finfo->b_size += FTP_BUFFER_ALLOCSIZE;
        finfo->b_data = tmp;
      }
      else {
        Curl_fileinfo_dtor(NULL, parser->file_data);
        parser->file_data = NULL;
        parser->error = CURLE_OUT_OF_MEMORY;
        goto fail;
      }
    }

    switch(parser->os_type) {







|







380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
      char *tmp = realloc(finfo->b_data,
                          finfo->b_size + FTP_BUFFER_ALLOCSIZE);
      if(tmp) {
        finfo->b_size += FTP_BUFFER_ALLOCSIZE;
        finfo->b_data = tmp;
      }
      else {
        Curl_fileinfo_cleanup(parser->file_data);
        parser->file_data = NULL;
        parser->error = CURLE_OUT_OF_MEMORY;
        goto fail;
      }
    }

    switch(parser->os_type) {
999
1000
1001
1002
1003
1004
1005

1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
    default:
      retsize = bufflen + 1;
      goto fail;
    }

    i++;
  }


fail:

  /* Clean up any allocated memory. */
  if(parser->file_data) {
    Curl_fileinfo_dtor(NULL, parser->file_data);
    parser->file_data = NULL;
  }

  return retsize;
}

#endif /* CURL_DISABLE_FTP */







>





|







1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
    default:
      retsize = bufflen + 1;
      goto fail;
    }

    i++;
  }
  return retsize;

fail:

  /* Clean up any allocated memory. */
  if(parser->file_data) {
    Curl_fileinfo_cleanup(parser->file_data);
    parser->file_data = NULL;
  }

  return retsize;
}

#endif /* CURL_DISABLE_FTP */
Changes to jni/curl/lib/hash.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
  }
}

size_t Curl_hash_str(void *key, size_t key_length, size_t slots_num)
{
  const char *key_str = (const char *) key;
  const char *end = key_str + key_length;
  unsigned long h = 5381;

  while(key_str < end) {
    h += h << 5;
    h ^= (unsigned long) *key_str++;
  }

  return (h % slots_num);
}

size_t Curl_str_key_compare(void *k1, size_t key1_len,
                            void *k2, size_t key2_len)







|



|







257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
  }
}

size_t Curl_hash_str(void *key, size_t key_length, size_t slots_num)
{
  const char *key_str = (const char *) key;
  const char *end = key_str + key_length;
  size_t h = 5381;

  while(key_str < end) {
    h += h << 5;
    h ^= *key_str++;
  }

  return (h % slots_num);
}

size_t Curl_str_key_compare(void *k1, size_t key1_len,
                            void *k2, size_t key2_len)
Changes to jni/curl/lib/hostcheck.c.
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 ***************************************************************************/

#include "curl_setup.h"

#if defined(USE_OPENSSL)                                \
  || defined(USE_AXTLS)                                 \
  || defined(USE_GSKIT)                                 \
  || (defined(USE_SCHANNEL) && defined(_WIN32_WCE))
/* these backends use functions from this file */

#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 ***************************************************************************/

#include "curl_setup.h"

#if defined(USE_OPENSSL)                                \
  || defined(USE_AXTLS)                                 \
  || defined(USE_GSKIT)                                 \
  || defined(USE_SCHANNEL)
/* these backends use functions from this file */

#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_IN6_H
#include <netinet/in6.h>
Changes to jni/curl/lib/hostip.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
50
51
52
53
54
55
56

57
58
59
60
61
62
63
#include <process.h>
#endif

#include "urldata.h"
#include "sendf.h"
#include "hostip.h"
#include "hash.h"

#include "share.h"
#include "strerror.h"
#include "url.h"
#include "inet_ntop.h"
#include "multiif.h"
#include "warnless.h"
/* The last 3 #include files should be in this order */







>







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <process.h>
#endif

#include "urldata.h"
#include "sendf.h"
#include "hostip.h"
#include "hash.h"
#include "rand.h"
#include "share.h"
#include "strerror.h"
#include "url.h"
#include "inet_ntop.h"
#include "multiif.h"
#include "warnless.h"
/* The last 3 #include files should be in this order */
361
362
363
364
365
366
367
































































368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387







388
389
390
391
392
393
394
    dns->inuse++; /* we use it! */

  if(data->share)
    Curl_share_unlock(data, CURL_LOCK_DATA_DNS);

  return dns;
}

































































/*
 * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache.
 *
 * When calling Curl_resolv() has resulted in a response with a returned
 * address, we call this function to store the information in the dns
 * cache etc
 *
 * Returns the Curl_dns_entry entry pointer or NULL if the storage failed.
 */
struct Curl_dns_entry *
Curl_cache_addr(struct Curl_easy *data,
                Curl_addrinfo *addr,
                const char *hostname,
                int port)
{
  char *entry_id;
  size_t entry_len;
  struct Curl_dns_entry *dns;
  struct Curl_dns_entry *dns2;








  /* Create an entry id, based upon the hostname and port */
  entry_id = create_hostcache_id(hostname, port);
  /* If we can't create the entry id, fail */
  if(!entry_id)
    return NULL;
  entry_len = strlen(entry_id);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




















>
>
>
>
>
>
>







362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
    dns->inuse++; /* we use it! */

  if(data->share)
    Curl_share_unlock(data, CURL_LOCK_DATA_DNS);

  return dns;
}

/*
 * Curl_shuffle_addr() shuffles the order of addresses in a 'Curl_addrinfo'
 * struct by re-linking its linked list.
 *
 * The addr argument should be the address of a pointer to the head node of a
 * `Curl_addrinfo` list and it will be modified to point to the new head after
 * shuffling.
 *
 * Not declared static only to make it easy to use in a unit test!
 *
 * @unittest: 1608
 */
CURLcode Curl_shuffle_addr(struct Curl_easy *data, Curl_addrinfo **addr)
{
  CURLcode result = CURLE_OK;
  const int num_addrs = Curl_num_addresses(*addr);

  if(num_addrs > 1) {
    Curl_addrinfo **nodes;
    infof(data, "Shuffling %i addresses", num_addrs);

    nodes = malloc(num_addrs*sizeof(*nodes));
    if(nodes) {
      int i;
      unsigned int *rnd;
      const size_t rnd_size = num_addrs * sizeof(*rnd);

      /* build a plain array of Curl_addrinfo pointers */
      nodes[0] = *addr;
      for(i = 1; i < num_addrs; i++) {
        nodes[i] = nodes[i-1]->ai_next;
      }

      rnd = malloc(rnd_size);
      if(rnd) {
        /* Fisher-Yates shuffle */
        if(Curl_rand(data, (unsigned char *)rnd, rnd_size) == CURLE_OK) {
          Curl_addrinfo *swap_tmp;
          for(i = num_addrs - 1; i > 0; i--) {
            swap_tmp = nodes[rnd[i] % (i + 1)];
            nodes[rnd[i] % (i + 1)] = nodes[i];
            nodes[i] = swap_tmp;
          }

          /* relink list in the new order */
          for(i = 1; i < num_addrs; i++) {
            nodes[i-1]->ai_next = nodes[i];
          }

          nodes[num_addrs-1]->ai_next = NULL;
          *addr = nodes[0];
        }
        free(rnd);
      }
      else
        result = CURLE_OUT_OF_MEMORY;
      free(nodes);
    }
    else
      result = CURLE_OUT_OF_MEMORY;
  }
  return result;
}

/*
 * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache.
 *
 * When calling Curl_resolv() has resulted in a response with a returned
 * address, we call this function to store the information in the dns
 * cache etc
 *
 * Returns the Curl_dns_entry entry pointer or NULL if the storage failed.
 */
struct Curl_dns_entry *
Curl_cache_addr(struct Curl_easy *data,
                Curl_addrinfo *addr,
                const char *hostname,
                int port)
{
  char *entry_id;
  size_t entry_len;
  struct Curl_dns_entry *dns;
  struct Curl_dns_entry *dns2;

  /* shuffle addresses if requested */
  if(data->set.dns_shuffle_addresses) {
    CURLcode result = Curl_shuffle_addr(data, &addr);
    if(!result)
      return NULL;
  }

  /* Create an entry id, based upon the hostname and port */
  entry_id = create_hostcache_id(hostname, port);
  /* If we can't create the entry id, fail */
  if(!entry_id)
    return NULL;
  entry_len = strlen(entry_id);
Changes to jni/curl/lib/hostip.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_HOSTIP_H
#define HEADER_CURL_HOSTIP_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_HOSTIP_H
#define HEADER_CURL_HOSTIP_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
178
179
180
181
182
183
184











185
186
187
188
189
190
191
 * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after
 * use, or we'll leak memory!
 */
struct Curl_dns_entry *
Curl_fetch_addr(struct connectdata *conn,
                const char *hostname,
                int port);











/*
 * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache.
 *
 * Returns the Curl_dns_entry entry pointer or NULL if the storage failed.
 */
struct Curl_dns_entry *
Curl_cache_addr(struct Curl_easy *data, Curl_addrinfo *addr,







>
>
>
>
>
>
>
>
>
>
>







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
 * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after
 * use, or we'll leak memory!
 */
struct Curl_dns_entry *
Curl_fetch_addr(struct connectdata *conn,
                const char *hostname,
                int port);

/*
 * Curl_shuffle_addr() shuffles the order of addresses in a 'Curl_addrinfo'
 * struct by re-linking its linked list.
 *
 * The addr argument should be the address of a pointer to the head node of a
 * `Curl_addrinfo` list and it will be modified to point to the new head after
 * shuffling.
 */
CURLcode Curl_shuffle_addr(struct Curl_easy *data, Curl_addrinfo **addr);

/*
 * Curl_cache_addr() stores a 'Curl_addrinfo' struct in the DNS cache.
 *
 * Returns the Curl_dns_entry entry pointer or NULL if the storage failed.
 */
struct Curl_dns_entry *
Curl_cache_addr(struct Curl_easy *data, Curl_addrinfo *addr,
Changes to jni/curl/lib/http.c.
88
89
90
91
92
93
94


95
96
97
98
99
100
101
 */

static int http_getsock_do(struct connectdata *conn,
                           curl_socket_t *socks,
                           int numsocks);
static int http_should_fail(struct connectdata *conn);



#ifdef USE_SSL
static CURLcode https_connecting(struct connectdata *conn, bool *done);
static int https_getsock(struct connectdata *conn,
                         curl_socket_t *socks,
                         int numsocks);
#else
#define https_connecting(x,y) CURLE_COULDNT_CONNECT







>
>







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
 */

static int http_getsock_do(struct connectdata *conn,
                           curl_socket_t *socks,
                           int numsocks);
static int http_should_fail(struct connectdata *conn);

static CURLcode add_haproxy_protocol_header(struct connectdata *conn);

#ifdef USE_SSL
static CURLcode https_connecting(struct connectdata *conn, bool *done);
static int https_getsock(struct connectdata *conn,
                         curl_socket_t *socks,
                         int numsocks);
#else
#define https_connecting(x,y) CURLE_COULDNT_CONNECT
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
char *Curl_copy_header_value(const char *header)
{
  const char *start;
  const char *end;
  char *value;
  size_t len;

  DEBUGASSERT(header);

  /* Find the end of the header name */
  while(*header && (*header != ':'))
    ++header;

  if(*header)
    /* Skip over colon */
    ++header;







<
<







210
211
212
213
214
215
216


217
218
219
220
221
222
223
char *Curl_copy_header_value(const char *header)
{
  const char *start;
  const char *end;
  char *value;
  size_t len;



  /* Find the end of the header name */
  while(*header && (*header != ':'))
    ++header;

  if(*header)
    /* Skip over colon */
    ++header;
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
      if(((expectsend - bytessent) < 2000) ||
         (conn->ntlm.state != NTLMSTATE_NONE) ||
         (conn->proxyntlm.state != NTLMSTATE_NONE)) {
        /* The NTLM-negotiation has started *OR* there is just a little (<2K)
           data left to send, keep on sending. */

        /* rewind data when completely done sending! */
        if(!conn->bits.authneg) {
          conn->bits.rewindaftersend = TRUE;
          infof(data, "Rewind stream after send\n");
        }

        return CURLE_OK;
      }








|







429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
      if(((expectsend - bytessent) < 2000) ||
         (conn->ntlm.state != NTLMSTATE_NONE) ||
         (conn->proxyntlm.state != NTLMSTATE_NONE)) {
        /* The NTLM-negotiation has started *OR* there is just a little (<2K)
           data left to send, keep on sending. */

        /* rewind data when completely done sending! */
        if(!conn->bits.authneg && (conn->writesockfd != CURL_SOCKET_BAD)) {
          conn->bits.rewindaftersend = TRUE;
          infof(data, "Rewind stream after send\n");
        }

        return CURLE_OK;
      }

1353
1354
1355
1356
1357
1358
1359







1360
1361
1362
1363
1364
1365
1366

  if(CONNECT_FIRSTSOCKET_PROXY_SSL())
    return CURLE_OK; /* wait for HTTPS proxy SSL initialization to complete */

  if(Curl_connect_ongoing(conn))
    /* nothing else to do except wait right now - we're not done here. */
    return CURLE_OK;








  if(conn->given->protocol & CURLPROTO_HTTPS) {
    /* perform SSL initialization */
    result = https_connecting(conn, done);
    if(result)
      return result;
  }







>
>
>
>
>
>
>







1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373

  if(CONNECT_FIRSTSOCKET_PROXY_SSL())
    return CURLE_OK; /* wait for HTTPS proxy SSL initialization to complete */

  if(Curl_connect_ongoing(conn))
    /* nothing else to do except wait right now - we're not done here. */
    return CURLE_OK;

  if(conn->data->set.haproxyprotocol) {
    /* add HAProxy PROXY protocol header */
    result = add_haproxy_protocol_header(conn);
    if(result)
      return result;
  }

  if(conn->given->protocol & CURLPROTO_HTTPS) {
    /* perform SSL initialization */
    result = https_connecting(conn, done);
    if(result)
      return result;
  }
1378
1379
1380
1381
1382
1383
1384









































1385
1386
1387
1388
1389
1390
1391
                           int numsocks)
{
  /* write mode */
  (void)numsocks; /* unused, we trust it to be at least 1 */
  socks[0] = conn->sock[FIRSTSOCKET];
  return GETSOCK_WRITESOCK(0);
}










































#ifdef USE_SSL
static CURLcode https_connecting(struct connectdata *conn, bool *done)
{
  CURLcode result;
  DEBUGASSERT((conn) && (conn->handler->flags & PROTOPT_SSL));








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
                           int numsocks)
{
  /* write mode */
  (void)numsocks; /* unused, we trust it to be at least 1 */
  socks[0] = conn->sock[FIRSTSOCKET];
  return GETSOCK_WRITESOCK(0);
}

static CURLcode add_haproxy_protocol_header(struct connectdata *conn)
{
  char proxy_header[128];
  Curl_send_buffer *req_buffer;
  CURLcode result;
  char tcp_version[5];

  /* Emit the correct prefix for IPv6 */
  if(conn->bits.ipv6) {
    strcpy(tcp_version, "TCP6");
  }
  else {
    strcpy(tcp_version, "TCP4");
  }

  snprintf(proxy_header,
           sizeof proxy_header,
           "PROXY %s %s %s %li %li\r\n",
           tcp_version,
           conn->data->info.conn_local_ip,
           conn->data->info.conn_primary_ip,
           conn->data->info.conn_local_port,
           conn->data->info.conn_primary_port);

  req_buffer = Curl_add_buffer_init();
  if(!req_buffer)
    return CURLE_OUT_OF_MEMORY;

  result = Curl_add_bufferf(req_buffer, proxy_header);
  if(result)
    return result;

  result = Curl_add_buffer_send(req_buffer,
                                conn,
                                &conn->data->info.request_size,
                                0,
                                FIRSTSOCKET);

  return result;
}

#ifdef USE_SSL
static CURLcode https_connecting(struct connectdata *conn, bool *done)
{
  CURLcode result;
  DEBUGASSERT((conn) && (conn->handler->flags & PROTOPT_SSL));

2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
      /* if(HTTPS on port 443) OR (HTTP on port 80) then don't include
         the port number in the host string */
      conn->allocptr.host = aprintf("Host: %s%s%s\r\n",
                                    conn->bits.ipv6_ip?"[":"",
                                    host,
                                    conn->bits.ipv6_ip?"]":"");
    else
      conn->allocptr.host = aprintf("Host: %s%s%s:%hu\r\n",
                                    conn->bits.ipv6_ip?"[":"",
                                    host,
                                    conn->bits.ipv6_ip?"]":"",
                                    conn->remote_port);

    if(!conn->allocptr.host)
      /* without Host: we can't make a nice request */







|







2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
      /* if(HTTPS on port 443) OR (HTTP on port 80) then don't include
         the port number in the host string */
      conn->allocptr.host = aprintf("Host: %s%s%s\r\n",
                                    conn->bits.ipv6_ip?"[":"",
                                    host,
                                    conn->bits.ipv6_ip?"]":"");
    else
      conn->allocptr.host = aprintf("Host: %s%s%s:%d\r\n",
                                    conn->bits.ipv6_ip?"[":"",
                                    host,
                                    conn->bits.ipv6_ip?"]":"",
                                    conn->remote_port);

    if(!conn->allocptr.host)
      /* without Host: we can't make a nice request */
2962
2963
2964
2965
2966
2967
2968


2969
2970
2971
2972
2973
2974
2975
CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
                                       struct connectdata *conn,
                                       ssize_t *nread,
                                       bool *stop_reading)
{
  CURLcode result;
  struct SingleRequest *k = &data->req;



  /* header line within buffer loop */
  do {
    size_t rest_length;
    size_t full_length;
    int writetype;








>
>







3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
                                       struct connectdata *conn,
                                       ssize_t *nread,
                                       bool *stop_reading)
{
  CURLcode result;
  struct SingleRequest *k = &data->req;
  ssize_t onread = *nread;
  char *ostr = k->str;

  /* header line within buffer loop */
  do {
    size_t rest_length;
    size_t full_length;
    int writetype;

3026
3027
3028
3029
3030
3031
3032
3033


3034
3035
3036
3037
3038
3039
3040
        k->header = FALSE;
        if(*nread)
          /* since there's more, this is a partial bad header */
          k->badheader = HEADER_PARTHEADER;
        else {
          /* this was all we read so it's all a bad header */
          k->badheader = HEADER_ALLBAD;
          *nread = (ssize_t)rest_length;


        }
        break;
      }
    }

    /* headers are in network encoding so
       use 0x0a and 0x0d instead of '\n' and '\r' */







|
>
>







3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
        k->header = FALSE;
        if(*nread)
          /* since there's more, this is a partial bad header */
          k->badheader = HEADER_PARTHEADER;
        else {
          /* this was all we read so it's all a bad header */
          k->badheader = HEADER_ALLBAD;
          *nread = onread;
          k->str = ostr;
          return CURLE_OK;
        }
        break;
      }
    }

    /* headers are in network encoding so
       use 0x0a and 0x0d instead of '\n' and '\r' */
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
    }
#if !defined(CURL_DISABLE_COOKIES)
    else if(data->cookies &&
            checkprefix("Set-Cookie:", k->p)) {
      Curl_share_lock(data, CURL_LOCK_DATA_COOKIE,
                      CURL_LOCK_ACCESS_SINGLE);
      Curl_cookie_add(data,
                      data->cookies, TRUE, k->p + 11,
                      /* If there is a custom-set Host: name, use it
                         here, or else use real peer host name. */
                      conn->allocptr.cookiehost?
                      conn->allocptr.cookiehost:conn->host.name,
                      data->state.path);
      Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
    }







|







3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
    }
#if !defined(CURL_DISABLE_COOKIES)
    else if(data->cookies &&
            checkprefix("Set-Cookie:", k->p)) {
      Curl_share_lock(data, CURL_LOCK_DATA_COOKIE,
                      CURL_LOCK_ACCESS_SINGLE);
      Curl_cookie_add(data,
                      data->cookies, TRUE, FALSE, k->p + 11,
                      /* If there is a custom-set Host: name, use it
                         here, or else use real peer host name. */
                      conn->allocptr.cookiehost?
                      conn->allocptr.cookiehost:conn->host.name,
                      data->state.path);
      Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
    }
Changes to jni/curl/lib/http.h.
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/* MAX_INITIAL_POST_SIZE indicates the number of bytes that will make the POST
   data get included in the initial data chunk sent to the server. If the
   data is larger than this, it will automatically get split up in multiple
   system calls.

   This value used to be fairly big (100K), but we must take into account that
   if the server rejects the POST due for authentication reasons, this data
   will always be uncondtionally sent and thus it may not be larger than can
   always be afforded to send twice.

   It must not be greater than 64K to work on VMS.
*/
#ifndef MAX_INITIAL_POST_SIZE
#define MAX_INITIAL_POST_SIZE (64*1024)
#endif







|







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/* MAX_INITIAL_POST_SIZE indicates the number of bytes that will make the POST
   data get included in the initial data chunk sent to the server. If the
   data is larger than this, it will automatically get split up in multiple
   system calls.

   This value used to be fairly big (100K), but we must take into account that
   if the server rejects the POST due for authentication reasons, this data
   will always be unconditionally sent and thus it may not be larger than can
   always be afforded to send twice.

   It must not be greater than 64K to work on VMS.
*/
#ifndef MAX_INITIAL_POST_SIZE
#define MAX_INITIAL_POST_SIZE (64*1024)
#endif
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

  char **push_headers;       /* allocated array */
  size_t push_headers_used;  /* number of entries filled in */
  size_t push_headers_alloc; /* number of entries allocated */
#endif
};

typedef int (*sending)(void); /* Curl_send */
typedef int (*recving)(void); /* Curl_recv */

#ifdef USE_NGHTTP2
/* h2 settings for this connection */
struct h2settings {
  uint32_t max_concurrent_streams;
  bool enable_push;
};
#endif


struct http_conn {
#ifdef USE_NGHTTP2
#define H2_BINSETTINGS_LEN 80
  nghttp2_session *h2;
  uint8_t binsettings[H2_BINSETTINGS_LEN];
  size_t  binlen; /* length of the binsettings data */
  sending send_underlying; /* underlying send Curl_send callback */
  recving recv_underlying; /* underlying recv Curl_recv callback */
  char *inbuf; /* buffer to receive data from underlying socket */
  size_t inbuflen; /* number of bytes filled in inbuf */
  size_t nread_inbuf; /* number of bytes read from in inbuf */
  /* We need separate buffer for transmission and reception because we
     may call nghttp2_session_send() after the
     nghttp2_session_mem_recv() but mem buffer is still not full. In
     this case, we wrongly sends the content of mem buffer if we share







<
<
<








<






|
|







182
183
184
185
186
187
188



189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

  char **push_headers;       /* allocated array */
  size_t push_headers_used;  /* number of entries filled in */
  size_t push_headers_alloc; /* number of entries allocated */
#endif
};




#ifdef USE_NGHTTP2
/* h2 settings for this connection */
struct h2settings {
  uint32_t max_concurrent_streams;
  bool enable_push;
};
#endif


struct http_conn {
#ifdef USE_NGHTTP2
#define H2_BINSETTINGS_LEN 80
  nghttp2_session *h2;
  uint8_t binsettings[H2_BINSETTINGS_LEN];
  size_t  binlen; /* length of the binsettings data */
  Curl_send *send_underlying; /* underlying send Curl_send callback */
  Curl_recv *recv_underlying; /* underlying recv Curl_recv callback */
  char *inbuf; /* buffer to receive data from underlying socket */
  size_t inbuflen; /* number of bytes filled in inbuf */
  size_t nread_inbuf; /* number of bytes read from in inbuf */
  /* We need separate buffer for transmission and reception because we
     may call nghttp2_session_send() after the
     nghttp2_session_mem_recv() but mem buffer is still not full. In
     this case, we wrongly sends the content of mem buffer if we share
Changes to jni/curl/lib/http2.c.
37
38
39
40
41
42
43

44
45
46
47
48
49
50
#include "strtoofft.h"
#include "strdup.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"


#define MIN(x,y) ((x)<(y)?(x):(y))

#if (NGHTTP2_VERSION_NUM < 0x010000)
#error too old nghttp2 version, upgrade!
#endif

#if (NGHTTP2_VERSION_NUM > 0x010800)







>







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "strtoofft.h"
#include "strdup.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"

#define H2_BUFSIZE 32768
#define MIN(x,y) ((x)<(y)?(x):(y))

#if (NGHTTP2_VERSION_NUM < 0x010000)
#error too old nghttp2 version, upgrade!
#endif

#if (NGHTTP2_VERSION_NUM > 0x010800)
67
68
69
70
71
72
73










74
75
76
77
78
79
80

#ifdef DEBUG_HTTP2
#define H2BUGF(x) x
#else
#define H2BUGF(x) do { } WHILE_FALSE
#endif











/*
 * Curl_http2_init_state() is called when the easy handle is created and
 * allows for HTTP/2 specific init of state.
 */
void Curl_http2_init_state(struct UrlState *state)
{
  state->stream_weight = NGHTTP2_DEFAULT_WEIGHT;







>
>
>
>
>
>
>
>
>
>







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

#ifdef DEBUG_HTTP2
#define H2BUGF(x) x
#else
#define H2BUGF(x) do { } WHILE_FALSE
#endif


static ssize_t http2_recv(struct connectdata *conn, int sockindex,
                          char *mem, size_t len, CURLcode *err);
static bool http2_connisdead(struct connectdata *conn);
static int h2_session_send(struct Curl_easy *data,
                           nghttp2_session *h2);
static int h2_process_pending_input(struct connectdata *conn,
                                    struct http_conn *httpc,
                                    CURLcode *err);

/*
 * Curl_http2_init_state() is called when the easy handle is created and
 * allows for HTTP/2 specific init of state.
 */
void Curl_http2_init_state(struct UrlState *state)
{
  state->stream_weight = NGHTTP2_DEFAULT_WEIGHT;
93
94
95
96
97
98
99

100
101
102
103
104
105
106
107
108
109
110


111
112
113
114
115
116
117
118
                                 curl_socket_t *sock, /* points to
                                                         numsocks
                                                         number of
                                                         sockets */
                                 int numsocks)
{
  const struct http_conn *c = &conn->proto.httpc;

  int bitmap = GETSOCK_BLANK;
  (void)numsocks;

  /* TODO We should check underlying socket state if it is SSL socket
     because of renegotiation. */
  sock[0] = conn->sock[FIRSTSOCKET];

  /* in a HTTP/2 connection we can basically always get a frame so we should
     always be ready for one */
  bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);



  if(nghttp2_session_want_write(c->h2))
    bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET);

  return bitmap;
}

static int http2_getsock(struct connectdata *conn,
                         curl_socket_t *sock, /* points to numsocks







>











>
>
|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
                                 curl_socket_t *sock, /* points to
                                                         numsocks
                                                         number of
                                                         sockets */
                                 int numsocks)
{
  const struct http_conn *c = &conn->proto.httpc;
  struct SingleRequest *k = &conn->data->req;
  int bitmap = GETSOCK_BLANK;
  (void)numsocks;

  /* TODO We should check underlying socket state if it is SSL socket
     because of renegotiation. */
  sock[0] = conn->sock[FIRSTSOCKET];

  /* in a HTTP/2 connection we can basically always get a frame so we should
     always be ready for one */
  bitmap |= GETSOCK_READSOCK(FIRSTSOCKET);

  /* we're still uploading or the HTTP/2 layer wants to send data */
  if(((k->keepon & (KEEP_SEND|KEEP_SEND_PAUSE)) == KEEP_SEND) ||
     nghttp2_session_want_write(c->h2))
    bitmap |= GETSOCK_WRITESOCK(FIRSTSOCKET);

  return bitmap;
}

static int http2_getsock(struct connectdata *conn,
                         curl_socket_t *sock, /* points to numsocks
147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171



172
173
174
175
176
177
178
179
180
181
182
183


















184



185
186
187
188


189
190
191
192
193
194
195
  (void)dead_connection;

  H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n"));

  nghttp2_session_del(c->h2);
  Curl_safefree(c->inbuf);
  http2_stream_free(conn->data->req.protop);


  H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n"));

  return CURLE_OK;
}

/*
 * The server may send us data at any point (e.g. PING frames). Therefore,
 * we cannot assume that an HTTP/2 socket is dead just because it is readable.
 *
 * Instead, if it is readable, run Curl_connalive() to peek at the socket
 * and distinguish between closed and data.
 */
static bool http2_connisdead(struct connectdata *check)
{
  int sval;
  bool ret_val = TRUE;




  sval = SOCKET_READABLE(check->sock[FIRSTSOCKET], 0);
  if(sval == 0) {
    /* timeout */
    ret_val = FALSE;
  }
  else if(sval & CURL_CSELECT_ERR) {
    /* socket is in an error state */
    ret_val = TRUE;
  }
  else if(sval & CURL_CSELECT_IN) {
    /* readable with no error. could still be closed */
    ret_val = !Curl_connalive(check);


















  }




  return ret_val;
}




static unsigned int http2_conncheck(struct connectdata *check,
                                    unsigned int checks_to_perform)
{
  unsigned int ret_val = CONNRESULT_NONE;

  if(checks_to_perform & CONNCHECK_ISDEAD) {







>













|


|

>
>
>
|


|



|



|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
|
<
|

>
>







161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

225
226
227
228
229
230
231
232
233
234
235
  (void)dead_connection;

  H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n"));

  nghttp2_session_del(c->h2);
  Curl_safefree(c->inbuf);
  http2_stream_free(conn->data->req.protop);
  conn->data->state.drain = 0;

  H2BUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n"));

  return CURLE_OK;
}

/*
 * The server may send us data at any point (e.g. PING frames). Therefore,
 * we cannot assume that an HTTP/2 socket is dead just because it is readable.
 *
 * Instead, if it is readable, run Curl_connalive() to peek at the socket
 * and distinguish between closed and data.
 */
static bool http2_connisdead(struct connectdata *conn)
{
  int sval;
  bool dead = TRUE;

  if(conn->bits.close)
    return TRUE;

  sval = SOCKET_READABLE(conn->sock[FIRSTSOCKET], 0);
  if(sval == 0) {
    /* timeout */
    dead = FALSE;
  }
  else if(sval & CURL_CSELECT_ERR) {
    /* socket is in an error state */
    dead = TRUE;
  }
  else if(sval & CURL_CSELECT_IN) {
    /* readable with no error. could still be closed */
    dead = !Curl_connalive(conn);
    if(!dead) {
      /* This happens before we've sent off a request and the connection is
         not in use by any other thransfer, there shouldn't be any data here,
         only "protocol frames" */
      CURLcode result;
      struct http_conn *httpc = &conn->proto.httpc;
      ssize_t nread = -1;
      if(httpc->recv_underlying)
        /* if called "too early", this pointer isn't setup yet! */
        nread = ((Curl_recv *)httpc->recv_underlying)(
          conn, FIRSTSOCKET, httpc->inbuf, H2_BUFSIZE, &result);
      if(nread != -1) {
        infof(conn->data,
              "%d bytes stray data read before trying h2 connection\n",
              (int)nread);
        httpc->nread_inbuf = 0;
        httpc->inbuflen = nread;
        (void)h2_process_pending_input(conn, httpc, &result);
      }
      else
        /* the read failed so let's say this is dead anyway */
        dead = TRUE;
    }

  }

  return dead;
}

static unsigned int http2_conncheck(struct connectdata *check,
                                    unsigned int checks_to_perform)
{
  unsigned int ret_val = CONNRESULT_NONE;

  if(checks_to_perform & CONNCHECK_ISDEAD) {
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
                         void *userp)
{
  struct connectdata *conn = (struct connectdata *)userp;
  struct http_conn *httpc = &conn->proto.httpc;
  struct Curl_easy *data_s = NULL;
  struct HTTP *stream = NULL;
  static int lastStream = -1;
  int rv;
  size_t left, ncopy;
  int32_t stream_id = frame->hd.stream_id;

  if(!stream_id) {
    /* stream ID zero is for connection-oriented stuff */
    if(frame->hd.type == NGHTTP2_SETTINGS) {







<







555
556
557
558
559
560
561

562
563
564
565
566
567
568
static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
                         void *userp)
{
  struct connectdata *conn = (struct connectdata *)userp;
  struct http_conn *httpc = &conn->proto.httpc;
  struct Curl_easy *data_s = NULL;
  struct HTTP *stream = NULL;

  int rv;
  size_t left, ncopy;
  int32_t stream_id = frame->hd.stream_id;

  if(!stream_id) {
    /* stream ID zero is for connection-oriented stuff */
    if(frame->hd.type == NGHTTP2_SETTINGS) {
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
              httpc->settings.max_concurrent_streams);
        Curl_multi_connchanged(conn->data->multi);
      }
    }
    return 0;
  }
  data_s = nghttp2_session_get_stream_user_data(session, stream_id);
  if(lastStream != stream_id) {
    lastStream = stream_id;
  }
  if(!data_s) {
    H2BUGF(infof(conn->data,
                 "No Curl_easy associated with stream: %x\n",
                 stream_id));
    return 0;
  }

  stream = data_s->req.protop;
  if(!stream) {
    H2BUGF(infof(conn->data, "No proto pointer for stream: %x\n",
                 stream_id));
    return NGHTTP2_ERR_CALLBACK_FAILURE;
  }

  H2BUGF(infof(data_s, "on_frame_recv() header %x stream %x\n",
               frame->hd.type, stream_id));








<
<
<









|







585
586
587
588
589
590
591



592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
              httpc->settings.max_concurrent_streams);
        Curl_multi_connchanged(conn->data->multi);
      }
    }
    return 0;
  }
  data_s = nghttp2_session_get_stream_user_data(session, stream_id);



  if(!data_s) {
    H2BUGF(infof(conn->data,
                 "No Curl_easy associated with stream: %x\n",
                 stream_id));
    return 0;
  }

  stream = data_s->req.protop;
  if(!stream) {
    H2BUGF(infof(data_s, "No proto pointer for stream: %x\n",
                 stream_id));
    return NGHTTP2_ERR_CALLBACK_FAILURE;
  }

  H2BUGF(infof(data_s, "on_frame_recv() header %x stream %x\n",
               frame->hd.type, stream_id));

586
587
588
589
590
591
592
593

594

595
596
597
598
599
600
601
    if(stream->bodystarted) {
      /* Only valid HEADERS after body started is trailer HEADERS.  We
         buffer them in on_header callback. */
      break;
    }

    /* nghttp2 guarantees that :status is received, and we store it to
       stream->status_code */

    DEBUGASSERT(stream->status_code != -1);


    /* Only final status code signals the end of header */
    if(stream->status_code / 100 != 1) {
      stream->bodystarted = TRUE;
      stream->status_code = -1;
    }








|
>
|
>







622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
    if(stream->bodystarted) {
      /* Only valid HEADERS after body started is trailer HEADERS.  We
         buffer them in on_header callback. */
      break;
    }

    /* nghttp2 guarantees that :status is received, and we store it to
       stream->status_code. Fuzzing has proven this can still be reached
       without status code having been set. */
    if(stream->status_code == -1)
      return NGHTTP2_ERR_CALLBACK_FAILURE;

    /* Only final status code signals the end of header */
    if(stream->status_code / 100 != 1) {
      stream->bodystarted = TRUE;
      stream->status_code = -1;
    }

634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
                                     NGHTTP2_CANCEL);
      if(nghttp2_is_fatal(rv)) {
        return rv;
      }
    }
    break;
  default:
    H2BUGF(infof(conn->data, "Got frame type %x for stream %u!\n",
                 frame->hd.type, stream_id));
    break;
  }
  return 0;
}

static int on_invalid_frame_recv(nghttp2_session *session,







|







672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
                                     NGHTTP2_CANCEL);
      if(nghttp2_is_fatal(rv)) {
        return rv;
      }
    }
    break;
  default:
    H2BUGF(infof(data_s, "Got frame type %x for stream %u!\n",
                 frame->hd.type, stream_id));
    break;
  }
  return 0;
}

static int on_invalid_frame_recv(nghttp2_session *session,
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
  }

  stream = data_s->req.protop;
  if(!stream || !stream->bodystarted) {
    return 0;
  }

  /* This is trailer HEADERS started.  Allocate buffer for them. */
  H2BUGF(infof(data_s, "trailer field started\n"));

  DEBUGASSERT(stream->trailer_recvbuf == NULL);

  stream->trailer_recvbuf = Curl_add_buffer_init();
  if(!stream->trailer_recvbuf) {
    return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
  }

  return 0;
}

/* Decode HTTP status code.  Returns -1 if no valid status code was
   decoded. */
static int decode_status_code(const uint8_t *value, size_t len)
{







<
<
<
|
<
|
|
|
|
|







871
872
873
874
875
876
877



878

879
880
881
882
883
884
885
886
887
888
889
890
  }

  stream = data_s->req.protop;
  if(!stream || !stream->bodystarted) {
    return 0;
  }




  if(!stream->trailer_recvbuf) {

    stream->trailer_recvbuf = Curl_add_buffer_init();
    if(!stream->trailer_recvbuf) {
      return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
    }
  }
  return 0;
}

/* Decode HTTP status code.  Returns -1 if no valid status code was
   decoded. */
static int decode_status_code(const uint8_t *value, size_t len)
{
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
  H2BUGF(infof(data_s, "data_source_read_callback: "
               "returns %zu bytes stream %u\n",
               nread, stream_id));

  return nread;
}

#define H2_BUFSIZE 32768

#ifdef NGHTTP2_HAS_ERROR_CALLBACK
static int error_callback(nghttp2_session *session,
                          const char *msg,
                          size_t len,
                          void *userp)
{
  struct connectdata *conn = (struct connectdata *)userp;







<
<







1069
1070
1071
1072
1073
1074
1075


1076
1077
1078
1079
1080
1081
1082
  H2BUGF(infof(data_s, "data_source_read_callback: "
               "returns %zu bytes stream %u\n",
               nread, stream_id));

  return nread;
}



#ifdef NGHTTP2_HAS_ERROR_CALLBACK
static int error_callback(nghttp2_session *session,
                          const char *msg,
                          size_t len,
                          void *userp)
{
  struct connectdata *conn = (struct connectdata *)userp;
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
void Curl_http2_done(struct connectdata *conn, bool premature)
{
  struct Curl_easy *data = conn->data;
  struct HTTP *http = data->req.protop;
  struct http_conn *httpc = &conn->proto.httpc;

  if(http->header_recvbuf) {
    H2BUGF(infof(data, "free header_recvbuf!!\n"));
    Curl_add_buffer_free(http->header_recvbuf);
    http->header_recvbuf = NULL; /* clear the pointer */
    Curl_add_buffer_free(http->trailer_recvbuf);
    http->trailer_recvbuf = NULL; /* clear the pointer */
    if(http->push_headers) {
      /* if they weren't used and then freed before */
      for(; http->push_headers_used > 0; --http->push_headers_used) {







<







1106
1107
1108
1109
1110
1111
1112

1113
1114
1115
1116
1117
1118
1119
void Curl_http2_done(struct connectdata *conn, bool premature)
{
  struct Curl_easy *data = conn->data;
  struct HTTP *http = data->req.protop;
  struct http_conn *httpc = &conn->proto.httpc;

  if(http->header_recvbuf) {

    Curl_add_buffer_free(http->header_recvbuf);
    http->header_recvbuf = NULL; /* clear the pointer */
    Curl_add_buffer_free(http->trailer_recvbuf);
    http->trailer_recvbuf = NULL; /* clear the pointer */
    if(http->push_headers) {
      /* if they weren't used and then freed before */
      for(; http->push_headers_used > 0; --http->push_headers_used) {
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
 */
static int should_close_session(struct http_conn *httpc)
{
  return httpc->drain_total == 0 && !nghttp2_session_want_read(httpc->h2) &&
    !nghttp2_session_want_write(httpc->h2);
}

static int h2_session_send(struct Curl_easy *data,
                           nghttp2_session *h2);

/*
 * h2_process_pending_input() processes pending input left in
 * httpc->inbuf.  Then, call h2_session_send() to send pending data.
 * This function returns 0 if it succeeds, or -1 and error code will
 * be assigned to *err.
 */
static int h2_process_pending_input(struct connectdata *conn,







<
<
<







1254
1255
1256
1257
1258
1259
1260



1261
1262
1263
1264
1265
1266
1267
 */
static int should_close_session(struct http_conn *httpc)
{
  return httpc->drain_total == 0 && !nghttp2_session_want_read(httpc->h2) &&
    !nghttp2_session_want_write(httpc->h2);
}




/*
 * h2_process_pending_input() processes pending input left in
 * httpc->inbuf.  Then, call h2_session_send() to send pending data.
 * This function returns 0 if it succeeds, or -1 and error code will
 * be assigned to *err.
 */
static int h2_process_pending_input(struct connectdata *conn,
1347
1348
1349
1350
1351
1352
1353








1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
    }
  }

  DEBUGASSERT(data->state.drain == 0);

  /* Reset to FALSE to prevent infinite loop in readwrite_data function. */
  stream->closed = FALSE;








  if(httpc->error_code != NGHTTP2_NO_ERROR) {
    failf(data, "HTTP/2 stream %u was not closed cleanly: %s (err %d)",
          stream->stream_id, Curl_http2_strerror(httpc->error_code),
          httpc->error_code);
    *err = CURLE_HTTP2_STREAM;
    return -1;
  }

  if(!stream->bodystarted) {
    failf(data, "HTTP/2 stream %u was closed cleanly, but before getting "
          " all response header fields, teated as error",
          stream->stream_id);
    *err = CURLE_HTTP2_STREAM;
    return -1;
  }

  if(stream->trailer_recvbuf && stream->trailer_recvbuf->buffer) {
    trailer_pos = stream->trailer_recvbuf->buffer;







>
>
>
>
>
>
>
>
|









|







1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
    }
  }

  DEBUGASSERT(data->state.drain == 0);

  /* Reset to FALSE to prevent infinite loop in readwrite_data function. */
  stream->closed = FALSE;
  if(httpc->error_code == NGHTTP2_REFUSED_STREAM) {
    H2BUGF(infof(data, "REFUSED_STREAM (%d), try again on a new connection!\n",
                 stream->stream_id));
    connclose(conn, "REFUSED_STREAM"); /* don't use this anymore */
    data->state.refused_stream = TRUE;
    *err = CURLE_RECV_ERROR; /* trigger Curl_retry_request() later */
    return -1;
  }
  else if(httpc->error_code != NGHTTP2_NO_ERROR) {
    failf(data, "HTTP/2 stream %u was not closed cleanly: %s (err %d)",
          stream->stream_id, Curl_http2_strerror(httpc->error_code),
          httpc->error_code);
    *err = CURLE_HTTP2_STREAM;
    return -1;
  }

  if(!stream->bodystarted) {
    failf(data, "HTTP/2 stream %u was closed cleanly, but before getting "
          " all response header fields, treated as error",
          stream->stream_id);
    *err = CURLE_HTTP2_STREAM;
    return -1;
  }

  if(stream->trailer_recvbuf && stream->trailer_recvbuf->buffer) {
    trailer_pos = stream->trailer_recvbuf->buffer;
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
          return http2_handle_stream_close(conn, data, stream, err);

        *err = result;
        return -1;
      }

      if(nread == 0) {
        failf(data, "Unexpected EOF");
        *err = CURLE_RECV_ERROR;
        return -1;
      }

      H2BUGF(infof(data, "nread=%zd\n", nread));

      httpc->inbuflen = nread;
      inbuf = httpc->inbuf;
    }







|
|
|







1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
          return http2_handle_stream_close(conn, data, stream, err);

        *err = result;
        return -1;
      }

      if(nread == 0) {
        H2BUGF(infof(data, "end of stream\n"));
        *err = CURLE_OK;
        return 0;
      }

      H2BUGF(infof(data, "nread=%zd\n", nread));

      httpc->inbuflen = nread;
      inbuf = httpc->inbuf;
    }
1823
1824
1825
1826
1827
1828
1829
1830


1831

1832
1833
1834
1835
1836
1837
1838
  nheader += 1;
  nva = malloc(sizeof(nghttp2_nv) * nheader);
  if(nva == NULL) {
    *err = CURLE_OUT_OF_MEMORY;
    return -1;
  }

  /* Extract :method, :path from request line */


  line_end = strstr(hdbuf, "\r\n");


  /* Method does not contain spaces */
  end = memchr(hdbuf, ' ', line_end - hdbuf);
  if(!end || end == hdbuf)
    goto fail;
  nva[0].name = (unsigned char *)":method";
  nva[0].namelen = strlen((char *)nva[0].name);







|
>
>
|
>







1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
  nheader += 1;
  nva = malloc(sizeof(nghttp2_nv) * nheader);
  if(nva == NULL) {
    *err = CURLE_OUT_OF_MEMORY;
    return -1;
  }

  /* Extract :method, :path from request line
     We do line endings with CRLF so checking for CR is enough */
  line_end = memchr(hdbuf, '\r', len);
  if(!line_end)
    goto fail;

  /* Method does not contain spaces */
  end = memchr(hdbuf, ' ', line_end - hdbuf);
  if(!end || end == hdbuf)
    goto fail;
  nva[0].name = (unsigned char *)":method";
  nva[0].namelen = strlen((char *)nva[0].name);
1882
1883
1884
1885
1886
1887
1888


1889
1890
1891
1892
1893
1894
1895
1896
1897
  authority_idx = 0;
  i = 3;
  while(i < nheader) {
    size_t hlen;

    hdbuf = line_end + 2;



    line_end = strstr(hdbuf, "\r\n");
    if(line_end == hdbuf)
      goto fail;

    /* header continuation lines are not supported */
    if(*hdbuf == ' ' || *hdbuf == '\t')
      goto fail;

    for(end = hdbuf; end < line_end && *end != ':'; ++end)







>
>
|
|







1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
  authority_idx = 0;
  i = 3;
  while(i < nheader) {
    size_t hlen;

    hdbuf = line_end + 2;

    /* check for next CR, but only within the piece of data left in the given
       buffer */
    line_end = memchr(hdbuf, '\r', len - (hdbuf - (char *)mem));
    if(!line_end || (line_end == hdbuf))
      goto fail;

    /* header continuation lines are not supported */
    if(*hdbuf == ' ' || *hdbuf == '\t')
      goto fail;

    for(end = hdbuf; end < line_end && *end != ':'; ++end)
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
  struct Curl_easy *data = conn->data;
  struct HTTP *stream = conn->data->req.protop;

  result = Curl_http2_setup(conn);
  if(result)
    return result;

  httpc->recv_underlying = (recving)conn->recv[FIRSTSOCKET];
  httpc->send_underlying = (sending)conn->send[FIRSTSOCKET];
  conn->recv[FIRSTSOCKET] = http2_recv;
  conn->send[FIRSTSOCKET] = http2_send;

  if(conn->data->req.upgr101 == UPGR101_RECEIVED) {
    /* stream 1 is opened implicitly on upgrade */
    stream->stream_id = 1;
    /* queue SETTINGS frame (again) */







|
|







2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
  struct Curl_easy *data = conn->data;
  struct HTTP *stream = conn->data->req.protop;

  result = Curl_http2_setup(conn);
  if(result)
    return result;

  httpc->recv_underlying = conn->recv[FIRSTSOCKET];
  httpc->send_underlying = conn->send[FIRSTSOCKET];
  conn->recv[FIRSTSOCKET] = http2_recv;
  conn->send[FIRSTSOCKET] = http2_send;

  if(conn->data->req.upgr101 == UPGR101_RECEIVED) {
    /* stream 1 is opened implicitly on upgrade */
    stream->stream_id = 1;
    /* queue SETTINGS frame (again) */
Changes to jni/curl/lib/http_chunks.c.
69
70
71
72
73
74
75













76
77
78
79
80
81
82
       trailer        = *(entity-header CRLF)

   The chunk-size field is a string of hex digits indicating the size of
   the chunk. The chunked encoding is ended by any chunk whose size is
   zero, followed by the trailer, which is terminated by an empty line.

 */














void Curl_httpchunk_init(struct connectdata *conn)
{
  struct Curl_chunker *chunk = &conn->chunk;
  chunk->hexindex = 0;      /* start at 0 */
  chunk->dataleft = 0;      /* no data left yet! */
  chunk->state = CHUNK_HEX; /* we get hex first! */







>
>
>
>
>
>
>
>
>
>
>
>
>







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
       trailer        = *(entity-header CRLF)

   The chunk-size field is a string of hex digits indicating the size of
   the chunk. The chunked encoding is ended by any chunk whose size is
   zero, followed by the trailer, which is terminated by an empty line.

 */

#ifdef CURL_DOES_CONVERSIONS
/* Check for an ASCII hex digit.
   We avoid the use of ISXDIGIT to accommodate non-ASCII hosts. */
static bool Curl_isxdigit_ascii(char digit)
{
  return (digit >= 0x30 && digit <= 0x39) /* 0-9 */
        || (digit >= 0x41 && digit <= 0x46) /* A-F */
        || (digit >= 0x61 && digit <= 0x66); /* a-f */
}
#else
#define Curl_isxdigit_ascii(x) Curl_isxdigit(x)
#endif

void Curl_httpchunk_init(struct connectdata *conn)
{
  struct Curl_chunker *chunk = &conn->chunk;
  chunk->hexindex = 0;      /* start at 0 */
  chunk->dataleft = 0;      /* no data left yet! */
  chunk->state = CHUNK_HEX; /* we get hex first! */
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
    if(result)
      return CHUNKE_WRITE_ERROR;
  }

  while(length) {
    switch(ch->state) {
    case CHUNK_HEX:
      if(Curl_isxdigit(*datap)) {
        if(ch->hexindex < MAXNUM_SIZE) {
          ch->hexbuffer[ch->hexindex] = *datap;
          datap++;
          length--;
          ch->hexindex++;
        }
        else {







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
    if(result)
      return CHUNKE_WRITE_ERROR;
  }

  while(length) {
    switch(ch->state) {
    case CHUNK_HEX:
      if(Curl_isxdigit_ascii(*datap)) {
        if(ch->hexindex < MAXNUM_SIZE) {
          ch->hexbuffer[ch->hexindex] = *datap;
          datap++;
          length--;
          ch->hexindex++;
        }
        else {
Changes to jni/curl/lib/http_negotiate.c.
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
    if(neg_ctx->context) {
      /* The server rejected our authentication and hasn't suppled any more
      negotiation mechanisms */
      return CURLE_LOGIN_DENIED;
    }
  }

  /* Initilise the security context and decode our challenge */
  result = Curl_auth_decode_spnego_message(data, userp, passwdp, service,
                                           host, header, neg_ctx);

  if(result)
    Curl_auth_spnego_cleanup(neg_ctx);

  return result;







|







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
    if(neg_ctx->context) {
      /* The server rejected our authentication and hasn't suppled any more
      negotiation mechanisms */
      return CURLE_LOGIN_DENIED;
    }
  }

  /* Initialize the security context and decode our challenge */
  result = Curl_auth_decode_spnego_message(data, userp, passwdp, service,
                                           host, header, neg_ctx);

  if(result)
    Curl_auth_spnego_cleanup(neg_ctx);

  return result;
Changes to jni/curl/lib/http_ntlm.c.
117
118
119
120
121
122
123
124
125
126


127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143



144
145
146
147
148
149
150



151
152
153
154
155
156
157
  size_t len = 0;
  CURLcode result;

  /* point to the address of the pointer that holds the string to send to the
     server, which is for a plain host or for a HTTP proxy */
  char **allocuserpwd;

  /* point to the name and password for this */
  const char *userp;
  const char *passwdp;



  /* point to the correct struct with this */
  struct ntlmdata *ntlm;
  struct auth *authp;

  DEBUGASSERT(conn);
  DEBUGASSERT(conn->data);

#if defined(NTLM_NEEDS_NSS_INIT)
  if(CURLE_OK != Curl_nss_force_init(conn->data))
    return CURLE_OUT_OF_MEMORY;
#endif

  if(proxy) {
    allocuserpwd = &conn->allocptr.proxyuserpwd;
    userp = conn->http_proxy.user;
    passwdp = conn->http_proxy.passwd;



    ntlm = &conn->proxyntlm;
    authp = &conn->data->state.authproxy;
  }
  else {
    allocuserpwd = &conn->allocptr.userpwd;
    userp = conn->user;
    passwdp = conn->passwd;



    ntlm = &conn->ntlm;
    authp = &conn->data->state.authhost;
  }
  authp->done = FALSE;

  /* not set means empty */
  if(!userp)







|


>
>

















>
>
>







>
>
>







117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
  size_t len = 0;
  CURLcode result;

  /* point to the address of the pointer that holds the string to send to the
     server, which is for a plain host or for a HTTP proxy */
  char **allocuserpwd;

  /* point to the username, password, service and host */
  const char *userp;
  const char *passwdp;
  const char *service = NULL;
  const char *hostname = NULL;

  /* point to the correct struct with this */
  struct ntlmdata *ntlm;
  struct auth *authp;

  DEBUGASSERT(conn);
  DEBUGASSERT(conn->data);

#if defined(NTLM_NEEDS_NSS_INIT)
  if(CURLE_OK != Curl_nss_force_init(conn->data))
    return CURLE_OUT_OF_MEMORY;
#endif

  if(proxy) {
    allocuserpwd = &conn->allocptr.proxyuserpwd;
    userp = conn->http_proxy.user;
    passwdp = conn->http_proxy.passwd;
    service = conn->data->set.str[STRING_PROXY_SERVICE_NAME] ?
              conn->data->set.str[STRING_PROXY_SERVICE_NAME] : "HTTP";
    hostname = conn->http_proxy.host.name;
    ntlm = &conn->proxyntlm;
    authp = &conn->data->state.authproxy;
  }
  else {
    allocuserpwd = &conn->allocptr.userpwd;
    userp = conn->user;
    passwdp = conn->passwd;
    service = conn->data->set.str[STRING_SERVICE_NAME] ?
              conn->data->set.str[STRING_SERVICE_NAME] : "HTTP";
    hostname = conn->host.name;
    ntlm = &conn->ntlm;
    authp = &conn->data->state.authhost;
  }
  authp->done = FALSE;

  /* not set means empty */
  if(!userp)
170
171
172
173
174
175
176

177

178
179
180
181
182
183
184
#endif

  switch(ntlm->state) {
  case NTLMSTATE_TYPE1:
  default: /* for the weird cases we (re)start here */
    /* Create a type-1 message */
    result = Curl_auth_create_ntlm_type1_message(conn->data, userp, passwdp,

                                                 ntlm, &base64, &len);

    if(result)
      return result;

    if(base64) {
      free(*allocuserpwd);
      *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
                              proxy ? "Proxy-" : "",







>
|
>







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#endif

  switch(ntlm->state) {
  case NTLMSTATE_TYPE1:
  default: /* for the weird cases we (re)start here */
    /* Create a type-1 message */
    result = Curl_auth_create_ntlm_type1_message(conn->data, userp, passwdp,
                                                 service, hostname,
                                                 ntlm, &base64,
                                                 &len);
    if(result)
      return result;

    if(base64) {
      free(*allocuserpwd);
      *allocuserpwd = aprintf("%sAuthorization: NTLM %s\r\n",
                              proxy ? "Proxy-" : "",
Changes to jni/curl/lib/http_proxy.c.
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231

      /* initialize a dynamic send-buffer */
      req_buffer = Curl_add_buffer_init();

      if(!req_buffer)
        return CURLE_OUT_OF_MEMORY;

      host_port = aprintf("%s:%hu", hostname, remote_port);
      if(!host_port) {
        Curl_add_buffer_free(req_buffer);
        return CURLE_OUT_OF_MEMORY;
      }

      /* Setup the proxy-authorization header, if any */
      result = Curl_http_output_auth(conn, "CONNECT", host_port, TRUE);







|







217
218
219
220
221
222
223
224
225
226
227
228
229
230
231

      /* initialize a dynamic send-buffer */
      req_buffer = Curl_add_buffer_init();

      if(!req_buffer)
        return CURLE_OUT_OF_MEMORY;

      host_port = aprintf("%s:%d", hostname, remote_port);
      if(!host_port) {
        Curl_add_buffer_free(req_buffer);
        return CURLE_OUT_OF_MEMORY;
      }

      /* Setup the proxy-authorization header, if any */
      result = Curl_http_output_auth(conn, "CONNECT", host_port, TRUE);
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
        bool ipv6_ip = conn->bits.ipv6_ip;
        char *hostheader;

        /* the hostname may be different */
        if(hostname != conn->host.name)
          ipv6_ip = (strchr(hostname, ':') != NULL);
        hostheader = /* host:port with IPv6 support */
          aprintf("%s%s%s:%hu", ipv6_ip?"[":"", hostname, ipv6_ip?"]":"",
                  remote_port);
        if(!hostheader) {
          Curl_add_buffer_free(req_buffer);
          return CURLE_OUT_OF_MEMORY;
        }

        if(!Curl_checkProxyheaders(conn, "Host")) {







|







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
        bool ipv6_ip = conn->bits.ipv6_ip;
        char *hostheader;

        /* the hostname may be different */
        if(hostname != conn->host.name)
          ipv6_ip = (strchr(hostname, ':') != NULL);
        hostheader = /* host:port with IPv6 support */
          aprintf("%s%s%s:%d", ipv6_ip?"[":"", hostname, ipv6_ip?"]":"",
                  remote_port);
        if(!hostheader) {
          Curl_add_buffer_free(req_buffer);
          return CURLE_OUT_OF_MEMORY;
        }

        if(!Curl_checkProxyheaders(conn, "Host")) {
Changes to jni/curl/lib/libcurl.plist.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
	<key>CFBundleExecutable</key>
	<string>curl</string>

	<key>CFBundleIdentifier</key>
	<string>se.haxx.curl.libcurl</string>

	<key>CFBundleVersion</key>
	<string>7.59.0</string>

	<key>CFBundleName</key>
	<string>libcurl</string>

	<key>CFBundlePackageType</key>
	<string>FMWK</string>

	<key>CFBundleSignature</key>
	<string>????</string>

	<key>CFBundleShortVersionString</key>
	<string>libcurl 7.59.0</string>

	<key>CFBundleGetInfoString</key>
	<string>libcurl.plist 7.59.0</string>
</dict>
</plist>







|











|


|


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
	<key>CFBundleExecutable</key>
	<string>curl</string>

	<key>CFBundleIdentifier</key>
	<string>se.haxx.curl.libcurl</string>

	<key>CFBundleVersion</key>
	<string>7.60.0</string>

	<key>CFBundleName</key>
	<string>libcurl</string>

	<key>CFBundlePackageType</key>
	<string>FMWK</string>

	<key>CFBundleSignature</key>
	<string>????</string>

	<key>CFBundleShortVersionString</key>
	<string>libcurl 7.60.0</string>

	<key>CFBundleGetInfoString</key>
	<string>libcurl.plist 7.60.0</string>
</dict>
</plist>
Changes to jni/curl/lib/md5.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
479
480
481
482
483
484
485





486
487
488
489
490
491
492
  result[14] = curlx_ultouc((ctx->d >> 16)&0xff);
  result[15] = curlx_ultouc(ctx->d >> 24);

  memset(ctx, 0, sizeof(*ctx));
}

#endif /* CRYPTO LIBS */






const HMAC_params Curl_HMAC_MD5[] = {
  {
    (HMAC_hinit_func) MD5_Init,           /* Hash initialization function. */
    (HMAC_hupdate_func) MD5_Update,       /* Hash update function. */
    (HMAC_hfinal_func) MD5_Final,         /* Hash computation end function. */
    sizeof(MD5_CTX),                      /* Size of hash context structure. */







>
>
>
>
>







479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
  result[14] = curlx_ultouc((ctx->d >> 16)&0xff);
  result[15] = curlx_ultouc(ctx->d >> 24);

  memset(ctx, 0, sizeof(*ctx));
}

#endif /* CRYPTO LIBS */

/* Disable this picky gcc-8 compiler warning */
#if defined(__GNUC__) && (__GNUC__ >= 8)
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif

const HMAC_params Curl_HMAC_MD5[] = {
  {
    (HMAC_hinit_func) MD5_Init,           /* Hash initialization function. */
    (HMAC_hupdate_func) MD5_Update,       /* Hash update function. */
    (HMAC_hfinal_func) MD5_Final,         /* Hash computation end function. */
    sizeof(MD5_CTX),                      /* Size of hash context structure. */
Changes to jni/curl/lib/mime.c.
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
  The basename() function need not be reentrant. A function that is not
  required to be reentrant is not required to be thread-safe.

*/
static char *Curl_basename(char *path)
{
  /* Ignore all the details above for now and make a quick and simple
     implementaion here */
  char *s1;
  char *s2;

  s1 = strrchr(path, '/');
  s2 = strrchr(path, '\\');

  if(s1 && s2) {







|







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
  The basename() function need not be reentrant. A function that is not
  required to be reentrant is not required to be thread-safe.

*/
static char *Curl_basename(char *path)
{
  /* Ignore all the details above for now and make a quick and simple
     implementation here */
  char *s1;
  char *s2;

  s1 = strrchr(path, '/');
  s2 = strrchr(path, '\\');

  if(s1 && s2) {
1189
1190
1191
1192
1193
1194
1195

1196


1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
      res = curl_mime_headers(dst, hdrs, TRUE);
      if(res)
        curl_slist_free_all(hdrs);
    }
  }

  /* Duplicate other fields. */

  dst->encoder = src->encoder;


  if(!res)
    res = curl_mime_type(dst, src->mimetype);
  if(!res)
    res = curl_mime_name(dst, src->name);
  if(!res)
    res = curl_mime_filename(dst, src->filename);

  /* If an error occurred, rollback. */
  if(res)
    Curl_mime_cleanpart(dst);

  return res;
}

/*
 * Mime build functions.







>
|
>
>








|







1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
      res = curl_mime_headers(dst, hdrs, TRUE);
      if(res)
        curl_slist_free_all(hdrs);
    }
  }

  /* Duplicate other fields. */
  if(dst != NULL)
    dst->encoder = src->encoder;
  else
    res = CURLE_WRITE_ERROR;
  if(!res)
    res = curl_mime_type(dst, src->mimetype);
  if(!res)
    res = curl_mime_name(dst, src->name);
  if(!res)
    res = curl_mime_filename(dst, src->filename);

  /* If an error occurred, rollback. */
  if(res && dst)
    Curl_mime_cleanpart(dst);

  return res;
}

/*
 * Mime build functions.
Changes to jni/curl/lib/multi.c.
73
74
75
76
77
78
79

80
81
82
83
84
85
86
static int update_timer(struct Curl_multi *multi);

static CURLMcode add_next_timeout(struct curltime now,
                                  struct Curl_multi *multi,
                                  struct Curl_easy *d);
static CURLMcode multi_timeout(struct Curl_multi *multi,
                               long *timeout_ms);


#ifdef DEBUGBUILD
static const char * const statename[]={
  "INIT",
  "CONNECT_PEND",
  "CONNECT",
  "WAITRESOLVE",







>







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
static int update_timer(struct Curl_multi *multi);

static CURLMcode add_next_timeout(struct curltime now,
                                  struct Curl_multi *multi,
                                  struct Curl_easy *d);
static CURLMcode multi_timeout(struct Curl_multi *multi,
                               long *timeout_ms);
static void process_pending_handles(struct Curl_multi *multi);

#ifdef DEBUGBUILD
static const char * const statename[]={
  "INIT",
  "CONNECT_PEND",
  "CONNECT",
  "WAITRESOLVE",
374
375
376
377
378
379
380


381
382
383
384
385
386
387

  /*
   * No failure allowed in this function beyond this point. And no
   * modification of easy nor multi handle allowed before this except for
   * potential multi's connection cache growing which won't be undone in this
   * function no matter what.
   */



  /* set the easy handle */
  multistate(data, CURLM_STATE_INIT);

  if((data->set.global_dns_cache) &&
     (data->dns.hostcachetype != HCACHE_GLOBAL)) {
    /* global dns cache was requested but still isn't */







>
>







375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390

  /*
   * No failure allowed in this function beyond this point. And no
   * modification of easy nor multi handle allowed before this except for
   * potential multi's connection cache growing which won't be undone in this
   * function no matter what.
   */
  if(data->set.errorbuffer)
    data->set.errorbuffer[0] = 0;

  /* set the easy handle */
  multistate(data, CURLM_STATE_INIT);

  if((data->set.global_dns_cache) &&
     (data->dns.hostcachetype != HCACHE_GLOBAL)) {
    /* global dns cache was requested but still isn't */
534
535
536
537
538
539
540


541
542
543
544


545
546
547
548
549
550
551
    /* avoid this if we already aborted by callback to avoid this calling
       another callback */
    CURLcode rc = Curl_pgrsDone(conn);
    if(!result && rc)
      result = CURLE_ABORTED_BY_CALLBACK;
  }



  if(conn->send_pipe.size || conn->recv_pipe.size) {
    /* Stop if pipeline is not empty . */
    data->easy_conn = NULL;
    DEBUGF(infof(data, "Connection still in use, no more multi_done now!\n"));


    return CURLE_OK;
  }

  data->state.done = TRUE; /* called just now! */
  Curl_resolver_cancel(conn);

  if(conn->dns_entry) {







>
>



|
>
>







537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
    /* avoid this if we already aborted by callback to avoid this calling
       another callback */
    CURLcode rc = Curl_pgrsDone(conn);
    if(!result && rc)
      result = CURLE_ABORTED_BY_CALLBACK;
  }

  process_pending_handles(data->multi); /* connection / multiplex */

  if(conn->send_pipe.size || conn->recv_pipe.size) {
    /* Stop if pipeline is not empty . */
    data->easy_conn = NULL;
    DEBUGF(infof(data, "Connection still in use %d/%d, "
                 "no more multi_done now!\n",
                 conn->send_pipe.size, conn->recv_pipe.size));
    return CURLE_OK;
  }

  data->state.done = TRUE; /* called just now! */
  Curl_resolver_cancel(conn);

  if(conn->dns_entry) {
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666

  /* If the 'state' is not INIT or COMPLETED, we might need to do something
     nice to put the easy_handle in a good known state when this returns. */
  if(premature) {
    /* this handle is "alive" so we need to count down the total number of
       alive connections when this is removed */
    multi->num_alive--;

    /* When this handle gets removed, other handles may be able to get the
       connection */
    Curl_multi_process_pending_handles(multi);
  }

  if(data->easy_conn &&
     data->mstate > CURLM_STATE_DO &&
     data->mstate < CURLM_STATE_COMPLETED) {
    /* Set connection owner so that the DONE function closes it.  We can
       safely do this here since connection is killed. */







<
<
<
<







656
657
658
659
660
661
662




663
664
665
666
667
668
669

  /* If the 'state' is not INIT or COMPLETED, we might need to do something
     nice to put the easy_handle in a good known state when this returns. */
  if(premature) {
    /* this handle is "alive" so we need to count down the total number of
       alive connections when this is removed */
    multi->num_alive--;




  }

  if(data->easy_conn &&
     data->mstate > CURLM_STATE_DO &&
     data->mstate < CURLM_STATE_COMPLETED) {
    /* Set connection owner so that the DONE function closes it.  We can
       safely do this here since connection is killed. */
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
         analyzers. */
      failf(data, "In state %d with no easy_conn, bail out!\n", data->mstate);
      return CURLM_INTERNAL_ERROR;
    }

    if(multi_ischanged(multi, TRUE)) {
      DEBUGF(infof(data, "multi changed, check CONNECT_PEND queue!\n"));
      Curl_multi_process_pending_handles(multi);
    }

    if(data->easy_conn && data->mstate > CURLM_STATE_CONNECT &&
       data->mstate < CURLM_STATE_COMPLETED) {
      /* Make sure we set the connection's current owner */
      data->easy_conn->data = data;
    }







|







1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
         analyzers. */
      failf(data, "In state %d with no easy_conn, bail out!\n", data->mstate);
      return CURLM_INTERNAL_ERROR;
    }

    if(multi_ischanged(multi, TRUE)) {
      DEBUGF(infof(data, "multi changed, check CONNECT_PEND queue!\n"));
      process_pending_handles(multi); /* pipelined/multiplexed */
    }

    if(data->easy_conn && data->mstate > CURLM_STATE_CONNECT &&
       data->mstate < CURLM_STATE_COMPLETED) {
      /* Make sure we set the connection's current owner */
      data->easy_conn->data = data;
    }
1781
1782
1783
1784
1785
1786
1787


1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
        stream_error = TRUE;
      }
      break;

    case CURLM_STATE_DO_DONE:
      /* Move ourselves from the send to recv pipeline */
      Curl_move_handle_from_send_to_recv_pipe(data, data->easy_conn);


      /* Check if we can move pending requests to send pipe */
      Curl_multi_process_pending_handles(multi);

      /* Only perform the transfer if there's a good socket to work with.
         Having both BAD is a signal to skip immediately to DONE */
      if((data->easy_conn->sockfd != CURL_SOCKET_BAD) ||
         (data->easy_conn->writesockfd != CURL_SOCKET_BAD))
        multistate(data, CURLM_STATE_WAITPERFORM);
      else
      {
        if(data->state.wildcardmatch &&
           ((data->easy_conn->handler->flags & PROTOPT_WILDCARD) == 0)) {
           data->wildcard.state = CURLWC_DONE;
        }
        multistate(data, CURLM_STATE_DONE);
      }
      rc = CURLM_CALL_MULTI_PERFORM;







>
>
|
|






|
<







1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801

1802
1803
1804
1805
1806
1807
1808
        stream_error = TRUE;
      }
      break;

    case CURLM_STATE_DO_DONE:
      /* Move ourselves from the send to recv pipeline */
      Curl_move_handle_from_send_to_recv_pipe(data, data->easy_conn);

      if(data->easy_conn->bits.multiplex || data->easy_conn->send_pipe.size)
        /* Check if we can move pending requests to send pipe */
        process_pending_handles(multi); /*  pipelined/multiplexed */

      /* Only perform the transfer if there's a good socket to work with.
         Having both BAD is a signal to skip immediately to DONE */
      if((data->easy_conn->sockfd != CURL_SOCKET_BAD) ||
         (data->easy_conn->writesockfd != CURL_SOCKET_BAD))
        multistate(data, CURLM_STATE_WAITPERFORM);
      else {

        if(data->state.wildcardmatch &&
           ((data->easy_conn->handler->flags & PROTOPT_WILDCARD) == 0)) {
           data->wildcard.state = CURLWC_DONE;
        }
        multistate(data, CURLM_STATE_DONE);
      }
      rc = CURLM_CALL_MULTI_PERFORM;
1819
1820
1821
1822
1823
1824
1825

1826
1827
1828
1829
1830
1831
1832
1833

1834
1835
1836
1837
1838
1839
1840
1841


1842
1843
1844
1845
1846
1847
1848
        result = CURLE_ABORTED_BY_CALLBACK;
      else
        result = Curl_speedcheck(data, now);

      if(!result) {
        send_timeout_ms = 0;
        if(data->set.max_send_speed > 0)

          send_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.uploaded,
                                data->progress.ul_limit_size,
                                data->set.max_send_speed,
                                data->progress.ul_limit_start,
                                now);

        recv_timeout_ms = 0;
        if(data->set.max_recv_speed > 0)

          recv_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.downloaded,
                                data->progress.dl_limit_size,
                                data->set.max_recv_speed,
                                data->progress.dl_limit_start,
                                now);

        if(send_timeout_ms <= 0 && recv_timeout_ms <= 0)
          multistate(data, CURLM_STATE_PERFORM);


        else if(send_timeout_ms >= recv_timeout_ms)
          Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST);
        else
          Curl_expire(data, recv_timeout_ms, EXPIRE_TOOFAST);
      }
      break;








>
|
|
|
|
|



>
|
|
|
|
|

|

>
>







1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
        result = CURLE_ABORTED_BY_CALLBACK;
      else
        result = Curl_speedcheck(data, now);

      if(!result) {
        send_timeout_ms = 0;
        if(data->set.max_send_speed > 0)
          send_timeout_ms =
            Curl_pgrsLimitWaitTime(data->progress.uploaded,
                                   data->progress.ul_limit_size,
                                   data->set.max_send_speed,
                                   data->progress.ul_limit_start,
                                   now);

        recv_timeout_ms = 0;
        if(data->set.max_recv_speed > 0)
          recv_timeout_ms =
            Curl_pgrsLimitWaitTime(data->progress.downloaded,
                                   data->progress.dl_limit_size,
                                   data->set.max_recv_speed,
                                   data->progress.dl_limit_start,
                                   now);

        if(!send_timeout_ms && !recv_timeout_ms) {
          multistate(data, CURLM_STATE_PERFORM);
          Curl_ratelimit(data, now);
        }
        else if(send_timeout_ms >= recv_timeout_ms)
          Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST);
        else
          Curl_expire(data, recv_timeout_ms, EXPIRE_TOOFAST);
      }
      break;

1866
1867
1868
1869
1870
1871
1872
1873

1874
1875
1876
1877
1878
1879
1880
      if(data->set.max_recv_speed > 0)
        recv_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.downloaded,
                                                 data->progress.dl_limit_size,
                                                 data->set.max_recv_speed,
                                                 data->progress.dl_limit_start,
                                                 now);

      if(send_timeout_ms > 0 || recv_timeout_ms > 0) {

        multistate(data, CURLM_STATE_TOOFAST);
        if(send_timeout_ms >= recv_timeout_ms)
          Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST);
        else
          Curl_expire(data, recv_timeout_ms, EXPIRE_TOOFAST);
        break;
      }







|
>







1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
      if(data->set.max_recv_speed > 0)
        recv_timeout_ms = Curl_pgrsLimitWaitTime(data->progress.downloaded,
                                                 data->progress.dl_limit_size,
                                                 data->set.max_recv_speed,
                                                 data->progress.dl_limit_start,
                                                 now);

      if(send_timeout_ms || recv_timeout_ms) {
        Curl_ratelimit(data, now);
        multistate(data, CURLM_STATE_TOOFAST);
        if(send_timeout_ms >= recv_timeout_ms)
          Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST);
        else
          Curl_expire(data, recv_timeout_ms, EXPIRE_TOOFAST);
        break;
      }
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
        /* we're no longer receiving */
        Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe);

        /* expire the new receiving pipeline head */
        if(data->easy_conn->recv_pipe.head)
          Curl_expire(data->easy_conn->recv_pipe.head->ptr, 0, EXPIRE_RUN_NOW);

        /* Check if we can move pending requests to send pipe */
        Curl_multi_process_pending_handles(multi);

        /* When we follow redirects or is set to retry the connection, we must
           to go back to the CONNECT state */
        if(data->req.newurl || retry) {
          if(!retry) {
            /* if the URL is a follow-location and not just a retried request
               then figure out the URL here */
            free(newurl);







<
<
<







1943
1944
1945
1946
1947
1948
1949



1950
1951
1952
1953
1954
1955
1956
        /* we're no longer receiving */
        Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe);

        /* expire the new receiving pipeline head */
        if(data->easy_conn->recv_pipe.head)
          Curl_expire(data->easy_conn->recv_pipe.head->ptr, 0, EXPIRE_RUN_NOW);




        /* When we follow redirects or is set to retry the connection, we must
           to go back to the CONNECT state */
        if(data->req.newurl || retry) {
          if(!retry) {
            /* if the URL is a follow-location and not just a retried request
               then figure out the URL here */
            free(newurl);
1993
1994
1995
1996
1997
1998
1999


2000
2001
2002
2003
2004
2005
2006
2007
2008
      rc = CURLM_CALL_MULTI_PERFORM;

      if(data->easy_conn) {
        CURLcode res;

        /* Remove ourselves from the receive pipeline, if we are there. */
        Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe);


        /* Check if we can move pending requests to send pipe */
        Curl_multi_process_pending_handles(multi);

        /* post-transfer command */
        res = multi_done(&data->easy_conn, result, FALSE);

        /* allow a previously set error code take precedence */
        if(!result)
          result = res;







>
>
|
|







1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
      rc = CURLM_CALL_MULTI_PERFORM;

      if(data->easy_conn) {
        CURLcode res;

        /* Remove ourselves from the receive pipeline, if we are there. */
        Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe);

        if(data->easy_conn->bits.multiplex || data->easy_conn->send_pipe.size)
          /* Check if we can move pending requests to connection */
          process_pending_handles(multi); /* pipelined/multiplexing */

        /* post-transfer command */
        res = multi_done(&data->easy_conn, result, FALSE);

        /* allow a previously set error code take precedence */
        if(!result)
          result = res;
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076

        /* NOTE: no attempt to disconnect connections must be made
           in the case blocks above - cleanup happens only here */

        data->state.pipe_broke = FALSE;

        /* Check if we can move pending requests to send pipe */
        Curl_multi_process_pending_handles(multi);

        if(data->easy_conn) {
          /* if this has a connection, unsubscribe from the pipelines */
          Curl_pipeline_leave_write(data->easy_conn);
          Curl_pipeline_leave_read(data->easy_conn);
          Curl_removeHandleFromPipeline(data, &data->easy_conn->send_pipe);
          Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe);







|







2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084

        /* NOTE: no attempt to disconnect connections must be made
           in the case blocks above - cleanup happens only here */

        data->state.pipe_broke = FALSE;

        /* Check if we can move pending requests to send pipe */
        process_pending_handles(multi); /* connection */

        if(data->easy_conn) {
          /* if this has a connection, unsubscribe from the pipelines */
          Curl_pipeline_leave_write(data->easy_conn);
          Curl_pipeline_leave_read(data->easy_conn);
          Curl_removeHandleFromPipeline(data, &data->easy_conn->send_pipe);
          Curl_removeHandleFromPipeline(data, &data->easy_conn->recv_pipe);
2411
2412
2413
2414
2415
2416
2417






2418
2419
2420
2421
2422
2423
2424
      }
    } /* if sockhash entry existed */
  } /* for loop over numsocks */

  memcpy(data->sockets, socks, num*sizeof(curl_socket_t));
  data->numsocks = num;
}







/*
 * Curl_multi_closed()
 *
 * Used by the connect code to tell the multi_socket code that one of the
 * sockets we were using is about to be closed.  This function will then
 * remove it from the sockethash for this handle to make the multi_socket API







>
>
>
>
>
>







2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
      }
    } /* if sockhash entry existed */
  } /* for loop over numsocks */

  memcpy(data->sockets, socks, num*sizeof(curl_socket_t));
  data->numsocks = num;
}

void Curl_updatesocket(struct Curl_easy *data)
{
  singlesocket(data->multi, data);
}


/*
 * Curl_multi_closed()
 *
 * Used by the connect code to tell the multi_socket code that one of the
 * sockets we were using is about to be closed.  This function will then
 * remove it from the sockethash for this handle to make the multi_socket API
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079

3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
}

struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi)
{
  return &multi->pipelining_server_bl;
}

void Curl_multi_process_pending_handles(struct Curl_multi *multi)
{
  struct curl_llist_element *e = multi->pending.head;

  while(e) {
    struct Curl_easy *data = e->ptr;
    struct curl_llist_element *next = e->next;

    if(data->mstate == CURLM_STATE_CONNECT_PEND) {

      multistate(data, CURLM_STATE_CONNECT);

      /* Remove this node from the list */
      Curl_llist_remove(&multi->pending, e, NULL);

      /* Make sure that the handle will be processed soonish. */
      Curl_expire(data, 0, EXPIRE_RUN_NOW);
    }

    e = next; /* operate on next handle */
  }
}

void Curl_set_in_callback(struct Curl_easy *easy, bool value)
{
  if(easy->multi_easy)
    easy->multi_easy->in_callback = value;







|


<
|

<

|
>
|

|
|

|
|
<
<
<







3078
3079
3080
3081
3082
3083
3084
3085
3086
3087

3088
3089

3090
3091
3092
3093
3094
3095
3096
3097
3098
3099



3100
3101
3102
3103
3104
3105
3106
}

struct curl_llist *Curl_multi_pipelining_server_bl(struct Curl_multi *multi)
{
  return &multi->pipelining_server_bl;
}

static void process_pending_handles(struct Curl_multi *multi)
{
  struct curl_llist_element *e = multi->pending.head;

  if(e) {
    struct Curl_easy *data = e->ptr;


    DEBUGASSERT(data->mstate == CURLM_STATE_CONNECT_PEND);

    multistate(data, CURLM_STATE_CONNECT);

    /* Remove this node from the list */
    Curl_llist_remove(&multi->pending, e, NULL);

    /* Make sure that the handle will be processed soonish. */
    Curl_expire(data, 0, EXPIRE_RUN_NOW);



  }
}

void Curl_set_in_callback(struct Curl_easy *easy, bool value)
{
  if(easy->multi_easy)
    easy->multi_easy->in_callback = value;
Changes to jni/curl/lib/multiif.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
#ifndef HEADER_CURL_MULTIIF_H
#define HEADER_CURL_MULTIIF_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/

/*
 * Prototypes for library-wide functions provided by multi.c
 */


void Curl_expire(struct Curl_easy *data, time_t milli, expire_id);
void Curl_expire_clear(struct Curl_easy *data);
void Curl_expire_done(struct Curl_easy *data, expire_id id);
bool Curl_pipeline_wanted(const struct Curl_multi* multi, int bits);
void Curl_multi_handlePipeBreak(struct Curl_easy *data);
void Curl_set_in_callback(struct Curl_easy *data, bool value);
bool Curl_is_in_callback(struct Curl_easy *easy);









|


















>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef HEADER_CURL_MULTIIF_H
#define HEADER_CURL_MULTIIF_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/

/*
 * Prototypes for library-wide functions provided by multi.c
 */

void Curl_updatesocket(struct Curl_easy *data);
void Curl_expire(struct Curl_easy *data, time_t milli, expire_id);
void Curl_expire_clear(struct Curl_easy *data);
void Curl_expire_done(struct Curl_easy *data, expire_id id);
bool Curl_pipeline_wanted(const struct Curl_multi* multi, int bits);
void Curl_multi_handlePipeBreak(struct Curl_easy *data);
void Curl_set_in_callback(struct Curl_easy *data, bool value);
bool Curl_is_in_callback(struct Curl_easy *easy);
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  * Curl_multi_dump is not a stable public function, this is only meant to
  * allow easier tracking of the internal handle's state and what sockets
  * they use. Only for research and development DEBUGBUILD enabled builds.
  */
void Curl_multi_dump(struct Curl_multi *multi);
#endif

void Curl_multi_process_pending_handles(struct Curl_multi *multi);

/* Return the value of the CURLMOPT_MAX_HOST_CONNECTIONS option */
size_t Curl_multi_max_host_connections(struct Curl_multi *multi);

/* Return the value of the CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE option */
curl_off_t Curl_multi_content_length_penalty_size(struct Curl_multi *multi);

/* Return the value of the CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE option */







<
<







55
56
57
58
59
60
61


62
63
64
65
66
67
68
  * Curl_multi_dump is not a stable public function, this is only meant to
  * allow easier tracking of the internal handle's state and what sockets
  * they use. Only for research and development DEBUGBUILD enabled builds.
  */
void Curl_multi_dump(struct Curl_multi *multi);
#endif



/* Return the value of the CURLMOPT_MAX_HOST_CONNECTIONS option */
size_t Curl_multi_max_host_connections(struct Curl_multi *multi);

/* Return the value of the CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE option */
curl_off_t Curl_multi_content_length_penalty_size(struct Curl_multi *multi);

/* Return the value of the CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE option */
Changes to jni/curl/lib/nwlib.c.
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
     * the lock because WE might be that other thread that was too late to
     * create the data and the first thread in will have created it.
     */
    NXLock(gLibLock);

    app_data = (libdata_t *) get_app_data(id);
    if(!app_data) {
      app_data = malloc(sizeof(libdata_t));

      if(app_data) {
        memset(app_data, 0, sizeof(libdata_t));

        app_data->tenbytes = malloc(10);
        app_data->lock     = NXMutexAlloc(0, 0, &liblock);

        if(!app_data->tenbytes || !app_data->lock) {
          if(app_data->lock)
            NXMutexFree(app_data->lock);








|


<
<







182
183
184
185
186
187
188
189
190
191


192
193
194
195
196
197
198
     * the lock because WE might be that other thread that was too late to
     * create the data and the first thread in will have created it.
     */
    NXLock(gLibLock);

    app_data = (libdata_t *) get_app_data(id);
    if(!app_data) {
      app_data = calloc(1, sizeof(libdata_t));

      if(app_data) {


        app_data->tenbytes = malloc(10);
        app_data->lock     = NXMutexAlloc(0, 0, &liblock);

        if(!app_data->tenbytes || !app_data->lock) {
          if(app_data->lock)
            NXMutexFree(app_data->lock);

Changes to jni/curl/lib/openldap.c.
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549





















550
551
552
553
554
555
556
    if(writeerr) {
      *err = writeerr;
      return -1;
    }
    data->req.bytecount += bv.bv_len + 5;

    for(rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, &bvals);
        (rc == LDAP_SUCCESS) && bvals;
        rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, &bvals)) {
      int i;

      if(bv.bv_val == NULL)
        break;

      if(bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7))
        binary = 1;
      else
        binary = 0;






















      for(i = 0; bvals[i].bv_val != NULL; i++) {
        int binval = 0;
        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
        if(writeerr) {
          *err = writeerr;
          return -1;







|










>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
    if(writeerr) {
      *err = writeerr;
      return -1;
    }
    data->req.bytecount += bv.bv_len + 5;

    for(rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, &bvals);
        rc == LDAP_SUCCESS;
        rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, &bvals)) {
      int i;

      if(bv.bv_val == NULL)
        break;

      if(bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7))
        binary = 1;
      else
        binary = 0;

      if(bvals == NULL) {
        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
        if(writeerr) {
          *err = writeerr;
          return -1;
        }
        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val,
                                     bv.bv_len);
        if(writeerr) {
          *err = writeerr;
          return -1;
        }
        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":\n", 2);
        if(writeerr) {
          *err = writeerr;
          return -1;
        }
        data->req.bytecount += bv.bv_len + 3;
        continue;
      }

      for(i = 0; bvals[i].bv_val != NULL; i++) {
        int binval = 0;
        writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"\t", 1);
        if(writeerr) {
          *err = writeerr;
          return -1;
Changes to jni/curl/lib/parsedate.c.
115
116
117
118
119
120
121

122
123
124
125
126
127
128
#define PARSEDATE_SOONER 2

/* Here's a bunch of frequently used time zone names. These were supported
   by the old getdate parser. */
#define tDAYZONE -60       /* offset for daylight savings time */
static const struct tzinfo tz[]= {
  {"GMT", 0},              /* Greenwich Mean */

  {"UTC", 0},              /* Universal (Coordinated) */
  {"WET", 0},              /* Western European */
  {"BST", 0 tDAYZONE},     /* British Summer */
  {"WAT", 60},             /* West Africa */
  {"AST", 240},            /* Atlantic Standard */
  {"ADT", 240 tDAYZONE},   /* Atlantic Daylight */
  {"EST", 300},            /* Eastern Standard */







>







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#define PARSEDATE_SOONER 2

/* Here's a bunch of frequently used time zone names. These were supported
   by the old getdate parser. */
#define tDAYZONE -60       /* offset for daylight savings time */
static const struct tzinfo tz[]= {
  {"GMT", 0},              /* Greenwich Mean */
  {"UT",  0},              /* Universal Time */
  {"UTC", 0},              /* Universal (Coordinated) */
  {"WET", 0},              /* Western European */
  {"BST", 0 tDAYZONE},     /* British Summer */
  {"WAT", 60},             /* West Africa */
  {"AST", 240},            /* Atlantic Standard */
  {"ADT", 240 tDAYZONE},   /* Atlantic Daylight */
  {"EST", 300},            /* Eastern Standard */
Changes to jni/curl/lib/pingpong.c.
300
301
302
303
304
305
306
307



308
309
310
311
312
313
314
      /* we had data in the "cache", copy that instead of doing an actual
       * read
       *
       * pp->cache_size is cast to ssize_t here.  This should be safe, because
       * it would have been populated with something of size int to begin
       * with, even though its datatype may be larger than an int.
       */
      DEBUGASSERT((ptr + pp->cache_size) <= (buf + data->set.buffer_size + 1));



      memcpy(ptr, pp->cache, pp->cache_size);
      gotbytes = (ssize_t)pp->cache_size;
      free(pp->cache);    /* free the cache */
      pp->cache = NULL;   /* clear the pointer */
      pp->cache_size = 0; /* zero the size just in case */
    }
    else {







|
>
>
>







300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
      /* we had data in the "cache", copy that instead of doing an actual
       * read
       *
       * pp->cache_size is cast to ssize_t here.  This should be safe, because
       * it would have been populated with something of size int to begin
       * with, even though its datatype may be larger than an int.
       */
      if((ptr + pp->cache_size) > (buf + data->set.buffer_size + 1)) {
        failf(data, "cached response data too big to handle");
        return CURLE_RECV_ERROR;
      }
      memcpy(ptr, pp->cache, pp->cache_size);
      gotbytes = (ssize_t)pp->cache_size;
      free(pp->cache);    /* free the cache */
      pp->cache = NULL;   /* clear the pointer */
      pp->cache_size = 0; /* zero the size just in case */
    }
    else {
Changes to jni/curl/lib/progress.c.
23
24
25
26
27
28
29



30
31
32
33
34
35
36
#include "curl_setup.h"

#include "urldata.h"
#include "sendf.h"
#include "multiif.h"
#include "progress.h"
#include "curl_printf.h"




/* Provide a string that is 2 + 1 + 2 + 1 + 2 = 8 letters long (plus the zero
   byte) */
static void time2str(char *r, curl_off_t seconds)
{
  curl_off_t d, h, m, s;
  if(seconds <= 0) {







>
>
>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "curl_setup.h"

#include "urldata.h"
#include "sendf.h"
#include "multiif.h"
#include "progress.h"
#include "curl_printf.h"

/* check rate limits within this many recent milliseconds, at minimum. */
#define MIN_RATE_LIMIT_PERIOD 3000

/* Provide a string that is 2 + 1 + 2 + 1 + 2 = 8 letters long (plus the zero
   byte) */
static void time2str(char *r, curl_off_t seconds)
{
  curl_off_t d, h, m, s;
  if(seconds <= 0) {
231
232
233
234
235
236
237

238
239
240
241
242
243
244
  data->progress.is_t_startransfer_set = false;
  data->progress.ul_limit_start.tv_sec = 0;
  data->progress.ul_limit_start.tv_usec = 0;
  data->progress.dl_limit_start.tv_sec = 0;
  data->progress.dl_limit_start.tv_usec = 0;
  /* clear all bits except HIDE and HEADERS_OUT */
  data->progress.flags &= PGRS_HIDE|PGRS_HEADERS_OUT;

}

/*
 * This is used to handle speed limits, calculating how many milliseconds to
 * wait until we're back under the speed limit, if needed.
 *
 * The way it works is by having a "starting point" (time & amount of data







>







234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
  data->progress.is_t_startransfer_set = false;
  data->progress.ul_limit_start.tv_sec = 0;
  data->progress.ul_limit_start.tv_usec = 0;
  data->progress.dl_limit_start.tv_sec = 0;
  data->progress.dl_limit_start.tv_usec = 0;
  /* clear all bits except HIDE and HEADERS_OUT */
  data->progress.flags &= PGRS_HIDE|PGRS_HEADERS_OUT;
  Curl_ratelimit(data, data->progress.start);
}

/*
 * This is used to handle speed limits, calculating how many milliseconds to
 * wait until we're back under the speed limit, if needed.
 *
 * The way it works is by having a "starting point" (time & amount of data
261
262
263
264
265
266
267
268
269
270
271
272
273
274




275
276
277
278
279
280
281
282
283
284




285
286
287


288

289
290
291
292



293
294
295

296
297




298
299
300


301
302


303
304
305
306
307
308
309
310
311
312
313
314
315


316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
                                  struct curltime start,
                                  struct curltime now)
{
  curl_off_t size = cursize - startsize;
  time_t minimum;
  time_t actual;

  /* we don't have a starting point yet -- return 0 so it gets (re)set */
  if(start.tv_sec == 0 && start.tv_usec == 0)
    return 0;

  if(!limit)
    return 0;





  if(size < CURL_OFF_T_MAX/1000)
    minimum = (time_t) (CURL_OFF_T_C(1000) * size / limit);
  else {
    minimum = (time_t) (size / limit);
    if(minimum < TIME_T_MAX/1000)
      minimum *= 1000;
    else
      minimum = TIME_T_MAX;
  }





  actual = Curl_timediff(now, start);

  if(actual < minimum)


    return (minimum - actual);


  return 0;
}




void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size)
{
  struct curltime now = Curl_now();


  data->progress.downloaded = size;





  /* download speed limit */
  if((data->set.max_recv_speed > 0) &&


     (Curl_pgrsLimitWaitTime(data->progress.downloaded,
                             data->progress.dl_limit_size,


                             data->set.max_recv_speed,
                             data->progress.dl_limit_start,
                             now) == 0)) {
    data->progress.dl_limit_start = now;
    data->progress.dl_limit_size = size;
  }
}

void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size)
{
  struct curltime now = Curl_now();

  data->progress.uploaded = size;



  /* upload speed limit */
  if((data->set.max_send_speed > 0) &&
     (Curl_pgrsLimitWaitTime(data->progress.uploaded,
                             data->progress.ul_limit_size,
                             data->set.max_send_speed,
                             data->progress.ul_limit_start,
                             now) == 0)) {
    data->progress.ul_limit_start = now;
    data->progress.ul_limit_size = size;
  }
}

void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size)
{
  if(size >= 0) {
    data->progress.size_dl = size;
    data->progress.flags |= PGRS_DL_SIZE_KNOWN;







<
<
<
<
|


>
>
>
>










>
>
>
>

<
|
>
>

>




>
>
>


<
>
|
|
>
>
>
>
|
|
|
>
>
|
|
>
>
|
|
|
|
|
|
|
|
<
|
<
|
|
>
>
|
<
<
<
|
<
<
<
<
<
<







265
266
267
268
269
270
271




272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293

294
295
296
297
298
299
300
301
302
303
304
305
306
307

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331

332

333
334
335
336
337



338






339
340
341
342
343
344
345
                                  struct curltime start,
                                  struct curltime now)
{
  curl_off_t size = cursize - startsize;
  time_t minimum;
  time_t actual;





  if(!limit || !size)
    return 0;

  /*
   * 'minimum' is the number of milliseconds 'size' should take to download to
   * stay below 'limit'.
   */
  if(size < CURL_OFF_T_MAX/1000)
    minimum = (time_t) (CURL_OFF_T_C(1000) * size / limit);
  else {
    minimum = (time_t) (size / limit);
    if(minimum < TIME_T_MAX/1000)
      minimum *= 1000;
    else
      minimum = TIME_T_MAX;
  }

  /*
   * 'actual' is the time in milliseconds it took to actually download the
   * last 'size' bytes.
   */
  actual = Curl_timediff(now, start);

  if(actual < minimum) {
    /* if it downloaded the data faster than the limit, make it wait the
       difference */
    return (minimum - actual);
  }

  return 0;
}

/*
 * Set the number of downloaded bytes so far.
 */
void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size)
{

  data->progress.downloaded = size;
}

/*
 * Update the timestamp and sizestamp to use for rate limit calculations.
 */
void Curl_ratelimit(struct Curl_easy *data, struct curltime now)
{
  /* don't set a new stamp unless the time since last update is long enough */
  if(data->set.max_recv_speed > 0) {
    if(Curl_timediff(now, data->progress.dl_limit_start) >=
       MIN_RATE_LIMIT_PERIOD) {
      data->progress.dl_limit_start = now;
      data->progress.dl_limit_size = data->progress.downloaded;
    }
  }
  if(data->set.max_send_speed > 0) {
    if(Curl_timediff(now, data->progress.ul_limit_start) >=
       MIN_RATE_LIMIT_PERIOD) {
      data->progress.ul_limit_start = now;
      data->progress.ul_limit_size = data->progress.uploaded;
    }
  }
}



/*
 * Set the number of uploaded bytes so far.
 */
void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size)
{



  data->progress.uploaded = size;






}

void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size)
{
  if(size >= 0) {
    data->progress.size_dl = size;
    data->progress.flags |= PGRS_DL_SIZE_KNOWN;
Changes to jni/curl/lib/progress.h.
42
43
44
45
46
47
48

49
50
51
52
53
54
55

int Curl_pgrsDone(struct connectdata *);
void Curl_pgrsStartNow(struct Curl_easy *data);
void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size);
void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size);
void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size);
void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size);

int Curl_pgrsUpdate(struct connectdata *);
void Curl_pgrsResetTransferSizes(struct Curl_easy *data);
void Curl_pgrsTime(struct Curl_easy *data, timerid timer);
timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize,
                                  curl_off_t startsize,
                                  curl_off_t limit,
                                  struct curltime start,







>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

int Curl_pgrsDone(struct connectdata *);
void Curl_pgrsStartNow(struct Curl_easy *data);
void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size);
void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size);
void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size);
void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size);
void Curl_ratelimit(struct Curl_easy *data, struct curltime now);
int Curl_pgrsUpdate(struct connectdata *);
void Curl_pgrsResetTransferSizes(struct Curl_easy *data);
void Curl_pgrsTime(struct Curl_easy *data, timerid timer);
timediff_t Curl_pgrsLimitWaitTime(curl_off_t cursize,
                                  curl_off_t startsize,
                                  curl_off_t limit,
                                  struct curltime start,
Changes to jni/curl/lib/rtsp.c.
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
     function and any configured CURLOPT_INTERLEAVEDATA to write out the RTP
     data. Otherwise, use the CURLOPT_WRITEFUNCTION with the CURLOPT_WRITEDATA
     pointer to write out the RTP data. */
  if(data->set.fwrite_rtp) {
    writeit = data->set.fwrite_rtp;
    user_ptr = data->set.rtp_out;
  }
  else
  {
    writeit = data->set.fwrite_func;
    user_ptr = data->set.out;
  }

  Curl_set_in_callback(data, true);
  wrote = writeit(ptr, 1, len, user_ptr);
  Curl_set_in_callback(data, false);







|
<







760
761
762
763
764
765
766
767

768
769
770
771
772
773
774
     function and any configured CURLOPT_INTERLEAVEDATA to write out the RTP
     data. Otherwise, use the CURLOPT_WRITEFUNCTION with the CURLOPT_WRITEDATA
     pointer to write out the RTP data. */
  if(data->set.fwrite_rtp) {
    writeit = data->set.fwrite_rtp;
    user_ptr = data->set.rtp_out;
  }
  else {

    writeit = data->set.fwrite_func;
    user_ptr = data->set.out;
  }

  Curl_set_in_callback(data, true);
  wrote = writeit(ptr, 1, len, user_ptr);
  Curl_set_in_callback(data, false);
Changes to jni/curl/lib/setopt.c.
777
778
779
780
781
782
783
784

785
786
787
788

789
790
791
792
793
794
795
        free(argptr);
      }
      else {
        Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);

        if(checkprefix("Set-Cookie:", argptr))
          /* HTTP Header format line */
          Curl_cookie_add(data, data->cookies, TRUE, argptr + 11, NULL, NULL);


        else
          /* Netscape format line */
          Curl_cookie_add(data, data->cookies, FALSE, argptr, NULL, NULL);


        Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
        free(argptr);
      }
    }

    break;







|
>



|
>







777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
        free(argptr);
      }
      else {
        Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);

        if(checkprefix("Set-Cookie:", argptr))
          /* HTTP Header format line */
          Curl_cookie_add(data, data->cookies, TRUE, FALSE, argptr + 11, NULL,
                          NULL);

        else
          /* Netscape format line */
          Curl_cookie_add(data, data->cookies, FALSE, FALSE, argptr, NULL,
                          NULL);

        Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
        free(argptr);
      }
    }

    break;
1033
1034
1035
1036
1037
1038
1039

1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  case CURLOPT_SOCKS5_GSSAPI_NEC:
    /*
     * Set flag for NEC SOCK5 support
     */
    data->set.socks5_gssapi_nec = (0 != va_arg(param, long)) ? TRUE : FALSE;
    break;


  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
  case CURLOPT_PROXY_SERVICE_NAME:
    /*
     * Set proxy authentication service name for Kerberos 5 and SPNEGO
     */
    result = Curl_setstropt(&data->set.str[STRING_PROXY_SERVICE_NAME],
                            va_arg(param, char *));
    break;
#endif

#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) ||     \
  defined(USE_SPNEGO)
  case CURLOPT_SERVICE_NAME:
    /*
     * Set authentication service name for DIGEST-MD5, Kerberos 5 and SPNEGO
     */
    result = Curl_setstropt(&data->set.str[STRING_SERVICE_NAME],
                            va_arg(param, char *));
    break;

#endif

  case CURLOPT_HEADERDATA:
    /*
     * Custom pointer to pass the header write callback function
     */
    data->set.writeheader = (void *)va_arg(param, void *);
    break;
  case CURLOPT_ERRORBUFFER:







>









<

<
<








<
<







1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051

1052


1053
1054
1055
1056
1057
1058
1059
1060


1061
1062
1063
1064
1065
1066
1067
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  case CURLOPT_SOCKS5_GSSAPI_NEC:
    /*
     * Set flag for NEC SOCK5 support
     */
    data->set.socks5_gssapi_nec = (0 != va_arg(param, long)) ? TRUE : FALSE;
    break;
#endif

  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
  case CURLOPT_PROXY_SERVICE_NAME:
    /*
     * Set proxy authentication service name for Kerberos 5 and SPNEGO
     */
    result = Curl_setstropt(&data->set.str[STRING_PROXY_SERVICE_NAME],
                            va_arg(param, char *));
    break;




  case CURLOPT_SERVICE_NAME:
    /*
     * Set authentication service name for DIGEST-MD5, Kerberos 5 and SPNEGO
     */
    result = Curl_setstropt(&data->set.str[STRING_SERVICE_NAME],
                            va_arg(param, char *));
    break;



  case CURLOPT_HEADERDATA:
    /*
     * Custom pointer to pass the header write callback function
     */
    data->set.writeheader = (void *)va_arg(param, void *);
    break;
  case CURLOPT_ERRORBUFFER:
1598
1599
1600
1601
1602
1603
1604







1605
1606
1607
1608
1609
1610
1611
    break;
  case CURLOPT_CRLF:
    /*
     * Kludgy option to enable CRLF conversions. Subject for removal.
     */
    data->set.crlf = (0 != va_arg(param, long)) ? TRUE : FALSE;
    break;








  case CURLOPT_INTERFACE:
    /*
     * Set what interface or address/hostname to bind the socket to when
     * performing an operation and thus what from-IP your connection will use.
     */
    result = Curl_setstropt(&data->set.str[STRING_DEVICE],







>
>
>
>
>
>
>







1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
    break;
  case CURLOPT_CRLF:
    /*
     * Kludgy option to enable CRLF conversions. Subject for removal.
     */
    data->set.crlf = (0 != va_arg(param, long)) ? TRUE : FALSE;
    break;

  case CURLOPT_HAPROXYPROTOCOL:
    /*
     * Set to send the HAProxy Proxy Protocol header
     */
    data->set.haproxyprotocol = (0 != va_arg(param, long)) ? TRUE : FALSE;
    break;

  case CURLOPT_INTERFACE:
    /*
     * Set what interface or address/hostname to bind the socket to when
     * performing an operation and thus what from-IP your connection will use.
     */
    result = Curl_setstropt(&data->set.str[STRING_DEVICE],
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
    }
    break;
  case CURLOPT_SSL_CTX_FUNCTION:
    /*
     * Set a SSL_CTX callback
     */
#ifdef USE_SSL
    if(Curl_ssl->have_ssl_ctx)
      data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback);
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_SSL_CTX_DATA:
    /*
     * Set a SSL_CTX callback parameter pointer
     */
#ifdef USE_SSL
    if(Curl_ssl->have_ssl_ctx)
      data->set.ssl.fsslctxp = va_arg(param, void *);
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_SSL_FALSESTART:
    /*
     * Enable TLS false start.
     */
    if(!Curl_ssl_false_start()) {
      result = CURLE_NOT_BUILT_IN;
      break;
    }

    data->set.ssl.falsestart = (0 != va_arg(param, long)) ? TRUE : FALSE;
    break;
  case CURLOPT_CERTINFO:
#ifdef USE_SSL
    if(Curl_ssl->have_certinfo)
      data->set.ssl.certinfo = (0 != va_arg(param, long)) ? TRUE : FALSE;
    else
#endif
      result = CURLE_NOT_BUILT_IN;
        break;
  case CURLOPT_PINNEDPUBLICKEY:
    /*
     * Set pinned public key for SSL connection.
     * Specify file name of the public key in DER format.
     */
#ifdef USE_SSL
    if(Curl_ssl->have_pinnedpubkey)
      result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG],
                              va_arg(param, char *));
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_PROXY_PINNEDPUBLICKEY:
    /*
     * Set pinned public key for SSL connection.
     * Specify file name of the public key in DER format.
     */
#ifdef USE_SSL
    if(Curl_ssl->have_pinnedpubkey)
      result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY],
                              va_arg(param, char *));
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_CAINFO:







|










|


















|











|












|







1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
    }
    break;
  case CURLOPT_SSL_CTX_FUNCTION:
    /*
     * Set a SSL_CTX callback
     */
#ifdef USE_SSL
    if(Curl_ssl->supports & SSLSUPP_SSL_CTX)
      data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback);
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_SSL_CTX_DATA:
    /*
     * Set a SSL_CTX callback parameter pointer
     */
#ifdef USE_SSL
    if(Curl_ssl->supports & SSLSUPP_SSL_CTX)
      data->set.ssl.fsslctxp = va_arg(param, void *);
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_SSL_FALSESTART:
    /*
     * Enable TLS false start.
     */
    if(!Curl_ssl_false_start()) {
      result = CURLE_NOT_BUILT_IN;
      break;
    }

    data->set.ssl.falsestart = (0 != va_arg(param, long)) ? TRUE : FALSE;
    break;
  case CURLOPT_CERTINFO:
#ifdef USE_SSL
    if(Curl_ssl->supports & SSLSUPP_CERTINFO)
      data->set.ssl.certinfo = (0 != va_arg(param, long)) ? TRUE : FALSE;
    else
#endif
      result = CURLE_NOT_BUILT_IN;
        break;
  case CURLOPT_PINNEDPUBLICKEY:
    /*
     * Set pinned public key for SSL connection.
     * Specify file name of the public key in DER format.
     */
#ifdef USE_SSL
    if(Curl_ssl->supports & SSLSUPP_PINNEDPUBKEY)
      result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG],
                              va_arg(param, char *));
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_PROXY_PINNEDPUBLICKEY:
    /*
     * Set pinned public key for SSL connection.
     * Specify file name of the public key in DER format.
     */
#ifdef USE_SSL
    if(Curl_ssl->supports & SSLSUPP_PINNEDPUBKEY)
      result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY],
                              va_arg(param, char *));
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_CAINFO:
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
    break;
  case CURLOPT_CAPATH:
    /*
     * Set CA path info for SSL connection. Specify directory name of the CA
     * certificates which have been prepared using openssl c_rehash utility.
     */
#ifdef USE_SSL
    if(Curl_ssl->have_ca_path)
      /* This does not work on windows. */
      result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG],
                              va_arg(param, char *));
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_PROXY_CAPATH:
    /*
     * Set CA path info for SSL connection proxy. Specify directory name of the
     * CA certificates which have been prepared using openssl c_rehash utility.
     */
#ifdef USE_SSL
    if(Curl_ssl->have_ca_path)
      /* This does not work on windows. */
      result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY],
                              va_arg(param, char *));
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;







|













|







1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
    break;
  case CURLOPT_CAPATH:
    /*
     * Set CA path info for SSL connection. Specify directory name of the CA
     * certificates which have been prepared using openssl c_rehash utility.
     */
#ifdef USE_SSL
    if(Curl_ssl->supports & SSLSUPP_CA_PATH)
      /* This does not work on windows. */
      result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG],
                              va_arg(param, char *));
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
  case CURLOPT_PROXY_CAPATH:
    /*
     * Set CA path info for SSL connection proxy. Specify directory name of the
     * CA certificates which have been prepared using openssl c_rehash utility.
     */
#ifdef USE_SSL
    if(Curl_ssl->supports & SSLSUPP_CA_PATH)
      /* This does not work on windows. */
      result = Curl_setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY],
                              va_arg(param, char *));
    else
#endif
      result = CURLE_NOT_BUILT_IN;
    break;
2550
2551
2552
2553
2554
2555
2556



2557
2558
2559
2560
2561
2562
2563
    break;
  case CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS:
    arg = va_arg(param, long);
    if(arg < 0)
      return CURLE_BAD_FUNCTION_ARGUMENT;
    data->set.happy_eyeballs_timeout = arg;
    break;



  default:
    /* unknown tag and its companion, just ignore: */
    result = CURLE_UNKNOWN_OPTION;
    break;
  }

  return result;







>
>
>







2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
    break;
  case CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS:
    arg = va_arg(param, long);
    if(arg < 0)
      return CURLE_BAD_FUNCTION_ARGUMENT;
    data->set.happy_eyeballs_timeout = arg;
    break;
  case CURLOPT_DNS_SHUFFLE_ADDRESSES:
    data->set.dns_shuffle_addresses = (0 != va_arg(param, long)) ? TRUE:FALSE;
    break;
  default:
    /* unknown tag and its companion, just ignore: */
    result = CURLE_UNKNOWN_OPTION;
    break;
  }

  return result;
Changes to jni/curl/lib/smb.c.
786
787
788
789
790
791
792





793
794
795
796

797
798
799
800
801
802
803
      conn->data->req.size = conn->data->state.infilesize;
      Curl_pgrsSetUploadSize(conn->data, conn->data->req.size);
      next_state = SMB_UPLOAD;
    }
    else {
      smb_m = (const struct smb_nt_create_response*) msg;
      conn->data->req.size = smb_swap64(smb_m->end_of_file);





      Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size);
      if(conn->data->set.get_filetime)
        get_posix_time(&conn->data->info.filetime, smb_m->last_change_time);
      next_state = SMB_DOWNLOAD;

    }
    break;

  case SMB_DOWNLOAD:
    if(h->status || smbc->got < sizeof(struct smb_header) + 14) {
      req->result = CURLE_RECV_ERROR;
      next_state = SMB_CLOSE;







>
>
>
>
>
|
|
|
|
>







786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
      conn->data->req.size = conn->data->state.infilesize;
      Curl_pgrsSetUploadSize(conn->data, conn->data->req.size);
      next_state = SMB_UPLOAD;
    }
    else {
      smb_m = (const struct smb_nt_create_response*) msg;
      conn->data->req.size = smb_swap64(smb_m->end_of_file);
      if(conn->data->req.size < 0) {
        req->result = CURLE_WEIRD_SERVER_REPLY;
        next_state = SMB_CLOSE;
      }
      else {
        Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size);
        if(conn->data->set.get_filetime)
          get_posix_time(&conn->data->info.filetime, smb_m->last_change_time);
        next_state = SMB_DOWNLOAD;
      }
    }
    break;

  case SMB_DOWNLOAD:
    if(h->status || smbc->got < sizeof(struct smb_header) + 14) {
      req->result = CURLE_RECV_ERROR;
      next_state = SMB_CLOSE;
Changes to jni/curl/lib/ssh-libssh.c.
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
 */
static ssize_t sftp_recv(struct connectdata *conn, int sockindex,
                         char *mem, size_t len, CURLcode *err)
{
  ssize_t nread;
  (void)sockindex;

  if(len >= (size_t)1<<32)
    len = (size_t)(1<<31)-1;

  switch(conn->proto.sshc.sftp_recv_state) {
    case 0:
      conn->proto.sshc.sftp_file_index =
            sftp_async_read_begin(conn->proto.sshc.sftp_file,
                                  (uint32_t)len);
      if(conn->proto.sshc.sftp_file_index < 0) {







|
<







2421
2422
2423
2424
2425
2426
2427
2428

2429
2430
2431
2432
2433
2434
2435
 */
static ssize_t sftp_recv(struct connectdata *conn, int sockindex,
                         char *mem, size_t len, CURLcode *err)
{
  ssize_t nread;
  (void)sockindex;

  DEBUGASSERT(len < CURL_MAX_READ_SIZE);


  switch(conn->proto.sshc.sftp_recv_state) {
    case 0:
      conn->proto.sshc.sftp_file_index =
            sftp_async_read_begin(conn->proto.sshc.sftp_file,
                                  (uint32_t)len);
      if(conn->proto.sshc.sftp_file_index < 0) {
Changes to jni/curl/lib/ssh.c.
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795

        /*
         * Unless the user explicitly specifies a public key file, let
         * libssh2 extract the public key from the private key file.
         * This is done by simply passing sshc->rsa_pub = NULL.
         */
        if(data->set.str[STRING_SSH_PUBLIC_KEY]
            /* treat empty string the same way as NULL */
            && data->set.str[STRING_SSH_PUBLIC_KEY][0]) {
          sshc->rsa_pub = strdup(data->set.str[STRING_SSH_PUBLIC_KEY]);
          if(!sshc->rsa_pub)
            out_of_memory = TRUE;
        }

        if(out_of_memory || sshc->rsa == NULL) {
          free(home);







|
|







780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795

        /*
         * Unless the user explicitly specifies a public key file, let
         * libssh2 extract the public key from the private key file.
         * This is done by simply passing sshc->rsa_pub = NULL.
         */
        if(data->set.str[STRING_SSH_PUBLIC_KEY]
           /* treat empty string the same way as NULL */
           && data->set.str[STRING_SSH_PUBLIC_KEY][0]) {
          sshc->rsa_pub = strdup(data->set.str[STRING_SSH_PUBLIC_KEY]);
          if(!sshc->rsa_pub)
            out_of_memory = TRUE;
        }

        if(out_of_memory || sshc->rsa == NULL) {
          free(home);
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849

      if(rc == 0) {
        sshc->authed = TRUE;
        infof(data, "Initialized SSH public key authentication\n");
        state(conn, SSH_AUTH_DONE);
      }
      else {
        char *err_msg;
        (void)libssh2_session_last_error(sshc->ssh_session,
                                         &err_msg, NULL, 0);
        infof(data, "SSH public key authentication failed: %s\n", err_msg);
        state(conn, SSH_AUTH_PASS_INIT);
        rc = 0; /* clear rc and continue */
      }
      break;







|







835
836
837
838
839
840
841
842
843
844
845
846
847
848
849

      if(rc == 0) {
        sshc->authed = TRUE;
        infof(data, "Initialized SSH public key authentication\n");
        state(conn, SSH_AUTH_DONE);
      }
      else {
        char *err_msg = NULL;
        (void)libssh2_session_last_error(sshc->ssh_session,
                                         &err_msg, NULL, 0);
        infof(data, "SSH public key authentication failed: %s\n", err_msg);
        state(conn, SSH_AUTH_PASS_INIT);
        rc = 0; /* clear rc and continue */
      }
      break;
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056

    case SSH_SFTP_INIT:
      /*
       * Start the libssh2 sftp session
       */
      sshc->sftp_session = libssh2_sftp_init(sshc->ssh_session);
      if(!sshc->sftp_session) {
        char *err_msg;
        if(libssh2_session_last_errno(sshc->ssh_session) ==
           LIBSSH2_ERROR_EAGAIN) {
          rc = LIBSSH2_ERROR_EAGAIN;
          break;
        }

        (void)libssh2_session_last_error(sshc->ssh_session,







|







1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056

    case SSH_SFTP_INIT:
      /*
       * Start the libssh2 sftp session
       */
      sshc->sftp_session = libssh2_sftp_init(sshc->ssh_session);
      if(!sshc->sftp_session) {
        char *err_msg = NULL;
        if(libssh2_session_last_errno(sshc->ssh_session) ==
           LIBSSH2_ERROR_EAGAIN) {
          rc = LIBSSH2_ERROR_EAGAIN;
          break;
        }

        (void)libssh2_session_last_error(sshc->ssh_session,
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
            break;
          }
          memset(&sshc->quote_attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES));
          state(conn, SSH_SFTP_QUOTE_STAT);
          break;
        }
        if(strncasecompare(cmd, "ln ", 3) ||
                strncasecompare(cmd, "symlink ", 8)) {
          /* symbolic linking */
          /* sshc->quote_path1 is the source */
          /* get the destination */
          result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir);
          if(result) {
            if(result == CURLE_OUT_OF_MEMORY)
              failf(data, "Out of memory");







|







1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
            break;
          }
          memset(&sshc->quote_attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES));
          state(conn, SSH_SFTP_QUOTE_STAT);
          break;
        }
        if(strncasecompare(cmd, "ln ", 3) ||
           strncasecompare(cmd, "symlink ", 8)) {
          /* symbolic linking */
          /* sshc->quote_path1 is the source */
          /* get the destination */
          result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir);
          if(result) {
            if(result == CURLE_OUT_OF_MEMORY)
              failf(data, "Out of memory");
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
      rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
                                curlx_uztoui(strlen(sftp_scp->path)),
                                LIBSSH2_SFTP_STAT, &attrs);
      if(rc == LIBSSH2_ERROR_EAGAIN) {
        break;
      }
      if(rc ||
              !(attrs.flags & LIBSSH2_SFTP_ATTR_SIZE) ||
              (attrs.filesize == 0)) {
        /*
         * libssh2_sftp_open() didn't return an error, so maybe the server
         * just doesn't support stat()
         * OR the server doesn't return a file size with a stat()
         * OR file size is 0
         */
        data->req.size = -1;







|
|







2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
      rc = libssh2_sftp_stat_ex(sshc->sftp_session, sftp_scp->path,
                                curlx_uztoui(strlen(sftp_scp->path)),
                                LIBSSH2_SFTP_STAT, &attrs);
      if(rc == LIBSSH2_ERROR_EAGAIN) {
        break;
      }
      if(rc ||
         !(attrs.flags & LIBSSH2_SFTP_ATTR_SIZE) ||
         (attrs.filesize == 0)) {
        /*
         * libssh2_sftp_open() didn't return an error, so maybe the server
         * just doesn't support stat()
         * OR the server doesn't return a file size with a stat()
         * OR file size is 0
         */
        data->req.size = -1;
2272
2273
2274
2275
2276
2277
2278



2279
2280
2281
2282
2283
2284
2285
2286
    case SSH_SFTP_CLOSE:
      if(sshc->sftp_handle) {
        rc = libssh2_sftp_close(sshc->sftp_handle);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {



          infof(data, "Failed to close libssh2 file\n");
        }
        sshc->sftp_handle = NULL;
      }

      Curl_safefree(sftp_scp->path);

      DEBUGF(infof(data, "SFTP DONE done\n"));







>
>
>
|







2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
    case SSH_SFTP_CLOSE:
      if(sshc->sftp_handle) {
        rc = libssh2_sftp_close(sshc->sftp_handle);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Failed to close libssh2 file: %d %s\n", rc, err_msg);
        }
        sshc->sftp_handle = NULL;
      }

      Curl_safefree(sftp_scp->path);

      DEBUGF(infof(data, "SFTP DONE done\n"));
2306
2307
2308
2309
2310
2311
2312



2313
2314
2315
2316
2317
2318
2319
2320

      if(sshc->sftp_handle) {
        rc = libssh2_sftp_close(sshc->sftp_handle);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {



          infof(data, "Failed to close libssh2 file\n");
        }
        sshc->sftp_handle = NULL;
      }
      if(sshc->sftp_session) {
        rc = libssh2_sftp_shutdown(sshc->sftp_session);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;







>
>
>
|







2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326

      if(sshc->sftp_handle) {
        rc = libssh2_sftp_close(sshc->sftp_handle);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session, &err_msg,
                                           NULL, 0);
          infof(data, "Failed to close libssh2 file: %d %s\n", rc, err_msg);
        }
        sshc->sftp_handle = NULL;
      }
      if(sshc->sftp_session) {
        rc = libssh2_sftp_shutdown(sshc->sftp_session);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
       * directory in the path.
       */
      sshc->ssh_channel =
        SCP_SEND(sshc->ssh_session, sftp_scp->path, data->set.new_file_perms,
                 data->state.infilesize);
      if(!sshc->ssh_channel) {
        int ssh_err;
        char *err_msg;

        if(libssh2_session_last_errno(sshc->ssh_session) ==
           LIBSSH2_ERROR_EAGAIN) {
          rc = LIBSSH2_ERROR_EAGAIN;
          break;
        }








|







2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
       * directory in the path.
       */
      sshc->ssh_channel =
        SCP_SEND(sshc->ssh_session, sftp_scp->path, data->set.new_file_perms,
                 data->state.infilesize);
      if(!sshc->ssh_channel) {
        int ssh_err;
        char *err_msg = NULL;

        if(libssh2_session_last_errno(sshc->ssh_session) ==
           LIBSSH2_ERROR_EAGAIN) {
          rc = LIBSSH2_ERROR_EAGAIN;
          break;
        }

2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
      curl_off_t bytecount;

      /*
       * We must check the remote file; if it is a directory no values will
       * be set in sb
       */

       /*
        * If support for >2GB files exists, use it.
        */

      /* get a fresh new channel from the ssh layer */
#if LIBSSH2_VERSION_NUM < 0x010700
      struct stat sb;
      memset(&sb, 0, sizeof(struct stat));
      sshc->ssh_channel = libssh2_scp_recv(sshc->ssh_session,
                                           sftp_scp->path, &sb);
#else
      libssh2_struct_stat sb;
      memset(&sb, 0, sizeof(libssh2_struct_stat));
      sshc->ssh_channel = libssh2_scp_recv2(sshc->ssh_session,
                                            sftp_scp->path, &sb);
#endif

      if(!sshc->ssh_channel) {
        int ssh_err;
        char *err_msg;

        if(libssh2_session_last_errno(sshc->ssh_session) ==
           LIBSSH2_ERROR_EAGAIN) {
          rc = LIBSSH2_ERROR_EAGAIN;
          break;
        }








|
|
|
















|







2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
      curl_off_t bytecount;

      /*
       * We must check the remote file; if it is a directory no values will
       * be set in sb
       */

      /*
       * If support for >2GB files exists, use it.
       */

      /* get a fresh new channel from the ssh layer */
#if LIBSSH2_VERSION_NUM < 0x010700
      struct stat sb;
      memset(&sb, 0, sizeof(struct stat));
      sshc->ssh_channel = libssh2_scp_recv(sshc->ssh_session,
                                           sftp_scp->path, &sb);
#else
      libssh2_struct_stat sb;
      memset(&sb, 0, sizeof(libssh2_struct_stat));
      sshc->ssh_channel = libssh2_scp_recv2(sshc->ssh_session,
                                            sftp_scp->path, &sb);
#endif

      if(!sshc->ssh_channel) {
        int ssh_err;
        char *err_msg = NULL;

        if(libssh2_session_last_errno(sshc->ssh_session) ==
           LIBSSH2_ERROR_EAGAIN) {
          rc = LIBSSH2_ERROR_EAGAIN;
          break;
        }

2487
2488
2489
2490
2491
2492
2493



2494

2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506



2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519



2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532



2533

2534
2535
2536
2537
2538
2539
2540
    case SSH_SCP_SEND_EOF:
      if(sshc->ssh_channel) {
        rc = libssh2_channel_send_eof(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc) {



          infof(data, "Failed to send libssh2 channel EOF\n");

        }
      }
      state(conn, SSH_SCP_WAIT_EOF);
      break;

    case SSH_SCP_WAIT_EOF:
      if(sshc->ssh_channel) {
        rc = libssh2_channel_wait_eof(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc) {



          infof(data, "Failed to get channel EOF: %d\n", rc);
        }
      }
      state(conn, SSH_SCP_WAIT_CLOSE);
      break;

    case SSH_SCP_WAIT_CLOSE:
      if(sshc->ssh_channel) {
        rc = libssh2_channel_wait_closed(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc) {



          infof(data, "Channel failed to close: %d\n", rc);
        }
      }
      state(conn, SSH_SCP_CHANNEL_FREE);
      break;

    case SSH_SCP_CHANNEL_FREE:
      if(sshc->ssh_channel) {
        rc = libssh2_channel_free(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {



          infof(data, "Failed to free libssh2 scp subsystem\n");

        }
        sshc->ssh_channel = NULL;
      }
      DEBUGF(infof(data, "SCP DONE phase complete\n"));
#if 0 /* PREV */
      state(conn, SSH_SESSION_DISCONNECT);
#endif







>
>
>
|
>












>
>
>
|












>
>
>
|












>
>
>
|
>







2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
    case SSH_SCP_SEND_EOF:
      if(sshc->ssh_channel) {
        rc = libssh2_channel_send_eof(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Failed to send libssh2 channel EOF: %d %s\n",
                rc, err_msg);
        }
      }
      state(conn, SSH_SCP_WAIT_EOF);
      break;

    case SSH_SCP_WAIT_EOF:
      if(sshc->ssh_channel) {
        rc = libssh2_channel_wait_eof(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Failed to get channel EOF: %d %s\n", rc, err_msg);
        }
      }
      state(conn, SSH_SCP_WAIT_CLOSE);
      break;

    case SSH_SCP_WAIT_CLOSE:
      if(sshc->ssh_channel) {
        rc = libssh2_channel_wait_closed(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Channel failed to close: %d %s\n", rc, err_msg);
        }
      }
      state(conn, SSH_SCP_CHANNEL_FREE);
      break;

    case SSH_SCP_CHANNEL_FREE:
      if(sshc->ssh_channel) {
        rc = libssh2_channel_free(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Failed to free libssh2 scp subsystem: %d %s\n",
                rc, err_msg);
        }
        sshc->ssh_channel = NULL;
      }
      DEBUGF(infof(data, "SCP DONE phase complete\n"));
#if 0 /* PREV */
      state(conn, SSH_SESSION_DISCONNECT);
#endif
2548
2549
2550
2551
2552
2553
2554



2555

2556
2557
2558
2559
2560
2561
2562
2563
2564
2565



2566

2567
2568
2569
2570
2571
2572
2573
         properly first */
      if(sshc->ssh_channel) {
        rc = libssh2_channel_free(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {



          infof(data, "Failed to free libssh2 scp subsystem\n");

        }
        sshc->ssh_channel = NULL;
      }

      if(sshc->ssh_session) {
        rc = libssh2_session_disconnect(sshc->ssh_session, "Shutdown");
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {



          infof(data, "Failed to disconnect libssh2 session\n");

        }
      }

      Curl_safefree(sshc->homedir);
      conn->data->state.most_recent_ftp_entrypath = NULL;

      state(conn, SSH_SESSION_FREE);







>
>
>
|
>










>
>
>
|
>







2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
         properly first */
      if(sshc->ssh_channel) {
        rc = libssh2_channel_free(sshc->ssh_channel);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Failed to free libssh2 scp subsystem: %d %s\n",
                rc, err_msg);
        }
        sshc->ssh_channel = NULL;
      }

      if(sshc->ssh_session) {
        rc = libssh2_session_disconnect(sshc->ssh_session, "Shutdown");
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Failed to disconnect libssh2 session: %d %s\n",
                rc, err_msg);
        }
      }

      Curl_safefree(sshc->homedir);
      conn->data->state.most_recent_ftp_entrypath = NULL;

      state(conn, SSH_SESSION_FREE);
2584
2585
2586
2587
2588
2589
2590



2591

2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608



2609
2610
2611
2612
2613
2614
2615
2616
#ifdef HAVE_LIBSSH2_AGENT_API
      if(sshc->ssh_agent) {
        rc = libssh2_agent_disconnect(sshc->ssh_agent);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {



          infof(data, "Failed to disconnect from libssh2 agent\n");

        }
        libssh2_agent_free(sshc->ssh_agent);
        sshc->ssh_agent = NULL;

        /* NB: there is no need to free identities, they are part of internal
           agent stuff */
        sshc->sshagent_identity = NULL;
        sshc->sshagent_prev_identity = NULL;
      }
#endif

      if(sshc->ssh_session) {
        rc = libssh2_session_free(sshc->ssh_session);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {



          infof(data, "Failed to free libssh2 session\n");
        }
        sshc->ssh_session = NULL;
      }

      /* worst-case scenario cleanup */

      DEBUGASSERT(sshc->ssh_session == NULL);







>
>
>
|
>

















>
>
>
|







2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
#ifdef HAVE_LIBSSH2_AGENT_API
      if(sshc->ssh_agent) {
        rc = libssh2_agent_disconnect(sshc->ssh_agent);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Failed to disconnect from libssh2 agent: %d %s\n",
                rc, err_msg);
        }
        libssh2_agent_free(sshc->ssh_agent);
        sshc->ssh_agent = NULL;

        /* NB: there is no need to free identities, they are part of internal
           agent stuff */
        sshc->sshagent_identity = NULL;
        sshc->sshagent_prev_identity = NULL;
      }
#endif

      if(sshc->ssh_session) {
        rc = libssh2_session_free(sshc->ssh_session);
        if(rc == LIBSSH2_ERROR_EAGAIN) {
          break;
        }
        if(rc < 0) {
          char *err_msg = NULL;
          (void)libssh2_session_last_error(sshc->ssh_session,
                                           &err_msg, NULL, 0);
          infof(data, "Failed to free libssh2 session: %d %s\n", rc, err_msg);
        }
        sshc->ssh_session = NULL;
      }

      /* worst-case scenario cleanup */

      DEBUGASSERT(sshc->ssh_session == NULL);
Changes to jni/curl/lib/strtoofft.c.
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
                         curl_off_t *num)
{
  char *end;
  curl_off_t number;
  errno = 0;
  *num = 0; /* clear by default */

  DEBUGASSERT(str);

  while(*str && ISSPACE(*str))
    str++;
  if('-' == *str) {
    if(endp)
      *endp = (char *)str; /* didn't actually move */
    return CURL_OFFT_INVAL; /* nothing parsed */
  }







<
<







216
217
218
219
220
221
222


223
224
225
226
227
228
229
                         curl_off_t *num)
{
  char *end;
  curl_off_t number;
  errno = 0;
  *num = 0; /* clear by default */



  while(*str && ISSPACE(*str))
    str++;
  if('-' == *str) {
    if(endp)
      *endp = (char *)str; /* didn't actually move */
    return CURL_OFFT_INVAL; /* nothing parsed */
  }
Changes to jni/curl/lib/telnet.c.
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
            suboption(conn);   /* handle sub-option */
            tn->telrcv_state = CURL_TS_IAC;
            goto process_iac;
          }
          CURL_SB_ACCUM(tn, c);
          tn->telrcv_state = CURL_TS_SB;
        }
        else
        {
          CURL_SB_ACCUM(tn, CURL_IAC);
          CURL_SB_ACCUM(tn, CURL_SE);
          tn->subpointer -= 2;
          CURL_SB_TERM(tn);
          suboption(conn);   /* handle sub-option */
          tn->telrcv_state = CURL_TS_DATA;
        }







|
<







1199
1200
1201
1202
1203
1204
1205
1206

1207
1208
1209
1210
1211
1212
1213
            suboption(conn);   /* handle sub-option */
            tn->telrcv_state = CURL_TS_IAC;
            goto process_iac;
          }
          CURL_SB_ACCUM(tn, c);
          tn->telrcv_state = CURL_TS_SB;
        }
        else {

          CURL_SB_ACCUM(tn, CURL_IAC);
          CURL_SB_ACCUM(tn, CURL_SE);
          tn->subpointer -= 2;
          CURL_SB_TERM(tn);
          suboption(conn);   /* handle sub-option */
          tn->telrcv_state = CURL_TS_DATA;
        }
Changes to jni/curl/lib/tftp.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
  state->sockfd = state->conn->sock[FIRSTSOCKET];
  state->state = TFTP_STATE_START;
  state->error = TFTP_ERR_NONE;
  state->blksize = TFTP_BLKSIZE_DEFAULT;
  state->requested_blksize = blksize;

  ((struct sockaddr *)&state->local_addr)->sa_family =
    (unsigned short)(conn->ip_addr->ai_family);

  tftp_set_timeouts(state);

  if(!conn->bits.bound) {
    /* If not already bound, bind to any interface, random UDP port. If it is
     * reused or a custom local port was desired, this has already been done!
     *







|







1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
  state->sockfd = state->conn->sock[FIRSTSOCKET];
  state->state = TFTP_STATE_START;
  state->error = TFTP_ERR_NONE;
  state->blksize = TFTP_BLKSIZE_DEFAULT;
  state->requested_blksize = blksize;

  ((struct sockaddr *)&state->local_addr)->sa_family =
    (CURL_SA_FAMILY_T)(conn->ip_addr->ai_family);

  tftp_set_timeouts(state);

  if(!conn->bits.bound) {
    /* If not already bound, bind to any interface, random UDP port. If it is
     * reused or a custom local port was desired, this has already been done!
     *
Changes to jni/curl/lib/timeval.c.
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

  usecs = mach_absolute_time();
  usecs *= timebase.numer;
  usecs /= timebase.denom;
  usecs /= 1000;

  cnow.tv_sec = usecs / 1000000;
  cnow.tv_usec = usecs % 1000000;

  return cnow;
}

#elif defined(HAVE_GETTIMEOFDAY)

struct curltime Curl_now(void)
{
  /*
  ** gettimeofday() is not granted to be increased monotonically, due to
  ** clock drifting and external source time synchronization it can jump
  ** forward or backward in time.
  */
  struct timeval now;
  struct curltime ret;
  (void)gettimeofday(&now, NULL);
  ret.tv_sec = now.tv_sec;
  ret.tv_usec = now.tv_usec;
  return ret;
}

#else

struct curltime Curl_now(void)
{







|

















|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

  usecs = mach_absolute_time();
  usecs *= timebase.numer;
  usecs /= timebase.denom;
  usecs /= 1000;

  cnow.tv_sec = usecs / 1000000;
  cnow.tv_usec = (int)(usecs % 1000000);

  return cnow;
}

#elif defined(HAVE_GETTIMEOFDAY)

struct curltime Curl_now(void)
{
  /*
  ** gettimeofday() is not granted to be increased monotonically, due to
  ** clock drifting and external source time synchronization it can jump
  ** forward or backward in time.
  */
  struct timeval now;
  struct curltime ret;
  (void)gettimeofday(&now, NULL);
  ret.tv_sec = now.tv_sec;
  ret.tv_usec = (int)now.tv_usec;
  return ret;
}

#else

struct curltime Curl_now(void)
{
Changes to jni/curl/lib/transfer.c.
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
          }
        }
        /* If it returned OK, we just keep going */
      }
#endif   /* CURL_DISABLE_HTTP */

      /* Account for body content stored in the header buffer */
      if(k->badheader && !k->ignorebody) {
        DEBUGF(infof(data, "Increasing bytecount by %zu from hbuflen\n",
                     k->hbuflen));
        k->bytecount += k->hbuflen;
      }

      if((-1 != k->maxdownload) &&
         (k->bytecount + nread >= k->maxdownload)) {







|







713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
          }
        }
        /* If it returned OK, we just keep going */
      }
#endif   /* CURL_DISABLE_HTTP */

      /* Account for body content stored in the header buffer */
      if((k->badheader == HEADER_PARTHEADER) && !k->ignorebody) {
        DEBUGF(infof(data, "Increasing bytecount by %zu from hbuflen\n",
                     k->hbuflen));
        k->bytecount += k->hbuflen;
      }

      if((-1 != k->maxdownload) &&
         (k->bytecount + nread >= k->maxdownload)) {
1441
1442
1443
1444
1445
1446
1447










1448
1449
1450
1451
1452
1453
1454
    sep = url + strlen(url);

  if(!query)
    query = url + strlen(url);

  return sep < query ? sep : query;
}











/*
 * strlen_url() returns the length of the given URL if the spaces within the
 * URL were properly URL encoded.
 * URL encoding should be skipped for host names, otherwise IDN resolution
 * will fail.
 */







>
>
>
>
>
>
>
>
>
>







1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
    sep = url + strlen(url);

  if(!query)
    query = url + strlen(url);

  return sep < query ? sep : query;
}

/*
 * Decide in an encoding-independent manner whether a character in an
 * URL must be escaped. The same criterion must be used in strlen_url()
 * and strcpy_url().
 */
static bool urlchar_needs_escaping(int c)
{
    return !(ISCNTRL(c) || ISSPACE(c) || ISGRAPH(c));
}

/*
 * strlen_url() returns the length of the given URL if the spaces within the
 * URL were properly URL encoded.
 * URL encoding should be skipped for host names, otherwise IDN resolution
 * will fail.
 */
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
    }

    switch(*ptr) {
    case '?':
      left = FALSE;
      /* fall through */
    default:
      if(*ptr >= 0x80)
        newlen += 2;
      newlen++;
      break;
    case ' ':
      if(left)
        newlen += 3;
      else







|







1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
    }

    switch(*ptr) {
    case '?':
      left = FALSE;
      /* fall through */
    default:
      if(urlchar_needs_escaping(*ptr))
        newlen += 2;
      newlen++;
      break;
    case ' ':
      if(left)
        newlen += 3;
      else
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
    }

    switch(*iptr) {
    case '?':
      left = FALSE;
      /* fall through */
    default:
      if(*iptr >= 0x80) {
        snprintf(optr, 4, "%%%02x", *iptr);
        optr += 3;
      }
      else
        *optr++=*iptr;
      break;
    case ' ':







|







1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
    }

    switch(*iptr) {
    case '?':
      left = FALSE;
      /* fall through */
    default:
      if(urlchar_needs_escaping(*iptr)) {
        snprintf(optr, 4, "%%%02x", *iptr);
        optr += 3;
      }
      else
        *optr++=*iptr;
      break;
    case ' ':
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949













1950
1951
1952
1953
1954
1955
1956
/* Returns CURLE_OK *and* sets '*url' if a request retry is wanted.

   NOTE: that the *url is malloc()ed. */
CURLcode Curl_retry_request(struct connectdata *conn,
                            char **url)
{
  struct Curl_easy *data = conn->data;

  *url = NULL;

  /* if we're talking upload, we can't do the checks below, unless the protocol
     is HTTP as when uploading over HTTP we will still get a response */
  if(data->set.upload &&
     !(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)))
    return CURLE_OK;

  if((data->req.bytecount + data->req.headerbytecount == 0) &&
      conn->bits.reuse &&
      (!data->set.opt_no_body
        || (conn->handler->protocol & PROTO_FAMILY_HTTP)) &&
      (data->set.rtspreq != RTSPREQ_RECEIVE)) {
    /* We got no data, we attempted to re-use a connection. For HTTP this
       can be a retry so we try again regardless if we expected a body.
       For other protocols we only try again only if we expected a body.

       This might happen if the connection was left alive when we were
       done using it before, but that was closed when we wanted to read from
       it again. Bad luck. Retry the same request on a fresh connect! */













    infof(conn->data, "Connection died, retrying a fresh connect\n");
    *url = strdup(conn->data->change.url);
    if(!*url)
      return CURLE_OUT_OF_MEMORY;

    connclose(conn, "retry"); /* close this connection */
    conn->bits.retry = TRUE; /* mark this as a connection we're about







|












|







>
>
>
>
>
>
>
>
>
>
>
>
>







1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
/* Returns CURLE_OK *and* sets '*url' if a request retry is wanted.

   NOTE: that the *url is malloc()ed. */
CURLcode Curl_retry_request(struct connectdata *conn,
                            char **url)
{
  struct Curl_easy *data = conn->data;
  bool retry = FALSE;
  *url = NULL;

  /* if we're talking upload, we can't do the checks below, unless the protocol
     is HTTP as when uploading over HTTP we will still get a response */
  if(data->set.upload &&
     !(conn->handler->protocol&(PROTO_FAMILY_HTTP|CURLPROTO_RTSP)))
    return CURLE_OK;

  if((data->req.bytecount + data->req.headerbytecount == 0) &&
      conn->bits.reuse &&
      (!data->set.opt_no_body
        || (conn->handler->protocol & PROTO_FAMILY_HTTP)) &&
      (data->set.rtspreq != RTSPREQ_RECEIVE))
    /* We got no data, we attempted to re-use a connection. For HTTP this
       can be a retry so we try again regardless if we expected a body.
       For other protocols we only try again only if we expected a body.

       This might happen if the connection was left alive when we were
       done using it before, but that was closed when we wanted to read from
       it again. Bad luck. Retry the same request on a fresh connect! */
    retry = TRUE;
  else if(data->state.refused_stream &&
          (data->req.bytecount + data->req.headerbytecount == 0) ) {
    /* This was sent on a refused stream, safe to rerun. A refused stream
       error can typically only happen on HTTP/2 level if the stream is safe
       to issue again, but the nghttp2 API can deliver the message to other
       streams as well, which is why this adds the check the data counters
       too. */
    infof(conn->data, "REFUSED_STREAM, retrying a fresh connect\n");
    data->state.refused_stream = FALSE; /* clear again */
    retry = TRUE;
  }
  if(retry) {
    infof(conn->data, "Connection died, retrying a fresh connect\n");
    *url = strdup(conn->data->change.url);
    if(!*url)
      return CURLE_OUT_OF_MEMORY;

    connclose(conn, "retry"); /* close this connection */
    conn->bits.retry = TRUE; /* mark this as a connection we're about
1991
1992
1993
1994
1995
1996
1997
1998

1999






2000
2001
2002

2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
  DEBUGASSERT(conn != NULL);

  data = conn->data;
  k = &data->req;

  DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));

  /* now copy all input parameters */

  conn->sockfd = sockindex == -1 ?






      CURL_SOCKET_BAD : conn->sock[sockindex];
  conn->writesockfd = writesockindex == -1 ?
      CURL_SOCKET_BAD:conn->sock[writesockindex];

  k->getheader = getheader;

  k->size = size;
  k->bytecountp = bytecountp;
  k->writebytecountp = writecountp;

  /* The code sequence below is placed in this function just because all
     necessary input is not always known in do_complete() as this function may
     be called after that */

  if(!k->getheader) {
    k->header = FALSE;
    if(size > 0)
      Curl_pgrsSetDownloadSize(data, size);
  }
  /* we want header and/or body, if neither then don't do this! */
  if(k->getheader || !data->set.opt_no_body) {

    if(conn->sockfd != CURL_SOCKET_BAD)
      k->keepon |= KEEP_RECV;

    if(conn->writesockfd != CURL_SOCKET_BAD) {
      struct HTTP *http = data->req.protop;
      /* HTTP 1.1 magic:

         Even if we require a 100-return code before uploading data, we might
         need to write data before that since the REQUEST may not have been
         finished sent off just yet.








|
>
|
>
>
>
>
>
>

|

>


















|


|







2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
  DEBUGASSERT(conn != NULL);

  data = conn->data;
  k = &data->req;

  DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));

  if(conn->bits.multiplex || conn->httpversion == 20) {
    /* when multiplexing, the read/write sockets need to be the same! */
    conn->sockfd = sockindex == -1 ?
      ((writesockindex == -1 ? CURL_SOCKET_BAD : conn->sock[writesockindex])) :
      conn->sock[sockindex];
    conn->writesockfd = conn->sockfd;
  }
  else {
    conn->sockfd = sockindex == -1 ?
      CURL_SOCKET_BAD : conn->sock[sockindex];
    conn->writesockfd = writesockindex == -1 ?
      CURL_SOCKET_BAD:conn->sock[writesockindex];
  }
  k->getheader = getheader;

  k->size = size;
  k->bytecountp = bytecountp;
  k->writebytecountp = writecountp;

  /* The code sequence below is placed in this function just because all
     necessary input is not always known in do_complete() as this function may
     be called after that */

  if(!k->getheader) {
    k->header = FALSE;
    if(size > 0)
      Curl_pgrsSetDownloadSize(data, size);
  }
  /* we want header and/or body, if neither then don't do this! */
  if(k->getheader || !data->set.opt_no_body) {

    if(sockindex != -1)
      k->keepon |= KEEP_RECV;

    if(writesockindex != -1) {
      struct HTTP *http = data->req.protop;
      /* HTTP 1.1 magic:

         Even if we require a 100-return code before uploading data, we might
         need to write data before that since the REQUEST may not have been
         finished sent off just yet.

2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
          /* when we've sent off the rest of the headers, we must await a
             100-continue but first finish sending the request */
          k->exp100 = EXP100_SENDING_REQUEST;

        /* enable the write bit when we're not waiting for continue */
        k->keepon |= KEEP_SEND;
      }
    } /* if(conn->writesockfd != CURL_SOCKET_BAD) */
  } /* if(k->getheader || !data->set.opt_no_body) */

}







|



2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
          /* when we've sent off the rest of the headers, we must await a
             100-continue but first finish sending the request */
          k->exp100 = EXP100_SENDING_REQUEST;

        /* enable the write bit when we're not waiting for continue */
        k->keepon |= KEEP_SEND;
      }
    } /* if(writesockindex != -1) */
  } /* if(k->getheader || !data->set.opt_no_body) */

}
Changes to jni/curl/lib/url.c.
484
485
486
487
488
489
490
491






492
493
494
495
496
497

498
499
500
501
502
503
504
505
506
507
508
509

510
511
512
513
514
515
516
  /*
   * disallow unprotected protection negotiation NEC reference implementation
   * seem not to follow rfc1961 section 4.3/4.4
   */
  set->socks5_gssapi_nec = FALSE;
#endif

  /* This is our preferred CA cert bundle/path since install time */






#if defined(CURL_CA_BUNDLE)
  result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_ORIG], CURL_CA_BUNDLE);
  if(result)
    return result;

  result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY], CURL_CA_BUNDLE);

  if(result)
    return result;
#endif
#if defined(CURL_CA_PATH)
  result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_ORIG], CURL_CA_PATH);
  if(result)
    return result;

  result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY], CURL_CA_PATH);
  if(result)
    return result;
#endif


  set->wildcard_enabled = FALSE;
  set->chunk_bgn      = ZERO_NULL;
  set->chunk_end      = ZERO_NULL;

  /* tcp keepalives are disabled by default, but provide reasonable values for
   * the interval and idle times.







|
>
>
>
>
>
>

|
|
|

|
>
|
|


|
|
|

|
|
|

>







484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
  /*
   * disallow unprotected protection negotiation NEC reference implementation
   * seem not to follow rfc1961 section 4.3/4.4
   */
  set->socks5_gssapi_nec = FALSE;
#endif

  /* Set the default CA cert bundle/path detected/specified at build time.
   *
   * If Schannel (WinSSL) is the selected SSL backend then these locations
   * are ignored. We allow setting CA location for schannel only when
   * explicitly specified by the user via CURLOPT_CAINFO / --cacert.
   */
  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
#if defined(CURL_CA_BUNDLE)
    result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_ORIG], CURL_CA_BUNDLE);
    if(result)
      return result;

    result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY],
                            CURL_CA_BUNDLE);
    if(result)
      return result;
#endif
#if defined(CURL_CA_PATH)
    result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_ORIG], CURL_CA_PATH);
    if(result)
      return result;

    result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY], CURL_CA_PATH);
    if(result)
      return result;
#endif
  }

  set->wildcard_enabled = FALSE;
  set->chunk_bgn      = ZERO_NULL;
  set->chunk_end      = ZERO_NULL;

  /* tcp keepalives are disabled by default, but provide reasonable values for
   * the interval and idle times.
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
      rc = sscanf(data->change.url, "%[^\n]", path);

    if(rc != 1) {
      failf(data, "Bad URL");
      return CURLE_URL_MALFORMAT;
    }

    if(url_has_scheme && path[0] == '/' && path[1] == '/' &&
       path[2] == '/' && path[3] == '/') {
      /* This appears to be a UNC string (usually indicating a SMB share).
       * We don't do SMB in file: URLs. (TODO?)
       */
      failf(data, "SMB shares are not supported in file: URLs.");
      return CURLE_URL_MALFORMAT;
    }

    /* Extra handling URLs with an authority component (i.e. that start with
     * "file://")
     *
     * We allow omitted hostname (e.g. file:/<path>) -- valid according to
     * RFC 8089, but not the (current) WHAT-WG URL spec.
     */
    if(url_has_scheme && path[0] == '/' && path[1] == '/') {







<
<
<
<
<
<
<
<
<







2071
2072
2073
2074
2075
2076
2077









2078
2079
2080
2081
2082
2083
2084
      rc = sscanf(data->change.url, "%[^\n]", path);

    if(rc != 1) {
      failf(data, "Bad URL");
      return CURLE_URL_MALFORMAT;
    }










    /* Extra handling URLs with an authority component (i.e. that start with
     * "file://")
     *
     * We allow omitted hostname (e.g. file:/<path>) -- valid according to
     * RFC 8089, but not the (current) WHAT-WG URL spec.
     */
    if(url_has_scheme && path[0] == '/' && path[1] == '/') {
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
          failf(data, "Invalid file://hostname/, "
                      "expected localhost or 127.0.0.1 or none");
          return CURLE_URL_MALFORMAT;
        }
        ptr += 9; /* now points to the slash after the host */
      }

      /*
       * RFC 8089, Appendix D, Section D.1, says:
       *
       * > In a POSIX file system, the root of the file system is represented
       * > as a directory with a zero-length name, usually written as "/"; the
       * > presence of this root in a file URI can be taken as given by the
       * > initial slash in the "path-absolute" rule.
       *
       * i.e. the first slash is part of the path.
       *
       * However in RFC 1738 the "/" between the host (or port) and the
       * URL-path was NOT part of the URL-path.  Any agent that followed the
       * older spec strictly, and wanted to refer to a file with an absolute
       * path, would have included a second slash.  So if there are two
       * slashes, swallow one.
       */
      if('/' == ptr[1]) /* note: the only way ptr[0]!='/' is if ptr[1]==':' */
        ptr++;

      /* This cannot be done with strcpy, as the memory chunks overlap! */
      memmove(path, ptr, strlen(ptr) + 1);
    }

#if !defined(MSDOS) && !defined(WIN32) && !defined(__CYGWIN__)
    /* Don't allow Windows drive letters when not in Windows.
     * This catches both "file:/c:" and "file:c:" */







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







2109
2110
2111
2112
2113
2114
2115



















2116
2117
2118
2119
2120
2121
2122
          failf(data, "Invalid file://hostname/, "
                      "expected localhost or 127.0.0.1 or none");
          return CURLE_URL_MALFORMAT;
        }
        ptr += 9; /* now points to the slash after the host */
      }




















      /* This cannot be done with strcpy, as the memory chunks overlap! */
      memmove(path, ptr, strlen(ptr) + 1);
    }

#if !defined(MSDOS) && !defined(WIN32) && !defined(__CYGWIN__)
    /* Don't allow Windows drive letters when not in Windows.
     * This catches both "file:/c:" and "file:c:" */
2686
2687
2688
2689
2690
2691
2692

2693
2694

2695

2696
2697

2698
2699



2700
2701
2702
2703
2704
2705
2706
   */
  if(!prox && !strcasecompare("http_proxy", proxy_env)) {
    /* There was no lowercase variable, try the uppercase version: */
    Curl_strntoupper(proxy_env, proxy_env, sizeof(proxy_env));
    prox = curl_getenv(proxy_env);
  }


  if(prox)
    proxy = prox; /* use this */

  else {

    proxy = curl_getenv("all_proxy"); /* default proxy to use */
    if(!proxy)

      proxy = curl_getenv("ALL_PROXY");
  }




  return proxy;
}
#endif /* CURL_DISABLE_HTTP */

/*
 * If this is supposed to use a proxy, we need to figure out the proxy







>
|

>

>
|
|
>
|
|
>
>
>







2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
   */
  if(!prox && !strcasecompare("http_proxy", proxy_env)) {
    /* There was no lowercase variable, try the uppercase version: */
    Curl_strntoupper(proxy_env, proxy_env, sizeof(proxy_env));
    prox = curl_getenv(proxy_env);
  }

  envp = proxy_env;
  if(prox) {
    proxy = prox; /* use this */
  }
  else {
    envp = (char *)"all_proxy";
    proxy = curl_getenv(envp); /* default proxy to use */
    if(!proxy) {
      envp = (char *)"ALL_PROXY";
      proxy = curl_getenv(envp);
    }
  }
  if(proxy)
    infof(conn->data, "Uses proxy env variable %s == '%s'\n", envp, proxy);

  return proxy;
}
#endif /* CURL_DISABLE_HTTP */

/*
 * If this is supposed to use a proxy, we need to figure out the proxy
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
      return CURLE_COULDNT_CONNECT;
    }
  }
  else
    proxyptr = proxy; /* No xxx:// head: It's a HTTP proxy */

#ifdef USE_SSL
  if(!Curl_ssl->support_https_proxy)
#endif
    if(proxytype == CURLPROXY_HTTPS) {
      failf(data, "Unsupported proxy \'%s\', libcurl is built without the "
                  "HTTPS-proxy support.", proxy);
      return CURLE_NOT_BUILT_IN;
    }








|







2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
      return CURLE_COULDNT_CONNECT;
    }
  }
  else
    proxyptr = proxy; /* No xxx:// head: It's a HTTP proxy */

#ifdef USE_SSL
  if(!(Curl_ssl->supports & SSLSUPP_HTTPS_PROXY))
#endif
    if(proxytype == CURLPROXY_HTTPS) {
      failf(data, "Unsupported proxy \'%s\', libcurl is built without the "
                  "HTTPS-proxy support.", proxy);
      return CURLE_NOT_BUILT_IN;
    }

2977
2978
2979
2980
2981
2982
2983

2984
2985

2986




2987
2988
2989
2990
2991
2992
2993
      failf(data, "memory shortage");
      result = CURLE_OUT_OF_MEMORY;
      goto out;
    }
  }

  if(!data->set.str[STRING_NOPROXY]) {

    no_proxy = curl_getenv("no_proxy");
    if(!no_proxy)

      no_proxy = curl_getenv("NO_PROXY");




  }

  if(check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY] ?
      data->set.str[STRING_NOPROXY] : no_proxy)) {
    Curl_safefree(proxy);
    Curl_safefree(socksproxy);
  }







>
|
|
>
|
>
>
>
>







2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
      failf(data, "memory shortage");
      result = CURLE_OUT_OF_MEMORY;
      goto out;
    }
  }

  if(!data->set.str[STRING_NOPROXY]) {
    const char *p = "no_proxy";
    no_proxy = curl_getenv(p);
    if(!no_proxy) {
      p = "NO_PROXY";
      no_proxy = curl_getenv(p);
    }
    if(no_proxy) {
      infof(conn->data, "Uses proxy env variable %s == '%s'\n", p, no_proxy);
    }
  }

  if(check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY] ?
      data->set.str[STRING_NOPROXY] : no_proxy)) {
    Curl_safefree(proxy);
    Curl_safefree(socksproxy);
  }
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
                 (data->set.ftp_list_only?'D':'I'));

      /*
       * This synthesized URL isn't always right--suffixes like ;type=A are
       * stripped off. It would be better to work directly from the original
       * URL and simply replace the port part of it.
       */
      url = aprintf("%s://%s%s%s:%hu%s%s%s", conn->given->scheme,
                    conn->bits.ipv6_ip?"[":"", conn->host.name,
                    conn->bits.ipv6_ip?"]":"", conn->remote_port,
                    data->state.slash_removed?"/":"", data->state.path,
                    type);
      if(!url)
        return CURLE_OUT_OF_MEMORY;








|







3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
                 (data->set.ftp_list_only?'D':'I'));

      /*
       * This synthesized URL isn't always right--suffixes like ;type=A are
       * stripped off. It would be better to work directly from the original
       * URL and simply replace the port part of it.
       */
      url = aprintf("%s://%s%s%s:%d%s%s%s", conn->given->scheme,
                    conn->bits.ipv6_ip?"[":"", conn->host.name,
                    conn->bits.ipv6_ip?"]":"", conn->remote_port,
                    data->state.slash_removed?"/":"", data->state.path,
                    type);
      if(!url)
        return CURLE_OUT_OF_MEMORY;

Changes to jni/curl/lib/urldata.h.
94
95
96
97
98
99
100














101
102
103
104
105
106
107
#include <curl/curl.h>

#include "http_chunks.h" /* for the structs and enum stuff */
#include "hostip.h"
#include "hash.h"
#include "splay.h"















#include "mime.h"
#include "imap.h"
#include "pop3.h"
#include "smtp.h"
#include "ftp.h"
#include "file.h"
#include "ssh.h"







>
>
>
>
>
>
>
>
>
>
>
>
>
>







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#include <curl/curl.h>

#include "http_chunks.h" /* for the structs and enum stuff */
#include "hostip.h"
#include "hash.h"
#include "splay.h"

/* return the count of bytes sent, or -1 on error */
typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */
                            int sockindex,            /* socketindex */
                            const void *buf,          /* data to write */
                            size_t len,               /* max amount to write */
                            CURLcode *err);           /* error to return */

/* return the count of bytes read, or -1 on error */
typedef ssize_t (Curl_recv)(struct connectdata *conn, /* connection data */
                            int sockindex,            /* socketindex */
                            char *buf,                /* store data here */
                            size_t len,               /* max amount to read */
                            CURLcode *err);           /* error to return */

#include "mime.h"
#include "imap.h"
#include "pop3.h"
#include "smtp.h"
#include "ftp.h"
#include "file.h"
#include "ssh.h"
324
325
326
327
328
329
330

331
332
333
334
335
336
337
  CtxtHandle *context;
  SEC_WINNT_AUTH_IDENTITY identity;
  SEC_WINNT_AUTH_IDENTITY *p_identity;
  size_t token_max;
  BYTE *output_token;
  BYTE *input_token;
  size_t input_token_len;

#else
  unsigned int flags;
  unsigned char nonce[8];
  void *target_info; /* TargetInfo received in the ntlm type-2 message */
  unsigned int target_info_len;
#endif
};







>







338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
  CtxtHandle *context;
  SEC_WINNT_AUTH_IDENTITY identity;
  SEC_WINNT_AUTH_IDENTITY *p_identity;
  size_t token_max;
  BYTE *output_token;
  BYTE *input_token;
  size_t input_token_len;
  TCHAR *spn;
#else
  unsigned int flags;
  unsigned char nonce[8];
  void *target_info; /* TargetInfo received in the ntlm type-2 message */
  unsigned int target_info_len;
#endif
};
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726

#define CONNCHECK_NONE 0                 /* No checks */
#define CONNCHECK_ISDEAD (1<<0)          /* Check if the connection is dead. */

#define CONNRESULT_NONE 0                /* No extra information. */
#define CONNRESULT_DEAD (1<<0)           /* The connection is dead. */

/* return the count of bytes sent, or -1 on error */
typedef ssize_t (Curl_send)(struct connectdata *conn, /* connection data */
                            int sockindex,            /* socketindex */
                            const void *buf,          /* data to write */
                            size_t len,               /* max amount to write */
                            CURLcode *err);           /* error to return */

/* return the count of bytes read, or -1 on error */
typedef ssize_t (Curl_recv)(struct connectdata *conn, /* connection data */
                            int sockindex,            /* socketindex */
                            char *buf,                /* store data here */
                            size_t len,               /* max amount to read */
                            CURLcode *err);           /* error to return */

#ifdef USE_RECV_BEFORE_SEND_WORKAROUND
struct postponed_data {
  char *buffer;          /* Temporal store for received data during
                            sending, must be freed */
  size_t allocated_size; /* Size of temporal store */
  size_t recv_size;      /* Size of received data during sending */
  size_t recv_processed; /* Size of processed part of postponed data */







<
<
<
<
<
<
<
<
<
<
<
<
<
<







714
715
716
717
718
719
720














721
722
723
724
725
726
727

#define CONNCHECK_NONE 0                 /* No checks */
#define CONNCHECK_ISDEAD (1<<0)          /* Check if the connection is dead. */

#define CONNRESULT_NONE 0                /* No extra information. */
#define CONNRESULT_DEAD (1<<0)           /* The connection is dead. */















#ifdef USE_RECV_BEFORE_SEND_WORKAROUND
struct postponed_data {
  char *buffer;          /* Temporal store for received data during
                            sending, must be freed */
  size_t allocated_size; /* Size of temporal store */
  size_t recv_size;      /* Size of received data during sending */
  size_t recv_processed; /* Size of processed part of postponed data */
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
  /**** curl_get() phase fields */

  curl_socket_t sockfd;   /* socket to read from or CURL_SOCKET_BAD */
  curl_socket_t writesockfd; /* socket to write to, it may very
                                well be the same we read from.
                                CURL_SOCKET_BAD disables */

  /** Dynamicly allocated strings, MUST be freed before this **/
  /** struct is killed.                                      **/
  struct dynamically_allocated_data {
    char *proxyuserpwd;
    char *uagent;
    char *accept_encoding;
    char *userpwd;
    char *rangeline;







|







892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
  /**** curl_get() phase fields */

  curl_socket_t sockfd;   /* socket to read from or CURL_SOCKET_BAD */
  curl_socket_t writesockfd; /* socket to write to, it may very
                                well be the same we read from.
                                CURL_SOCKET_BAD disables */

  /** Dynamically allocated strings, MUST be freed before this **/
  /** struct is killed.                                      **/
  struct dynamically_allocated_data {
    char *proxyuserpwd;
    char *uagent;
    char *accept_encoding;
    char *userpwd;
    char *rangeline;
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
  size_t headersize;   /* size of the allocation */

  char *buffer; /* download buffer */
  char uploadbuffer[UPLOAD_BUFSIZE + 1]; /* upload buffer */
  curl_off_t current_speed;  /* the ProgressShow() function sets this,
                                bytes / second */
  bool this_is_a_follow; /* this is a followed Location: request */

  char *first_host; /* host name of the first (not followed) request.
                       if set, this should be the host name that we will
                       sent authorization to, no else. Used to make Location:
                       following not keep sending user+password... This is
                       strdup() data.
                    */
  int first_remote_port; /* remote port of the first (not followed) request */







|







1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
  size_t headersize;   /* size of the allocation */

  char *buffer; /* download buffer */
  char uploadbuffer[UPLOAD_BUFSIZE + 1]; /* upload buffer */
  curl_off_t current_speed;  /* the ProgressShow() function sets this,
                                bytes / second */
  bool this_is_a_follow; /* this is a followed Location: request */
  bool refused_stream; /* this was refused, try again */
  char *first_host; /* host name of the first (not followed) request.
                       if set, this should be the host name that we will
                       sent authorization to, no else. Used to make Location:
                       following not keep sending user+password... This is
                       strdup() data.
                    */
  int first_remote_port; /* remote port of the first (not followed) request */
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
  STRING_RTSP_TRANSPORT,  /* Transport for this session */
#if defined(USE_LIBSSH2) || defined(USE_LIBSSH)
  STRING_SSH_PRIVATE_KEY, /* path to the private key file for auth */
  STRING_SSH_PUBLIC_KEY,  /* path to the public key file for auth */
  STRING_SSH_HOST_PUBLIC_KEY_MD5, /* md5 of host public key in ascii hex */
  STRING_SSH_KNOWNHOSTS,  /* file name of knownhosts file */
#endif
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  STRING_PROXY_SERVICE_NAME, /* Proxy service name */
#endif
#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \
  defined(USE_SPNEGO) || defined(HAVE_GSSAPI)
  STRING_SERVICE_NAME,    /* Service name */
#endif
  STRING_MAIL_FROM,
  STRING_MAIL_AUTH,

#ifdef USE_TLS_SRP
  STRING_TLSAUTH_USERNAME_ORIG,  /* TLS auth <username> */
  STRING_TLSAUTH_USERNAME_PROXY, /* TLS auth <username> */
  STRING_TLSAUTH_PASSWORD_ORIG,  /* TLS auth <password> */







<

<
<
<

<







1419
1420
1421
1422
1423
1424
1425

1426



1427

1428
1429
1430
1431
1432
1433
1434
  STRING_RTSP_TRANSPORT,  /* Transport for this session */
#if defined(USE_LIBSSH2) || defined(USE_LIBSSH)
  STRING_SSH_PRIVATE_KEY, /* path to the private key file for auth */
  STRING_SSH_PUBLIC_KEY,  /* path to the public key file for auth */
  STRING_SSH_HOST_PUBLIC_KEY_MD5, /* md5 of host public key in ascii hex */
  STRING_SSH_KNOWNHOSTS,  /* file name of knownhosts file */
#endif

  STRING_PROXY_SERVICE_NAME, /* Proxy service name */



  STRING_SERVICE_NAME,    /* Service name */

  STRING_MAIL_FROM,
  STRING_MAIL_AUTH,

#ifdef USE_TLS_SRP
  STRING_TLSAUTH_USERNAME_ORIG,  /* TLS auth <username> */
  STRING_TLSAUTH_USERNAME_PROXY, /* TLS auth <username> */
  STRING_TLSAUTH_PASSWORD_ORIG,  /* TLS auth <password> */
1670
1671
1672
1673
1674
1675
1676


1677
1678
1679


1680
1681
1682
1683
1684
1685
1686
  bool path_as_is;      /* allow dotdots? */
  bool pipewait;        /* wait for pipe/multiplex status before starting a
                           new connection */
  long expect_100_timeout; /* in milliseconds */
  bool suppress_connect_headers;  /* suppress proxy CONNECT response headers
                                     from user callbacks */



  struct Curl_easy *stream_depends_on;
  bool stream_depends_e; /* set or don't set the Exclusive bit */
  int stream_weight;



  struct Curl_http2_dep *stream_dependents;

  bool abstract_unix_socket;

  curl_resolver_start_callback resolver_start; /* optional callback called
                                                  before resolver start */







>
>



>
>







1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
  bool path_as_is;      /* allow dotdots? */
  bool pipewait;        /* wait for pipe/multiplex status before starting a
                           new connection */
  long expect_100_timeout; /* in milliseconds */
  bool suppress_connect_headers;  /* suppress proxy CONNECT response headers
                                     from user callbacks */

  bool dns_shuffle_addresses; /* whether to shuffle addresses before use */

  struct Curl_easy *stream_depends_on;
  bool stream_depends_e; /* set or don't set the Exclusive bit */
  int stream_weight;

  bool haproxyprotocol; /* whether to send HAProxy PROXY protocol header */

  struct Curl_http2_dep *stream_dependents;

  bool abstract_unix_socket;

  curl_resolver_start_callback resolver_start; /* optional callback called
                                                  before resolver start */
Changes to jni/curl/lib/vauth/cleartext.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
  size_t plainlen;

  *outlen = 0;
  *outptr = NULL;
  ulen = strlen(userp);
  plen = strlen(passwdp);

  /* Compute binary message length, checking for overflows. */
  plainlen = 2 * ulen;
  if(plainlen < ulen)
    return CURLE_OUT_OF_MEMORY;
  plainlen += plen;
  if(plainlen < plen)
    return CURLE_OUT_OF_MEMORY;
  plainlen += 2;
  if(plainlen < 2)
    return CURLE_OUT_OF_MEMORY;

  plainauth = malloc(plainlen);
  if(!plainauth)
    return CURLE_OUT_OF_MEMORY;

  /* Calculate the reply */
  memcpy(plainauth, userp, ulen);







|
<
|

<
<
<
|
<
<







69
70
71
72
73
74
75
76

77
78



79


80
81
82
83
84
85
86
  size_t plainlen;

  *outlen = 0;
  *outptr = NULL;
  ulen = strlen(userp);
  plen = strlen(passwdp);

  /* Compute binary message length. Check for overflows. */

  if((ulen > SIZE_T_MAX/2) || (plen > (SIZE_T_MAX/2 - 2)))
    return CURLE_OUT_OF_MEMORY;



  plainlen = 2 * ulen + plen + 2;



  plainauth = malloc(plainlen);
  if(!plainauth)
    return CURLE_OUT_OF_MEMORY;

  /* Calculate the reply */
  memcpy(plainauth, userp, ulen);
Changes to jni/curl/lib/vauth/krb5_sspi.c.
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
    /* Allocate our response buffer */
    krb5->output_token = malloc(krb5->token_max);
    if(!krb5->output_token)
      return CURLE_OUT_OF_MEMORY;
  }

  if(!krb5->credentials) {
    /* Do we have credientials to use or are we using single sign-on? */
    if(userp && *userp) {
      /* Populate our identity structure */
      result = Curl_create_sspi_identity(userp, passwdp, &krb5->identity);
      if(result)
        return result;

      /* Allow proper cleanup of the identity structure */
      krb5->p_identity = &krb5->identity;
    }
    else
      /* Use the current Windows user */
      krb5->p_identity = NULL;

    /* Allocate our credentials handle */
    krb5->credentials = malloc(sizeof(CredHandle));
    if(!krb5->credentials)
      return CURLE_OUT_OF_MEMORY;

    memset(krb5->credentials, 0, sizeof(CredHandle));

    /* Acquire our credentials handle */
    status = s_pSecFn->AcquireCredentialsHandle(NULL,
                                                (TCHAR *)
                                                TEXT(SP_NAME_KERBEROS),
                                                SECPKG_CRED_OUTBOUND, NULL,
                                                krb5->p_identity, NULL, NULL,
                                                krb5->credentials, &expiry);
    if(status != SEC_E_OK)
      return CURLE_LOGIN_DENIED;

    /* Allocate our new context handle */
    krb5->context = malloc(sizeof(CtxtHandle));
    if(!krb5->context)
      return CURLE_OUT_OF_MEMORY;

    memset(krb5->context, 0, sizeof(CtxtHandle));
  }

  if(chlg64 && *chlg64) {
    /* Decode the base-64 encoded challenge message */
    if(*chlg64 != '=') {
      result = Curl_base64_decode(chlg64, &chlg, &chlglen);
      if(result)







|














|



<
<











|


<
<







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156


157
158
159
160
161
162
163
164
165
166
167
168
169
170


171
172
173
174
175
176
177
    /* Allocate our response buffer */
    krb5->output_token = malloc(krb5->token_max);
    if(!krb5->output_token)
      return CURLE_OUT_OF_MEMORY;
  }

  if(!krb5->credentials) {
    /* Do we have credentials to use or are we using single sign-on? */
    if(userp && *userp) {
      /* Populate our identity structure */
      result = Curl_create_sspi_identity(userp, passwdp, &krb5->identity);
      if(result)
        return result;

      /* Allow proper cleanup of the identity structure */
      krb5->p_identity = &krb5->identity;
    }
    else
      /* Use the current Windows user */
      krb5->p_identity = NULL;

    /* Allocate our credentials handle */
    krb5->credentials = calloc(1, sizeof(CredHandle));
    if(!krb5->credentials)
      return CURLE_OUT_OF_MEMORY;



    /* Acquire our credentials handle */
    status = s_pSecFn->AcquireCredentialsHandle(NULL,
                                                (TCHAR *)
                                                TEXT(SP_NAME_KERBEROS),
                                                SECPKG_CRED_OUTBOUND, NULL,
                                                krb5->p_identity, NULL, NULL,
                                                krb5->credentials, &expiry);
    if(status != SEC_E_OK)
      return CURLE_LOGIN_DENIED;

    /* Allocate our new context handle */
    krb5->context = calloc(1, sizeof(CtxtHandle));
    if(!krb5->context)
      return CURLE_OUT_OF_MEMORY;


  }

  if(chlg64 && *chlg64) {
    /* Decode the base-64 encoded challenge message */
    if(*chlg64 != '=') {
      result = Curl_base64_decode(chlg64, &chlg, &chlglen);
      if(result)
Changes to jni/curl/lib/vauth/ntlm.c.
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"

/* "NTLMSSP" signature is always in ASCII regardless of the platform */
#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"

#define SHORTPAIR(x) ((x) & 0xff), (((x) >> 8) & 0xff)
#define LONGQUARTET(x) ((x) & 0xff), (((x) >> 8) & 0xff), \
  (((x) >> 16) & 0xff), (((x) >> 24) & 0xff)

#if DEBUG_ME
# define DEBUG_OUT(x) x
static void ntlm_print_flags(FILE *handle, unsigned long flags)
{
  if(flags & NTLMFLAG_NEGOTIATE_UNICODE)
    fprintf(handle, "NTLMFLAG_NEGOTIATE_UNICODE ");







|
|
|







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* The last #include files should be: */
#include "curl_memory.h"
#include "memdebug.h"

/* "NTLMSSP" signature is always in ASCII regardless of the platform */
#define NTLMSSP_SIGNATURE "\x4e\x54\x4c\x4d\x53\x53\x50"

#define SHORTPAIR(x) ((int)((x) & 0xff)), ((int)(((x) >> 8) & 0xff))
#define LONGQUARTET(x) ((int)((x) & 0xff)), ((int)(((x) >> 8) & 0xff)), \
  ((int)(((x) >> 16) & 0xff)), ((int)(((x) >> 24) & 0xff))

#if DEBUG_ME
# define DEBUG_OUT(x) x
static void ntlm_print_flags(FILE *handle, unsigned long flags)
{
  if(flags & NTLMFLAG_NEGOTIATE_UNICODE)
    fprintf(handle, "NTLMFLAG_NEGOTIATE_UNICODE ");
351
352
353
354
355
356
357


358
359
360
361
362
363
364
365
366
367


368
369
370
371
372
373
374
 * sending to the recipient using the appropriate compile time crypto API.
 *
 * Parameters:
 *
 * data    [in]     - The session handle.
 * userp   [in]     - The user name in the format User or Domain\User.
 * passdwp [in]     - The user's password.


 * ntlm    [in/out] - The NTLM data struct being used and modified.
 * outptr  [in/out] - The address where a pointer to newly allocated memory
 *                    holding the result will be stored upon completion.
 * outlen  [out]    - The length of the output message.
 *
 * Returns CURLE_OK on success.
 */
CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
                                             const char *userp,
                                             const char *passwdp,


                                             struct ntlmdata *ntlm,
                                             char **outptr, size_t *outlen)
{
  /* NTLM type-1 message structure:

       Index  Description            Content
         0    NTLMSSP Signature      Null-terminated ASCII "NTLMSSP"







>
>










>
>







351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
 * sending to the recipient using the appropriate compile time crypto API.
 *
 * Parameters:
 *
 * data    [in]     - The session handle.
 * userp   [in]     - The user name in the format User or Domain\User.
 * passdwp [in]     - The user's password.
 * service [in]     - The service type such as http, smtp, pop or imap.
 * host    [in]     - The host name.
 * ntlm    [in/out] - The NTLM data struct being used and modified.
 * outptr  [in/out] - The address where a pointer to newly allocated memory
 *                    holding the result will be stored upon completion.
 * outlen  [out]    - The length of the output message.
 *
 * Returns CURLE_OK on success.
 */
CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
                                             const char *userp,
                                             const char *passwdp,
                                             const char *service,
                                             const char *hostname,
                                             struct ntlmdata *ntlm,
                                             char **outptr, size_t *outlen)
{
  /* NTLM type-1 message structure:

       Index  Description            Content
         0    NTLMSSP Signature      Null-terminated ASCII "NTLMSSP"
390
391
392
393
394
395
396


397
398
399
400
401
402
403
  size_t hostlen = 0;
  size_t domlen = 0;
  size_t hostoff = 0;
  size_t domoff = hostoff + hostlen;  /* This is 0: remember that host and
                                         domain are empty */
  (void)userp;
  (void)passwdp;



  /* Clean up any former leftovers and initialise to defaults */
  Curl_auth_ntlm_cleanup(ntlm);

#if defined(USE_NTRESPONSES) && defined(USE_NTLM2SESSION)
#define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY
#else







>
>







394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
  size_t hostlen = 0;
  size_t domlen = 0;
  size_t hostoff = 0;
  size_t domoff = hostoff + hostlen;  /* This is 0: remember that host and
                                         domain are empty */
  (void)userp;
  (void)passwdp;
  (void)service,
  (void)hostname,

  /* Clean up any former leftovers and initialise to defaults */
  Curl_auth_ntlm_cleanup(ntlm);

#if defined(USE_NTRESPONSES) && defined(USE_NTLM2SESSION)
#define NTLM2FLAG NTLMFLAG_NEGOTIATE_NTLM2_KEY
#else
Changes to jni/curl/lib/vauth/ntlm.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_NTLM_H
#define HEADER_CURL_NTLM_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
|
|







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_VAUTH_NTLM_H
#define HEADER_VAUTH_NTLM_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
136
137
138
139
140
141
142
143
#define NTLMFLAG_NEGOTIATE_56                    (1<<31)
/* Indicates that 56-bit encryption is supported. */

#endif /* BUILDING_CURL_NTLM_MSGS_C */

#endif /* USE_NTLM */

#endif /* HEADER_CURL_NTLM_H */







|
136
137
138
139
140
141
142
143
#define NTLMFLAG_NEGOTIATE_56                    (1<<31)
/* Indicates that 56-bit encryption is supported. */

#endif /* BUILDING_CURL_NTLM_MSGS_C */

#endif /* USE_NTLM */

#endif /* HEADER_VAUTH_NTLM_H */
Changes to jni/curl/lib/vauth/ntlm_sspi.c.
66
67
68
69
70
71
72


73
74
75
76
77
78
79
80
81
82


83
84
85
86
87
88
89
 * sending to the recipient.
 *
 * Parameters:
 *
 * data    [in]     - The session handle.
 * userp   [in]     - The user name in the format User or Domain\User.
 * passdwp [in]     - The user's password.


 * ntlm    [in/out] - The NTLM data struct being used and modified.
 * outptr  [in/out] - The address where a pointer to newly allocated memory
 *                    holding the result will be stored upon completion.
 * outlen  [out]    - The length of the output message.
 *
 * Returns CURLE_OK on success.
 */
CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
                                             const char *userp,
                                             const char *passwdp,


                                             struct ntlmdata *ntlm,
                                             char **outptr, size_t *outlen)
{
  PSecPkgInfo SecurityPackage;
  SecBuffer type_1_buf;
  SecBufferDesc type_1_desc;
  SECURITY_STATUS status;







>
>










>
>







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
 * sending to the recipient.
 *
 * Parameters:
 *
 * data    [in]     - The session handle.
 * userp   [in]     - The user name in the format User or Domain\User.
 * passdwp [in]     - The user's password.
 * service [in]     - The service type such as http, smtp, pop or imap.
 * host    [in]     - The host name.
 * ntlm    [in/out] - The NTLM data struct being used and modified.
 * outptr  [in/out] - The address where a pointer to newly allocated memory
 *                    holding the result will be stored upon completion.
 * outlen  [out]    - The length of the output message.
 *
 * Returns CURLE_OK on success.
 */
CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
                                             const char *userp,
                                             const char *passwdp,
                                             const char *service,
                                             const char *host,
                                             struct ntlmdata *ntlm,
                                             char **outptr, size_t *outlen)
{
  PSecPkgInfo SecurityPackage;
  SecBuffer type_1_buf;
  SecBufferDesc type_1_desc;
  SECURITY_STATUS status;
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147

148

149
150
151
152
153
154
155
156
157
158
159
160

161
162
163
164
165
166
167
    ntlm->p_identity = &ntlm->identity;
  }
  else
    /* Use the current Windows user */
    ntlm->p_identity = NULL;

  /* Allocate our credentials handle */
  ntlm->credentials = malloc(sizeof(CredHandle));
  if(!ntlm->credentials)
    return CURLE_OUT_OF_MEMORY;

  memset(ntlm->credentials, 0, sizeof(CredHandle));

  /* Acquire our credentials handle */
  status = s_pSecFn->AcquireCredentialsHandle(NULL,
                                              (TCHAR *) TEXT(SP_NAME_NTLM),
                                              SECPKG_CRED_OUTBOUND, NULL,
                                              ntlm->p_identity, NULL, NULL,
                                              ntlm->credentials, &expiry);
  if(status != SEC_E_OK)
    return CURLE_LOGIN_DENIED;

  /* Allocate our new context handle */
  ntlm->context = malloc(sizeof(CtxtHandle));
  if(!ntlm->context)
    return CURLE_OUT_OF_MEMORY;


  memset(ntlm->context, 0, sizeof(CtxtHandle));


  /* Setup the type-1 "output" security buffer */
  type_1_desc.ulVersion = SECBUFFER_VERSION;
  type_1_desc.cBuffers  = 1;
  type_1_desc.pBuffers  = &type_1_buf;
  type_1_buf.BufferType = SECBUFFER_TOKEN;
  type_1_buf.pvBuffer   = ntlm->output_token;
  type_1_buf.cbBuffer   = curlx_uztoul(ntlm->token_max);

  /* Generate our type-1 message */
  status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, NULL,
                                               (TCHAR *) TEXT(""),

                                               0, 0, SECURITY_NETWORK_DREP,
                                               NULL, 0,
                                               ntlm->context, &type_1_desc,
                                               &attrs, &expiry);
  if(status == SEC_I_COMPLETE_NEEDED ||
    status == SEC_I_COMPLETE_AND_CONTINUE)
    s_pSecFn->CompleteAuthToken(ntlm->context, &type_1_desc);







|



<
<










|



>
|
>











<
>







125
126
127
128
129
130
131
132
133
134
135


136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

164
165
166
167
168
169
170
171
    ntlm->p_identity = &ntlm->identity;
  }
  else
    /* Use the current Windows user */
    ntlm->p_identity = NULL;

  /* Allocate our credentials handle */
  ntlm->credentials = calloc(1, sizeof(CredHandle));
  if(!ntlm->credentials)
    return CURLE_OUT_OF_MEMORY;



  /* Acquire our credentials handle */
  status = s_pSecFn->AcquireCredentialsHandle(NULL,
                                              (TCHAR *) TEXT(SP_NAME_NTLM),
                                              SECPKG_CRED_OUTBOUND, NULL,
                                              ntlm->p_identity, NULL, NULL,
                                              ntlm->credentials, &expiry);
  if(status != SEC_E_OK)
    return CURLE_LOGIN_DENIED;

  /* Allocate our new context handle */
  ntlm->context = calloc(1, sizeof(CtxtHandle));
  if(!ntlm->context)
    return CURLE_OUT_OF_MEMORY;

  ntlm->spn = Curl_auth_build_spn(service, host, NULL);
  if(!ntlm->spn)
    return CURLE_OUT_OF_MEMORY;

  /* Setup the type-1 "output" security buffer */
  type_1_desc.ulVersion = SECBUFFER_VERSION;
  type_1_desc.cBuffers  = 1;
  type_1_desc.pBuffers  = &type_1_buf;
  type_1_buf.BufferType = SECBUFFER_TOKEN;
  type_1_buf.pvBuffer   = ntlm->output_token;
  type_1_buf.cbBuffer   = curlx_uztoul(ntlm->token_max);

  /* Generate our type-1 message */
  status = s_pSecFn->InitializeSecurityContext(ntlm->credentials, NULL,

                                               ntlm->spn,
                                               0, 0, SECURITY_NETWORK_DREP,
                                               NULL, 0,
                                               ntlm->context, &type_1_desc,
                                               &attrs, &expiry);
  if(status == SEC_I_COMPLETE_NEEDED ||
    status == SEC_I_COMPLETE_AND_CONTINUE)
    s_pSecFn->CompleteAuthToken(ntlm->context, &type_1_desc);
271
272
273
274
275
276
277
278

279
280
281
282
283
284
285
  type_3_buf.BufferType = SECBUFFER_TOKEN;
  type_3_buf.pvBuffer   = ntlm->output_token;
  type_3_buf.cbBuffer   = curlx_uztoul(ntlm->token_max);

  /* Generate our type-3 message */
  status = s_pSecFn->InitializeSecurityContext(ntlm->credentials,
                                               ntlm->context,
                                               (TCHAR *) TEXT(""),

                                               0, 0, SECURITY_NETWORK_DREP,
                                               &type_2_desc,
                                               0, ntlm->context,
                                               &type_3_desc,
                                               &attrs, &expiry);
  if(status != SEC_E_OK) {
    infof(data, "NTLM handshake failure (type-3 message): Status=%x\n",







<
>







275
276
277
278
279
280
281

282
283
284
285
286
287
288
289
  type_3_buf.BufferType = SECBUFFER_TOKEN;
  type_3_buf.pvBuffer   = ntlm->output_token;
  type_3_buf.cbBuffer   = curlx_uztoul(ntlm->token_max);

  /* Generate our type-3 message */
  status = s_pSecFn->InitializeSecurityContext(ntlm->credentials,
                                               ntlm->context,

                                               ntlm->spn,
                                               0, 0, SECURITY_NETWORK_DREP,
                                               &type_2_desc,
                                               0, ntlm->context,
                                               &type_3_desc,
                                               &attrs, &expiry);
  if(status != SEC_E_OK) {
    infof(data, "NTLM handshake failure (type-3 message): Status=%x\n",
329
330
331
332
333
334
335


336
337
338

  /* Free the input and output tokens */
  Curl_safefree(ntlm->input_token);
  Curl_safefree(ntlm->output_token);

  /* Reset any variables */
  ntlm->token_max = 0;


}

#endif /* USE_WINDOWS_SSPI && USE_NTLM */







>
>



333
334
335
336
337
338
339
340
341
342
343
344

  /* Free the input and output tokens */
  Curl_safefree(ntlm->input_token);
  Curl_safefree(ntlm->output_token);

  /* Reset any variables */
  ntlm->token_max = 0;

  Curl_safefree(ntlm->spn);
}

#endif /* USE_WINDOWS_SSPI && USE_NTLM */
Changes to jni/curl/lib/vauth/spnego_sspi.c.
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
    /* Allocate our output buffer */
    nego->output_token = malloc(nego->token_max);
    if(!nego->output_token)
      return CURLE_OUT_OF_MEMORY;
 }

  if(!nego->credentials) {
    /* Do we have credientials to use or are we using single sign-on? */
    if(user && *user) {
      /* Populate our identity structure */
      result = Curl_create_sspi_identity(user, password, &nego->identity);
      if(result)
        return result;

      /* Allow proper cleanup of the identity structure */
      nego->p_identity = &nego->identity;
    }
    else
      /* Use the current Windows user */
      nego->p_identity = NULL;

    /* Allocate our credentials handle */
    nego->credentials = malloc(sizeof(CredHandle));
    if(!nego->credentials)
      return CURLE_OUT_OF_MEMORY;

    memset(nego->credentials, 0, sizeof(CredHandle));

    /* Acquire our credentials handle */
    nego->status =
      s_pSecFn->AcquireCredentialsHandle(NULL,
                                         (TCHAR *)TEXT(SP_NAME_NEGOTIATE),
                                         SECPKG_CRED_OUTBOUND, NULL,
                                         nego->p_identity, NULL, NULL,
                                         nego->credentials, &expiry);
    if(nego->status != SEC_E_OK)
      return CURLE_LOGIN_DENIED;

    /* Allocate our new context handle */
    nego->context = malloc(sizeof(CtxtHandle));
    if(!nego->context)
      return CURLE_OUT_OF_MEMORY;

    memset(nego->context, 0, sizeof(CtxtHandle));
  }

  if(chlg64 && *chlg64) {
    /* Decode the base-64 encoded challenge message */
    if(*chlg64 != '=') {
      result = Curl_base64_decode(chlg64, &chlg, &chlglen);
      if(result)







|














|



<
<











|


<
<







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159


160
161
162
163
164
165
166
167
168
169
170
171
172
173


174
175
176
177
178
179
180
    /* Allocate our output buffer */
    nego->output_token = malloc(nego->token_max);
    if(!nego->output_token)
      return CURLE_OUT_OF_MEMORY;
 }

  if(!nego->credentials) {
    /* Do we have credentials to use or are we using single sign-on? */
    if(user && *user) {
      /* Populate our identity structure */
      result = Curl_create_sspi_identity(user, password, &nego->identity);
      if(result)
        return result;

      /* Allow proper cleanup of the identity structure */
      nego->p_identity = &nego->identity;
    }
    else
      /* Use the current Windows user */
      nego->p_identity = NULL;

    /* Allocate our credentials handle */
    nego->credentials = calloc(1, sizeof(CredHandle));
    if(!nego->credentials)
      return CURLE_OUT_OF_MEMORY;



    /* Acquire our credentials handle */
    nego->status =
      s_pSecFn->AcquireCredentialsHandle(NULL,
                                         (TCHAR *)TEXT(SP_NAME_NEGOTIATE),
                                         SECPKG_CRED_OUTBOUND, NULL,
                                         nego->p_identity, NULL, NULL,
                                         nego->credentials, &expiry);
    if(nego->status != SEC_E_OK)
      return CURLE_LOGIN_DENIED;

    /* Allocate our new context handle */
    nego->context = calloc(1, sizeof(CtxtHandle));
    if(!nego->context)
      return CURLE_OUT_OF_MEMORY;


  }

  if(chlg64 && *chlg64) {
    /* Decode the base-64 encoded challenge message */
    if(*chlg64 != '=') {
      result = Curl_base64_decode(chlg64, &chlg, &chlglen);
      if(result)
Changes to jni/curl/lib/vauth/vauth.c.
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
* follows:
*
* User\Domain (Down-level Logon Name)
* User/Domain (curl Down-level format - for compatibility with existing code)
* User@Domain (User Principal Name)
*
* Note: The user name may be empty when using a GSS-API library or Windows SSPI
* as the user and domain are either obtained from the credientals cache when
* using GSS-API or via the currently logged in user's credientals when using
* Windows SSPI.
*
* Parameters:
*
* user  [in] - The user name.
*
* Returns TRUE on success; otherwise FALSE.







|
|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
* follows:
*
* User\Domain (Down-level Logon Name)
* User/Domain (curl Down-level format - for compatibility with existing code)
* User@Domain (User Principal Name)
*
* Note: The user name may be empty when using a GSS-API library or Windows SSPI
* as the user and domain are either obtained from the credentials cache when
* using GSS-API or via the currently logged in user's credentials when using
* Windows SSPI.
*
* Parameters:
*
* user  [in] - The user name.
*
* Returns TRUE on success; otherwise FALSE.
134
135
136
137
138
139
140
141
142
143
144
145
146
147
    char *p = strpbrk(user, "\\/@");

    valid = (p != NULL && p > user && p < user + strlen(user) - 1 ? TRUE :
                                                                    FALSE);
  }
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  else
    /* User and domain are obtained from the GSS-API credientials cache or the
       currently logged in user from Windows */
    valid = TRUE;
#endif

  return valid;
}







|






134
135
136
137
138
139
140
141
142
143
144
145
146
147
    char *p = strpbrk(user, "\\/@");

    valid = (p != NULL && p > user && p < user + strlen(user) - 1 ? TRUE :
                                                                    FALSE);
  }
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  else
    /* User and domain are obtained from the GSS-API credentials cache or the
       currently logged in user from Windows */
    valid = TRUE;
#endif

  return valid;
}
Changes to jni/curl/lib/vauth/vauth.h.
118
119
120
121
122
123
124


125
126
127
128
129
130
131
/* This is used to evaluate if NTLM is supported */
bool Curl_auth_is_ntlm_supported(void);

/* This is used to generate a base64 encoded NTLM type-1 message */
CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
                                             const char *userp,
                                             const char *passwdp,


                                             struct ntlmdata *ntlm,
                                             char **outptr,
                                             size_t *outlen);

/* This is used to decode a base64 encoded NTLM type-2 message */
CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
                                             const char *type2msg,







>
>







118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/* This is used to evaluate if NTLM is supported */
bool Curl_auth_is_ntlm_supported(void);

/* This is used to generate a base64 encoded NTLM type-1 message */
CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
                                             const char *userp,
                                             const char *passwdp,
                                             const char *service,
                                             const char *host,
                                             struct ntlmdata *ntlm,
                                             char **outptr,
                                             size_t *outlen);

/* This is used to decode a base64 encoded NTLM type-2 message */
CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
                                             const char *type2msg,
Changes to jni/curl/lib/version.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409

  if(initialized)
    return &version_info;

#ifdef USE_SSL
  Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer));
  version_info.ssl_version = ssl_buffer;
  if(Curl_ssl->support_https_proxy)
    version_info.features |= CURL_VERSION_HTTPS_PROXY;
  else
    version_info.features &= ~CURL_VERSION_HTTPS_PROXY;
#endif

#ifdef HAVE_LIBZ
  version_info.libz_version = zlibVersion();







|







395
396
397
398
399
400
401
402
403
404
405
406
407
408
409

  if(initialized)
    return &version_info;

#ifdef USE_SSL
  Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer));
  version_info.ssl_version = ssl_buffer;
  if(Curl_ssl->supports & SSLSUPP_HTTPS_PROXY)
    version_info.features |= CURL_VERSION_HTTPS_PROXY;
  else
    version_info.features &= ~CURL_VERSION_HTTPS_PROXY;
#endif

#ifdef HAVE_LIBZ
  version_info.libz_version = zlibVersion();
Changes to jni/curl/lib/vtls/axtls.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010, DirecTV, Contact: Eric Hu, <ehu@directv.com>.
 * Copyright (C) 2010 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010, DirecTV, Contact: Eric Hu, <ehu@directv.com>.
 * Copyright (C) 2010 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
{
  (void)info;
  return BACKEND->ssl;
}

const struct Curl_ssl Curl_ssl_axtls = {
  { CURLSSLBACKEND_AXTLS, "axtls" }, /* info */

  0, /* have_ca_path */
  0, /* have_certinfo */
  0, /* have_pinnedpubkey */
  0, /* have_ssl_ctx */
  0, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  /*
   * axTLS has no global init.  Everything is done through SSL and SSL_CTX
   * structs stored in connectdata structure.
   */
  Curl_none_init,                 /* init */







|
<
<
<
<
<
<







699
700
701
702
703
704
705
706






707
708
709
710
711
712
713
{
  (void)info;
  return BACKEND->ssl;
}

const struct Curl_ssl Curl_ssl_axtls = {
  { CURLSSLBACKEND_AXTLS, "axtls" }, /* info */
  0, /* no fancy stuff */






  sizeof(struct ssl_backend_data),

  /*
   * axTLS has no global init.  Everything is done through SSL and SSL_CTX
   * structs stored in connectdata structure.
   */
  Curl_none_init,                 /* init */
Changes to jni/curl/lib/vtls/cyassl.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
183
184
185
186
187
188
189

190
191




192
193
194
195
196
197
198
    infof(data, "CyaSSL <3.3.0 cannot be configured to use TLS 1.0-1.2, "
          "TLS 1.0 is used exclusively\n");
    req_method = TLSv1_client_method();
#endif
    use_sni(TRUE);
    break;
  case CURL_SSLVERSION_TLSv1_0:

    req_method = TLSv1_client_method();
    use_sni(TRUE);




    break;
  case CURL_SSLVERSION_TLSv1_1:
    req_method = TLSv1_1_client_method();
    use_sni(TRUE);
    break;
  case CURL_SSLVERSION_TLSv1_2:
    req_method = TLSv1_2_client_method();







>


>
>
>
>







183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
    infof(data, "CyaSSL <3.3.0 cannot be configured to use TLS 1.0-1.2, "
          "TLS 1.0 is used exclusively\n");
    req_method = TLSv1_client_method();
#endif
    use_sni(TRUE);
    break;
  case CURL_SSLVERSION_TLSv1_0:
#ifdef WOLFSSL_ALLOW_TLSV10
    req_method = TLSv1_client_method();
    use_sni(TRUE);
#else
    failf(data, "CyaSSL does not support TLS 1.0");
    return CURLE_NOT_BUILT_IN;
#endif
    break;
  case CURL_SSLVERSION_TLSv1_1:
    req_method = TLSv1_1_client_method();
    use_sni(TRUE);
    break;
  case CURL_SSLVERSION_TLSv1_2:
    req_method = TLSv1_2_client_method();
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978

979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996

997
998
999

1000
1001
1002
1003
1004
1005
1006
  if(length > UINT_MAX)
    return CURLE_FAILED_INIT;
  if(RNG_GenerateBlock(&rng, entropy, (unsigned)length))
    return CURLE_FAILED_INIT;
  return CURLE_OK;
}

static void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */
                                  size_t tmplen,
                                  unsigned char *sha256sum /* output */,
                                  size_t unused)
{
  Sha256 SHA256pw;
  (void)unused;
  InitSha256(&SHA256pw);
  Sha256Update(&SHA256pw, tmp, (word32)tmplen);
  Sha256Final(&SHA256pw, sha256sum);

}

static void *Curl_cyassl_get_internals(struct ssl_connect_data *connssl,
                                       CURLINFO info UNUSED_PARAM)
{
  (void)info;
  return BACKEND->handle;
}

const struct Curl_ssl Curl_ssl_cyassl = {
  { CURLSSLBACKEND_WOLFSSL, "WolfSSL" }, /* info */

  0, /* have_ca_path */
  0, /* have_certinfo */
#ifdef KEEP_PEER_CERT
  1, /* have_pinnedpubkey */
#else
  0, /* have_pinnedpubkey */

#endif
  1, /* have_ssl_ctx */
  0, /* support_https_proxy */


  sizeof(struct ssl_backend_data),

  Curl_cyassl_init,                /* init */
  Curl_none_cleanup,               /* cleanup */
  Curl_cyassl_version,             /* version */
  Curl_none_check_cxn,             /* check_cxn */







|









>












<
<

<
<
<
>

<
<
>







967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996


997



998
999


1000
1001
1002
1003
1004
1005
1006
1007
  if(length > UINT_MAX)
    return CURLE_FAILED_INIT;
  if(RNG_GenerateBlock(&rng, entropy, (unsigned)length))
    return CURLE_FAILED_INIT;
  return CURLE_OK;
}

static CURLcode Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */
                                  size_t tmplen,
                                  unsigned char *sha256sum /* output */,
                                  size_t unused)
{
  Sha256 SHA256pw;
  (void)unused;
  InitSha256(&SHA256pw);
  Sha256Update(&SHA256pw, tmp, (word32)tmplen);
  Sha256Final(&SHA256pw, sha256sum);
  return CURLE_OK;
}

static void *Curl_cyassl_get_internals(struct ssl_connect_data *connssl,
                                       CURLINFO info UNUSED_PARAM)
{
  (void)info;
  return BACKEND->handle;
}

const struct Curl_ssl Curl_ssl_cyassl = {
  { CURLSSLBACKEND_WOLFSSL, "WolfSSL" }, /* info */



#ifdef KEEP_PEER_CERT



  SSLSUPP_PINNEDPUBKEY |
#endif


  SSLSUPP_SSL_CTX,

  sizeof(struct ssl_backend_data),

  Curl_cyassl_init,                /* init */
  Curl_none_cleanup,               /* cleanup */
  Curl_cyassl_version,             /* version */
  Curl_none_check_cxn,             /* check_cxn */
Changes to jni/curl/lib/vtls/darwinssl.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2012 - 2017, Nick Zitzmann, <nickzman@gmail.com>.
 * Copyright (C) 2012 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2012 - 2017, Nick Zitzmann, <nickzman@gmail.com>.
 * Copyright (C) 2012 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
1191
1192
1193
1194
1195
1196
1197

1198
1199
1200
1201
1202
1203

1204
1205
1206
1207
1208
1209
1210
          CFTypeRef identity = (CFTypeRef) CFDictionaryGetValue(
                                                 (CFDictionaryRef) item,
                                                 kSecImportItemIdentity);
          CFRetain(identity);
          *out_cert_and_key = (SecIdentityRef) identity;
          break;
        }

        else if(itemID == SecCertificateGetTypeID()) {
          status = SecIdentityCreateWithCertificate(NULL,
                                                 (SecCertificateRef) item,
                                                 out_cert_and_key);
          break;
        }

      }
    }

    if(items)
      CFRelease(items);
    CFRelease(pkcs_data);
  }







>






>







1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
          CFTypeRef identity = (CFTypeRef) CFDictionaryGetValue(
                                                 (CFDictionaryRef) item,
                                                 kSecImportItemIdentity);
          CFRetain(identity);
          *out_cert_and_key = (SecIdentityRef) identity;
          break;
        }
#if CURL_BUILD_MAC_10_7
        else if(itemID == SecCertificateGetTypeID()) {
          status = SecIdentityCreateWithCertificate(NULL,
                                                 (SecCertificateRef) item,
                                                 out_cert_and_key);
          break;
        }
#endif
      }
    }

    if(items)
      CFRelease(items);
    CFRelease(pkcs_data);
  }
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
#if CURL_BUILD_MAC
  int darwinver_maj = 0, darwinver_min = 0;

  GetDarwinVersionNumber(&darwinver_maj, &darwinver_min);
#endif /* CURL_BUILD_MAC */

#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
  if(SSLCreateContext != NULL) {  /* use the newer API if avaialble */
    if(BACKEND->ssl_ctx)
      CFRelease(BACKEND->ssl_ctx);
    BACKEND->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType);
    if(!BACKEND->ssl_ctx) {
      failf(data, "SSL: couldn't create a context!");
      return CURLE_OUT_OF_MEMORY;
    }







|







1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
#if CURL_BUILD_MAC
  int darwinver_maj = 0, darwinver_min = 0;

  GetDarwinVersionNumber(&darwinver_maj, &darwinver_min);
#endif /* CURL_BUILD_MAC */

#if CURL_BUILD_MAC_10_8 || CURL_BUILD_IOS
  if(SSLCreateContext != NULL) {  /* use the newer API if available */
    if(BACKEND->ssl_ctx)
      CFRelease(BACKEND->ssl_ctx);
    BACKEND->ssl_ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType);
    if(!BACKEND->ssl_ctx) {
      failf(data, "SSL: couldn't create a context!");
      return CURLE_OUT_OF_MEMORY;
    }
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901

2902
2903
2904
2905
2906
2907
2908
                                      size_t md5len)
{
  (void)md5len;
  (void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum);
  return CURLE_OK;
}

static void Curl_darwinssl_sha256sum(const unsigned char *tmp, /* input */
                                     size_t tmplen,
                                     unsigned char *sha256sum, /* output */
                                     size_t sha256len)
{
  assert(sha256len >= CURL_SHA256_DIGEST_LENGTH);
  (void)CC_SHA256(tmp, (CC_LONG)tmplen, sha256sum);

}

static bool Curl_darwinssl_false_start(void)
{
#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
  if(SSLSetSessionOption != NULL)
    return TRUE;







|






>







2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
                                      size_t md5len)
{
  (void)md5len;
  (void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum);
  return CURLE_OK;
}

static CURLcode Curl_darwinssl_sha256sum(const unsigned char *tmp, /* input */
                                     size_t tmplen,
                                     unsigned char *sha256sum, /* output */
                                     size_t sha256len)
{
  assert(sha256len >= CURL_SHA256_DIGEST_LENGTH);
  (void)CC_SHA256(tmp, (CC_LONG)tmplen, sha256sum);
  return CURLE_OK;
}

static bool Curl_darwinssl_false_start(void)
{
#if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7
  if(SSLSetSessionOption != NULL)
    return TRUE;
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032

3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
  (void)info;
  return BACKEND->ssl_ctx;
}

const struct Curl_ssl Curl_ssl_darwinssl = {
  { CURLSSLBACKEND_DARWINSSL, "darwinssl" }, /* info */

  0, /* have_ca_path */
  0, /* have_certinfo */
#ifdef DARWIN_SSL_PINNEDPUBKEY
  1, /* have_pinnedpubkey */

#else
  0, /* have_pinnedpubkey */
#endif /* DARWIN_SSL_PINNEDPUBKEY */
  0, /* have_ssl_ctx */
  0, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  Curl_none_init,                     /* init */
  Curl_none_cleanup,                  /* cleanup */
  Curl_darwinssl_version,             /* version */
  Curl_darwinssl_check_cxn,           /* check_cxn */







<
<

<
>

|

<
<







3025
3026
3027
3028
3029
3030
3031


3032

3033
3034
3035
3036


3037
3038
3039
3040
3041
3042
3043
  (void)info;
  return BACKEND->ssl_ctx;
}

const struct Curl_ssl Curl_ssl_darwinssl = {
  { CURLSSLBACKEND_DARWINSSL, "darwinssl" }, /* info */



#ifdef DARWIN_SSL_PINNEDPUBKEY

  SSLSUPP_PINNEDPUBKEY,
#else
  0,
#endif /* DARWIN_SSL_PINNEDPUBKEY */



  sizeof(struct ssl_backend_data),

  Curl_none_init,                     /* init */
  Curl_none_cleanup,                  /* cleanup */
  Curl_darwinssl_version,             /* version */
  Curl_darwinssl_check_cxn,           /* check_cxn */
Changes to jni/curl/lib/vtls/gskit.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
  (void)info;
  return BACKEND->handle;
}

const struct Curl_ssl Curl_ssl_gskit = {
  { CURLSSLBACKEND_GSKIT, "gskit" }, /* info */

  0, /* have_ca_path */
  1, /* have_certinfo */
  1, /* have_pinnedpubkey */
  0, /* have_ssl_ctx */
  /* TODO: convert to 1 and fix test #1014 (if need) */
  0, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  Curl_gskit_init,                /* init */
  Curl_gskit_cleanup,             /* cleanup */
  Curl_gskit_version,             /* version */
  Curl_gskit_check_cxn,           /* check_cxn */







|
|
<
<
<
<







1349
1350
1351
1352
1353
1354
1355
1356
1357




1358
1359
1360
1361
1362
1363
1364
  (void)info;
  return BACKEND->handle;
}

const struct Curl_ssl Curl_ssl_gskit = {
  { CURLSSLBACKEND_GSKIT, "gskit" }, /* info */

  SSLSUPP_CERTINFO |
  SSLSUPP_PINNEDPUBKEY,





  sizeof(struct ssl_backend_data),

  Curl_gskit_init,                /* init */
  Curl_gskit_cleanup,             /* cleanup */
  Curl_gskit_version,             /* version */
  Curl_gskit_check_cxn,           /* check_cxn */
Changes to jni/curl/lib/vtls/gtls.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
148
149
150
151
152
153
154

155
156
157
158
159
160
161
162
163
164

165
166
167
168
169
170
171
172
  }
  return gtls_EIO;
}
#endif

static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len)
{

  ssize_t ret = swrite(CURLX_POINTER_TO_INTEGER_CAST(s), buf, len);
#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
  if(ret < 0)
    gnutls_transport_set_global_errno(gtls_mapped_sockerrno());
#endif
  return ret;
}

static ssize_t Curl_gtls_pull(void *s, void *buf, size_t len)
{

  ssize_t ret = sread(CURLX_POINTER_TO_INTEGER_CAST(s), buf, len);
#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
  if(ret < 0)
    gnutls_transport_set_global_errno(gtls_mapped_sockerrno());
#endif
  return ret;
}








>
|









>
|







148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
  }
  return gtls_EIO;
}
#endif

static ssize_t Curl_gtls_push(void *s, const void *buf, size_t len)
{
  curl_socket_t sock = *(curl_socket_t *)s;
  ssize_t ret = swrite(sock, buf, len);
#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
  if(ret < 0)
    gnutls_transport_set_global_errno(gtls_mapped_sockerrno());
#endif
  return ret;
}

static ssize_t Curl_gtls_pull(void *s, void *buf, size_t len)
{
  curl_socket_t sock = *(curl_socket_t *)s;
  ssize_t ret = sread(sock, buf, len);
#if defined(USE_WINSOCK) && !defined(GNUTLS_MAPS_WINSOCK_ERRORS)
  if(ret < 0)
    gnutls_transport_set_global_errno(gtls_mapped_sockerrno());
#endif
  return ret;
}

844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
  if(conn->proxy_ssl[sockindex].use) {
    transport_ptr = conn->proxy_ssl[sockindex].backend->session;
    gnutls_transport_push = Curl_gtls_push_ssl;
    gnutls_transport_pull = Curl_gtls_pull_ssl;
  }
  else {
    /* file descriptor for the socket */
    transport_ptr = CURLX_INTEGER_TO_POINTER_CAST(conn->sock[sockindex]);
    gnutls_transport_push = Curl_gtls_push;
    gnutls_transport_pull = Curl_gtls_pull;
  }

  /* set the connection handle */
  gnutls_transport_set_ptr(session, transport_ptr);








|







846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
  if(conn->proxy_ssl[sockindex].use) {
    transport_ptr = conn->proxy_ssl[sockindex].backend->session;
    gnutls_transport_push = Curl_gtls_push_ssl;
    gnutls_transport_pull = Curl_gtls_pull_ssl;
  }
  else {
    /* file descriptor for the socket */
    transport_ptr = &conn->sock[sockindex];
    gnutls_transport_push = Curl_gtls_push;
    gnutls_transport_pull = Curl_gtls_pull;
  }

  /* set the connection handle */
  gnutls_transport_set_ptr(session, transport_ptr);

1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780

1781
1782
1783
1784
1785
1786
1787
  gcry_md_write(MD5pw, tmp, tmplen);
  memcpy(md5sum, gcry_md_read(MD5pw, 0), md5len);
  gcry_md_close(MD5pw);
#endif
  return CURLE_OK;
}

static void Curl_gtls_sha256sum(const unsigned char *tmp, /* input */
                                size_t tmplen,
                                unsigned char *sha256sum, /* output */
                                size_t sha256len)
{
#if defined(USE_GNUTLS_NETTLE)
  struct sha256_ctx SHA256pw;
  sha256_init(&SHA256pw);
  sha256_update(&SHA256pw, (unsigned int)tmplen, tmp);
  sha256_digest(&SHA256pw, (unsigned int)sha256len, sha256sum);
#elif defined(USE_GNUTLS)
  gcry_md_hd_t SHA256pw;
  gcry_md_open(&SHA256pw, GCRY_MD_SHA256, 0);
  gcry_md_write(SHA256pw, tmp, tmplen);
  memcpy(sha256sum, gcry_md_read(SHA256pw, 0), sha256len);
  gcry_md_close(SHA256pw);
#endif

}

static bool Curl_gtls_cert_status_request(void)
{
#ifdef HAS_OCSP
  return TRUE;
#else







|
















>







1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
  gcry_md_write(MD5pw, tmp, tmplen);
  memcpy(md5sum, gcry_md_read(MD5pw, 0), md5len);
  gcry_md_close(MD5pw);
#endif
  return CURLE_OK;
}

static CURLcode Curl_gtls_sha256sum(const unsigned char *tmp, /* input */
                                size_t tmplen,
                                unsigned char *sha256sum, /* output */
                                size_t sha256len)
{
#if defined(USE_GNUTLS_NETTLE)
  struct sha256_ctx SHA256pw;
  sha256_init(&SHA256pw);
  sha256_update(&SHA256pw, (unsigned int)tmplen, tmp);
  sha256_digest(&SHA256pw, (unsigned int)sha256len, sha256sum);
#elif defined(USE_GNUTLS)
  gcry_md_hd_t SHA256pw;
  gcry_md_open(&SHA256pw, GCRY_MD_SHA256, 0);
  gcry_md_write(SHA256pw, tmp, tmplen);
  memcpy(sha256sum, gcry_md_read(SHA256pw, 0), sha256len);
  gcry_md_close(SHA256pw);
#endif
  return CURLE_OK;
}

static bool Curl_gtls_cert_status_request(void)
{
#ifdef HAS_OCSP
  return TRUE;
#else
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
  (void)info;
  return BACKEND->session;
}

const struct Curl_ssl Curl_ssl_gnutls = {
  { CURLSSLBACKEND_GNUTLS, "gnutls" }, /* info */

  1, /* have_ca_path */
  1, /* have_certinfo */
  1, /* have_pinnedpubkey */
  0, /* have_ssl_ctx */
  1, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  Curl_gtls_init,                /* init */
  Curl_gtls_cleanup,             /* cleanup */
  Curl_gtls_version,             /* version */
  Curl_none_check_cxn,           /* check_cxn */







|
|
|
|
<







1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808

1809
1810
1811
1812
1813
1814
1815
  (void)info;
  return BACKEND->session;
}

const struct Curl_ssl Curl_ssl_gnutls = {
  { CURLSSLBACKEND_GNUTLS, "gnutls" }, /* info */

  SSLSUPP_CA_PATH  |
  SSLSUPP_CERTINFO |
  SSLSUPP_PINNEDPUBKEY |
  SSLSUPP_HTTPS_PROXY,


  sizeof(struct ssl_backend_data),

  Curl_gtls_init,                /* init */
  Curl_gtls_cleanup,             /* cleanup */
  Curl_gtls_version,             /* version */
  Curl_none_check_cxn,           /* check_cxn */
Changes to jni/curl/lib/vtls/mbedtls.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
 * Copyright (C) 2012 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
 * Copyright (C) 2012 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
  mbedtls_ssl_session_free(ptr);
  free(ptr);
}

static size_t Curl_mbedtls_version(char *buffer, size_t size)
{
  unsigned int version = mbedtls_version_get_number();
  return snprintf(buffer, size, "mbedTLS/%d.%d.%d", version>>24,
                  (version>>16)&0xff, (version>>8)&0xff);
}

static CURLcode Curl_mbedtls_random(struct Curl_easy *data,
                                    unsigned char *entropy, size_t length)
{
#if defined(MBEDTLS_CTR_DRBG_C)







|







811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
  mbedtls_ssl_session_free(ptr);
  free(ptr);
}

static size_t Curl_mbedtls_version(char *buffer, size_t size)
{
  unsigned int version = mbedtls_version_get_number();
  return snprintf(buffer, size, "mbedTLS/%u.%u.%u", version>>24,
                  (version>>16)&0xff, (version>>8)&0xff);
}

static CURLcode Curl_mbedtls_random(struct Curl_easy *data,
                                    unsigned char *entropy, size_t length)
{
#if defined(MBEDTLS_CTR_DRBG_C)
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031

1032






1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
static bool Curl_mbedtls_data_pending(const struct connectdata *conn,
                                      int sockindex)
{
  const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
  return mbedtls_ssl_get_bytes_avail(&BACKEND->ssl) != 0;
}

static void Curl_mbedtls_sha256sum(const unsigned char *input,
                                    size_t inputlen,
                                    unsigned char *sha256sum,
                                    size_t sha256len UNUSED_PARAM)
{
  (void)sha256len;

  mbedtls_sha256(input, inputlen, sha256sum, 0);






}

static void *Curl_mbedtls_get_internals(struct ssl_connect_data *connssl,
                                        CURLINFO info UNUSED_PARAM)
{
  (void)info;
  return &BACKEND->ssl;
}

const struct Curl_ssl Curl_ssl_mbedtls = {
  { CURLSSLBACKEND_MBEDTLS, "mbedtls" }, /* info */

  1, /* have_ca_path */
  0, /* have_certinfo */
  1, /* have_pinnedpubkey */
  1, /* have_ssl_ctx */
  0, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  Curl_mbedtls_init,                /* init */
  Curl_mbedtls_cleanup,             /* cleanup */
  Curl_mbedtls_version,             /* version */
  Curl_none_check_cxn,              /* check_cxn */







|





>

>
>
>
>
>
>












|
|
|
<
<







1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054


1055
1056
1057
1058
1059
1060
1061
static bool Curl_mbedtls_data_pending(const struct connectdata *conn,
                                      int sockindex)
{
  const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
  return mbedtls_ssl_get_bytes_avail(&BACKEND->ssl) != 0;
}

static CURLcode Curl_mbedtls_sha256sum(const unsigned char *input,
                                    size_t inputlen,
                                    unsigned char *sha256sum,
                                    size_t sha256len UNUSED_PARAM)
{
  (void)sha256len;
#if MBEDTLS_VERSION_NUMBER < 0x02070000
  mbedtls_sha256(input, inputlen, sha256sum, 0);
#else
  /* returns 0 on success, otherwise failure */
  if(mbedtls_sha256_ret(input, inputlen, sha256sum, 0) != 0)
    return CURLE_BAD_FUNCTION_ARGUMENT;
#endif
  return CURLE_OK;
}

static void *Curl_mbedtls_get_internals(struct ssl_connect_data *connssl,
                                        CURLINFO info UNUSED_PARAM)
{
  (void)info;
  return &BACKEND->ssl;
}

const struct Curl_ssl Curl_ssl_mbedtls = {
  { CURLSSLBACKEND_MBEDTLS, "mbedtls" }, /* info */

  SSLSUPP_CA_PATH |
  SSLSUPP_PINNEDPUBKEY |
  SSLSUPP_SSL_CTX,



  sizeof(struct ssl_backend_data),

  Curl_mbedtls_init,                /* init */
  Curl_mbedtls_cleanup,             /* cleanup */
  Curl_mbedtls_version,             /* version */
  Curl_none_check_cxn,              /* check_cxn */
Changes to jni/curl/lib/vtls/nss.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327


2328
2329
2330
2331
2332
2333
2334
  PK11_DigestOp(MD5pw, tmp, curlx_uztoui(tmplen));
  PK11_DigestFinal(MD5pw, md5sum, &MD5out, curlx_uztoui(md5len));
  PK11_DestroyContext(MD5pw, PR_TRUE);

  return CURLE_OK;
}

static void Curl_nss_sha256sum(const unsigned char *tmp, /* input */
                               size_t tmplen,
                               unsigned char *sha256sum, /* output */
                               size_t sha256len)
{
  PK11Context *SHA256pw = PK11_CreateDigestContext(SEC_OID_SHA256);
  unsigned int SHA256out;

  PK11_DigestOp(SHA256pw, tmp, curlx_uztoui(tmplen));
  PK11_DigestFinal(SHA256pw, sha256sum, &SHA256out, curlx_uztoui(sha256len));
  PK11_DestroyContext(SHA256pw, PR_TRUE);


}

static bool Curl_nss_cert_status_request(void)
{
#ifdef SSL_ENABLE_OCSP_STAPLING
  return TRUE;
#else







|










>
>







2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
  PK11_DigestOp(MD5pw, tmp, curlx_uztoui(tmplen));
  PK11_DigestFinal(MD5pw, md5sum, &MD5out, curlx_uztoui(md5len));
  PK11_DestroyContext(MD5pw, PR_TRUE);

  return CURLE_OK;
}

static CURLcode Curl_nss_sha256sum(const unsigned char *tmp, /* input */
                               size_t tmplen,
                               unsigned char *sha256sum, /* output */
                               size_t sha256len)
{
  PK11Context *SHA256pw = PK11_CreateDigestContext(SEC_OID_SHA256);
  unsigned int SHA256out;

  PK11_DigestOp(SHA256pw, tmp, curlx_uztoui(tmplen));
  PK11_DigestFinal(SHA256pw, sha256sum, &SHA256out, curlx_uztoui(sha256len));
  PK11_DestroyContext(SHA256pw, PR_TRUE);

  return CURLE_OK;
}

static bool Curl_nss_cert_status_request(void)
{
#ifdef SSL_ENABLE_OCSP_STAPLING
  return TRUE;
#else
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
  (void)info;
  return BACKEND->handle;
}

const struct Curl_ssl Curl_ssl_nss = {
  { CURLSSLBACKEND_NSS, "nss" }, /* info */

  1, /* have_ca_path */
  1, /* have_certinfo */
  1, /* have_pinnedpubkey */
  0, /* have_ssl_ctx */
  1, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  Curl_nss_init,                /* init */
  Curl_nss_cleanup,             /* cleanup */
  Curl_nss_version,             /* version */
  Curl_nss_check_cxn,           /* check_cxn */







|
|
|
|
<







2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363

2364
2365
2366
2367
2368
2369
2370
  (void)info;
  return BACKEND->handle;
}

const struct Curl_ssl Curl_ssl_nss = {
  { CURLSSLBACKEND_NSS, "nss" }, /* info */

  SSLSUPP_CA_PATH |
  SSLSUPP_CERTINFO |
  SSLSUPP_PINNEDPUBKEY |
  SSLSUPP_HTTPS_PROXY,


  sizeof(struct ssl_backend_data),

  Curl_nss_init,                /* init */
  Curl_nss_cleanup,             /* cleanup */
  Curl_nss_version,             /* version */
  Curl_nss_check_cxn,           /* check_cxn */
Changes to jni/curl/lib/vtls/openssl.c.
100
101
102
103
104
105
106
107

108
109
110
111
112
113








114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#if !defined(HAVE_SSLV2_CLIENT_METHOD) || \
  OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0+ has no SSLv2 */
#undef OPENSSL_NO_SSL2 /* undef first to avoid compiler warnings */
#define OPENSSL_NO_SSL2
#endif

#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && /* OpenSSL 1.1.0+ */ \
  !defined(LIBRESSL_VERSION_NUMBER)

#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
#define HAVE_X509_GET0_EXTENSIONS 1 /* added in 1.1.0 -pre1 */
#define HAVE_OPAQUE_EVP_PKEY 1 /* since 1.1.0 -pre3 */
#define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */
#define CONST_EXTS const
#define HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED 1








#else
/* For OpenSSL before 1.1.0 */
#define ASN1_STRING_get0_data(x) ASN1_STRING_data(x)
#define X509_get0_notBefore(x) X509_get_notBefore(x)
#define X509_get0_notAfter(x) X509_get_notAfter(x)
#define CONST_EXTS /* nope */
#if defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x2070100fL)
static unsigned long OpenSSL_version_num(void)
{
  return LIBRESSL_VERSION_NUMBER;
}
#else
#define OpenSSL_version_num() SSLeay()
#endif
#endif

#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && /* 1.0.2 or later */ \
  !defined(LIBRESSL_VERSION_NUMBER)

#define HAVE_X509_GET0_SIGNATURE 1
#endif

#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \
  OPENSSL_VERSION_NUMBER <= 0x10002FFFL && \
  !defined(OPENSSL_NO_COMP)
#define HAVE_SSL_COMP_FREE_COMPRESSION_METHODS 1
#endif

#if (OPENSSL_VERSION_NUMBER < 0x0090808fL)
/* not present in older OpenSSL */
#define OPENSSL_load_builtin_modules(x)
#endif

/*
 * Whether SSL_CTX_set_keylog_callback is available.
 * OpenSSL: supported since 1.1.1 https://github.com/openssl/openssl/pull/2287
 * BoringSSL: supported since d28f59c27bac (committed 2015-11-19)
 * LibreSSL: unsupported in at least 2.5.1 (explicitly check for it since it
 *           lies and pretends to be OpenSSL 2.0.0).
 */
#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && \
     !defined(LIBRESSL_VERSION_NUMBER)) || \
    defined(OPENSSL_IS_BORINGSSL)
#define HAVE_KEYLOG_CALLBACK
#endif







|
>






>
>
>
>
>
>
>
>






|










|
>


















|







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#if !defined(HAVE_SSLV2_CLIENT_METHOD) || \
  OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0+ has no SSLv2 */
#undef OPENSSL_NO_SSL2 /* undef first to avoid compiler warnings */
#define OPENSSL_NO_SSL2
#endif

#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && /* OpenSSL 1.1.0+ */ \
    !(defined(LIBRESSL_VERSION_NUMBER) && \
      LIBRESSL_VERSION_NUMBER < 0x20700000L)
#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
#define HAVE_X509_GET0_EXTENSIONS 1 /* added in 1.1.0 -pre1 */
#define HAVE_OPAQUE_EVP_PKEY 1 /* since 1.1.0 -pre3 */
#define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */
#define CONST_EXTS const
#define HAVE_ERR_REMOVE_THREAD_STATE_DEPRECATED 1

/* funny typecast define due to difference in API */
#ifdef LIBRESSL_VERSION_NUMBER
#define ARG2_X509_signature_print (X509_ALGOR *)
#else
#define ARG2_X509_signature_print
#endif

#else
/* For OpenSSL before 1.1.0 */
#define ASN1_STRING_get0_data(x) ASN1_STRING_data(x)
#define X509_get0_notBefore(x) X509_get_notBefore(x)
#define X509_get0_notAfter(x) X509_get_notAfter(x)
#define CONST_EXTS /* nope */
#ifdef LIBRESSL_VERSION_NUMBER
static unsigned long OpenSSL_version_num(void)
{
  return LIBRESSL_VERSION_NUMBER;
}
#else
#define OpenSSL_version_num() SSLeay()
#endif
#endif

#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && /* 1.0.2 or later */ \
    !(defined(LIBRESSL_VERSION_NUMBER) && \
      LIBRESSL_VERSION_NUMBER < 0x20700000L)
#define HAVE_X509_GET0_SIGNATURE 1
#endif

#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \
  OPENSSL_VERSION_NUMBER <= 0x10002FFFL && \
  !defined(OPENSSL_NO_COMP)
#define HAVE_SSL_COMP_FREE_COMPRESSION_METHODS 1
#endif

#if (OPENSSL_VERSION_NUMBER < 0x0090808fL)
/* not present in older OpenSSL */
#define OPENSSL_load_builtin_modules(x)
#endif

/*
 * Whether SSL_CTX_set_keylog_callback is available.
 * OpenSSL: supported since 1.1.1 https://github.com/openssl/openssl/pull/2287
 * BoringSSL: supported since d28f59c27bac (committed 2015-11-19)
 * LibreSSL: unsupported in at least 2.7.2 (explicitly check for it since it
 *           lies and pretends to be OpenSSL 2.0.0).
 */
#if (OPENSSL_VERSION_NUMBER >= 0x10101000L && \
     !defined(LIBRESSL_VERSION_NUMBER)) || \
    defined(OPENSSL_IS_BORINGSSL)
#define HAVE_KEYLOG_CALLBACK
#endif
255
256
257
258
259
260
261
262


263
264
265
266
267
268
269
  unsigned char client_random[SSL3_RANDOM_SIZE];
  unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH];
  int master_key_length = 0;

  if(!session || !keylog_file_fp)
    return;

#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)


  /* ssl->s3 is not checked in openssl 1.1.0-pre6, but let's assume that
   * we have a valid SSL context if we have a non-NULL session. */
  SSL_get_client_random(ssl, client_random, SSL3_RANDOM_SIZE);
  master_key_length = (int)
    SSL_SESSION_get_master_key(session, master_key, SSL_MAX_MASTER_KEY_LENGTH);
#else
  if(ssl->s3 && session->master_key_length > 0) {







|
>
>







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
  unsigned char client_random[SSL3_RANDOM_SIZE];
  unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH];
  int master_key_length = 0;

  if(!session || !keylog_file_fp)
    return;

#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
    !(defined(LIBRESSL_VERSION_NUMBER) && \
      LIBRESSL_VERSION_NUMBER < 0x20700000L)
  /* ssl->s3 is not checked in openssl 1.1.0-pre6, but let's assume that
   * we have a valid SSL context if we have a non-NULL session. */
  SSL_get_client_random(ssl, client_random, SSL3_RANDOM_SIZE);
  master_key_length = (int)
    SSL_SESSION_get_master_key(session, master_key, SSL_MAX_MASTER_KEY_LENGTH);
#else
  if(ssl->s3 && session->master_key_length > 0) {
645
646
647
648
649
650
651
652
653
654
655
656









657
658
659

660
661
662
663
664
665
666
667
668
669
670
#else
      failf(data, "file type ENG for certificate not implemented");
      return 0;
#endif

    case SSL_FILETYPE_PKCS12:
    {
      FILE *f;
      PKCS12 *p12;
      EVP_PKEY *pri;
      STACK_OF(X509) *ca = NULL;










      f = fopen(cert_file, "rb");
      if(!f) {
        failf(data, "could not open PKCS12 file '%s'", cert_file);

        return 0;
      }
      p12 = d2i_PKCS12_fp(f, NULL);
      fclose(f);

      if(!p12) {
        failf(data, "error reading PKCS12 file '%s'", cert_file);
        return 0;
      }

      PKCS12_PBE_add();







|
|



>
>
>
>
>
>
>
>
>
|
|

>


|
|







657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
#else
      failf(data, "file type ENG for certificate not implemented");
      return 0;
#endif

    case SSL_FILETYPE_PKCS12:
    {
      BIO *fp = NULL;
      PKCS12 *p12 = NULL;
      EVP_PKEY *pri;
      STACK_OF(X509) *ca = NULL;

      fp = BIO_new(BIO_s_file());
      if(fp == NULL) {
        failf(data,
              "BIO_new return NULL, " OSSL_PACKAGE
              " error %s",
              ossl_strerror(ERR_get_error(), error_buffer,
                            sizeof(error_buffer)) );
        return 0;
      }

      if(BIO_read_filename(fp, cert_file) <= 0) {
        failf(data, "could not open PKCS12 file '%s'", cert_file);
        BIO_free(fp);
        return 0;
      }
      p12 = d2i_PKCS12_bio(fp, NULL);
      BIO_free(fp);

      if(!p12) {
        failf(data, "error reading PKCS12 file '%s'", cert_file);
        return 0;
      }

      PKCS12_PBE_add();
1307
1308
1309
1310
1311
1312
1313













































1314
1315
1316
1317
1318
1319
1320
     this queue here should be harmless at worst. */
  ERR_remove_thread_state(NULL);
#endif
}

/* ====================================================== */















































/* Quote from RFC2818 section 3.1 "Server Identity"

   If a subjectAltName extension of type dNSName is present, that MUST
   be used as the identity. Otherwise, the (most specific) Common Name
   field in the Subject field of the certificate MUST be used. Although
   the use of the Common Name is existing practice, it is deprecated and







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
     this queue here should be harmless at worst. */
  ERR_remove_thread_state(NULL);
#endif
}

/* ====================================================== */

/*
 * Match subjectAltName against the host name. This requires a conversion
 * in CURL_DOES_CONVERSIONS builds.
 */
static bool subj_alt_hostcheck(struct Curl_easy *data,
                               const char *match_pattern, const char *hostname,
                               const char *dispname)
#ifdef CURL_DOES_CONVERSIONS
{
  bool res = FALSE;

  /* Curl_cert_hostcheck uses host encoding, but we get ASCII from
     OpenSSl.
   */
  char *match_pattern2 = strdup(match_pattern);

  if(match_pattern2) {
    if(Curl_convert_from_network(data, match_pattern2,
                                strlen(match_pattern2)) == CURLE_OK) {
      if(Curl_cert_hostcheck(match_pattern2, hostname)) {
        res = TRUE;
        infof(data,
                " subjectAltName: host \"%s\" matched cert's \"%s\"\n",
                dispname, match_pattern2);
      }
    }
    free(match_pattern2);
  }
  else {
    failf(data,
        "SSL: out of memory when allocating temporary for subjectAltName");
  }
  return res;
}
#else
{
  if(Curl_cert_hostcheck(match_pattern, hostname)) {
    infof(data, " subjectAltName: host \"%s\" matched cert's \"%s\"\n",
                  dispname, match_pattern);
    return TRUE;
  }
  return FALSE;
}
#endif


/* Quote from RFC2818 section 3.1 "Server Identity"

   If a subjectAltName extension of type dNSName is present, that MUST
   be used as the identity. Otherwise, the (most specific) Common Name
   field in the Subject field of the certificate MUST be used. Although
   the use of the Common Name is existing practice, it is deprecated and
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
             Gisle researched the OpenSSL sources:
             "I checked the 0.9.6 and 0.9.8 sources before my patch and
             it always 0-terminates an IA5String."
          */
          if((altlen == strlen(altptr)) &&
             /* if this isn't true, there was an embedded zero in the name
                string and we cannot match it. */
             Curl_cert_hostcheck(altptr, hostname)) {
            dnsmatched = TRUE;
            infof(data,
                  " subjectAltName: host \"%s\" matched cert's \"%s\"\n",
                  dispname, altptr);
          }
          break;

        case GEN_IPADD: /* IP address comparison */
          /* compare alternative IP address if the data chunk is the same size
             our server IP address is */
          if((altlen == addrlen) && !memcmp(altptr, &addr, altlen)) {







|

<
<
<







1473
1474
1475
1476
1477
1478
1479
1480
1481



1482
1483
1484
1485
1486
1487
1488
             Gisle researched the OpenSSL sources:
             "I checked the 0.9.6 and 0.9.8 sources before my patch and
             it always 0-terminates an IA5String."
          */
          if((altlen == strlen(altptr)) &&
             /* if this isn't true, there was an embedded zero in the name
                string and we cannot match it. */
             subj_alt_hostcheck(data, altptr, hostname, dispname)) {
            dnsmatched = TRUE;



          }
          break;

        case GEN_IPADD: /* IP address comparison */
          /* compare alternative IP address if the data chunk is the same size
             our server IP address is */
          if((altlen == addrlen) && !memcmp(altptr, &addr, altlen)) {
1721
1722
1723
1724
1725
1726
1727




















1728
1729
1730
1731
1732
1733
1734







1735
1736
1737
1738
1739
1740
1741
        return "CERT verify";
      case SSL3_MT_FINISHED:
        return "Finished";
#ifdef SSL3_MT_CERTIFICATE_STATUS
      case SSL3_MT_CERTIFICATE_STATUS:
        return "Certificate Status";
#endif




















    }
  }
  return "Unknown";
}

static const char *tls_rt_type(int type)
{







  switch(type) {
#ifdef SSL3_RT_HEADER
  case SSL3_RT_HEADER:
    return "TLS header";
#endif
  case SSL3_RT_CHANGE_CIPHER_SPEC:
    return "TLS change cipher";







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|

>
>
>
>
>
>
>







1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
        return "CERT verify";
      case SSL3_MT_FINISHED:
        return "Finished";
#ifdef SSL3_MT_CERTIFICATE_STATUS
      case SSL3_MT_CERTIFICATE_STATUS:
        return "Certificate Status";
#endif
#ifdef SSL3_MT_ENCRYPTED_EXTENSIONS
      case SSL3_MT_ENCRYPTED_EXTENSIONS:
        return "Encrypted Extensions";
#endif
#ifdef SSL3_MT_END_OF_EARLY_DATA
      case SSL3_MT_END_OF_EARLY_DATA:
        return "End of early data";
#endif
#ifdef SSL3_MT_KEY_UPDATE
      case SSL3_MT_KEY_UPDATE:
        return "Key update";
#endif
#ifdef SSL3_MT_NEXT_PROTO
      case SSL3_MT_NEXT_PROTO:
        return "Next protocol";
#endif
#ifdef SSL3_MT_MESSAGE_HASH
      case SSL3_MT_MESSAGE_HASH:
        return "Message hash";
#endif
    }
  }
  return "Unknown";
}

static const char *tls_rt_type(int type, const void *buf, size_t buflen)
{
  (void)buf;
  (void)buflen;
#ifdef SSL3_RT_INNER_CONTENT_TYPE
  if(type == SSL3_RT_INNER_CONTENT_TYPE && buf && buflen >= 1)
    type = *(unsigned char *)buf;
#endif

  switch(type) {
#ifdef SSL3_RT_HEADER
  case SSL3_RT_HEADER:
    return "TLS header";
#endif
  case SSL3_RT_CHANGE_CIPHER_SPEC:
    return "TLS change cipher";
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
 * Our callback from the SSL/TLS layers.
 */
static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
                          const void *buf, size_t len, SSL *ssl,
                          void *userp)
{
  struct Curl_easy *data;
  const char *msg_name, *tls_rt_name;
  char ssl_buf[1024];
  char unknown[32];
  int msg_type, txt_len;
  const char *verstr = NULL;
  struct connectdata *conn = userp;

  if(!conn || !conn->data || !conn->data->set.fdebug ||
     (direction != 0 && direction != 1))
    return;








<
<

<







1846
1847
1848
1849
1850
1851
1852


1853

1854
1855
1856
1857
1858
1859
1860
 * Our callback from the SSL/TLS layers.
 */
static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
                          const void *buf, size_t len, SSL *ssl,
                          void *userp)
{
  struct Curl_easy *data;


  char unknown[32];

  const char *verstr = NULL;
  struct connectdata *conn = userp;

  if(!conn || !conn->data || !conn->data->set.fdebug ||
     (direction != 0 && direction != 1))
    return;

1806
1807
1808
1809
1810
1811
1812




1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825








1826
1827

1828
1829
1830
1831

1832

1833
1834
1835
1836
1837
1838
1839
  default:
    snprintf(unknown, sizeof(unknown), "(%x)", ssl_ver);
    verstr = unknown;
    break;
  }

  if(ssl_ver) {




    /* the info given when the version is zero is not that useful for us */

    ssl_ver >>= 8; /* check the upper 8 bits only below */

    /* SSLv2 doesn't seem to have TLS record-type headers, so OpenSSL
     * always pass-up content-type as 0. But the interesting message-type
     * is at 'buf[0]'.
     */
    if(ssl_ver == SSL3_VERSION_MAJOR && content_type)
      tls_rt_name = tls_rt_type(content_type);
    else
      tls_rt_name = "";









    msg_type = *(char *)buf;
    msg_name = ssl_msg_type(ssl_ver, msg_type);


    txt_len = snprintf(ssl_buf, sizeof(ssl_buf), "%s (%s), %s, %s (%d):\n",
                       verstr, direction?"OUT":"IN",
                       tls_rt_name, msg_name, msg_type);

    Curl_debug(data, CURLINFO_TEXT, ssl_buf, (size_t)txt_len, NULL);

  }

  Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT :
             CURLINFO_SSL_DATA_IN, (char *)buf, len, NULL);
  (void) ssl;
}
#endif







>
>
>
>









|



>
>
>
>
>
>
>
>
|
|
>




>
|
>







1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
  default:
    snprintf(unknown, sizeof(unknown), "(%x)", ssl_ver);
    verstr = unknown;
    break;
  }

  if(ssl_ver) {
    const char *msg_name, *tls_rt_name;
    char ssl_buf[1024];
    int msg_type, txt_len;

    /* the info given when the version is zero is not that useful for us */

    ssl_ver >>= 8; /* check the upper 8 bits only below */

    /* SSLv2 doesn't seem to have TLS record-type headers, so OpenSSL
     * always pass-up content-type as 0. But the interesting message-type
     * is at 'buf[0]'.
     */
    if(ssl_ver == SSL3_VERSION_MAJOR && content_type)
      tls_rt_name = tls_rt_type(content_type, buf, len);
    else
      tls_rt_name = "";

#ifdef SSL3_RT_INNER_CONTENT_TYPE
    if(content_type == SSL3_RT_INNER_CONTENT_TYPE) {
      msg_type = 0;
      msg_name = "[no content]";
    }
    else
#endif
    {
      msg_type = *(char *)buf;
      msg_name = ssl_msg_type(ssl_ver, msg_type);
    }

    txt_len = snprintf(ssl_buf, sizeof(ssl_buf), "%s (%s), %s, %s (%d):\n",
                       verstr, direction?"OUT":"IN",
                       tls_rt_name, msg_name, msg_type);
    if(0 <= txt_len && (unsigned)txt_len < sizeof(ssl_buf)) {
      Curl_debug(data, CURLINFO_TEXT, ssl_buf, (size_t)txt_len, NULL);
    }
  }

  Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT :
             CURLINFO_SSL_DATA_IN, (char *)buf, len, NULL);
  (void) ssl;
}
#endif
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
  case CURL_SSLVERSION_DEFAULT:
  case CURL_SSLVERSION_TLSv1:
  case CURL_SSLVERSION_TLSv1_0:
  case CURL_SSLVERSION_TLSv1_1:
  case CURL_SSLVERSION_TLSv1_2:
  case CURL_SSLVERSION_TLSv1_3:
    /* it will be handled later with the context options */
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && \
    !defined(LIBRESSL_VERSION_NUMBER)
    req_method = TLS_client_method();
#else
    req_method = SSLv23_client_method();
#endif
    use_sni(TRUE);
    break;
  case CURL_SSLVERSION_SSLv2:







|
<







2181
2182
2183
2184
2185
2186
2187
2188

2189
2190
2191
2192
2193
2194
2195
  case CURL_SSLVERSION_DEFAULT:
  case CURL_SSLVERSION_TLSv1:
  case CURL_SSLVERSION_TLSv1_0:
  case CURL_SSLVERSION_TLSv1_1:
  case CURL_SSLVERSION_TLSv1_2:
  case CURL_SSLVERSION_TLSv1_3:
    /* it will be handled later with the context options */
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)

    req_method = TLS_client_method();
#else
    req_method = SSLv23_client_method();
#endif
    use_sni(TRUE);
    break;
  case CURL_SSLVERSION_SSLv2:
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352





2353
2354
2355


2356

2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
        return CURLE_SSL_CIPHER;
      }
    }
  }
#endif

  if(ssl_cafile || ssl_capath) {
    if(verifypeer) {
      /* tell SSL where to find CA certificates that are used to verify
         the servers certificate. */
      if(!SSL_CTX_load_verify_locations(BACKEND->ctx,
                                        ssl_cafile, ssl_capath)) {
        /* Fail if we insist on successfully verifying the server. */
        failf(data, "error setting certificate verify locations:\n"
              "  CAfile: %s\n  CApath: %s",
              ssl_cafile ? ssl_cafile : "none",
              ssl_capath ? ssl_capath : "none");
        return CURLE_SSL_CACERT_BADFILE;
      }





      else {
        /* Everything is fine. */
        infof(data, "successfully set certificate verify locations:\n"


              "  CAfile: %s\n  CApath: %s\n",

              ssl_cafile ? ssl_cafile : "none",
              ssl_capath ? ssl_capath : "none");
      }
    }
    else {
      infof(data, "ignoring certificate verify locations due to "
            "disabled peer verification\n");
    }
  }
#ifdef CURL_CA_FALLBACK
  else if(verifypeer) {
    /* verfying the peer without any CA certificates won't
       work so use openssl's built in default as fallback */
    SSL_CTX_set_default_verify_paths(BACKEND->ctx);
  }







<
|
|
|
|







>
>
>
>
>
|
|
|
>
>
|
>
|
|
<
<
<
<
<
<







2436
2437
2438
2439
2440
2441
2442

2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467






2468
2469
2470
2471
2472
2473
2474
        return CURLE_SSL_CIPHER;
      }
    }
  }
#endif

  if(ssl_cafile || ssl_capath) {

    /* tell SSL where to find CA certificates that are used to verify
       the servers certificate. */
    if(!SSL_CTX_load_verify_locations(BACKEND->ctx, ssl_cafile, ssl_capath)) {
      if(verifypeer) {
        /* Fail if we insist on successfully verifying the server. */
        failf(data, "error setting certificate verify locations:\n"
              "  CAfile: %s\n  CApath: %s",
              ssl_cafile ? ssl_cafile : "none",
              ssl_capath ? ssl_capath : "none");
        return CURLE_SSL_CACERT_BADFILE;
      }
      /* Just continue with a warning if no strict  certificate verification
         is required. */
      infof(data, "error setting certificate verify locations,"
            " continuing anyway:\n");
    }
    else {
      /* Everything is fine. */
      infof(data, "successfully set certificate verify locations:\n");
    }
    infof(data,
          "  CAfile: %s\n"
          "  CApath: %s\n",
          ssl_cafile ? ssl_cafile : "none",
          ssl_capath ? ssl_capath : "none");






  }
#ifdef CURL_CA_FALLBACK
  else if(verifypeer) {
    /* verfying the peer without any CA certificates won't
       work so use openssl's built in default as fallback */
    SSL_CTX_set_default_verify_paths(BACKEND->ctx);
  }
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809

#if defined(HAVE_X509_GET0_SIGNATURE) && defined(HAVE_X509_GET0_EXTENSIONS)
    {
      const X509_ALGOR *palg = NULL;
      ASN1_STRING *a = ASN1_STRING_new();
      if(a) {
        X509_get0_signature(&psig, &palg, x);
        X509_signature_print(mem, palg, a);
        ASN1_STRING_free(a);

        if(palg) {
          i2a_ASN1_OBJECT(mem, palg->algorithm);
          push_certinfo("Public Key Algorithm", i);
        }
      }







|







2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912

#if defined(HAVE_X509_GET0_SIGNATURE) && defined(HAVE_X509_GET0_EXTENSIONS)
    {
      const X509_ALGOR *palg = NULL;
      ASN1_STRING *a = ASN1_STRING_new();
      if(a) {
        X509_get0_signature(&psig, &palg, x);
        X509_signature_print(mem, ARG2_X509_signature_print palg, a);
        ASN1_STRING_free(a);

        if(palg) {
          i2a_ASN1_OBJECT(mem, palg->algorithm);
          push_certinfo("Public Key Algorithm", i);
        }
      }
3030
3031
3032
3033
3034
3035
3036
3037

3038
3039
3040
3041
3042
3043
3044
3045
3046











3047
3048
3049

3050
3051
3052
3053
3054
3055
3056
                           bool strict)
{
  CURLcode result = CURLE_OK;
  int rc;
  long lerr, len;
  struct Curl_easy *data = conn->data;
  X509 *issuer;
  FILE *fp;

  char buffer[2048];
  const char *ptr;
  long * const certverifyresult = SSL_IS_PROXY() ?
    &data->set.proxy_ssl.certverifyresult : &data->set.ssl.certverifyresult;
  BIO *mem = BIO_new(BIO_s_mem());

  if(data->set.ssl.certinfo)
    /* we've been asked to gather certificate info! */
    (void)get_cert_chain(conn, connssl);












  BACKEND->server_cert = SSL_get_peer_certificate(BACKEND->handle);
  if(!BACKEND->server_cert) {

    BIO_free(mem);
    if(!strict)
      return CURLE_OK;

    failf(data, "SSL: couldn't get peer certificate!");
    return CURLE_PEER_FAILED_VERIFICATION;
  }







|
>









>
>
>
>
>
>
>
>
>
>
>



>







3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
                           bool strict)
{
  CURLcode result = CURLE_OK;
  int rc;
  long lerr, len;
  struct Curl_easy *data = conn->data;
  X509 *issuer;
  BIO *fp = NULL;
  char error_buffer[256]="";
  char buffer[2048];
  const char *ptr;
  long * const certverifyresult = SSL_IS_PROXY() ?
    &data->set.proxy_ssl.certverifyresult : &data->set.ssl.certverifyresult;
  BIO *mem = BIO_new(BIO_s_mem());

  if(data->set.ssl.certinfo)
    /* we've been asked to gather certificate info! */
    (void)get_cert_chain(conn, connssl);

  fp = BIO_new(BIO_s_file());
  if(fp == NULL) {
    failf(data,
          "BIO_new return NULL, " OSSL_PACKAGE
          " error %s",
          ossl_strerror(ERR_get_error(), error_buffer,
                        sizeof(error_buffer)) );
    BIO_free(mem);
    return 0;
  }

  BACKEND->server_cert = SSL_get_peer_certificate(BACKEND->handle);
  if(!BACKEND->server_cert) {
    BIO_free(fp);
    BIO_free(mem);
    if(!strict)
      return CURLE_OK;

    failf(data, "SSL: couldn't get peer certificate!");
    return CURLE_PEER_FAILED_VERIFICATION;
  }
3072
3073
3074
3075
3076
3077
3078

3079
3080
3081
3082
3083
3084
3085
  (void)BIO_reset(mem);

  BIO_free(mem);

  if(SSL_CONN_CONFIG(verifyhost)) {
    result = verifyhost(conn, BACKEND->server_cert);
    if(result) {

      X509_free(BACKEND->server_cert);
      BACKEND->server_cert = NULL;
      return result;
    }
  }

  rc = x509_name_oneline(X509_get_issuer_name(BACKEND->server_cert),







>







3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
  (void)BIO_reset(mem);

  BIO_free(mem);

  if(SSL_CONN_CONFIG(verifyhost)) {
    result = verifyhost(conn, BACKEND->server_cert);
    if(result) {
      BIO_free(fp);
      X509_free(BACKEND->server_cert);
      BACKEND->server_cert = NULL;
      return result;
    }
  }

  rc = x509_name_oneline(X509_get_issuer_name(BACKEND->server_cert),
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104

3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117

3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128

3129
3130
3131
3132
3133
3134
3135
    infof(data, " issuer: %s\n", buffer);

    /* We could do all sorts of certificate verification stuff here before
       deallocating the certificate. */

    /* e.g. match issuer name with provided issuer certificate */
    if(SSL_SET_OPTION(issuercert)) {
      fp = fopen(SSL_SET_OPTION(issuercert), FOPEN_READTEXT);
      if(!fp) {
        if(strict)
          failf(data, "SSL: Unable to open issuer cert (%s)",
                SSL_SET_OPTION(issuercert));

        X509_free(BACKEND->server_cert);
        BACKEND->server_cert = NULL;
        return CURLE_SSL_ISSUER_ERROR;
      }

      issuer = PEM_read_X509(fp, NULL, ZERO_NULL, NULL);
      if(!issuer) {
        if(strict)
          failf(data, "SSL: Unable to read issuer cert (%s)",
                SSL_SET_OPTION(issuercert));
        X509_free(BACKEND->server_cert);
        X509_free(issuer);
        fclose(fp);

        return CURLE_SSL_ISSUER_ERROR;
      }

      fclose(fp);

      if(X509_check_issued(issuer, BACKEND->server_cert) != X509_V_OK) {
        if(strict)
          failf(data, "SSL: Certificate issuer check failed (%s)",
                SSL_SET_OPTION(issuercert));
        X509_free(BACKEND->server_cert);
        X509_free(issuer);

        BACKEND->server_cert = NULL;
        return CURLE_SSL_ISSUER_ERROR;
      }

      infof(data, " SSL certificate issuer check ok (%s)\n",
            SSL_SET_OPTION(issuercert));
      X509_free(issuer);







|
<



>





|




|

|
>



<
<




|

>







3210
3211
3212
3213
3214
3215
3216
3217

3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238


3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
    infof(data, " issuer: %s\n", buffer);

    /* We could do all sorts of certificate verification stuff here before
       deallocating the certificate. */

    /* e.g. match issuer name with provided issuer certificate */
    if(SSL_SET_OPTION(issuercert)) {
      if(BIO_read_filename(fp, SSL_SET_OPTION(issuercert)) <= 0) {

        if(strict)
          failf(data, "SSL: Unable to open issuer cert (%s)",
                SSL_SET_OPTION(issuercert));
        BIO_free(fp);
        X509_free(BACKEND->server_cert);
        BACKEND->server_cert = NULL;
        return CURLE_SSL_ISSUER_ERROR;
      }

      issuer = PEM_read_bio_X509(fp, NULL, ZERO_NULL, NULL);
      if(!issuer) {
        if(strict)
          failf(data, "SSL: Unable to read issuer cert (%s)",
                SSL_SET_OPTION(issuercert));
        BIO_free(fp);
        X509_free(issuer);
        X509_free(BACKEND->server_cert);
        BACKEND->server_cert = NULL;
        return CURLE_SSL_ISSUER_ERROR;
      }



      if(X509_check_issued(issuer, BACKEND->server_cert) != X509_V_OK) {
        if(strict)
          failf(data, "SSL: Certificate issuer check failed (%s)",
                SSL_SET_OPTION(issuercert));
        BIO_free(fp);
        X509_free(issuer);
        X509_free(BACKEND->server_cert);
        BACKEND->server_cert = NULL;
        return CURLE_SSL_ISSUER_ERROR;
      }

      infof(data, " SSL certificate issuer check ok (%s)\n",
            SSL_SET_OPTION(issuercert));
      X509_free(issuer);
3156
3157
3158
3159
3160
3161
3162

3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181

3182
3183
3184
3185
3186
3187
3188
  }

#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
    !defined(OPENSSL_NO_OCSP)
  if(SSL_CONN_CONFIG(verifystatus)) {
    result = verifystatus(conn, connssl);
    if(result) {

      X509_free(BACKEND->server_cert);
      BACKEND->server_cert = NULL;
      return result;
    }
  }
#endif

  if(!strict)
    /* when not strict, we don't bother about the verify cert problems */
    result = CURLE_OK;

  ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
                         data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
  if(!result && ptr) {
    result = pkp_pin_peer_pubkey(data, BACKEND->server_cert, ptr);
    if(result)
      failf(data, "SSL: public key does not match pinned public key!");
  }


  X509_free(BACKEND->server_cert);
  BACKEND->server_cert = NULL;
  connssl->connecting_state = ssl_connect_done;

  return result;
}








>



















>







3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
  }

#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
    !defined(OPENSSL_NO_OCSP)
  if(SSL_CONN_CONFIG(verifystatus)) {
    result = verifystatus(conn, connssl);
    if(result) {
      BIO_free(fp);
      X509_free(BACKEND->server_cert);
      BACKEND->server_cert = NULL;
      return result;
    }
  }
#endif

  if(!strict)
    /* when not strict, we don't bother about the verify cert problems */
    result = CURLE_OK;

  ptr = SSL_IS_PROXY() ? data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY] :
                         data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG];
  if(!result && ptr) {
    result = pkp_pin_peer_pubkey(data, BACKEND->server_cert, ptr);
    if(result)
      failf(data, "SSL: public key does not match pinned public key!");
  }

  BIO_free(fp);
  X509_free(BACKEND->server_cert);
  BACKEND->server_cert = NULL;
  connssl->connecting_state = ssl_connect_done;

  return result;
}

3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608

3609
3610
3611
3612
3613
3614
3615
  EVP_DigestUpdate(mdctx, tmp, tmplen);
  EVP_DigestFinal_ex(mdctx, md5sum, &len);
  EVP_MD_CTX_destroy(mdctx);
  return CURLE_OK;
}

#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256)
static void Curl_ossl_sha256sum(const unsigned char *tmp, /* input */
                                size_t tmplen,
                                unsigned char *sha256sum /* output */,
                                size_t unused)
{
  EVP_MD_CTX *mdctx;
  unsigned int len = 0;
  (void) unused;

  mdctx =  EVP_MD_CTX_create();
  EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL);
  EVP_DigestUpdate(mdctx, tmp, tmplen);
  EVP_DigestFinal_ex(mdctx, sha256sum, &len);
  EVP_MD_CTX_destroy(mdctx);

}
#endif

static bool Curl_ossl_cert_status_request(void)
{
#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
    !defined(OPENSSL_NO_OCSP)







|













>







3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
  EVP_DigestUpdate(mdctx, tmp, tmplen);
  EVP_DigestFinal_ex(mdctx, md5sum, &len);
  EVP_MD_CTX_destroy(mdctx);
  return CURLE_OK;
}

#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256)
static CURLcode Curl_ossl_sha256sum(const unsigned char *tmp, /* input */
                                size_t tmplen,
                                unsigned char *sha256sum /* output */,
                                size_t unused)
{
  EVP_MD_CTX *mdctx;
  unsigned int len = 0;
  (void) unused;

  mdctx =  EVP_MD_CTX_create();
  EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL);
  EVP_DigestUpdate(mdctx, tmp, tmplen);
  EVP_DigestFinal_ex(mdctx, sha256sum, &len);
  EVP_MD_CTX_destroy(mdctx);
  return CURLE_OK;
}
#endif

static bool Curl_ossl_cert_status_request(void)
{
#if (OPENSSL_VERSION_NUMBER >= 0x0090808fL) && !defined(OPENSSL_NO_TLSEXT) && \
    !defined(OPENSSL_NO_OCSP)
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
  return info == CURLINFO_TLS_SESSION ?
         (void *)BACKEND->ctx : (void *)BACKEND->handle;
}

const struct Curl_ssl Curl_ssl_openssl = {
  { CURLSSLBACKEND_OPENSSL, "openssl" }, /* info */

  1, /* have_ca_path */
  1, /* have_certinfo */
  1, /* have_pinnedpubkey */
  1, /* have_ssl_ctx */
  1, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  Curl_ossl_init,                /* init */
  Curl_ossl_cleanup,             /* cleanup */
  Curl_ossl_version,             /* version */
  Curl_ossl_check_cxn,           /* check_cxn */







|
|
|
|
|







3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
  return info == CURLINFO_TLS_SESSION ?
         (void *)BACKEND->ctx : (void *)BACKEND->handle;
}

const struct Curl_ssl Curl_ssl_openssl = {
  { CURLSSLBACKEND_OPENSSL, "openssl" }, /* info */

  SSLSUPP_CA_PATH |
  SSLSUPP_CERTINFO |
  SSLSUPP_PINNEDPUBKEY |
  SSLSUPP_SSL_CTX |
  SSLSUPP_HTTPS_PROXY,

  sizeof(struct ssl_backend_data),

  Curl_ossl_init,                /* init */
  Curl_ossl_cleanup,             /* cleanup */
  Curl_ossl_version,             /* version */
  Curl_ossl_check_cxn,           /* check_cxn */
Changes to jni/curl/lib/vtls/polarssl.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2012 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2012 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
  DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);

  if(SSL_SET_OPTION(primary.sessionid)) {
    int ret;
    ssl_session *our_ssl_sessionid;
    void *old_ssl_sessionid = NULL;

    our_ssl_sessionid = malloc(sizeof(ssl_session));
    if(!our_ssl_sessionid)
      return CURLE_OUT_OF_MEMORY;

    memset(our_ssl_sessionid, 0, sizeof(ssl_session));

    ret = ssl_get_session(&BACKEND->ssl, our_ssl_sessionid);
    if(ret) {
      failf(data, "ssl_get_session returned -0x%x", -ret);
      return CURLE_SSL_CONNECT_ERROR;
    }

    /* If there's already a matching session in the cache, delete it */







|



<
<







616
617
618
619
620
621
622
623
624
625
626


627
628
629
630
631
632
633
  DEBUGASSERT(ssl_connect_3 == connssl->connecting_state);

  if(SSL_SET_OPTION(primary.sessionid)) {
    int ret;
    ssl_session *our_ssl_sessionid;
    void *old_ssl_sessionid = NULL;

    our_ssl_sessionid = calloc(1, sizeof(ssl_session));
    if(!our_ssl_sessionid)
      return CURLE_OUT_OF_MEMORY;



    ret = ssl_get_session(&BACKEND->ssl, our_ssl_sessionid);
    if(ret) {
      failf(data, "ssl_get_session returned -0x%x", -ret);
      return CURLE_SSL_CONNECT_ERROR;
    }

    /* If there's already a matching session in the cache, delete it */
878
879
880
881
882
883
884
885
886
887
888
889
890
891

892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
static bool Curl_polarssl_data_pending(const struct connectdata *conn,
                                       int sockindex)
{
  const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
  return ssl_get_bytes_avail(&BACKEND->ssl) != 0;
}

static void Curl_polarssl_sha256sum(const unsigned char *input,
                                    size_t inputlen,
                                    unsigned char *sha256sum,
                                    size_t sha256len UNUSED_PARAM)
{
  (void)sha256len;
  sha256(input, inputlen, sha256sum, 0);

}

static void *Curl_polarssl_get_internals(struct ssl_connect_data *connssl,
                                         CURLINFO info UNUSED_PARAM)
{
  (void)info;
  return &BACKEND->ssl;
}

const struct Curl_ssl Curl_ssl_polarssl = {
  { CURLSSLBACKEND_POLARSSL, "polarssl" }, /* info */

  1, /* have_ca_path */
  0, /* have_certinfo */
  1, /* have_pinnedpubkey */
  0, /* have_ssl_ctx */
  0, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  Curl_polarssl_init,                /* init */
  Curl_polarssl_cleanup,             /* cleanup */
  Curl_polarssl_version,             /* version */
  Curl_none_check_cxn,               /* check_cxn */







|






>












|
|
<
<
<







876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904



905
906
907
908
909
910
911
static bool Curl_polarssl_data_pending(const struct connectdata *conn,
                                       int sockindex)
{
  const struct ssl_connect_data *connssl = &conn->ssl[sockindex];
  return ssl_get_bytes_avail(&BACKEND->ssl) != 0;
}

static CURLcode Curl_polarssl_sha256sum(const unsigned char *input,
                                    size_t inputlen,
                                    unsigned char *sha256sum,
                                    size_t sha256len UNUSED_PARAM)
{
  (void)sha256len;
  sha256(input, inputlen, sha256sum, 0);
  return CURLE_OK;
}

static void *Curl_polarssl_get_internals(struct ssl_connect_data *connssl,
                                         CURLINFO info UNUSED_PARAM)
{
  (void)info;
  return &BACKEND->ssl;
}

const struct Curl_ssl Curl_ssl_polarssl = {
  { CURLSSLBACKEND_POLARSSL, "polarssl" }, /* info */

  SSLSUPP_CA_PATH |
  SSLSUPP_PINNEDPUBKEY,




  sizeof(struct ssl_backend_data),

  Curl_polarssl_init,                /* init */
  Curl_polarssl_cleanup,             /* cleanup */
  Curl_polarssl_version,             /* version */
  Curl_none_check_cxn,               /* check_cxn */
Changes to jni/curl/lib/vtls/schannel.c.
38
39
40
41
42
43
44


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 * Thanks for code and inspiration!
 */

#include "curl_setup.h"

#ifdef USE_SCHANNEL



#ifndef USE_WINDOWS_SSPI
#  error "Can't compile SCHANNEL support without SSPI."
#endif

#include <schnlsp.h>
#include <schannel.h>
#include "curl_sspi.h"
#include "schannel.h"
#include "vtls.h"
#include "sendf.h"
#include "connect.h" /* for the connect timeout */
#include "strerror.h"
#include "select.h" /* for the socket readyness */
#include "inet_pton.h" /* for IP addr SNI check */
#include "curl_multibyte.h"
#include "warnless.h"
#include "x509asn1.h"
#include "curl_printf.h"
#include "system_win32.h"
#include "hostcheck.h"

 /* The last #include file should be: */
#include "curl_memory.h"
#include "memdebug.h"

/* ALPN requires version 8.1 of the Windows SDK, which was
   shipped with Visual Studio 2013, aka _MSC_VER 1800:







>
>




<
<
<












<







38
39
40
41
42
43
44
45
46
47
48
49
50



51
52
53
54
55
56
57
58
59
60
61
62

63
64
65
66
67
68
69
 * Thanks for code and inspiration!
 */

#include "curl_setup.h"

#ifdef USE_SCHANNEL

#define EXPOSE_SCHANNEL_INTERNAL_STRUCTS

#ifndef USE_WINDOWS_SSPI
#  error "Can't compile SCHANNEL support without SSPI."
#endif




#include "schannel.h"
#include "vtls.h"
#include "sendf.h"
#include "connect.h" /* for the connect timeout */
#include "strerror.h"
#include "select.h" /* for the socket readyness */
#include "inet_pton.h" /* for IP addr SNI check */
#include "curl_multibyte.h"
#include "warnless.h"
#include "x509asn1.h"
#include "curl_printf.h"
#include "system_win32.h"


 /* The last #include file should be: */
#include "curl_memory.h"
#include "memdebug.h"

/* ALPN requires version 8.1 of the Windows SDK, which was
   shipped with Visual Studio 2013, aka _MSC_VER 1800:
87
88
89
90
91
92
93






94
95
96
97
98
99
100
#ifndef UNISP_NAME
#ifdef UNICODE
#define UNISP_NAME  UNISP_NAME_W
#else
#define UNISP_NAME  UNISP_NAME_A
#endif
#endif







#ifndef SP_PROT_SSL2_CLIENT
#define SP_PROT_SSL2_CLIENT             0x00000008
#endif

#ifndef SP_PROT_SSL3_CLIENT
#define SP_PROT_SSL3_CLIENT             0x00000008







>
>
>
>
>
>







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#ifndef UNISP_NAME
#ifdef UNICODE
#define UNISP_NAME  UNISP_NAME_W
#else
#define UNISP_NAME  UNISP_NAME_A
#endif
#endif

#ifdef UNICODE
#define CURL_CERT_STORE_PROV_SYSTEM CERT_STORE_PROV_SYSTEM_W
#else
#define CURL_CERT_STORE_PROV_SYSTEM CERT_STORE_PROV_SYSTEM_A
#endif

#ifndef SP_PROT_SSL2_CLIENT
#define SP_PROT_SSL2_CLIENT             0x00000008
#endif

#ifndef SP_PROT_SSL3_CLIENT
#define SP_PROT_SSL3_CLIENT             0x00000008
120
121
122
123
124
125
126



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#define SECBUFFER_ALERT                 17
#endif

/* Both schannel buffer sizes must be > 0 */
#define CURL_SCHANNEL_BUFFER_INIT_SIZE   4096
#define CURL_SCHANNEL_BUFFER_FREE_SIZE   1024




/* Uncomment to force verbose output
 * #define infof(x, y, ...) printf(y, __VA_ARGS__)
 * #define failf(x, y, ...) printf(y, __VA_ARGS__)
 */

#ifndef CALG_SHA_256
#  define CALG_SHA_256 0x0000800c
#endif

/* Structs to store Schannel handles */
struct curl_schannel_cred {
  CredHandle cred_handle;
  TimeStamp time_stamp;
  int refcount;
};

struct curl_schannel_ctxt {
  CtxtHandle ctxt_handle;
  TimeStamp time_stamp;
};

struct ssl_backend_data {
  struct curl_schannel_cred *cred;
  struct curl_schannel_ctxt *ctxt;
  SecPkgContext_StreamSizes stream_sizes;
  size_t encdata_length, decdata_length;
  size_t encdata_offset, decdata_offset;
  unsigned char *encdata_buffer, *decdata_buffer;
  /* encdata_is_incomplete: if encdata contains only a partial record that
     can't be decrypted without another Curl_read_plain (that is, status is
     SEC_E_INCOMPLETE_MESSAGE) then set this true. after Curl_read_plain writes
     more bytes into encdata then set this back to false. */
  bool encdata_is_incomplete;
  unsigned long req_flags, ret_flags;
  CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err */
  bool recv_sspi_close_notify; /* true if connection closed by close_notify */
  bool recv_connection_closed; /* true if connection closed, regardless how */
  bool use_alpn; /* true if ALPN is used for this connection */
};

#define BACKEND connssl->backend

static Curl_recv schannel_recv;
static Curl_send schannel_send;

static CURLcode pkp_pin_peer_pubkey(struct connectdata *conn, int sockindex,
                                    const char *pinnedpubkey);

#ifdef _WIN32_WCE
static CURLcode verify_certificate(struct connectdata *conn, int sockindex);
#endif

static void InitSecBuffer(SecBuffer *buffer, unsigned long BufType,
                          void *BufDataPtr, unsigned long BufByteSize)
{
  buffer->cbBuffer = BufByteSize;
  buffer->BufferType = BufType;
  buffer->pvBuffer = BufDataPtr;
}







>
>
>









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142































143
144
145
146
147
148
149
150




151
152
153
154
155
156
157
#define SECBUFFER_ALERT                 17
#endif

/* Both schannel buffer sizes must be > 0 */
#define CURL_SCHANNEL_BUFFER_INIT_SIZE   4096
#define CURL_SCHANNEL_BUFFER_FREE_SIZE   1024

#define CERT_THUMBPRINT_STR_LEN 40
#define CERT_THUMBPRINT_DATA_LEN 20

/* Uncomment to force verbose output
 * #define infof(x, y, ...) printf(y, __VA_ARGS__)
 * #define failf(x, y, ...) printf(y, __VA_ARGS__)
 */

#ifndef CALG_SHA_256
#  define CALG_SHA_256 0x0000800c
#endif
































#define BACKEND connssl->backend

static Curl_recv schannel_recv;
static Curl_send schannel_send;

static CURLcode pkp_pin_peer_pubkey(struct connectdata *conn, int sockindex,
                                    const char *pinnedpubkey);





static void InitSecBuffer(SecBuffer *buffer, unsigned long BufType,
                          void *BufDataPtr, unsigned long BufByteSize)
{
  buffer->cbBuffer = BufByteSize;
  buffer->BufferType = BufType;
  buffer->pvBuffer = BufDataPtr;
}
222
223
224
225
226
227
228


















































229
230
231
232
233
234
235
236
237
238
239
240
241
242
243

244
245
246
247
248
249
250
      case CURL_SSLVERSION_TLSv1_3:
        failf(data, "Schannel: TLS 1.3 is not yet supported");
        return CURLE_SSL_CONNECT_ERROR;
    }
  }
  return CURLE_OK;
}



















































static CURLcode
schannel_connect_step1(struct connectdata *conn, int sockindex)
{
  ssize_t written = -1;
  struct Curl_easy *data = conn->data;
  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
  SecBuffer outbuf;
  SecBufferDesc outbuf_desc;
  SecBuffer inbuf;
  SecBufferDesc inbuf_desc;
#ifdef HAS_ALPN
  unsigned char alpn_buffer[128];
#endif
  SCHANNEL_CRED schannel_cred;

  SECURITY_STATUS sspi_status = SEC_E_OK;
  struct curl_schannel_cred *old_cred = NULL;
  struct in_addr addr;
#ifdef ENABLE_IPV6
  struct in6_addr addr6;
#endif
  TCHAR *host_name;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>















>







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
      case CURL_SSLVERSION_TLSv1_3:
        failf(data, "Schannel: TLS 1.3 is not yet supported");
        return CURLE_SSL_CONNECT_ERROR;
    }
  }
  return CURLE_OK;
}

static CURLcode
get_cert_location(TCHAR *path, DWORD *store_name, TCHAR **store_path,
                  TCHAR **thumbprint)
{
  TCHAR *sep;
  size_t store_name_len;

  sep = _tcschr(path, TEXT('\\'));
  if(sep == NULL)
    return CURLE_SSL_CONNECT_ERROR;

  store_name_len = sep - path;

  if(_tcsnccmp(path, TEXT("CurrentUser"), store_name_len) == 0)
    *store_name = CERT_SYSTEM_STORE_CURRENT_USER;
  else if(_tcsnccmp(path, TEXT("LocalMachine"), store_name_len) == 0)
    *store_name = CERT_SYSTEM_STORE_LOCAL_MACHINE;
  else if(_tcsnccmp(path, TEXT("CurrentService"), store_name_len) == 0)
    *store_name = CERT_SYSTEM_STORE_CURRENT_SERVICE;
  else if(_tcsnccmp(path, TEXT("Services"), store_name_len) == 0)
    *store_name = CERT_SYSTEM_STORE_SERVICES;
  else if(_tcsnccmp(path, TEXT("Users"), store_name_len) == 0)
    *store_name = CERT_SYSTEM_STORE_USERS;
  else if(_tcsnccmp(path, TEXT("CurrentUserGroupPolicy"),
                    store_name_len) == 0)
    *store_name = CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY;
  else if(_tcsnccmp(path, TEXT("LocalMachineGroupPolicy"),
                    store_name_len) == 0)
    *store_name = CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY;
  else if(_tcsnccmp(path, TEXT("LocalMachineEnterprise"),
                    store_name_len) == 0)
    *store_name = CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE;
  else
    return CURLE_SSL_CONNECT_ERROR;

  *store_path = sep + 1;

  sep = _tcschr(*store_path, TEXT('\\'));
  if(sep == NULL)
    return CURLE_SSL_CONNECT_ERROR;

  *sep = 0;

  *thumbprint = sep + 1;
  if(_tcslen(*thumbprint) != CERT_THUMBPRINT_STR_LEN)
    return CURLE_SSL_CONNECT_ERROR;

  return CURLE_OK;
}

static CURLcode
schannel_connect_step1(struct connectdata *conn, int sockindex)
{
  ssize_t written = -1;
  struct Curl_easy *data = conn->data;
  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
  SecBuffer outbuf;
  SecBufferDesc outbuf_desc;
  SecBuffer inbuf;
  SecBufferDesc inbuf_desc;
#ifdef HAS_ALPN
  unsigned char alpn_buffer[128];
#endif
  SCHANNEL_CRED schannel_cred;
  PCCERT_CONTEXT client_certs[1] = { NULL };
  SECURITY_STATUS sspi_status = SEC_E_OK;
  struct curl_schannel_cred *old_cred = NULL;
  struct in_addr addr;
#ifdef ENABLE_IPV6
  struct in6_addr addr6;
#endif
  TCHAR *host_name;
270
271
272
273
274
275
276




















277
278
279
280
281
282
283
                      !GetProcAddress(GetModuleHandleA("ntdll"),
                                      "wine_get_version") &&
                      Curl_verify_windows_version(6, 3, PLATFORM_WINNT,
                                                  VERSION_GREATER_THAN_EQUAL);
#else
  BACKEND->use_alpn = false;
#endif





















  BACKEND->cred = NULL;

  /* check for an existing re-usable credential handle */
  if(SSL_SET_OPTION(primary.sessionid)) {
    Curl_ssl_sessionid_lock(conn);
    if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, sockindex)) {







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
                      !GetProcAddress(GetModuleHandleA("ntdll"),
                                      "wine_get_version") &&
                      Curl_verify_windows_version(6, 3, PLATFORM_WINNT,
                                                  VERSION_GREATER_THAN_EQUAL);
#else
  BACKEND->use_alpn = false;
#endif

#ifdef _WIN32_WCE
  /* certificate validation on CE doesn't seem to work right; we'll
   * do it following a more manual process. */
  BACKEND->use_manual_cred_validation = true;
#else
  if(SSL_CONN_CONFIG(CAfile)) {
    if(Curl_verify_windows_version(6, 1, PLATFORM_WINNT,
                                   VERSION_GREATER_THAN_EQUAL)) {
      BACKEND->use_manual_cred_validation = true;
    }
    else {
      failf(data, "schannel: this version of Windows is too old to support "
            "certificate verification via CA bundle file.");
      return CURLE_SSL_CACERT_BADFILE;
    }
  }
  else
    BACKEND->use_manual_cred_validation = false;
#endif

  BACKEND->cred = NULL;

  /* check for an existing re-usable credential handle */
  if(SSL_SET_OPTION(primary.sessionid)) {
    Curl_ssl_sessionid_lock(conn);
    if(!Curl_ssl_getsessionid(conn, (void **)&old_cred, NULL, sockindex)) {
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308

309
310
311
312
313
314
315
316
317
318

319

320

321
322
323
324
325
326
327

  if(!BACKEND->cred) {
    /* setup Schannel API options */
    memset(&schannel_cred, 0, sizeof(schannel_cred));
    schannel_cred.dwVersion = SCHANNEL_CRED_VERSION;

    if(conn->ssl_config.verifypeer) {
#ifdef _WIN32_WCE
      /* certificate validation on CE doesn't seem to work right; we'll
         do it following a more manual process. */
      schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
        SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
        SCH_CRED_IGNORE_REVOCATION_OFFLINE;
#else
      schannel_cred.dwFlags = SCH_CRED_AUTO_CRED_VALIDATION;

      /* TODO s/data->set.ssl.no_revoke/SSL_SET_OPTION(no_revoke)/g */
      if(data->set.ssl.no_revoke)
        schannel_cred.dwFlags |= SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
                                 SCH_CRED_IGNORE_REVOCATION_OFFLINE;
      else
        schannel_cred.dwFlags |= SCH_CRED_REVOCATION_CHECK_CHAIN;
#endif
      if(data->set.ssl.no_revoke)
        infof(data, "schannel: disabled server certificate revocation "
                    "checks\n");

      else

        infof(data, "schannel: checking server certificate revocation\n");

    }
    else {
      schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
        SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
        SCH_CRED_IGNORE_REVOCATION_OFFLINE;
      infof(data, "schannel: disabled server certificate revocation checks\n");
    }







<
|
<
|
<
<
|
|
>

|

|
|
<
<
<


>
|
>

>







337
338
339
340
341
342
343

344

345


346
347
348
349
350
351
352
353



354
355
356
357
358
359
360
361
362
363
364
365
366
367

  if(!BACKEND->cred) {
    /* setup Schannel API options */
    memset(&schannel_cred, 0, sizeof(schannel_cred));
    schannel_cred.dwVersion = SCHANNEL_CRED_VERSION;

    if(conn->ssl_config.verifypeer) {

      if(BACKEND->use_manual_cred_validation)

        schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION;


      else
        schannel_cred.dwFlags = SCH_CRED_AUTO_CRED_VALIDATION;

      /* TODO s/data->set.ssl.no_revoke/SSL_SET_OPTION(no_revoke)/g */
      if(data->set.ssl.no_revoke) {
        schannel_cred.dwFlags |= SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
          SCH_CRED_IGNORE_REVOCATION_OFFLINE;




        infof(data, "schannel: disabled server certificate revocation "
                    "checks\n");
      }
      else {
        schannel_cred.dwFlags |= SCH_CRED_REVOCATION_CHECK_CHAIN;
        infof(data, "schannel: checking server certificate revocation\n");
      }
    }
    else {
      schannel_cred.dwFlags = SCH_CRED_MANUAL_CRED_VALIDATION |
        SCH_CRED_IGNORE_NO_REVOCATION_CHECK |
        SCH_CRED_IGNORE_REVOCATION_OFFLINE;
      infof(data, "schannel: disabled server certificate revocation checks\n");
    }
356
357
358
359
360
361
362
363





















































364
365
366
367
368




369
370
371
372
373
374
375
376
377
378
379
380
381
382



383
384
385
386
387
388
389
    case CURL_SSLVERSION_SSLv2:
      schannel_cred.grbitEnabledProtocols = SP_PROT_SSL2_CLIENT;
      break;
    default:
      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
      return CURLE_SSL_CONNECT_ERROR;
    }






















































    /* allocate memory for the re-usable credential handle */
    BACKEND->cred = (struct curl_schannel_cred *)
      malloc(sizeof(struct curl_schannel_cred));
    if(!BACKEND->cred) {
      failf(data, "schannel: unable to allocate memory");




      return CURLE_OUT_OF_MEMORY;
    }
    memset(BACKEND->cred, 0, sizeof(struct curl_schannel_cred));
    BACKEND->cred->refcount = 1;

    /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx
       */
    sspi_status =
      s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME,
                                         SECPKG_CRED_OUTBOUND, NULL,
                                         &schannel_cred, NULL, NULL,
                                         &BACKEND->cred->cred_handle,
                                         &BACKEND->cred->time_stamp);




    if(sspi_status != SEC_E_OK) {
      if(sspi_status == SEC_E_WRONG_PRINCIPAL)
        failf(data, "schannel: SNI or certificate check failed: %s",
              Curl_sspi_strerror(conn, sspi_status));
      else
        failf(data, "schannel: AcquireCredentialsHandle failed: %s",
              Curl_sspi_strerror(conn, sspi_status));








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


|


>
>
>
>


<











>
>
>







396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467

468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
    case CURL_SSLVERSION_SSLv2:
      schannel_cred.grbitEnabledProtocols = SP_PROT_SSL2_CLIENT;
      break;
    default:
      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
      return CURLE_SSL_CONNECT_ERROR;
    }

    /* client certificate */
    if(data->set.ssl.cert) {
      DWORD cert_store_name;
      TCHAR *cert_store_path;
      TCHAR *cert_thumbprint_str;
      CRYPT_HASH_BLOB cert_thumbprint;
      BYTE cert_thumbprint_data[CERT_THUMBPRINT_DATA_LEN];
      HCERTSTORE cert_store;

      TCHAR *cert_path = Curl_convert_UTF8_to_tchar(data->set.ssl.cert);
      if(!cert_path)
        return CURLE_OUT_OF_MEMORY;

      result = get_cert_location(cert_path, &cert_store_name,
                                 &cert_store_path, &cert_thumbprint_str);
      if(result != CURLE_OK) {
        Curl_unicodefree(cert_path);
        return result;
      }

      cert_store = CertOpenStore(CURL_CERT_STORE_PROV_SYSTEM, 0,
                                 (HCRYPTPROV)NULL,
                                 cert_store_name, cert_store_path);
      if(!cert_store) {
        Curl_unicodefree(cert_path);
        return CURLE_SSL_CONNECT_ERROR;
      }

      cert_thumbprint.pbData = cert_thumbprint_data;
      cert_thumbprint.cbData = CERT_THUMBPRINT_DATA_LEN;

      if(!CryptStringToBinary(cert_thumbprint_str, CERT_THUMBPRINT_STR_LEN,
                              CRYPT_STRING_HEX,
                              cert_thumbprint_data, &cert_thumbprint.cbData,
                              NULL, NULL)) {
        Curl_unicodefree(cert_path);
        return CURLE_SSL_CONNECT_ERROR;
      }

      client_certs[0] = CertFindCertificateInStore(
        cert_store, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0,
        CERT_FIND_HASH, &cert_thumbprint, NULL);

      Curl_unicodefree(cert_path);

      if(client_certs[0]) {
        schannel_cred.cCreds = 1;
        schannel_cred.paCred = client_certs;
      }

      CertCloseStore(cert_store, 0);
    }

    /* allocate memory for the re-usable credential handle */
    BACKEND->cred = (struct curl_schannel_cred *)
      calloc(1, sizeof(struct curl_schannel_cred));
    if(!BACKEND->cred) {
      failf(data, "schannel: unable to allocate memory");

      if(client_certs[0])
        CertFreeCertificateContext(client_certs[0]);

      return CURLE_OUT_OF_MEMORY;
    }

    BACKEND->cred->refcount = 1;

    /* https://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx
       */
    sspi_status =
      s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME,
                                         SECPKG_CRED_OUTBOUND, NULL,
                                         &schannel_cred, NULL, NULL,
                                         &BACKEND->cred->cred_handle,
                                         &BACKEND->cred->time_stamp);

    if(client_certs[0])
      CertFreeCertificateContext(client_certs[0]);

    if(sspi_status != SEC_E_OK) {
      if(sspi_status == SEC_E_WRONG_PRINCIPAL)
        failf(data, "schannel: SNI or certificate check failed: %s",
              Curl_sspi_strerror(conn, sspi_status));
      else
        failf(data, "schannel: AcquireCredentialsHandle failed: %s",
              Curl_sspi_strerror(conn, sspi_status));
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481

    *list_len = curlx_uitous(cur - list_start_index);
    *extension_len = *list_len + sizeof(unsigned int) + sizeof(unsigned short);

    InitSecBuffer(&inbuf, SECBUFFER_APPLICATION_PROTOCOLS, alpn_buffer, cur);
    InitSecBufferDesc(&inbuf_desc, &inbuf, 1);
  }
  else
  {
    InitSecBuffer(&inbuf, SECBUFFER_EMPTY, NULL, 0);
    InitSecBufferDesc(&inbuf_desc, &inbuf, 1);
  }
#else /* HAS_ALPN */
  InitSecBuffer(&inbuf, SECBUFFER_EMPTY, NULL, 0);
  InitSecBufferDesc(&inbuf_desc, &inbuf, 1);
#endif

  /* setup output buffer */
  InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0);
  InitSecBufferDesc(&outbuf_desc, &outbuf, 1);

  /* setup request flags */
  BACKEND->req_flags = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT |
    ISC_REQ_CONFIDENTIALITY | ISC_REQ_ALLOCATE_MEMORY |
    ISC_REQ_STREAM;

  /* allocate memory for the security context handle */
  BACKEND->ctxt = (struct curl_schannel_ctxt *)
    malloc(sizeof(struct curl_schannel_ctxt));
  if(!BACKEND->ctxt) {
    failf(data, "schannel: unable to allocate memory");
    return CURLE_OUT_OF_MEMORY;
  }
  memset(BACKEND->ctxt, 0, sizeof(struct curl_schannel_ctxt));

  host_name = Curl_convert_UTF8_to_tchar(hostname);
  if(!host_name)
    return CURLE_OUT_OF_MEMORY;

  /* Schannel InitializeSecurityContext:
     https://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx







|
<



















|




<







540
541
542
543
544
545
546
547

548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571

572
573
574
575
576
577
578

    *list_len = curlx_uitous(cur - list_start_index);
    *extension_len = *list_len + sizeof(unsigned int) + sizeof(unsigned short);

    InitSecBuffer(&inbuf, SECBUFFER_APPLICATION_PROTOCOLS, alpn_buffer, cur);
    InitSecBufferDesc(&inbuf_desc, &inbuf, 1);
  }
  else {

    InitSecBuffer(&inbuf, SECBUFFER_EMPTY, NULL, 0);
    InitSecBufferDesc(&inbuf_desc, &inbuf, 1);
  }
#else /* HAS_ALPN */
  InitSecBuffer(&inbuf, SECBUFFER_EMPTY, NULL, 0);
  InitSecBufferDesc(&inbuf_desc, &inbuf, 1);
#endif

  /* setup output buffer */
  InitSecBuffer(&outbuf, SECBUFFER_EMPTY, NULL, 0);
  InitSecBufferDesc(&outbuf_desc, &outbuf, 1);

  /* setup request flags */
  BACKEND->req_flags = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT |
    ISC_REQ_CONFIDENTIALITY | ISC_REQ_ALLOCATE_MEMORY |
    ISC_REQ_STREAM;

  /* allocate memory for the security context handle */
  BACKEND->ctxt = (struct curl_schannel_ctxt *)
    calloc(1, sizeof(struct curl_schannel_ctxt));
  if(!BACKEND->ctxt) {
    failf(data, "schannel: unable to allocate memory");
    return CURLE_OUT_OF_MEMORY;
  }


  host_name = Curl_convert_UTF8_to_tchar(hostname);
  if(!host_name)
    return CURLE_OUT_OF_MEMORY;

  /* Schannel InitializeSecurityContext:
     https://msdn.microsoft.com/en-us/library/windows/desktop/aa375924.aspx
776
777
778
779
780
781
782
783
784
785
786
787
788

789
790
791
792
793
794
795
    result = pkp_pin_peer_pubkey(conn, sockindex, pubkey_ptr);
    if(result) {
      failf(data, "SSL: public key does not match pinned public key!");
      return result;
    }
  }

#ifdef _WIN32_WCE
  /* Windows CE doesn't do any server certificate validation.
     We have to do it manually. */
  if(conn->ssl_config.verifypeer)
    return verify_certificate(conn, sockindex);
#endif


  return CURLE_OK;
}

static CURLcode
schannel_connect_step3(struct connectdata *conn, int sockindex)
{







<
<
<
|

<
>







873
874
875
876
877
878
879



880
881

882
883
884
885
886
887
888
889
    result = pkp_pin_peer_pubkey(conn, sockindex, pubkey_ptr);
    if(result) {
      failf(data, "SSL: public key does not match pinned public key!");
      return result;
    }
  }




  if(conn->ssl_config.verifypeer && BACKEND->use_manual_cred_validation) {
    return verify_certificate(conn, sockindex);

  }

  return CURLE_OK;
}

static CURLcode
schannel_connect_step3(struct connectdata *conn, int sockindex)
{
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899

  if(pCertContextServer)
    CertFreeCertificateContext(pCertContextServer);

  return result;
}

#ifdef _WIN32_WCE
static CURLcode verify_certificate(struct connectdata *conn, int sockindex)
{
  SECURITY_STATUS status;
  struct Curl_easy *data = conn->data;
  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
  CURLcode result = CURLE_OK;
  CERT_CONTEXT *pCertContextServer = NULL;
  const CERT_CHAIN_CONTEXT *pChainContext = NULL;
  const char * const conn_hostname = SSL_IS_PROXY() ?
    conn->http_proxy.host.name :
    conn->host.name;

  status = s_pSecFn->QueryContextAttributes(&BACKEND->ctxt->ctxt_handle,
                                            SECPKG_ATTR_REMOTE_CERT_CONTEXT,
                                            &pCertContextServer);

  if((status != SEC_E_OK) || (pCertContextServer == NULL)) {
    failf(data, "schannel: Failed to read remote certificate context: %s",
          Curl_sspi_strerror(conn, status));
    result = CURLE_PEER_FAILED_VERIFICATION;
  }

  if(result == CURLE_OK) {
    CERT_CHAIN_PARA ChainPara;
    memset(&ChainPara, 0, sizeof(ChainPara));
    ChainPara.cbSize = sizeof(ChainPara);

    if(!CertGetCertificateChain(NULL,
                                pCertContextServer,
                                NULL,
                                pCertContextServer->hCertStore,
                                &ChainPara,
                                (data->set.ssl.no_revoke ? 0 :
                                 CERT_CHAIN_REVOCATION_CHECK_CHAIN),
                                NULL,
                                &pChainContext)) {
      failf(data, "schannel: CertGetCertificateChain failed: %s",
            Curl_sspi_strerror(conn, GetLastError()));
      pChainContext = NULL;
      result = CURLE_PEER_FAILED_VERIFICATION;
    }

    if(result == CURLE_OK) {
      CERT_SIMPLE_CHAIN *pSimpleChain = pChainContext->rgpChain[0];
      DWORD dwTrustErrorMask = ~(DWORD)(CERT_TRUST_IS_NOT_TIME_NESTED);
      dwTrustErrorMask &= pSimpleChain->TrustStatus.dwErrorStatus;
      if(dwTrustErrorMask) {
        if(dwTrustErrorMask & CERT_TRUST_IS_REVOKED)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_IS_REVOKED");
        else if(dwTrustErrorMask & CERT_TRUST_IS_PARTIAL_CHAIN)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_IS_PARTIAL_CHAIN");
        else if(dwTrustErrorMask & CERT_TRUST_IS_UNTRUSTED_ROOT)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_IS_UNTRUSTED_ROOT");
        else if(dwTrustErrorMask & CERT_TRUST_IS_NOT_TIME_VALID)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_IS_NOT_TIME_VALID");
        else
          failf(data, "schannel: CertGetCertificateChain error mask: 0x%08x",
                dwTrustErrorMask);
        result = CURLE_PEER_FAILED_VERIFICATION;
      }
    }
  }

  if(result == CURLE_OK) {
    if(conn->ssl_config.verifyhost) {
      TCHAR cert_hostname_buff[256];
      DWORD len;

      /* TODO: Fix this for certificates with multiple alternative names.
      Right now we're only asking for the first preferred alternative name.
      Instead we'd need to do all via CERT_NAME_SEARCH_ALL_NAMES_FLAG
      (if WinCE supports that?) and run this section in a loop for each.
      https://msdn.microsoft.com/en-us/library/windows/desktop/aa376086.aspx
      curl: (51) schannel: CertGetNameString() certificate hostname
      (.google.com) did not match connection (google.com)
      */
      len = CertGetNameString(pCertContextServer,
                              CERT_NAME_DNS_TYPE,
                              CERT_NAME_DISABLE_IE4_UTF8_FLAG,
                              NULL,
                              cert_hostname_buff,
                              256);
      if(len > 0) {
        const char *cert_hostname;

        /* Comparing the cert name and the connection hostname encoded as UTF-8
         * is acceptable since both values are assumed to use ASCII
         * (or some equivalent) encoding
         */
        cert_hostname = Curl_convert_tchar_to_UTF8(cert_hostname_buff);
        if(!cert_hostname) {
          result = CURLE_OUT_OF_MEMORY;
        }
        else{
          int match_result;

          match_result = Curl_cert_hostcheck(cert_hostname, conn->host.name);
          if(match_result == CURL_HOST_MATCH) {
            infof(data,
                  "schannel: connection hostname (%s) validated "
                  "against certificate name (%s)\n",
                  conn->host.name,
                  cert_hostname);
            result = CURLE_OK;
          }
          else{
            failf(data,
                  "schannel: connection hostname (%s) "
                  "does not match certificate name (%s)",
                  conn->host.name,
                  cert_hostname);
            result = CURLE_PEER_FAILED_VERIFICATION;
          }
          Curl_unicodefree(cert_hostname);
        }
      }
      else {
        failf(data,
              "schannel: CertGetNameString did not provide any "
              "certificate name information");
        result = CURLE_PEER_FAILED_VERIFICATION;
      }
    }
  }

  if(pChainContext)
    CertFreeCertificateChain(pChainContext);

  if(pCertContextServer)
    CertFreeCertificateContext(pCertContextServer);

  return result;
}
#endif /* _WIN32_WCE */

static void Curl_schannel_checksum(const unsigned char *input,
                      size_t inputlen,
                      unsigned char *checksum,
                      size_t checksumlen,
                      DWORD provType,
                      const unsigned int algId)
{







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1840
1841
1842
1843
1844
1845
1846












































































































































1847
1848
1849
1850
1851
1852
1853

  if(pCertContextServer)
    CertFreeCertificateContext(pCertContextServer);

  return result;
}













































































































































static void Curl_schannel_checksum(const unsigned char *input,
                      size_t inputlen,
                      unsigned char *checksum,
                      size_t checksumlen,
                      DWORD provType,
                      const unsigned int algId)
{
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958

1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
                                     size_t md5len)
{
    Curl_schannel_checksum(input, inputlen, md5sum, md5len,
                           PROV_RSA_FULL, CALG_MD5);
    return CURLE_OK;
}

static void Curl_schannel_sha256sum(const unsigned char *input,
                                    size_t inputlen,
                                    unsigned char *sha256sum,
                                    size_t sha256len)
{
    Curl_schannel_checksum(input, inputlen, sha256sum, sha256len,
                           PROV_RSA_AES, CALG_SHA_256);

}

static void *Curl_schannel_get_internals(struct ssl_connect_data *connssl,
                                         CURLINFO info UNUSED_PARAM)
{
  (void)info;
  return &BACKEND->ctxt->ctxt_handle;
}

const struct Curl_ssl Curl_ssl_schannel = {
  { CURLSSLBACKEND_SCHANNEL, "schannel" }, /* info */

  0, /* have_ca_path */
  1, /* have_certinfo */
  1, /* have_pinnedpubkey */
  0, /* have_ssl_ctx */
  0, /* support_https_proxy */

  sizeof(struct ssl_backend_data),

  Curl_schannel_init,                /* init */
  Curl_schannel_cleanup,             /* cleanup */
  Curl_schannel_version,             /* version */
  Curl_none_check_cxn,               /* check_cxn */







|






>












|
|
<
<
<







1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927



1928
1929
1930
1931
1932
1933
1934
                                     size_t md5len)
{
    Curl_schannel_checksum(input, inputlen, md5sum, md5len,
                           PROV_RSA_FULL, CALG_MD5);
    return CURLE_OK;
}

static CURLcode Curl_schannel_sha256sum(const unsigned char *input,
                                    size_t inputlen,
                                    unsigned char *sha256sum,
                                    size_t sha256len)
{
    Curl_schannel_checksum(input, inputlen, sha256sum, sha256len,
                           PROV_RSA_AES, CALG_SHA_256);
    return CURLE_OK;
}

static void *Curl_schannel_get_internals(struct ssl_connect_data *connssl,
                                         CURLINFO info UNUSED_PARAM)
{
  (void)info;
  return &BACKEND->ctxt->ctxt_handle;
}

const struct Curl_ssl Curl_ssl_schannel = {
  { CURLSSLBACKEND_SCHANNEL, "schannel" }, /* info */

  SSLSUPP_CERTINFO |
  SSLSUPP_PINNEDPUBKEY,




  sizeof(struct ssl_backend_data),

  Curl_schannel_init,                /* init */
  Curl_schannel_cleanup,             /* cleanup */
  Curl_schannel_version,             /* version */
  Curl_none_check_cxn,               /* check_cxn */
Changes to jni/curl/lib/vtls/schannel.h.
22
23
24
25
26
27
28




29
30
31




































32
33
34
 * KIND, either express or implied.
 *
 ***************************************************************************/
#include "curl_setup.h"

#ifdef USE_SCHANNEL





#include "urldata.h"

extern const struct Curl_ssl Curl_ssl_schannel;





































#endif /* USE_SCHANNEL */
#endif /* HEADER_CURL_SCHANNEL_H */







>
>
>
>



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
 * KIND, either express or implied.
 *
 ***************************************************************************/
#include "curl_setup.h"

#ifdef USE_SCHANNEL

#include <schnlsp.h>
#include <schannel.h>
#include "curl_sspi.h"

#include "urldata.h"

extern const struct Curl_ssl Curl_ssl_schannel;

CURLcode verify_certificate(struct connectdata *conn, int sockindex);

/* structs to expose only in schannel.c and schannel_verify.c */
#ifdef EXPOSE_SCHANNEL_INTERNAL_STRUCTS
struct curl_schannel_cred {
  CredHandle cred_handle;
  TimeStamp time_stamp;
  int refcount;
};

struct curl_schannel_ctxt {
  CtxtHandle ctxt_handle;
  TimeStamp time_stamp;
};

struct ssl_backend_data {
  struct curl_schannel_cred *cred;
  struct curl_schannel_ctxt *ctxt;
  SecPkgContext_StreamSizes stream_sizes;
  size_t encdata_length, decdata_length;
  size_t encdata_offset, decdata_offset;
  unsigned char *encdata_buffer, *decdata_buffer;
  /* encdata_is_incomplete: if encdata contains only a partial record that
     can't be decrypted without another Curl_read_plain (that is, status is
     SEC_E_INCOMPLETE_MESSAGE) then set this true. after Curl_read_plain writes
     more bytes into encdata then set this back to false. */
  bool encdata_is_incomplete;
  unsigned long req_flags, ret_flags;
  CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err */
  bool recv_sspi_close_notify; /* true if connection closed by close_notify */
  bool recv_connection_closed; /* true if connection closed, regardless how */
  bool use_alpn; /* true if ALPN is used for this connection */
  bool use_manual_cred_validation; /* true if manual cred validation is used */
};
#endif /* EXPOSE_SCHANNEL_INTERNAL_STRUCTS */

#endif /* USE_SCHANNEL */
#endif /* HEADER_CURL_SCHANNEL_H */
Added jni/curl/lib/vtls/schannel_verify.c.














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2012 - 2016, Marc Hoersken, <info@marc-hoersken.de>
 * Copyright (C) 2012, Mark Salisbury, <mark.salisbury@hp.com>
 * Copyright (C) 2012 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/

/*
 * Source file for SChannel-specific certificate verification. This code should
 * only be invoked by code in schannel.c.
 */

#include "curl_setup.h"

#ifdef USE_SCHANNEL

#define EXPOSE_SCHANNEL_INTERNAL_STRUCTS

#ifndef USE_WINDOWS_SSPI
#  error "Can't compile SCHANNEL support without SSPI."
#endif

#include "schannel.h"
#include "vtls.h"
#include "sendf.h"
#include "strerror.h"
#include "curl_multibyte.h"
#include "curl_printf.h"
#include "hostcheck.h"
#include "system_win32.h"

/* The last #include file should be: */
#include "curl_memory.h"
#include "memdebug.h"

#define BACKEND connssl->backend

#define MAX_CAFILE_SIZE 1048576 /* 1 MiB */
#define BEGIN_CERT "-----BEGIN CERTIFICATE-----\n"
#define END_CERT "\n-----END CERTIFICATE-----"

typedef struct {
  DWORD cbSize;
  HCERTSTORE hRestrictedRoot;
  HCERTSTORE hRestrictedTrust;
  HCERTSTORE hRestrictedOther;
  DWORD cAdditionalStore;
  HCERTSTORE *rghAdditionalStore;
  DWORD dwFlags;
  DWORD dwUrlRetrievalTimeout;
  DWORD MaximumCachedCertificates;
  DWORD CycleDetectionModulus;
  HCERTSTORE hExclusiveRoot;
  HCERTSTORE hExclusiveTrustedPeople;
} CERT_CHAIN_ENGINE_CONFIG_WIN7, *PCERT_CHAIN_ENGINE_CONFIG_WIN7;


static CURLcode add_certs_to_store(HCERTSTORE trust_store,
                                   const char *ca_file,
                                   struct connectdata *conn)
{
  CURLcode result;
  struct Curl_easy *data = conn->data;
  HANDLE ca_file_handle = INVALID_HANDLE_VALUE;
  LARGE_INTEGER file_size;
  char *ca_file_buffer = NULL;
  char *current_ca_file_ptr = NULL;
  const TCHAR *ca_file_tstr = NULL;
  size_t ca_file_bufsize = 0;
  DWORD total_bytes_read = 0;
  bool more_certs = 0;
  int num_certs = 0;
  size_t END_CERT_LEN;

  ca_file_tstr = Curl_convert_UTF8_to_tchar(ca_file);
  if(!ca_file_tstr) {
    failf(data,
          "schannel: invalid path name for CA file '%s': %s",
          ca_file, Curl_strerror(conn, GetLastError()));
    result = CURLE_SSL_CACERT_BADFILE;
    goto cleanup;
  }

  /*
   * Read the CA file completely into memory before parsing it. This
   * optimizes for the common case where the CA file will be relatively
   * small ( < 1 MiB ).
   */
  ca_file_handle = CreateFile(ca_file_tstr,
                              GENERIC_READ,
                              0,
                              NULL,
                              OPEN_EXISTING,
                              FILE_ATTRIBUTE_NORMAL,
                              NULL);
  if(ca_file_handle == INVALID_HANDLE_VALUE) {
    failf(data,
          "schannel: failed to open CA file '%s': %s",
          ca_file, Curl_strerror(conn, GetLastError()));
    result = CURLE_SSL_CACERT_BADFILE;
    goto cleanup;
  }

  if(!GetFileSizeEx(ca_file_handle, &file_size)) {
    failf(data,
          "schannel: failed to determine size of CA file '%s': %s",
          ca_file, Curl_strerror(conn, GetLastError()));
    result = CURLE_SSL_CACERT_BADFILE;
    goto cleanup;
  }

  if(file_size.QuadPart > MAX_CAFILE_SIZE) {
    failf(data,
          "schannel: CA file exceeds max size of %u bytes",
          MAX_CAFILE_SIZE);
    result = CURLE_OUT_OF_MEMORY;
    goto cleanup;
  }

  ca_file_bufsize = (size_t)file_size.QuadPart;
  ca_file_buffer = (char *)malloc(ca_file_bufsize + 1);
  if(!ca_file_buffer) {
    result = CURLE_OUT_OF_MEMORY;
    goto cleanup;
  }

  result = CURLE_OK;
  while(total_bytes_read < ca_file_bufsize) {
    DWORD bytes_to_read = (DWORD)(ca_file_bufsize - total_bytes_read);
    DWORD bytes_read = 0;

    if(!ReadFile(ca_file_handle, ca_file_buffer + total_bytes_read,
                 bytes_to_read, &bytes_read, NULL)) {

      failf(data,
            "schannel: failed to read from CA file '%s': %s",
            ca_file, Curl_strerror(conn, GetLastError()));
      result = CURLE_SSL_CACERT_BADFILE;
      goto cleanup;
    }
    if(bytes_read == 0) {
      /* Premature EOF -- adjust the bufsize to the new value */
      ca_file_bufsize = total_bytes_read;
    }
    else {
      total_bytes_read += bytes_read;
    }
  }

  /* Null terminate the buffer */
  ca_file_buffer[ca_file_bufsize] = '\0';

  if(result != CURLE_OK) {
    goto cleanup;
  }

  END_CERT_LEN = strlen(END_CERT);

  more_certs = 1;
  current_ca_file_ptr = ca_file_buffer;
  while(more_certs && *current_ca_file_ptr != '\0') {
    char *begin_cert_ptr = strstr(current_ca_file_ptr, BEGIN_CERT);
    if(!begin_cert_ptr) {
      more_certs = 0;
    }
    else {
      char *end_cert_ptr = strstr(begin_cert_ptr, END_CERT);
      if(!end_cert_ptr) {
        failf(data,
              "schannel: CA file '%s' is not correctly formatted",
              ca_file);
        result = CURLE_SSL_CACERT_BADFILE;
        more_certs = 0;
      }
      else {
        CERT_BLOB cert_blob;
        CERT_CONTEXT *cert_context = NULL;
        BOOL add_cert_result = FALSE;
        DWORD actual_content_type = 0;
        DWORD cert_size = (DWORD)
          ((end_cert_ptr + END_CERT_LEN) - begin_cert_ptr);

        cert_blob.pbData = (BYTE *)begin_cert_ptr;
        cert_blob.cbData = cert_size;
        if(!CryptQueryObject(CERT_QUERY_OBJECT_BLOB,
                             &cert_blob,
                             CERT_QUERY_CONTENT_FLAG_CERT,
                             CERT_QUERY_FORMAT_FLAG_ALL,
                             0,
                             NULL,
                             &actual_content_type,
                             NULL,
                             NULL,
                             NULL,
                             &cert_context)) {

          failf(data,
                "schannel: failed to extract certificate from CA file "
                "'%s': %s",
                ca_file, Curl_strerror(conn, GetLastError()));
          result = CURLE_SSL_CACERT_BADFILE;
          more_certs = 0;
        }
        else {
          current_ca_file_ptr = begin_cert_ptr + cert_size;

          /* Sanity check that the cert_context object is the right type */
          if(CERT_QUERY_CONTENT_CERT != actual_content_type) {
            failf(data,
                  "schannel: unexpected content type '%d' when extracting "
                  "certificate from CA file '%s'",
                  actual_content_type, ca_file);
            result = CURLE_SSL_CACERT_BADFILE;
            more_certs = 0;
          }
          else {
            add_cert_result =
              CertAddCertificateContextToStore(trust_store,
                                               cert_context,
                                               CERT_STORE_ADD_ALWAYS,
                                               NULL);
            CertFreeCertificateContext(cert_context);
            if(!add_cert_result) {
              failf(data,
                    "schannel: failed to add certificate from CA file '%s'"
                    "to certificate store: %s",
                    ca_file, Curl_strerror(conn, GetLastError()));
              result = CURLE_SSL_CACERT_BADFILE;
              more_certs = 0;
            }
            else {
              num_certs++;
            }
          }
        }
      }
    }
  }

  if(result == CURLE_OK) {
    if(!num_certs) {
      infof(data,
            "schannel: did not add any certificates from CA file '%s'\n",
            ca_file);
    }
    else {
      infof(data,
            "schannel: added %d certificate(s) from CA file '%s'\n",
            num_certs, ca_file);
    }
  }

cleanup:
  if(ca_file_handle != INVALID_HANDLE_VALUE) {
    CloseHandle(ca_file_handle);
  }
  Curl_safefree(ca_file_buffer);
  Curl_unicodefree(ca_file_tstr);

  return result;
}

static CURLcode verify_host(struct Curl_easy *data,
                            CERT_CONTEXT *pCertContextServer,
                            const char * const conn_hostname)
{
  CURLcode result = CURLE_PEER_FAILED_VERIFICATION;
  TCHAR *cert_hostname_buff = NULL;
  size_t cert_hostname_buff_index = 0;
  DWORD len = 0;
  DWORD actual_len = 0;

  /* CertGetNameString will provide the 8-bit character string without
   * any decoding */
  DWORD name_flags = CERT_NAME_DISABLE_IE4_UTF8_FLAG;

#ifdef CERT_NAME_SEARCH_ALL_NAMES_FLAG
  name_flags |= CERT_NAME_SEARCH_ALL_NAMES_FLAG;
#endif

  /* Determine the size of the string needed for the cert hostname */
  len = CertGetNameString(pCertContextServer,
                          CERT_NAME_DNS_TYPE,
                          name_flags,
                          NULL,
                          NULL,
                          0);
  if(len == 0) {
    failf(data,
          "schannel: CertGetNameString() returned no "
          "certificate name information");
    result = CURLE_PEER_FAILED_VERIFICATION;
    goto cleanup;
  }

  /* CertGetNameString guarantees that the returned name will not contain
   * embedded null bytes. This appears to be undocumented behavior.
   */
  cert_hostname_buff = (LPTSTR)malloc(len * sizeof(TCHAR));
  actual_len = CertGetNameString(pCertContextServer,
                                 CERT_NAME_DNS_TYPE,
                                 name_flags,
                                 NULL,
                                 (LPTSTR) cert_hostname_buff,
                                 len);

  /* Sanity check */
  if(actual_len != len) {
    failf(data,
          "schannel: CertGetNameString() returned certificate "
          "name information of unexpected size");
    result = CURLE_PEER_FAILED_VERIFICATION;
    goto cleanup;
  }

  /* If HAVE_CERT_NAME_SEARCH_ALL_NAMES is available, the output
   * will contain all DNS names, where each name is null-terminated
   * and the last DNS name is double null-terminated. Due to this
   * encoding, use the length of the buffer to iterate over all names.
   */
  result = CURLE_PEER_FAILED_VERIFICATION;
  while(cert_hostname_buff_index < len &&
        cert_hostname_buff[cert_hostname_buff_index] != TEXT('\0') &&
        result == CURLE_PEER_FAILED_VERIFICATION) {

    char *cert_hostname;

    /* Comparing the cert name and the connection hostname encoded as UTF-8
     * is acceptable since both values are assumed to use ASCII
     * (or some equivalent) encoding
     */
    cert_hostname = Curl_convert_tchar_to_UTF8(
        &cert_hostname_buff[cert_hostname_buff_index]);
    if(!cert_hostname) {
      result = CURLE_OUT_OF_MEMORY;
    }
    else {
      int match_result;

      match_result = Curl_cert_hostcheck(cert_hostname, conn_hostname);
      if(match_result == CURL_HOST_MATCH) {
        infof(data,
              "schannel: connection hostname (%s) validated "
              "against certificate name (%s)\n",
              conn_hostname, cert_hostname);
        result = CURLE_OK;
      }
      else {
        size_t cert_hostname_len;

        infof(data,
              "schannel: connection hostname (%s) did not match "
              "against certificate name (%s)\n",
              conn_hostname, cert_hostname);

        cert_hostname_len = _tcslen(
            &cert_hostname_buff[cert_hostname_buff_index]);

        /* Move on to next cert name */
        cert_hostname_buff_index += cert_hostname_len + 1;

        result = CURLE_PEER_FAILED_VERIFICATION;
      }
      Curl_unicodefree(cert_hostname);
    }
  }

  if(result == CURLE_PEER_FAILED_VERIFICATION) {
    failf(data,
          "schannel: CertGetNameString() failed to match "
          "connection hostname (%s) against server certificate names",
          conn_hostname);
  }
  else if(result != CURLE_OK)
    failf(data, "schannel: server certificate name verification failed");

cleanup:
  Curl_unicodefree(cert_hostname_buff);

  return result;
}

CURLcode verify_certificate(struct connectdata *conn, int sockindex)
{
  SECURITY_STATUS status;
  struct Curl_easy *data = conn->data;
  struct ssl_connect_data *connssl = &conn->ssl[sockindex];
  CURLcode result = CURLE_OK;
  CERT_CONTEXT *pCertContextServer = NULL;
  const CERT_CHAIN_CONTEXT *pChainContext = NULL;
  HCERTCHAINENGINE cert_chain_engine = NULL;
  HCERTSTORE trust_store = NULL;
  const char * const conn_hostname = SSL_IS_PROXY() ?
    conn->http_proxy.host.name :
    conn->host.name;

  status = s_pSecFn->QueryContextAttributes(&BACKEND->ctxt->ctxt_handle,
                                            SECPKG_ATTR_REMOTE_CERT_CONTEXT,
                                            &pCertContextServer);

  if((status != SEC_E_OK) || (pCertContextServer == NULL)) {
    failf(data, "schannel: Failed to read remote certificate context: %s",
          Curl_sspi_strerror(conn, status));
    result = CURLE_PEER_FAILED_VERIFICATION;
  }

  if(result == CURLE_OK && SSL_CONN_CONFIG(CAfile) &&
      BACKEND->use_manual_cred_validation) {
    /*
     * Create a chain engine that uses the certificates in the CA file as
     * trusted certificates. This is only supported on Windows 7+.
     */

    if(Curl_verify_windows_version(6, 1, PLATFORM_WINNT, VERSION_LESS_THAN)) {
      failf(data, "schannel: this version of Windows is too old to support "
            "certificate verification via CA bundle file.");
      result = CURLE_SSL_CACERT_BADFILE;
    }
    else {
      /* Open the certificate store */
      trust_store = CertOpenStore(CERT_STORE_PROV_MEMORY,
                                  0,
                                  (HCRYPTPROV)NULL,
                                  CERT_STORE_CREATE_NEW_FLAG,
                                  NULL);
      if(!trust_store) {
        failf(data, "schannel: failed to create certificate store: %s",
              Curl_strerror(conn, GetLastError()));
        result = CURLE_SSL_CACERT_BADFILE;
      }
      else {
        result = add_certs_to_store(trust_store, SSL_CONN_CONFIG(CAfile),
                                    conn);
      }
    }

    if(result == CURLE_OK) {
      CERT_CHAIN_ENGINE_CONFIG_WIN7 engine_config;
      BOOL create_engine_result;

      memset(&engine_config, 0, sizeof(engine_config));
      engine_config.cbSize = sizeof(engine_config);
      engine_config.hExclusiveRoot = trust_store;

      /* CertCreateCertificateChainEngine will check the expected size of the
       * CERT_CHAIN_ENGINE_CONFIG structure and fail if the specified size
       * does not match the expected size. When this occurs, it indicates that
       * CAINFO is not supported on the version of Windows in use.
       */
      create_engine_result =
        CertCreateCertificateChainEngine(
          (CERT_CHAIN_ENGINE_CONFIG *)&engine_config, &cert_chain_engine);
      if(!create_engine_result) {
        failf(data,
              "schannel: failed to create certificate chain engine: %s",
              Curl_strerror(conn, GetLastError()));
        result = CURLE_SSL_CACERT_BADFILE;
      }
    }
  }

  if(result == CURLE_OK) {
    CERT_CHAIN_PARA ChainPara;

    memset(&ChainPara, 0, sizeof(ChainPara));
    ChainPara.cbSize = sizeof(ChainPara);

    if(!CertGetCertificateChain(cert_chain_engine,
                                pCertContextServer,
                                NULL,
                                pCertContextServer->hCertStore,
                                &ChainPara,
                                (data->set.ssl.no_revoke ? 0 :
                                 CERT_CHAIN_REVOCATION_CHECK_CHAIN),
                                NULL,
                                &pChainContext)) {
      failf(data, "schannel: CertGetCertificateChain failed: %s",
            Curl_sspi_strerror(conn, GetLastError()));
      pChainContext = NULL;
      result = CURLE_PEER_FAILED_VERIFICATION;
    }

    if(result == CURLE_OK) {
      CERT_SIMPLE_CHAIN *pSimpleChain = pChainContext->rgpChain[0];
      DWORD dwTrustErrorMask = ~(DWORD)(CERT_TRUST_IS_NOT_TIME_NESTED);
      dwTrustErrorMask &= pSimpleChain->TrustStatus.dwErrorStatus;
      if(dwTrustErrorMask) {
        if(dwTrustErrorMask & CERT_TRUST_IS_REVOKED)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_IS_REVOKED");
        else if(dwTrustErrorMask & CERT_TRUST_IS_PARTIAL_CHAIN)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_IS_PARTIAL_CHAIN");
        else if(dwTrustErrorMask & CERT_TRUST_IS_UNTRUSTED_ROOT)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_IS_UNTRUSTED_ROOT");
        else if(dwTrustErrorMask & CERT_TRUST_IS_NOT_TIME_VALID)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_IS_NOT_TIME_VALID");
        else if(dwTrustErrorMask & CERT_TRUST_REVOCATION_STATUS_UNKNOWN)
          failf(data, "schannel: CertGetCertificateChain trust error"
                " CERT_TRUST_REVOCATION_STATUS_UNKNOWN");
        else
          failf(data, "schannel: CertGetCertificateChain error mask: 0x%08x",
                dwTrustErrorMask);
        result = CURLE_PEER_FAILED_VERIFICATION;
      }
    }
  }

  if(result == CURLE_OK) {
    if(SSL_CONN_CONFIG(verifyhost)) {
      result = verify_host(conn->data, pCertContextServer, conn_hostname);
    }
  }

  if(cert_chain_engine) {
    CertFreeCertificateChainEngine(cert_chain_engine);
  }

  if(trust_store) {
    CertCloseStore(trust_store, 0);
  }

  if(pChainContext)
    CertFreeCertificateChain(pChainContext);

  if(pCertContextServer)
    CertFreeCertificateContext(pCertContextServer);

  return result;
}

#endif /* USE_SCHANNEL */
Changes to jni/curl/lib/vtls/vtls.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
ssl_connect_init_proxy(struct connectdata *conn, int sockindex)
{
  DEBUGASSERT(conn->bits.proxy_ssl_connected[sockindex]);
  if(ssl_connection_complete == conn->ssl[sockindex].state &&
     !conn->proxy_ssl[sockindex].use) {
    struct ssl_backend_data *pbdata;

    if(!Curl_ssl->support_https_proxy)
      return CURLE_NOT_BUILT_IN;

    /* The pointers to the ssl backend data, which is opaque here, are swapped
       rather than move the contents. */
    pbdata = conn->proxy_ssl[sockindex].backend;
    conn->proxy_ssl[sockindex] = conn->ssl[sockindex];








|







207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
ssl_connect_init_proxy(struct connectdata *conn, int sockindex)
{
  DEBUGASSERT(conn->bits.proxy_ssl_connected[sockindex]);
  if(ssl_connection_complete == conn->ssl[sockindex].state &&
     !conn->proxy_ssl[sockindex].use) {
    struct ssl_backend_data *pbdata;

    if(!(Curl_ssl->supports & SSLSUPP_HTTPS_PROXY))
      return CURLE_NOT_BUILT_IN;

    /* The pointers to the ssl backend data, which is opaque here, are swapped
       rather than move the contents. */
    pbdata = conn->proxy_ssl[sockindex].backend;
    conn->proxy_ssl[sockindex] = conn->ssl[sockindex];

507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
  }

  Curl_ssl->close_all(data);
}

#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
  defined(USE_DARWINSSL) || defined(USE_POLARSSL) || defined(USE_NSS) || \
  defined(USE_MBEDTLS)
int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks,
                     int numsocks)
{
  struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];

  if(!numsocks)
    return GETSOCK_BLANK;







|







507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
  }

  Curl_ssl->close_all(data);
}

#if defined(USE_OPENSSL) || defined(USE_GNUTLS) || defined(USE_SCHANNEL) || \
  defined(USE_DARWINSSL) || defined(USE_POLARSSL) || defined(USE_NSS) || \
  defined(USE_MBEDTLS) || defined(USE_CYASSL)
int Curl_ssl_getsock(struct connectdata *conn, curl_socket_t *socks,
                     int numsocks)
{
  struct ssl_connect_data *connssl = &conn->ssl[FIRSTSOCKET];

  if(!numsocks)
    return GETSOCK_BLANK;
827
828
829
830
831
832
833
834
835




836
837
838
839
840
841
842
      return result;
    }

    /* compute sha256sum of public key */
    sha256sumdigest = malloc(CURL_SHA256_DIGEST_LENGTH);
    if(!sha256sumdigest)
      return CURLE_OUT_OF_MEMORY;
    Curl_ssl->sha256sum(pubkey, pubkeylen,
                        sha256sumdigest, CURL_SHA256_DIGEST_LENGTH);




    encode = Curl_base64_encode(data, (char *)sha256sumdigest,
                                CURL_SHA256_DIGEST_LENGTH, &encoded,
                                &encodedlen);
    Curl_safefree(sha256sumdigest);

    if(encode)
      return encode;







|

>
>
>
>







827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
      return result;
    }

    /* compute sha256sum of public key */
    sha256sumdigest = malloc(CURL_SHA256_DIGEST_LENGTH);
    if(!sha256sumdigest)
      return CURLE_OUT_OF_MEMORY;
    encode = Curl_ssl->sha256sum(pubkey, pubkeylen,
                        sha256sumdigest, CURL_SHA256_DIGEST_LENGTH);

    if(encode != CURLE_OK)
      return encode;

    encode = Curl_base64_encode(data, (char *)sha256sumdigest,
                                CURL_SHA256_DIGEST_LENGTH, &encoded,
                                &encodedlen);
    Curl_safefree(sha256sumdigest);

    if(encode)
      return encode;
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
  if(multissl_init(NULL))
    return;
  Curl_ssl->close_one(conn, sockindex);
}

static const struct Curl_ssl Curl_ssl_multi = {
  { CURLSSLBACKEND_NONE, "multi" },  /* info */

  0, /* have_ca_path */
  0, /* have_certinfo */
  0, /* have_pinnedpubkey */
  0, /* have_ssl_ctx */
  0, /* support_https_proxy */

  (size_t)-1, /* something insanely large to be on the safe side */

  Curl_multissl_init,                /* init */
  Curl_none_cleanup,                 /* cleanup */
  Curl_multissl_version,             /* version */
  Curl_none_check_cxn,               /* check_cxn */
  Curl_none_shutdown,                /* shutdown */







<
<
<
<
<
|
<







1127
1128
1129
1130
1131
1132
1133





1134

1135
1136
1137
1138
1139
1140
1141
  if(multissl_init(NULL))
    return;
  Curl_ssl->close_one(conn, sockindex);
}

static const struct Curl_ssl Curl_ssl_multi = {
  { CURLSSLBACKEND_NONE, "multi" },  /* info */





  0, /* supports nothing */

  (size_t)-1, /* something insanely large to be on the safe side */

  Curl_multissl_init,                /* init */
  Curl_none_cleanup,                 /* cleanup */
  Curl_multissl_version,             /* version */
  Curl_none_check_cxn,               /* check_cxn */
  Curl_none_shutdown,                /* shutdown */
1296
1297
1298
1299
1300
1301
1302



1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
}

CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
                              const curl_ssl_backend ***avail)
{
  int i;




  if(Curl_ssl != &Curl_ssl_multi)
    return id == Curl_ssl->info.id ? CURLSSLSET_OK : CURLSSLSET_TOO_LATE;

  for(i = 0; available_backends[i]; i++) {
    if(available_backends[i]->info.id == id ||
       (name && strcasecompare(available_backends[i]->info.name, name))) {
      multissl_init(available_backends[i]);
      return CURLSSLSET_OK;
    }
  }

  if(avail)
    *avail = (const curl_ssl_backend **)&available_backends;
  return CURLSSLSET_UNKNOWN_BACKEND;
}

#else /* USE_SSL */
CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
                              const curl_ssl_backend ***avail)
{







>
>
>











<
<







1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314


1315
1316
1317
1318
1319
1320
1321
}

CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
                              const curl_ssl_backend ***avail)
{
  int i;

  if(avail)
    *avail = (const curl_ssl_backend **)&available_backends;

  if(Curl_ssl != &Curl_ssl_multi)
    return id == Curl_ssl->info.id ? CURLSSLSET_OK : CURLSSLSET_TOO_LATE;

  for(i = 0; available_backends[i]; i++) {
    if(available_backends[i]->info.id == id ||
       (name && strcasecompare(available_backends[i]->info.name, name))) {
      multissl_init(available_backends[i]);
      return CURLSSLSET_OK;
    }
  }



  return CURLSSLSET_UNKNOWN_BACKEND;
}

#else /* USE_SSL */
CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
                              const curl_ssl_backend ***avail)
{
Changes to jni/curl/lib/vtls/vtls.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28






29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef HEADER_CURL_VTLS_H
#define HEADER_CURL_VTLS_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/
#include "curl_setup.h"

struct connectdata;
struct ssl_connect_data;







struct Curl_ssl {
  /*
   * This *must* be the first entry to allow returning the list of available
   * backends in curl_global_sslset().
   */
  curl_ssl_backend info;

  unsigned have_ca_path:1;      /* supports CAPATH */
  unsigned have_certinfo:1;     /* supports CURLOPT_CERTINFO */
  unsigned have_pinnedpubkey:1; /* supports CURLOPT_PINNEDPUBLICKEY */
  unsigned have_ssl_ctx:1;      /* supports CURLOPT_SSL_CTX_* */

  unsigned support_https_proxy:1; /* supports access via HTTPS proxies */

  size_t sizeof_ssl_backend_data;

  int (*init)(void);
  void (*cleanup)(void);

  size_t (*version)(char *buffer, size_t size);
  int (*check_cxn)(struct connectdata *cxn);









|


















>
>
>
>
>
>






|
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41







42
43
44
45
46
47
48
#ifndef HEADER_CURL_VTLS_H
#define HEADER_CURL_VTLS_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/
#include "curl_setup.h"

struct connectdata;
struct ssl_connect_data;

#define SSLSUPP_CA_PATH      (1<<0) /* supports CAPATH */
#define SSLSUPP_CERTINFO     (1<<1) /* supports CURLOPT_CERTINFO */
#define SSLSUPP_PINNEDPUBKEY (1<<2) /* supports CURLOPT_PINNEDPUBLICKEY */
#define SSLSUPP_SSL_CTX      (1<<3) /* supports CURLOPT_SSL_CTX */
#define SSLSUPP_HTTPS_PROXY  (1<<4) /* supports access via HTTPS proxies */

struct Curl_ssl {
  /*
   * This *must* be the first entry to allow returning the list of available
   * backends in curl_global_sslset().
   */
  curl_ssl_backend info;
  unsigned int supports; /* bitfield, see above */







  size_t sizeof_ssl_backend_data;

  int (*init)(void);
  void (*cleanup)(void);

  size_t (*version)(char *buffer, size_t size);
  int (*check_cxn)(struct connectdata *cxn);
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
  CURLcode (*set_engine_default)(struct Curl_easy *data);
  struct curl_slist *(*engines_list)(struct Curl_easy *data);

  bool (*false_start)(void);

  CURLcode (*md5sum)(unsigned char *input, size_t inputlen,
                     unsigned char *md5sum, size_t md5sumlen);
  void (*sha256sum)(const unsigned char *input, size_t inputlen,
                    unsigned char *sha256sum, size_t sha256sumlen);
};

#ifdef USE_SSL
extern const struct Curl_ssl *Curl_ssl;
#endif








|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  CURLcode (*set_engine_default)(struct Curl_easy *data);
  struct curl_slist *(*engines_list)(struct Curl_easy *data);

  bool (*false_start)(void);

  CURLcode (*md5sum)(unsigned char *input, size_t inputlen,
                     unsigned char *md5sum, size_t md5sumlen);
  CURLcode (*sha256sum)(const unsigned char *input, size_t inputlen,
                    unsigned char *sha256sum, size_t sha256sumlen);
};

#ifdef USE_SSL
extern const struct Curl_ssl *Curl_ssl;
#endif

109
110
111
112
113
114
115

116

117
118
119
120
121
122
123
#include "mbedtls.h"        /* mbedTLS versions */

#ifndef MAX_PINNED_PUBKEY_SIZE
#define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1MB */
#endif

#ifndef MD5_DIGEST_LENGTH

#define MD5_DIGEST_LENGTH 16 /* fixed size */

#endif

#ifndef CURL_SHA256_DIGEST_LENGTH
#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
#endif

/* see https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04 */







>

>







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#include "mbedtls.h"        /* mbedTLS versions */

#ifndef MAX_PINNED_PUBKEY_SIZE
#define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1MB */
#endif

#ifndef MD5_DIGEST_LENGTH
#ifndef LIBWOLFSSL_VERSION_HEX /* because WolfSSL borks this */
#define MD5_DIGEST_LENGTH 16 /* fixed size */
#endif
#endif

#ifndef CURL_SHA256_DIGEST_LENGTH
#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
#endif

/* see https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04 */
Changes to jni/curl/lib/warnless.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef HEADER_CURL_WARNLESS_H
#define HEADER_CURL_WARNLESS_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/

#ifdef USE_WINSOCK
#include <curl/curl.h> /* for curl_socket_t */
#endif

#define CURLX_POINTER_TO_INTEGER_CAST(p) \
  ((char *)(p) - (char *)NULL)
#define CURLX_INTEGER_TO_POINTER_CAST(i) \
  ((void *)((char *)NULL + (i)))

unsigned short curlx_ultous(unsigned long ulnum);

unsigned char curlx_ultouc(unsigned long ulnum);

int curlx_ultosi(unsigned long ulnum);

int curlx_uztosi(size_t uznum);









|


















<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28





29
30
31
32
33
34
35
#ifndef HEADER_CURL_WARNLESS_H
#define HEADER_CURL_WARNLESS_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/

#ifdef USE_WINSOCK
#include <curl/curl.h> /* for curl_socket_t */
#endif






unsigned short curlx_ultous(unsigned long ulnum);

unsigned char curlx_ultouc(unsigned long ulnum);

int curlx_ultosi(unsigned long ulnum);

int curlx_uztosi(size_t uznum);
Changes to jni/curl/lib/wildcard.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
25
26
27
28
29
30
31






32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "wildcard.h"
#include "llist.h"
#include "fileinfo.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"







CURLcode Curl_wildcard_init(struct WildcardData *wc)
{
  Curl_llist_init(&wc->filelist, Curl_fileinfo_dtor);
  wc->state = CURLWC_INIT;

  return CURLE_OK;
}

void Curl_wildcard_dtor(struct WildcardData *wc)
{
  if(!wc)
    return;

  if(wc->tmp_dtor) {
    wc->tmp_dtor(wc->tmp);
    wc->tmp_dtor = ZERO_NULL;
    wc->tmp = NULL;
  }
  DEBUGASSERT(wc->tmp == NULL);

  Curl_llist_destroy(&wc->filelist, NULL);


  free(wc->path);
  wc->path = NULL;
  free(wc->pattern);
  wc->pattern = NULL;

  wc->customptr = NULL;
  wc->state = CURLWC_INIT;
}







>
>
>
>
>
>



|










|
|
|
|

|












25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include "wildcard.h"
#include "llist.h"
#include "fileinfo.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"

static void fileinfo_dtor(void *user, void *element)
{
  (void)user;
  Curl_fileinfo_cleanup(element);
}

CURLcode Curl_wildcard_init(struct WildcardData *wc)
{
  Curl_llist_init(&wc->filelist, fileinfo_dtor);
  wc->state = CURLWC_INIT;

  return CURLE_OK;
}

void Curl_wildcard_dtor(struct WildcardData *wc)
{
  if(!wc)
    return;

  if(wc->dtor) {
    wc->dtor(wc->protdata);
    wc->dtor = ZERO_NULL;
    wc->protdata = NULL;
  }
  DEBUGASSERT(wc->protdata == NULL);

  Curl_llist_destroy(&wc->filelist, NULL);


  free(wc->path);
  wc->path = NULL;
  free(wc->pattern);
  wc->pattern = NULL;

  wc->customptr = NULL;
  wc->state = CURLWC_INIT;
}
Changes to jni/curl/lib/wildcard.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_WILDCARD_H
#define HEADER_CURL_WILDCARD_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef HEADER_CURL_WILDCARD_H
#define HEADER_CURL_WILDCARD_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  CURLWC_CLEAN, /* deallocate resources and reset settings */
  CURLWC_SKIP,  /* skip over concrete file */
  CURLWC_ERROR, /* error cases */
  CURLWC_DONE   /* if is wildcard->state == CURLWC_DONE wildcard loop
                   will end */
} curl_wildcard_states;

typedef void (*curl_wildcard_tmp_dtor)(void *ptr);

/* struct keeping information about wildcard download process */
struct WildcardData {
  curl_wildcard_states state;
  char *path; /* path to the directory, where we trying wildcard-match */
  char *pattern; /* wildcard pattern */
  struct curl_llist filelist; /* llist with struct Curl_fileinfo */
  void *tmp; /* pointer to protocol specific temporary data */
  curl_wildcard_tmp_dtor tmp_dtor;
  void *customptr;  /* for CURLOPT_CHUNK_DATA pointer */
};

CURLcode Curl_wildcard_init(struct WildcardData *wc);
void Curl_wildcard_dtor(struct WildcardData *wc);

struct Curl_easy;

#endif /* HEADER_CURL_WILDCARD_H */







|







|
|









36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  CURLWC_CLEAN, /* deallocate resources and reset settings */
  CURLWC_SKIP,  /* skip over concrete file */
  CURLWC_ERROR, /* error cases */
  CURLWC_DONE   /* if is wildcard->state == CURLWC_DONE wildcard loop
                   will end */
} curl_wildcard_states;

typedef void (*curl_wildcard_dtor)(void *ptr);

/* struct keeping information about wildcard download process */
struct WildcardData {
  curl_wildcard_states state;
  char *path; /* path to the directory, where we trying wildcard-match */
  char *pattern; /* wildcard pattern */
  struct curl_llist filelist; /* llist with struct Curl_fileinfo */
  void *protdata; /* pointer to protocol specific temporary data */
  curl_wildcard_dtor dtor;
  void *customptr;  /* for CURLOPT_CHUNK_DATA pointer */
};

CURLcode Curl_wildcard_init(struct WildcardData *wc);
void Curl_wildcard_dtor(struct WildcardData *wc);

struct Curl_easy;

#endif /* HEADER_CURL_WILDCARD_H */
Changes to jni/curl/ltmain.sh.
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


PROGRAM=libtool
PACKAGE=libtool
VERSION="2.4.6 Debian-2.4.6-2"
package_revision=2.4.6


## ------ ##
## Usage. ##
## ------ ##








|







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


PROGRAM=libtool
PACKAGE=libtool
VERSION="2.4.6 Debian-2.4.6-2.1"
package_revision=2.4.6


## ------ ##
## Usage. ##
## ------ ##

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
## Source external libraries. ##
## -------------------------- ##

# Much of our low-level functionality needs to be sourced from external
# libraries, which are installed to $pkgauxdir.

# Set a version string for this script.
scriptversion=2015-01-20.17; # UTC

# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004

# Copyright (C) 2004-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.







|







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
## Source external libraries. ##
## -------------------------- ##

# Much of our low-level functionality needs to be sourced from external
# libraries, which are installed to $pkgauxdir.

# Set a version string for this script.
scriptversion=2015-10-12.13; # UTC

# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004

# Copyright (C) 2004-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# Quote VALUE and append to the end of shell variable VAR, separated
# by a space.
if test yes = "$_G_HAVE_PLUSEQ_OP"; then
  eval 'func_append_quoted ()
  {
    $debug_cmd

    func_quote_for_eval "$2"
    eval "$1+=\\ \$func_quote_for_eval_result"
  }'
else
  func_append_quoted ()
  {
    $debug_cmd

    func_quote_for_eval "$2"
    eval "$1=\$$1\\ \$func_quote_for_eval_result"
  }
fi


# func_append_uniq VAR VALUE
# --------------------------
# Append unique VALUE onto the existing contents of VAR, assuming







|
|






|
|







576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# Quote VALUE and append to the end of shell variable VAR, separated
# by a space.
if test yes = "$_G_HAVE_PLUSEQ_OP"; then
  eval 'func_append_quoted ()
  {
    $debug_cmd

    func_quote_arg pretty "$2"
    eval "$1+=\\ \$func_quote_arg_result"
  }'
else
  func_append_quoted ()
  {
    $debug_cmd

    func_quote_arg pretty "$2"
    eval "$1=\$$1\\ \$func_quote_arg_result"
  }
fi


# func_append_uniq VAR VALUE
# --------------------------
# Append unique VALUE onto the existing contents of VAR, assuming
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097

1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108

1109








1110
1111
1112
1113


1114
1115
1116
1117



1118


1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129

1130












1131



1132









1133
1134

















1135
1136
1137
1138
1139
1140
1141
1142
1143










1144













1145
1146












1147
1148
1149
1150
1151





1152
1153
1154
1155


1156
1157

1158



1159
1160
1161
1162
1163


1164
1165
1166
1167
1168
1169
1170
1171


1172









1173
1174
1175
1176
1177
1178
1179

    test -n "$func_relative_path_result" || func_relative_path_result=.

    :
}


# func_quote_for_eval ARG...
# --------------------------
# Aesthetically quote ARGs to be evaled later.
# This function returns two values:

#   i) func_quote_for_eval_result
#      double-quoted, suitable for a subsequent eval
#  ii) func_quote_for_eval_unquoted_result
#      has all characters that are still active within double
#      quotes backslashified.
func_quote_for_eval ()
{
    $debug_cmd

    func_quote_for_eval_unquoted_result=
    func_quote_for_eval_result=

    while test 0 -lt $#; do








      case $1 in
        *[\\\`\"\$]*)
	  _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
        *)


          _G_unquoted_arg=$1 ;;
      esac
      if test -n "$func_quote_for_eval_unquoted_result"; then
	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"



      else


        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
      fi

      case $_G_unquoted_arg in
        # Double-quote args containing shell metacharacters to delay
        # word splitting, command substitution and variable expansion
        # for a subsequent eval.
        # Many Bourne shells cannot handle close brackets correctly
        # in scan sets, so we specify it separately.
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
          _G_quoted_arg=\"$_G_unquoted_arg\"

          ;;












        *)



          _G_quoted_arg=$_G_unquoted_arg









	  ;;
      esac


















      if test -n "$func_quote_for_eval_result"; then
	func_append func_quote_for_eval_result " $_G_quoted_arg"
      else
        func_append func_quote_for_eval_result "$_G_quoted_arg"
      fi
      shift
    done
}

























# func_quote_for_expand ARG












# -------------------------
# Aesthetically quote ARG to be evaled later; same as above,
# but do not quote variable references.
func_quote_for_expand ()
{





    $debug_cmd

    case $1 in
      *[\\\`\"]*)


	_G_arg=`$ECHO "$1" | $SED \
	    -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;

      *)



        _G_arg=$1 ;;
    esac

    case $_G_arg in
      # Double-quote args containing shell metacharacters to delay


      # word splitting and command substitution for a subsequent eval.
      # Many Bourne shells cannot handle close brackets correctly
      # in scan sets, so we specify it separately.
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
        _G_arg=\"$_G_arg\"
        ;;
    esac



    func_quote_for_expand_result=$_G_arg









}


# func_stripname PREFIX SUFFIX NAME
# ---------------------------------
# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
# PREFIX and SUFFIX must not contain globbing or regex special







|
|
<
|
>
|
<
<
<
<
|



|
|
>
|
>
>
>
>
>
>
>
>
|

|
|
>
>
|
|
|
|
>
>
>
|
>
>
|
<
|
|
|
<
<
<
<
<
|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
|
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
<
<
|
|
<
|
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
|
|
<
|

>
>
>
>
>
|

|
<
>
>
|
|
>

>
>
>
|

|
|
|
>
>
|
<
<
<
|
<
|
|
>
>
|
>
>
>
>
>
>
>
>
>







1087
1088
1089
1090
1091
1092
1093
1094
1095

1096
1097
1098




1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131

1132
1133
1134





1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183




1184
1185

1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226

1227
1228
1229
1230
1231
1232
1233
1234
1235
1236

1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253



1254

1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275

    test -n "$func_relative_path_result" || func_relative_path_result=.

    :
}


# func_quote_portable EVAL ARG
# ----------------------------

# Internal function to portably implement func_quote_arg.  Note that we still
# keep attention to performance here so we as much as possible try to avoid
# calling sed binary (so far O(N) complexity as long as func_append is O(1)).




func_quote_portable ()
{
    $debug_cmd

    func_quote_portable_result=$2

    # one-time-loop (easy break)
    while true
    do
      if $1; then
        func_quote_portable_result=`$ECHO "$2" | $SED \
          -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
        break
      fi

      # Quote for eval.
      case $func_quote_portable_result in
        *[\\\`\"\$]*)
          case $func_quote_portable_result in
            *[\[\*\?]*)
              func_quote_portable_result=`$ECHO "$func_quote_portable_result" | $SED "$sed_quote_subst"`
              break
              ;;
          esac

          func_quote_portable_old_IFS=$IFS
          for _G_char in '\' '`' '"' '$'
          do
            # STATE($1) PREV($2) SEPARATOR($3)
            set start "" ""
            func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
            IFS=$_G_char
            for _G_part in $func_quote_portable_result

            do
              case $1 in
              quote)





                func_append func_quote_portable_result "$3$2"
                set quote "$_G_part" "\\$_G_char"
                ;;
              start)
                set first "" ""
                func_quote_portable_result=
                ;;
              first)
                set quote "$_G_part" ""
                ;;
              esac
            done
          done
          IFS=$func_quote_portable_old_IFS
          ;;
        *) ;;
      esac
      break
    done

    func_quote_portable_unquoted_result=$func_quote_portable_result
    case $func_quote_portable_result in
      # double-quote args containing shell metacharacters to delay
      # word splitting, command substitution and variable expansion
      # for a subsequent eval.
      # many bourne shells cannot handle close brackets correctly
      # in scan sets, so we specify it separately.
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
        func_quote_portable_result=\"$func_quote_portable_result\"
        ;;
    esac
}


# func_quotefast_eval ARG
# -----------------------
# Quote one ARG (internal).  This is equivalent to 'func_quote_arg eval ARG',
# but optimized for speed.  Result is stored in $func_quotefast_eval.
if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
  func_quotefast_eval ()
  {
    printf -v func_quotefast_eval_result %q "$1"
  }
else
  func_quotefast_eval ()
  {
    func_quote_portable false "$1"
    func_quotefast_eval_result=$func_quote_portable_result
  }




fi



# func_quote_arg MODEs ARG
# ------------------------
# Quote one ARG to be evaled later.  MODEs argument may contain zero ore more
# specifiers listed below separated by ',' character.  This function returns two
# values:
#   i) func_quote_arg_result
#      double-quoted (when needed), suitable for a subsequent eval
#  ii) func_quote_arg_unquoted_result
#      has all characters that are still active within double
#      quotes backslashified.  Available only if 'unquoted' is specified.
#
# Available modes:
# ----------------
# 'eval' (default)
#       - escape shell special characters
# 'expand'
#       - the same as 'eval';  but do not quote variable references
# 'pretty'
#       - request aesthetic output, i.e. '"a b"' instead of 'a\ b'.  This might
#         later used in func_quote to get output like: 'echo "a b"' instead of
#         'echo a\ b'.  This is slower than default on some shells.
# 'unquoted'
#       - produce also $func_quote_arg_unquoted_result which does not contain
#         wrapping double-quotes.
#
# Examples for 'func_quote_arg pretty,unquoted string':
#
#   string      | *_result              | *_unquoted_result
#   ------------+-----------------------+-------------------
#   "           | \"                    | \"
#   a b         | "a b"                 | a b
#   "a b"       | "\"a b\""             | \"a b\"
#   *           | "*"                   | *
#   z="${x-$y}" | "z=\"\${x-\$y}\""     | z=\"\${x-\$y}\"
#
# Examples for 'func_quote_arg pretty,unquoted,expand string':
#
#   string        |   *_result          |  *_unquoted_result
#   --------------+---------------------+--------------------
#   z="${x-$y}"   | "z=\"${x-$y}\""     | z=\"${x-$y}\"

func_quote_arg ()
{
    _G_quote_expand=false
    case ,$1, in
      *,expand,*)
        _G_quote_expand=:
        ;;
    esac

    case ,$1, in

      *,pretty,*|*,expand,*|*,unquoted,*)
        func_quote_portable $_G_quote_expand "$2"
        func_quote_arg_result=$func_quote_portable_result
        func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
        ;;
      *)
        # Faster quote-for-eval for some shells.
        func_quotefast_eval "$2"
        func_quote_arg_result=$func_quotefast_eval_result
        ;;
    esac
}


# func_quote MODEs ARGs...
# ------------------------
# Quote all ARGs to be evaled later and join them into single command.  See



# func_quote_arg's description for more info.

func_quote ()
{
    $debug_cmd
    _G_func_quote_mode=$1 ; shift
    func_quote_result=
    while test 0 -lt $#; do
      func_quote_arg "$_G_func_quote_mode" "$1"
      if test -n "$func_quote_result"; then
        func_append func_quote_result " $func_quote_arg_result"
      else
        func_append func_quote_result "$func_quote_arg_result"
      fi
      shift
    done
}


# func_stripname PREFIX SUFFIX NAME
# ---------------------------------
# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
# PREFIX and SUFFIX must not contain globbing or regex special
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
func_show_eval ()
{
    $debug_cmd

    _G_cmd=$1
    _G_fail_exp=${2-':'}

    func_quote_for_expand "$_G_cmd"
    eval "func_notquiet $func_quote_for_expand_result"

    $opt_dry_run || {
      eval "$_G_cmd"
      _G_status=$?
      if test 0 -ne "$_G_status"; then
	eval "(exit $_G_status); $_G_fail_exp"
      fi







|
|







1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
func_show_eval ()
{
    $debug_cmd

    _G_cmd=$1
    _G_fail_exp=${2-':'}

    func_quote_arg pretty,expand "$_G_cmd"
    eval "func_notquiet $func_quote_arg_result"

    $opt_dry_run || {
      eval "$_G_cmd"
      _G_status=$?
      if test 0 -ne "$_G_status"; then
	eval "(exit $_G_status); $_G_fail_exp"
      fi
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
{
    $debug_cmd

    _G_cmd=$1
    _G_fail_exp=${2-':'}

    $opt_quiet || {
      func_quote_for_expand "$_G_cmd"
      eval "func_echo $func_quote_for_expand_result"
    }

    $opt_dry_run || {
      eval "$_G_user_locale
	    $_G_cmd"
      _G_status=$?
      eval "$_G_safe_locale"







|
|







1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
{
    $debug_cmd

    _G_cmd=$1
    _G_fail_exp=${2-':'}

    $opt_quiet || {
      func_quote_arg expand,pretty "$_G_cmd"
      eval "func_echo $func_quote_arg_result"
    }

    $opt_dry_run || {
      eval "$_G_user_locale
	    $_G_cmd"
      _G_status=$?
      eval "$_G_safe_locale"
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:
#! /bin/sh

# Set a version string for this script.
scriptversion=2014-01-07.03; # UTC

# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010

# Copyright (C) 2010-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.







|







1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:
#! /bin/sh

# Set a version string for this script.
scriptversion=2015-10-12.13; # UTC

# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010

# Copyright (C) 2010-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1525
1526
1527
1528
1529
1530
1531


1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546


1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562






1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573

1574
1575

1576
1577
1578
1579
1580
1581
1582


1583
1584
1585
1586
1587
1588
1589
1590


1591
1592
1593
1594
1595

1596
1597



1598
1599
1600

1601
1602



1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622

















1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635

1636
1637
1638
1639
1640


1641
1642






1643



1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663

1664
1665
1666
1667



1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680

1681
1682
1683
1684
1685
1686
1687
1688


1689
1690
1691
1692

1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707



1708
1709
1710
1711
1712
1713
1714
# It is assumed that the list of hook functions contains nothing more
# than a whitespace-delimited list of legal shell function names, and
# no effort is wasted trying to catch shell meta-characters or preserve
# whitespace.
func_run_hooks ()
{
    $debug_cmd



    case " $hookable_fns " in
      *" $1 "*) ;;
      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
    esac

    eval _G_hook_fns=\$$1_hooks; shift

    for _G_hook in $_G_hook_fns; do
      eval $_G_hook '"$@"'

      # store returned options list back into positional
      # parameters for next 'cmd' execution.
      eval _G_hook_result=\$${_G_hook}_result
      eval set dummy "$_G_hook_result"; shift


    done

    func_quote_for_eval ${1+"$@"}
    func_run_hooks_result=$func_quote_for_eval_result
}



## --------------- ##
## Option parsing. ##
## --------------- ##

# In order to add your own option parsing hooks, you must accept the
# full positional parameter list in your hook function, remove any
# options that you action, and then pass back the remaining unprocessed
# options in '<hooked_function_name>_result', escaped suitably for






# 'eval'.  Like this:
#
#    my_options_prep ()
#    {
#        $debug_cmd
#
#        # Extend the existing usage message.
#        usage_message=$usage_message'
#      -s, --silent       don'\''t print informational messages
#    '
#

#        func_quote_for_eval ${1+"$@"}
#        my_options_prep_result=$func_quote_for_eval_result

#    }
#    func_add_hook func_options_prep my_options_prep
#
#
#    my_silent_option ()
#    {
#        $debug_cmd


#
#        # Note that for efficiency, we parse as many options as we can
#        # recognise in a loop before passing the remainder back to the
#        # caller on the first unrecognised argument we encounter.
#        while test $# -gt 0; do
#          opt=$1; shift
#          case $opt in
#            --silent|-s) opt_silent=: ;;


#            # Separate non-argument short options:
#            -s*)         func_split_short_opt "$_G_opt"
#                         set dummy "$func_split_short_opt_name" \
#                             "-$func_split_short_opt_arg" ${1+"$@"}
#                         shift

#                         ;;
#            *)            set dummy "$_G_opt" "$*"; shift; break ;;



#          esac
#        done
#

#        func_quote_for_eval ${1+"$@"}
#        my_silent_option_result=$func_quote_for_eval_result



#    }
#    func_add_hook func_parse_options my_silent_option
#
#
#    my_option_validation ()
#    {
#        $debug_cmd
#
#        $opt_silent && $opt_verbose && func_fatal_help "\
#    '--silent' and '--verbose' options are mutually exclusive."
#
#        func_quote_for_eval ${1+"$@"}
#        my_option_validation_result=$func_quote_for_eval_result
#    }
#    func_add_hook func_validate_options my_option_validation
#
# You'll alse need to manually amend $usage_message to reflect the extra
# options you parse.  It's preferable to append if you can, so that
# multiple option parsing hooks can be added safely.



















# func_options [ARG]...
# ---------------------
# All the functions called inside func_options are hookable. See the
# individual implementations for details.
func_hookable func_options
func_options ()
{
    $debug_cmd

    func_options_prep ${1+"$@"}
    eval func_parse_options \
        ${func_options_prep_result+"$func_options_prep_result"}

    eval func_validate_options \
        ${func_parse_options_result+"$func_parse_options_result"}

    eval func_run_hooks func_options \
        ${func_validate_options_result+"$func_validate_options_result"}



    # save modified positional parameters for caller






    func_options_result=$func_run_hooks_result



}


# func_options_prep [ARG]...
# --------------------------
# All initialisations required before starting the option parse loop.
# Note that when calling hook functions, we pass through the list of
# positional parameters.  If a hook function modifies that list, and
# needs to propogate that back to rest of this script, then the complete
# modified list must be put in 'func_run_hooks_result' before
# returning.
func_hookable func_options_prep
func_options_prep ()
{
    $debug_cmd

    # Option defaults:
    opt_verbose=false
    opt_warning_types=


    func_run_hooks func_options_prep ${1+"$@"}

    # save modified positional parameters for caller
    func_options_prep_result=$func_run_hooks_result



}


# func_parse_options [ARG]...
# ---------------------------
# The main option parsing loop.
func_hookable func_parse_options
func_parse_options ()
{
    $debug_cmd

    func_parse_options_result=


    # this just eases exit handling
    while test $# -gt 0; do
      # Defer to hook functions for initial option parsing, so they
      # get priority in the event of reusing an option name.
      func_run_hooks func_parse_options ${1+"$@"}

      # Adjust func_parse_options positional parameters to match
      eval set dummy "$func_run_hooks_result"; shift



      # Break out of the loop if we already parsed every option.
      test $# -gt 0 || break


      _G_opt=$1
      shift
      case $_G_opt in
        --debug|-x)   debug_cmd='set -x'
                      func_echo "enabling shell trace mode"
                      $debug_cmd
                      ;;

        --no-warnings|--no-warning|--no-warn)
                      set dummy --warnings none ${1+"$@"}
                      shift
		      ;;

        --warnings|--warning|-W)
                      test $# = 0 && func_missing_arg $_G_opt && break



                      case " $warning_categories $1" in
                        *" $1 "*)
                          # trailing space prevents matching last $1 above
                          func_append_uniq opt_warning_types " $1"
                          ;;
                        *all)
                          opt_warning_types=$warning_categories







>
>









|
<
|
|
|
|
>
>


<
|









|
|

>
>
>
>
>
>
|









|
>
|
|
>







>
>







|
>
>





>

|
>
>
>



>
|
|
>
>
>











|
<



|



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










|
|
|
>
|
|
|
|
<
>
>

|
>
>
>
>
>
>
|
>
>
>








|

|









>
|
|
|
|
>
>
>













>




|
<
<
|
>
>




>














|
>
>
>







1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639

1640
1641
1642
1643
1644
1645
1646
1647

1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732

1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774

1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835


1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
# It is assumed that the list of hook functions contains nothing more
# than a whitespace-delimited list of legal shell function names, and
# no effort is wasted trying to catch shell meta-characters or preserve
# whitespace.
func_run_hooks ()
{
    $debug_cmd

    _G_rc_run_hooks=false

    case " $hookable_fns " in
      *" $1 "*) ;;
      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
    esac

    eval _G_hook_fns=\$$1_hooks; shift

    for _G_hook in $_G_hook_fns; do
      if eval $_G_hook '"$@"'; then

        # store returned options list back into positional
        # parameters for next 'cmd' execution.
        eval _G_hook_result=\$${_G_hook}_result
        eval set dummy "$_G_hook_result"; shift
        _G_rc_run_hooks=:
      fi
    done


    $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
}



## --------------- ##
## Option parsing. ##
## --------------- ##

# In order to add your own option parsing hooks, you must accept the
# full positional parameter list in your hook function, you may remove/edit
# any options that you action, and then pass back the remaining unprocessed
# options in '<hooked_function_name>_result', escaped suitably for
# 'eval'.  In this case you also must return $EXIT_SUCCESS to let the
# hook's caller know that it should pay attention to
# '<hooked_function_name>_result'.  Returning $EXIT_FAILURE signalizes that
# arguments are left untouched by the hook and therefore caller will ignore the
# result variable.
#
# Like this:
#
#    my_options_prep ()
#    {
#        $debug_cmd
#
#        # Extend the existing usage message.
#        usage_message=$usage_message'
#      -s, --silent       don'\''t print informational messages
#    '
#        # No change in '$@' (ignored completely by this hook).  There is
#        # no need to do the equivalent (but slower) action:
#        # func_quote eval ${1+"$@"}
#        # my_options_prep_result=$func_quote_result
#        false
#    }
#    func_add_hook func_options_prep my_options_prep
#
#
#    my_silent_option ()
#    {
#        $debug_cmd
#
#        args_changed=false
#
#        # Note that for efficiency, we parse as many options as we can
#        # recognise in a loop before passing the remainder back to the
#        # caller on the first unrecognised argument we encounter.
#        while test $# -gt 0; do
#          opt=$1; shift
#          case $opt in
#            --silent|-s) opt_silent=:
#                         args_changed=:
#                         ;;
#            # Separate non-argument short options:
#            -s*)         func_split_short_opt "$_G_opt"
#                         set dummy "$func_split_short_opt_name" \
#                             "-$func_split_short_opt_arg" ${1+"$@"}
#                         shift
#                         args_changed=:
#                         ;;
#            *)           # Make sure the first unrecognised option "$_G_opt"
#                         # is added back to "$@", we could need that later
#                         # if $args_changed is true.
#                         set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
#          esac
#        done
#
#        if $args_changed; then
#          func_quote eval ${1+"$@"}
#          my_silent_option_result=$func_quote_result
#        fi
#
#        $args_changed
#    }
#    func_add_hook func_parse_options my_silent_option
#
#
#    my_option_validation ()
#    {
#        $debug_cmd
#
#        $opt_silent && $opt_verbose && func_fatal_help "\
#    '--silent' and '--verbose' options are mutually exclusive."
#
#        false

#    }
#    func_add_hook func_validate_options my_option_validation
#
# You'll also need to manually amend $usage_message to reflect the extra
# options you parse.  It's preferable to append if you can, so that
# multiple option parsing hooks can be added safely.


# func_options_finish [ARG]...
# ----------------------------
# Finishing the option parse loop (call 'func_options' hooks ATM).
func_options_finish ()
{
    $debug_cmd

    _G_func_options_finish_exit=false
    if func_run_hooks func_options ${1+"$@"}; then
      func_options_finish_result=$func_run_hooks_result
      _G_func_options_finish_exit=:
    fi

    $_G_func_options_finish_exit
}


# func_options [ARG]...
# ---------------------
# All the functions called inside func_options are hookable. See the
# individual implementations for details.
func_hookable func_options
func_options ()
{
    $debug_cmd

    _G_rc_options=false

    for my_func in options_prep parse_options validate_options options_finish
    do
      if eval func_$my_func '${1+"$@"}'; then
        eval _G_res_var='$'"func_${my_func}_result"
        eval set dummy "$_G_res_var" ; shift
        _G_rc_options=:

      fi
    done

    # Save modified positional parameters for caller.  As a top-level
    # options-parser function we always need to set the 'func_options_result'
    # variable (regardless the $_G_rc_options value).
    if $_G_rc_options; then
      func_options_result=$_G_res_var
    else
      func_quote eval ${1+"$@"}
      func_options_result=$func_quote_result
    fi

    $_G_rc_options
}


# func_options_prep [ARG]...
# --------------------------
# All initialisations required before starting the option parse loop.
# Note that when calling hook functions, we pass through the list of
# positional parameters.  If a hook function modifies that list, and
# needs to propagate that back to rest of this script, then the complete
# modified list must be put in 'func_run_hooks_result' before
# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
func_hookable func_options_prep
func_options_prep ()
{
    $debug_cmd

    # Option defaults:
    opt_verbose=false
    opt_warning_types=

    _G_rc_options_prep=false
    if func_run_hooks func_options_prep ${1+"$@"}; then
      _G_rc_options_prep=:
      # save modified positional parameters for caller
      func_options_prep_result=$func_run_hooks_result
    fi

    $_G_rc_options_prep
}


# func_parse_options [ARG]...
# ---------------------------
# The main option parsing loop.
func_hookable func_parse_options
func_parse_options ()
{
    $debug_cmd

    func_parse_options_result=

    _G_rc_parse_options=false
    # this just eases exit handling
    while test $# -gt 0; do
      # Defer to hook functions for initial option parsing, so they
      # get priority in the event of reusing an option name.
      if func_run_hooks func_parse_options ${1+"$@"}; then


        eval set dummy "$func_run_hooks_result"; shift
        _G_rc_parse_options=:
      fi

      # Break out of the loop if we already parsed every option.
      test $# -gt 0 || break

      _G_match_parse_options=:
      _G_opt=$1
      shift
      case $_G_opt in
        --debug|-x)   debug_cmd='set -x'
                      func_echo "enabling shell trace mode"
                      $debug_cmd
                      ;;

        --no-warnings|--no-warning|--no-warn)
                      set dummy --warnings none ${1+"$@"}
                      shift
		      ;;

        --warnings|--warning|-W)
                      if test $# = 0 && func_missing_arg $_G_opt; then
                        _G_rc_parse_options=:
                        break
                      fi
                      case " $warning_categories $1" in
                        *" $1 "*)
                          # trailing space prevents matching last $1 above
                          func_append_uniq opt_warning_types " $1"
                          ;;
                        *all)
                          opt_warning_types=$warning_categories
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762



1763


1764
1765


1766
1767
1768



1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779


1780
1781
1782
1783
1784




1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
        -\?*|-h*|-v*|-x*)
                      func_split_short_opt "$_G_opt"
                      set dummy "$func_split_short_opt_name" \
                          "-$func_split_short_opt_arg" ${1+"$@"}
                      shift
                      ;;

        --)           break ;;
        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;



      esac


    done



    # save modified positional parameters for caller
    func_quote_for_eval ${1+"$@"}
    func_parse_options_result=$func_quote_for_eval_result



}


# func_validate_options [ARG]...
# ------------------------------
# Perform any sanity checks on option settings and/or unconsumed
# arguments.
func_hookable func_validate_options
func_validate_options ()
{
    $debug_cmd



    # Display all warnings if -W was not given.
    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"

    func_run_hooks func_validate_options ${1+"$@"}





    # Bail if the options were screwed!
    $exit_cmd $EXIT_FAILURE

    # save modified positional parameters for caller
    func_validate_options_result=$func_run_hooks_result
}



## ----------------- ##
## Helper functions. ##
## ----------------- ##







|

|
>
>
>

>
>


>
>
|
|
|
>
>
>











>
>




|
>
>
>
>




<
|







1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958

1959
1960
1961
1962
1963
1964
1965
1966
        -\?*|-h*|-v*|-x*)
                      func_split_short_opt "$_G_opt"
                      set dummy "$func_split_short_opt_name" \
                          "-$func_split_short_opt_arg" ${1+"$@"}
                      shift
                      ;;

        --)           _G_rc_parse_options=: ; break ;;
        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
        *)            set dummy "$_G_opt" ${1+"$@"}; shift
                      _G_match_parse_options=false
                      break
                      ;;
      esac

      $_G_match_parse_options && _G_rc_parse_options=:
    done


    if $_G_rc_parse_options; then
      # save modified positional parameters for caller
      func_quote eval ${1+"$@"}
      func_parse_options_result=$func_quote_result
    fi

    $_G_rc_parse_options
}


# func_validate_options [ARG]...
# ------------------------------
# Perform any sanity checks on option settings and/or unconsumed
# arguments.
func_hookable func_validate_options
func_validate_options ()
{
    $debug_cmd

    _G_rc_validate_options=false

    # Display all warnings if -W was not given.
    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"

    if func_run_hooks func_validate_options ${1+"$@"}; then
      # save modified positional parameters for caller
      func_validate_options_result=$func_run_hooks_result
      _G_rc_validate_options=:
    fi

    # Bail if the options were screwed!
    $exit_cmd $EXIT_FAILURE


    $_G_rc_validate_options
}



## ----------------- ##
## Helper functions. ##
## ----------------- ##
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
include the following information:

       host-triplet:   $host
       shell:          $SHELL
       compiler:       $LTCC
       compiler flags: $LTCFLAGS
       linker:         $LD (gnu? $with_gnu_ld)
       version:        $progname $scriptversion Debian-2.4.6-2
       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`

Report bugs to <bug-libtool@gnu.org>.
GNU libtool home page: <http://www.gnu.org/s/libtool/>.
General help using GNU software: <http://www.gnu.org/gethelp/>."
    exit 0







|







2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
include the following information:

       host-triplet:   $host
       shell:          $SHELL
       compiler:       $LTCC
       compiler flags: $LTCFLAGS
       linker:         $LD (gnu? $with_gnu_ld)
       version:        $progname $scriptversion Debian-2.4.6-2.1
       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`

Report bugs to <bug-libtool@gnu.org>.
GNU libtool home page: <http://www.gnu.org/s/libtool/>.
General help using GNU software: <http://www.gnu.org/gethelp/>."
    exit 0
2265
2266
2267
2268
2269
2270
2271


2272
2273
2274
2275
2276
2277
2278
    opt_help=false
    opt_mode=
    opt_preserve_dup_deps=false
    opt_quiet=false

    nonopt=
    preserve_args=



    # Shorthand for --mode=foo, only valid as the first argument
    case $1 in
    clean|clea|cle|cl)
      shift; set dummy --mode clean ${1+"$@"}; shift
      ;;
    compile|compil|compi|comp|com|co|c)







>
>







2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
    opt_help=false
    opt_mode=
    opt_preserve_dup_deps=false
    opt_quiet=false

    nonopt=
    preserve_args=

    _G_rc_lt_options_prep=:

    # Shorthand for --mode=foo, only valid as the first argument
    case $1 in
    clean|clea|cle|cl)
      shift; set dummy --mode clean ${1+"$@"}; shift
      ;;
    compile|compil|compi|comp|com|co|c)
2289
2290
2291
2292
2293
2294
2295



2296
2297

2298
2299
2300



2301
2302
2303
2304
2305
2306
2307
2308
2309
2310


2311
2312
2313
2314

2315
2316
2317
2318
2319
2320
2321
      ;;
    link|lin|li|l)
      shift; set dummy --mode link ${1+"$@"}; shift
      ;;
    uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
      shift; set dummy --mode uninstall ${1+"$@"}; shift
      ;;



    esac


    # Pass back the list of options.
    func_quote_for_eval ${1+"$@"}
    libtool_options_prep_result=$func_quote_for_eval_result



}
func_add_hook func_options_prep libtool_options_prep


# libtool_parse_options [ARG]...
# ---------------------------------
# Provide handling for libtool specific options.
libtool_parse_options ()
{
    $debug_cmd



    # Perform our own loop to consume as many options as possible in
    # each iteration.
    while test $# -gt 0; do

      _G_opt=$1
      shift
      case $_G_opt in
        --dry-run|--dryrun|-n)
                        opt_dry_run=:
                        ;;








>
>
>


>
|
|
|
>
>
>










>
>




>







2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
      ;;
    link|lin|li|l)
      shift; set dummy --mode link ${1+"$@"}; shift
      ;;
    uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
      shift; set dummy --mode uninstall ${1+"$@"}; shift
      ;;
    *)
      _G_rc_lt_options_prep=false
      ;;
    esac

    if $_G_rc_lt_options_prep; then
      # Pass back the list of options.
      func_quote eval ${1+"$@"}
      libtool_options_prep_result=$func_quote_result
    fi

    $_G_rc_lt_options_prep
}
func_add_hook func_options_prep libtool_options_prep


# libtool_parse_options [ARG]...
# ---------------------------------
# Provide handling for libtool specific options.
libtool_parse_options ()
{
    $debug_cmd

    _G_rc_lt_parse_options=false

    # Perform our own loop to consume as many options as possible in
    # each iteration.
    while test $# -gt 0; do
      _G_match_lt_parse_options=:
      _G_opt=$1
      shift
      case $_G_opt in
        --dry-run|--dryrun|-n)
                        opt_dry_run=:
                        ;;

2382
2383
2384
2385
2386
2387
2388
2389
2390



2391

2392
2393
2394
2395
2396
2397



2398
2399
2400
2401
2402
2403
2404
                        ;;

        --verbose|-v)   opt_quiet=false
                        opt_verbose=:
                        func_append preserve_args " $_G_opt"
                        ;;

	# An option not handled by this hook function:
        *)		set dummy "$_G_opt" ${1+"$@"};	shift; break  ;;



      esac

    done


    # save modified positional parameters for caller
    func_quote_for_eval ${1+"$@"}
    libtool_parse_options_result=$func_quote_for_eval_result



}
func_add_hook func_parse_options libtool_parse_options



# libtool_validate_options [ARG]...
# ---------------------------------







|
|
>
>
>

>


|
|
|
|
>
>
>







2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
                        ;;

        --verbose|-v)   opt_quiet=false
                        opt_verbose=:
                        func_append preserve_args " $_G_opt"
                        ;;

        # An option not handled by this hook function:
        *)              set dummy "$_G_opt" ${1+"$@"} ; shift
                        _G_match_lt_parse_options=false
                        break
                        ;;
      esac
      $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
    done

    if $_G_rc_lt_parse_options; then
      # save modified positional parameters for caller
      func_quote eval ${1+"$@"}
      libtool_parse_options_result=$func_quote_result
    fi

    $_G_rc_lt_parse_options
}
func_add_hook func_parse_options libtool_parse_options



# libtool_validate_options [ARG]...
# ---------------------------------
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462

      # Change the help message to a mode-specific one.
      generic_help=$help
      help="Try '$progname --help --mode=$opt_mode' for more information."
    }

    # Pass back the unparsed argument list
    func_quote_for_eval ${1+"$@"}
    libtool_validate_options_result=$func_quote_for_eval_result
}
func_add_hook func_validate_options libtool_validate_options


# Process options as early as possible so that --help and --version
# can return quickly.
func_options ${1+"$@"}







|
|







2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650

      # Change the help message to a mode-specific one.
      generic_help=$help
      help="Try '$progname --help --mode=$opt_mode' for more information."
    }

    # Pass back the unparsed argument list
    func_quote eval ${1+"$@"}
    libtool_validate_options_result=$func_quote_result
}
func_add_hook func_validate_options libtool_validate_options


# Process options as early as possible so that --help and --version
# can return quickly.
func_options ${1+"$@"}
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
      -prefer-non-pic)
	pic_mode=no
	continue
	;;
      esac
    done

    func_quote_for_eval "$libobj"
    test "X$libobj" != "X$func_quote_for_eval_result" \
      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
      && func_warning "libobj name '$libobj' may not contain shell special characters."
    func_dirname_and_basename "$obj" "/" ""
    objname=$func_basename_result
    xdir=$func_dirname_result
    lobj=$xdir$objdir/$objname








|
|







3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
      -prefer-non-pic)
	pic_mode=no
	continue
	;;
      esac
    done

    func_quote_arg pretty "$libobj"
    test "X$libobj" != "X$func_quote_arg_result" \
      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
      && func_warning "libobj name '$libobj' may not contain shell special characters."
    func_dirname_and_basename "$obj" "/" ""
    objname=$func_basename_result
    xdir=$func_dirname_result
    lobj=$xdir$objdir/$objname

3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503

    $opt_dry_run || $RM $removelist
    func_append removelist " $lockfile"
    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15

    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
    srcfile=$func_to_tool_file_result
    func_quote_for_eval "$srcfile"
    qsrcfile=$func_quote_for_eval_result

    # Only build a PIC object if we are building libtool libraries.
    if test yes = "$build_libtool_libs"; then
      # Without this assignment, base_compile gets emptied.
      fbsd_hideous_sh_bug=$base_compile

      if test no != "$pic_mode"; then







|
|







3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691

    $opt_dry_run || $RM $removelist
    func_append removelist " $lockfile"
    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15

    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
    srcfile=$func_to_tool_file_result
    func_quote_arg pretty "$srcfile"
    qsrcfile=$func_quote_arg_result

    # Only build a PIC object if we are building libtool libraries.
    if test yes = "$build_libtool_libs"; then
      # Without this assignment, base_compile gets emptied.
      fbsd_hideous_sh_bug=$base_compile

      if test no != "$pic_mode"; then
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
    # There may be an optional sh(1) argument at the beginning of
    # install_prog (especially on Windows NT).
    if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
       # Allow the use of GNU shtool's install command.
       case $nonopt in *shtool*) :;; *) false;; esac
    then
      # Aesthetically quote it.
      func_quote_for_eval "$nonopt"
      install_prog="$func_quote_for_eval_result "
      arg=$1
      shift
    else
      install_prog=
      arg=$nonopt
    fi

    # The real first argument should be the name of the installation program.
    # Aesthetically quote it.
    func_quote_for_eval "$arg"
    func_append install_prog "$func_quote_for_eval_result"
    install_shared_prog=$install_prog
    case " $install_prog " in
      *[\\\ /]cp\ *) install_cp=: ;;
      *) install_cp=false ;;
    esac

    # We need to accept at least all the BSD install flags.







|
|









|
|







4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
    # There may be an optional sh(1) argument at the beginning of
    # install_prog (especially on Windows NT).
    if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
       # Allow the use of GNU shtool's install command.
       case $nonopt in *shtool*) :;; *) false;; esac
    then
      # Aesthetically quote it.
      func_quote_arg pretty "$nonopt"
      install_prog="$func_quote_arg_result "
      arg=$1
      shift
    else
      install_prog=
      arg=$nonopt
    fi

    # The real first argument should be the name of the installation program.
    # Aesthetically quote it.
    func_quote_arg pretty "$arg"
    func_append install_prog "$func_quote_arg_result"
    install_shared_prog=$install_prog
    case " $install_prog " in
      *[\\\ /]cp\ *) install_cp=: ;;
      *) install_cp=false ;;
    esac

    # We need to accept at least all the BSD install flags.
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
	  dest=$arg
	  continue
	fi
	;;
      esac

      # Aesthetically quote the argument.
      func_quote_for_eval "$arg"
      func_append install_prog " $func_quote_for_eval_result"
      if test -n "$arg2"; then
	func_quote_for_eval "$arg2"
      fi
      func_append install_shared_prog " $func_quote_for_eval_result"
    done

    test -z "$install_prog" && \
      func_fatal_help "you must specify an install program"

    test -n "$prev" && \
      func_fatal_help "the '$prev' option requires an argument"

    if test -n "$install_override_mode" && $no_mode; then
      if $install_cp; then :; else
	func_quote_for_eval "$install_override_mode"
	func_append install_shared_prog " -m $func_quote_for_eval_result"
      fi
    fi

    if test -z "$files"; then
      if test -z "$dest"; then
	func_fatal_help "no file or destination specified"
      else







|
|

|

|










|
|







4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
	  dest=$arg
	  continue
	fi
	;;
      esac

      # Aesthetically quote the argument.
      func_quote_arg pretty "$arg"
      func_append install_prog " $func_quote_arg_result"
      if test -n "$arg2"; then
	func_quote_arg pretty "$arg2"
      fi
      func_append install_shared_prog " $func_quote_arg_result"
    done

    test -z "$install_prog" && \
      func_fatal_help "you must specify an install program"

    test -n "$prev" && \
      func_fatal_help "the '$prev' option requires an argument"

    if test -n "$install_override_mode" && $no_mode; then
      if $install_cp; then :; else
	func_quote_arg pretty "$install_override_mode"
	func_append install_shared_prog " -m $func_quote_arg_result"
      fi
    fi

    if test -z "$files"; then
      if test -z "$dest"; then
	func_fatal_help "no file or destination specified"
      else
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
		func_basename "$file$stripped_ext"
		file=$func_basename_result
	        outputname=$tmpdir/$file
	        # Replace the output file specification.
	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`

	        $opt_quiet || {
	          func_quote_for_expand "$relink_command"
		  eval "func_echo $func_quote_for_expand_result"
	        }
	        if eval "$relink_command"; then :
	          else
		  func_error "error: relink '$file' with the above command before installing it"
		  $opt_dry_run || ${RM}r "$tmpdir"
		  continue
	        fi







|
|







4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
		func_basename "$file$stripped_ext"
		file=$func_basename_result
	        outputname=$tmpdir/$file
	        # Replace the output file specification.
	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`

	        $opt_quiet || {
	          func_quote_arg expand,pretty "$relink_command"
		  eval "func_echo $func_quote_arg_result"
	        }
	        if eval "$relink_command"; then :
	          else
		  func_error "error: relink '$file' with the above command before installing it"
		  $opt_dry_run || ${RM}r "$tmpdir"
		  continue
	        fi
5254
5255
5256
5257
5258
5259
5260
5261

5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
  generated_by_libtool_version='$macro_version'
  notinst_deplibs='$notinst_deplibs'
else
  # When we are sourced in execute mode, \$file and \$ECHO are already set.
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
    file=\"\$0\""

    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`

    $ECHO "\

# A function that is used when there is no print builtin or printf.
func_fallback_echo ()
{
  eval 'cat <<_LTECHO_EOF
\$1
_LTECHO_EOF'
}
    ECHO=\"$qECHO\"
  fi

# Very basic option parsing. These options are (a) specific to
# the libtool wrapper, (b) are identical between the wrapper
# /script/ and the wrapper /executable/ that is used only on
# windows platforms, and (c) all begin with the string "--lt-"
# (application programs are unlikely to have options that match







|
>









|







5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
  generated_by_libtool_version='$macro_version'
  notinst_deplibs='$notinst_deplibs'
else
  # When we are sourced in execute mode, \$file and \$ECHO are already set.
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
    file=\"\$0\""

    func_quote_arg pretty "$ECHO"
    qECHO=$func_quote_arg_result
    $ECHO "\

# A function that is used when there is no print builtin or printf.
func_fallback_echo ()
{
  eval 'cat <<_LTECHO_EOF
\$1
_LTECHO_EOF'
}
    ECHO=$qECHO
  fi

# Very basic option parsing. These options are (a) specific to
# the libtool wrapper, (b) are identical between the wrapper
# /script/ and the wrapper /executable/ that is used only on
# windows platforms, and (c) all begin with the string "--lt-"
# (application programs are unlikely to have options that match
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
    # See if our shared archives depend on static archives.
    test -n "$old_archive_from_new_cmds" && build_old_libs=yes

    # Go through the arguments, transforming them on the way.
    while test "$#" -gt 0; do
      arg=$1
      shift
      func_quote_for_eval "$arg"
      qarg=$func_quote_for_eval_unquoted_result
      func_append libtool_args " $func_quote_for_eval_result"

      # If the previous option needs an argument, assign it.
      if test -n "$prev"; then
	case $prev in
	output)
	  func_append compile_command " @OUTPUT@"
	  func_append finalize_command " @OUTPUT@"







|
|
|







6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
    # See if our shared archives depend on static archives.
    test -n "$old_archive_from_new_cmds" && build_old_libs=yes

    # Go through the arguments, transforming them on the way.
    while test "$#" -gt 0; do
      arg=$1
      shift
      func_quote_arg pretty,unquoted "$arg"
      qarg=$func_quote_arg_unquoted_result
      func_append libtool_args " $func_quote_arg_result"

      # If the previous option needs an argument, assign it.
      if test -n "$prev"; then
	case $prev in
	output)
	  func_append compile_command " @OUTPUT@"
	  func_append finalize_command " @OUTPUT@"
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
      -Wc,*)
	func_stripname '-Wc,' '' "$arg"
	args=$func_stripname_result
	arg=
	save_ifs=$IFS; IFS=,
	for flag in $args; do
	  IFS=$save_ifs
          func_quote_for_eval "$flag"
	  func_append arg " $func_quote_for_eval_result"
	  func_append compiler_flags " $func_quote_for_eval_result"
	done
	IFS=$save_ifs
	func_stripname ' ' '' "$arg"
	arg=$func_stripname_result
	;;

      -Wl,*)
	func_stripname '-Wl,' '' "$arg"
	args=$func_stripname_result
	arg=
	save_ifs=$IFS; IFS=,
	for flag in $args; do
	  IFS=$save_ifs
          func_quote_for_eval "$flag"
	  func_append arg " $wl$func_quote_for_eval_result"
	  func_append compiler_flags " $wl$func_quote_for_eval_result"
	  func_append linker_flags " $func_quote_for_eval_result"
	done
	IFS=$save_ifs
	func_stripname ' ' '' "$arg"
	arg=$func_stripname_result
	;;

      -Xcompiler)







|
|
|













|
|
|
|







7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
      -Wc,*)
	func_stripname '-Wc,' '' "$arg"
	args=$func_stripname_result
	arg=
	save_ifs=$IFS; IFS=,
	for flag in $args; do
	  IFS=$save_ifs
          func_quote_arg pretty "$flag"
	  func_append arg " $func_quote_arg_result"
	  func_append compiler_flags " $func_quote_arg_result"
	done
	IFS=$save_ifs
	func_stripname ' ' '' "$arg"
	arg=$func_stripname_result
	;;

      -Wl,*)
	func_stripname '-Wl,' '' "$arg"
	args=$func_stripname_result
	arg=
	save_ifs=$IFS; IFS=,
	for flag in $args; do
	  IFS=$save_ifs
          func_quote_arg pretty "$flag"
	  func_append arg " $wl$func_quote_arg_result"
	  func_append compiler_flags " $wl$func_quote_arg_result"
	  func_append linker_flags " $func_quote_arg_result"
	done
	IFS=$save_ifs
	func_stripname ' ' '' "$arg"
	arg=$func_stripname_result
	;;

      -Xcompiler)
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
      -XCClinker)
	prev=xcclinker
	continue
	;;

      # -msg_* for osf cc
      -msg_*)
	func_quote_for_eval "$arg"
	arg=$func_quote_for_eval_result
	;;

      # Flags to be passed through unchanged, with rationale:
      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
      # -r[0-9][0-9]*        specify processor for the SGI compiler
      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
      # +DA*, +DD*           enable 64-bit mode for the HP compiler







|
|







7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
      -XCClinker)
	prev=xcclinker
	continue
	;;

      # -msg_* for osf cc
      -msg_*)
	func_quote_arg pretty "$arg"
	arg=$func_quote_arg_result
	;;

      # Flags to be passed through unchanged, with rationale:
      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
      # -r[0-9][0-9]*        specify processor for the SGI compiler
      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
      # +DA*, +DD*           enable 64-bit mode for the HP compiler
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
      # -specs=*             GCC specs files
      # -stdlib=*            select c++ std lib with clang
      # -fsanitize=*         Clang/GCC memory and address sanitizer
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
      -specs=*|-fsanitize=*)
        func_quote_for_eval "$arg"
	arg=$func_quote_for_eval_result
        func_append compile_command " $arg"
        func_append finalize_command " $arg"
        func_append compiler_flags " $arg"
        continue
        ;;

      -Z*)
        if test os2 = "`expr $host : '.*\(os2\)'`"; then
          # OS/2 uses -Zxxx to specify OS/2-specific options
	  compiler_flags="$compiler_flags $arg"
	  func_append compile_command " $arg"
	  func_append finalize_command " $arg"
	  case $arg in
	  -Zlinker | -Zstack)
	    prev=xcompiler
	    ;;
	  esac
	  continue
        else
	  # Otherwise treat like 'Some other compiler flag' below
	  func_quote_for_eval "$arg"
	  arg=$func_quote_for_eval_result
        fi
	;;

      # Some other compiler flag.
      -* | +*)
        func_quote_for_eval "$arg"
	arg=$func_quote_for_eval_result
	;;

      *.$objext)
	# A standard object.
	func_append objs " $arg"
	;;








|
|




















|
|





|
|







7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
      # -specs=*             GCC specs files
      # -stdlib=*            select c++ std lib with clang
      # -fsanitize=*         Clang/GCC memory and address sanitizer
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
      -specs=*|-fsanitize=*)
        func_quote_arg pretty "$arg"
	arg=$func_quote_arg_result
        func_append compile_command " $arg"
        func_append finalize_command " $arg"
        func_append compiler_flags " $arg"
        continue
        ;;

      -Z*)
        if test os2 = "`expr $host : '.*\(os2\)'`"; then
          # OS/2 uses -Zxxx to specify OS/2-specific options
	  compiler_flags="$compiler_flags $arg"
	  func_append compile_command " $arg"
	  func_append finalize_command " $arg"
	  case $arg in
	  -Zlinker | -Zstack)
	    prev=xcompiler
	    ;;
	  esac
	  continue
        else
	  # Otherwise treat like 'Some other compiler flag' below
	  func_quote_arg pretty "$arg"
	  arg=$func_quote_arg_result
        fi
	;;

      # Some other compiler flag.
      -* | +*)
        func_quote_arg pretty "$arg"
	arg=$func_quote_arg_result
	;;

      *.$objext)
	# A standard object.
	func_append objs " $arg"
	;;

7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
	continue
	;;

      # Some other compiler argument.
      *)
	# Unknown arguments in both finalize_command and compile_command need
	# to be aesthetically quoted because they are evaled later.
	func_quote_for_eval "$arg"
	arg=$func_quote_for_eval_result
	;;
      esac # arg

      # Now actually substitute the argument into the commands.
      if test -n "$arg"; then
	func_append compile_command " $arg"
	func_append finalize_command " $arg"







|
|







7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
	continue
	;;

      # Some other compiler argument.
      *)
	# Unknown arguments in both finalize_command and compile_command need
	# to be aesthetically quoted because they are evaled later.
	func_quote_arg pretty "$arg"
	arg=$func_quote_arg_result
	;;
      esac # arg

      # Now actually substitute the argument into the commands.
      if test -n "$arg"; then
	func_append compile_command " $arg"
	func_append finalize_command " $arg"
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
	      func_verbose "creating a temporary reloadable object file: $output"

	    # Loop through the commands generated above and execute them.
	    save_ifs=$IFS; IFS='~'
	    for cmd in $concat_cmds; do
	      IFS=$save_ifs
	      $opt_quiet || {
		  func_quote_for_expand "$cmd"
		  eval "func_echo $func_quote_for_expand_result"
	      }
	      $opt_dry_run || eval "$cmd" || {
		lt_exit=$?

		# Restore the uninstalled library and exit
		if test relink = "$opt_mode"; then
		  ( cd "$output_objdir" && \







|
|







10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
	      func_verbose "creating a temporary reloadable object file: $output"

	    # Loop through the commands generated above and execute them.
	    save_ifs=$IFS; IFS='~'
	    for cmd in $concat_cmds; do
	      IFS=$save_ifs
	      $opt_quiet || {
		  func_quote_arg expand,pretty "$cmd"
		  eval "func_echo $func_quote_arg_result"
	      }
	      $opt_dry_run || eval "$cmd" || {
		lt_exit=$?

		# Restore the uninstalled library and exit
		if test relink = "$opt_mode"; then
		  ( cd "$output_objdir" && \
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047

	save_ifs=$IFS; IFS='~'
	for cmd in $cmds; do
	  IFS=$sp$nl
	  eval cmd=\"$cmd\"
	  IFS=$save_ifs
	  $opt_quiet || {
	    func_quote_for_expand "$cmd"
	    eval "func_echo $func_quote_for_expand_result"
	  }
	  $opt_dry_run || eval "$cmd" || {
	    lt_exit=$?

	    # Restore the uninstalled library and exit
	    if test relink = "$opt_mode"; then
	      ( cd "$output_objdir" && \







|
|







10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236

	save_ifs=$IFS; IFS='~'
	for cmd in $cmds; do
	  IFS=$sp$nl
	  eval cmd=\"$cmd\"
	  IFS=$save_ifs
	  $opt_quiet || {
	    func_quote_arg expand,pretty "$cmd"
	    eval "func_echo $func_quote_arg_result"
	  }
	  $opt_dry_run || eval "$cmd" || {
	    lt_exit=$?

	    # Restore the uninstalled library and exit
	    if test relink = "$opt_mode"; then
	      ( cd "$output_objdir" && \
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
	# Preserve any variables that may affect compiler behavior
	for var in $variables_saved_for_relink; do
	  if eval test -z \"\${$var+set}\"; then
	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
	  elif eval var_value=\$$var; test -z "$var_value"; then
	    relink_command="$var=; export $var; $relink_command"
	  else
	    func_quote_for_eval "$var_value"
	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
	  fi
	done
	relink_command="(cd `pwd`; $relink_command)"
	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
      fi

      # Only actually do things if not in dry run mode.
      $opt_dry_run || {
	# win32 will think the script is a binary if it has
	# a .exe suffix, so we strip it off here.
	case $output in







|
|


|
|







10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
	# Preserve any variables that may affect compiler behavior
	for var in $variables_saved_for_relink; do
	  if eval test -z \"\${$var+set}\"; then
	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
	  elif eval var_value=\$$var; test -z "$var_value"; then
	    relink_command="$var=; export $var; $relink_command"
	  else
	    func_quote_arg pretty "$var_value"
	    relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
	  fi
	done
	func_quote_arg pretty,unquoted "(cd `pwd`; $relink_command)"
	relink_command=$func_quote_arg_unquoted_result
      fi

      # Only actually do things if not in dry run mode.
      $opt_dry_run || {
	# win32 will think the script is a binary if it has
	# a .exe suffix, so we strip it off here.
	case $output in
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765

10766
10767
10768
10769
10770
10771
10772
      # Preserve any variables that may affect compiler behavior
      for var in $variables_saved_for_relink; do
	if eval test -z \"\${$var+set}\"; then
	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
	elif eval var_value=\$$var; test -z "$var_value"; then
	  relink_command="$var=; export $var; $relink_command"
	else
	  func_quote_for_eval "$var_value"
	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
	fi
      done
      # Quote the link command for shipping.
      relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`

      if test yes = "$hardcode_automatic"; then
	relink_command=
      fi

      # Only create the output if not a dry run.
      $opt_dry_run || {
	for installed in no yes; do







|
|




|
>







10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
      # Preserve any variables that may affect compiler behavior
      for var in $variables_saved_for_relink; do
	if eval test -z \"\${$var+set}\"; then
	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
	elif eval var_value=\$$var; test -z "$var_value"; then
	  relink_command="$var=; export $var; $relink_command"
	else
	  func_quote_arg pretty,unquoted "$var_value"
	  relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
	fi
      done
      # Quote the link command for shipping.
      relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
      func_quote_arg pretty,unquoted "$relink_command"
      relink_command=$func_quote_arg_unquoted_result
      if test yes = "$hardcode_automatic"; then
	relink_command=
      fi

      # Only create the output if not a dry run.
      $opt_dry_run || {
	for installed in no yes; do
Changes to jni/curl/m4/curl-compilers.m4.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
1040
1041
1042
1043
1044
1045
1046

















1047
1048
1049
1050
1051
1052
1053
          fi
          #
          dnl Only gcc 4.6 or later
          if test "$compiler_num" -ge "406"; then
            tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
          fi
          #

















        fi
        #
        dnl Do not issue warnings for code in system include paths.
        if test "$compiler_num" -ge "300"; then
          tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
        else
          dnl When cross-compiling with a gcc older than 3.0, disable







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
          fi
          #
          dnl Only gcc 4.6 or later
          if test "$compiler_num" -ge "406"; then
            tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
          fi
          #
          dnl Only gcc 6 or later
          if test "$compiler_num" -ge "600"; then
            tmp_CFLAGS="$tmp_CFLAGS -Wshift-negative-value"
            tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
            tmp_CFLAGS="$tmp_CFLAGS -Wnull-dereference"
            tmp_CFLAGS="$tmp_CFLAGS -Wduplicated-cond"
          fi
          #
          dnl Only gcc 7 or later
          if test "$compiler_num" -ge "700"; then
            tmp_CFLAGS="$tmp_CFLAGS -Wduplicated-branches"
            tmp_CFLAGS="$tmp_CFLAGS -Wrestrict"
            tmp_CFLAGS="$tmp_CFLAGS -Walloc-zero"
            tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
            tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
          fi
          #
        fi
        #
        dnl Do not issue warnings for code in system include paths.
        if test "$compiler_num" -ge "300"; then
          tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
        else
          dnl When cross-compiling with a gcc older than 3.0, disable
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
    test "$supports_curldebug" = "no" || supports_curldebug="yes"
    AC_MSG_RESULT([$supports_curldebug])
    if test "$supports_curldebug" = "no"; then
      AC_MSG_WARN([cannot enable curl debug memory tracking.])
      want_curldebug="no"
    fi
  fi
  #
  if test "$want_curldebug" = "yes"; then
    CPPFLAGS="-DCURLDEBUG $CPPFLAGS"
    squeeze CPPFLAGS
  fi
  if test "$want_debug" = "yes"; then
    CPPFLAGS="-DDEBUGBUILD $CPPFLAGS"
    squeeze CPPFLAGS
  fi
])



dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the







<
<
<
<
<
<
<
<
<







1295
1296
1297
1298
1299
1300
1301









1302
1303
1304
1305
1306
1307
1308
    test "$supports_curldebug" = "no" || supports_curldebug="yes"
    AC_MSG_RESULT([$supports_curldebug])
    if test "$supports_curldebug" = "no"; then
      AC_MSG_WARN([cannot enable curl debug memory tracking.])
      want_curldebug="no"
    fi
  fi









])



dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
Changes to jni/curl/m4/curl-confopts.m4.
110
111
112
113
114
115
116

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132

133
134
135
136
137
138
139
      dnl handle this as a a request to use the same setting as option
      dnl --enable-debug. IOW, initially, for debug-enabled builds
      dnl this will be handled as a request to enable curldebug if
      dnl possible, and for debug-disabled builds this will be handled
      dnl as a request to disable curldebug.
      if test "$want_debug" = "yes"; then
        AC_MSG_RESULT([(assumed) yes])

      else
        AC_MSG_RESULT([no])
      fi
      want_curldebug_assumed="yes"
      want_curldebug="$want_debug"
      ;;
    *)
      dnl --enable-curldebug option used.
      dnl The use of this option value is a request to enable curl's
      dnl debug memory tracking for the libcurl library. This can only
      dnl be done when some requisites are simultaneously satisfied.
      dnl Later on, these requisites are verified and if they are not
      dnl fully satisfied the option will be ignored and act as if
      dnl --disable-curldebug had been given setting shell variable
      dnl want_curldebug to 'no'.
      want_curldebug="yes"

      AC_MSG_RESULT([yes])
      ;;
  esac
])


dnl CURL_CHECK_OPTION_DEBUG







>
















>







110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
      dnl handle this as a a request to use the same setting as option
      dnl --enable-debug. IOW, initially, for debug-enabled builds
      dnl this will be handled as a request to enable curldebug if
      dnl possible, and for debug-disabled builds this will be handled
      dnl as a request to disable curldebug.
      if test "$want_debug" = "yes"; then
        AC_MSG_RESULT([(assumed) yes])
        AC_DEFINE(CURLDEBUG, 1, [to enable curl debug memory tracking])
      else
        AC_MSG_RESULT([no])
      fi
      want_curldebug_assumed="yes"
      want_curldebug="$want_debug"
      ;;
    *)
      dnl --enable-curldebug option used.
      dnl The use of this option value is a request to enable curl's
      dnl debug memory tracking for the libcurl library. This can only
      dnl be done when some requisites are simultaneously satisfied.
      dnl Later on, these requisites are verified and if they are not
      dnl fully satisfied the option will be ignored and act as if
      dnl --disable-curldebug had been given setting shell variable
      dnl want_curldebug to 'no'.
      want_curldebug="yes"
      AC_DEFINE(CURLDEBUG, 1, [to enable curl debug memory tracking])
      AC_MSG_RESULT([yes])
      ;;
  esac
])


dnl CURL_CHECK_OPTION_DEBUG
160
161
162
163
164
165
166

167
168
169
170
171
172
173
    default)
      dnl configure option not specified
      want_debug="no"
      ;;
    *)
      dnl --enable-debug option used
      want_debug="yes"

      ;;
  esac
  AC_MSG_RESULT([$want_debug])
])

dnl CURL_CHECK_OPTION_OPTIMIZE
dnl -------------------------------------------------







>







162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
    default)
      dnl configure option not specified
      want_debug="no"
      ;;
    *)
      dnl --enable-debug option used
      want_debug="yes"
      AC_DEFINE(DEBUGBUILD, 1, [enable debug build options])
      ;;
  esac
  AC_MSG_RESULT([$want_debug])
])

dnl CURL_CHECK_OPTION_OPTIMIZE
dnl -------------------------------------------------
Changes to jni/curl/m4/curl-functions.m4.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#***************************************************************************
#                                  _   _ ____  _
#  Project                     ___| | | |  _ \| |
#                             / __| | | | |_) | |
#                            | (__| |_| |  _ <| |___
#                             \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
7004
7005
7006
7007
7008
7009
7010
















      [Define to 1 if you have the writev function.])
    curl_cv_func_writev="yes"
  else
    AC_MSG_RESULT([no])
    curl_cv_func_writev="no"
  fi
])























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
      [Define to 1 if you have the writev function.])
    curl_cv_func_writev="yes"
  else
    AC_MSG_RESULT([no])
    curl_cv_func_writev="no"
  fi
])

dnl CURL_RUN_IFELSE
dnl -------------------------------------------------
dnl Wrapper macro to use instead of AC_RUN_IFELSE. It
dnl sets LD_LIBRARY_PATH locally for this run only, from the
dnl CURL_LIBRARY_PATH variable. It keeps the LD_LIBRARY_PATH
dnl changes contained within this macro.

AC_DEFUN([CURL_RUN_IFELSE], [
   AC_REQUIRE([AC_RUN_IFELSE])dnl

   old=$LD_LIBRARY_PATH
   LD_LIBRARY_PATH=$CURL_LIBRARY_PATH
   AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
   LD_LIBRARY_PATH=$old # restore
])
Changes to jni/curl/packages/DOS/README.
1
2
3
4
5
6
7
8
9
10
11
Gisle Vanem made curl build fine on DOS (and MingW) with djgpp, OpenSSL and his
Watt-32 stack.

'make djgpp' in the root curl dir should build it fine.

Note 1: djgpp 2.04 beta has a sscanf() bug so the URL parsing isn't
        done proberly. Use djgpp 2.03 until they fix it.

Note 2: Compile Watt-32 (and OpenSSL) with the same version of djgpp.
        Otherwise things go wrong because things like FS-extensions and
        errnos have been changed between releases.






|




1
2
3
4
5
6
7
8
9
10
11
Gisle Vanem made curl build fine on DOS (and MingW) with djgpp, OpenSSL and his
Watt-32 stack.

'make djgpp' in the root curl dir should build it fine.

Note 1: djgpp 2.04 beta has a sscanf() bug so the URL parsing isn't
        done properly. Use djgpp 2.03 until they fix it.

Note 2: Compile Watt-32 (and OpenSSL) with the same version of djgpp.
        Otherwise things go wrong because things like FS-extensions and
        errnos have been changed between releases.
Changes to jni/curl/packages/OS400/curl.inc.in.
1326
1327
1328
1329
1330
1331
1332




1333
1334
1335
1336
1337
1338
1339
     d                 c                   30270
     d  CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS...
     d                 c                   00271
     d  CURLOPT_RESOLVER_START_FUNCTION...
     d                 c                   20272
     d  CURLOPT_RESOLVER_START_DATA...
     d                 c                   10273




      *
      /if not defined(CURL_NO_OLDIES)
     d  CURLOPT_FILE   c                   10001
     d  CURLOPT_INFILE...
     d                 c                   10009
     d  CURLOPT_SSLKEYPASSWD...
     d                 c                   10026







>
>
>
>







1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
     d                 c                   30270
     d  CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS...
     d                 c                   00271
     d  CURLOPT_RESOLVER_START_FUNCTION...
     d                 c                   20272
     d  CURLOPT_RESOLVER_START_DATA...
     d                 c                   10273
     d  CURLOPT_HAPROXYPROTOCOL...
     d                 c                   00274
     d  CURLOPT_DNS_SHUFFLE_ADDRESSES...
     d                 c                   00275
      *
      /if not defined(CURL_NO_OLDIES)
     d  CURLOPT_FILE   c                   10001
     d  CURLOPT_INFILE...
     d                 c                   10009
     d  CURLOPT_SSLKEYPASSWD...
     d                 c                   10026
Changes to jni/curl/packages/OS400/os400sys.c.
136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160
161
162
163
164
165
166
167
168
169
  /* If `size' >= 0, make sure buffer at `buf' is at least `size'-byte long.
     Return the buffer address. */

  if(size < 0)
    return buf->buf;

  if(!buf->buf) {
    if((buf->buf = malloc(size)))

      buf->size = size;

    return buf->buf;
    }

  if((unsigned long) size <= buf->size) {
    /* Shorten the buffer only if it frees a significant byte count. This
       avoids some realloc() overhead. */

    if(buf->size - size < MIN_BYTE_GAIN)
      return buf->buf;
    }

  /* Resize the buffer. */

  if((cp = realloc(buf->buf, size))) {

    buf->buf = cp;
    buf->size = size;
    }
  else if(size <= buf->size)
    cp = buf->buf;

  return cp;
}









|
>



|







|



|
>


|







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
  /* If `size' >= 0, make sure buffer at `buf' is at least `size'-byte long.
     Return the buffer address. */

  if(size < 0)
    return buf->buf;

  if(!buf->buf) {
    buf->buf = malloc(size);
    if(buf->buf)
      buf->size = size;

    return buf->buf;
  }

  if((unsigned long) size <= buf->size) {
    /* Shorten the buffer only if it frees a significant byte count. This
       avoids some realloc() overhead. */

    if(buf->size - size < MIN_BYTE_GAIN)
      return buf->buf;
  }

  /* Resize the buffer. */

  cp = realloc(buf->buf, size);
  if(cp) {
    buf->buf = cp;
    buf->size = size;
  }
  else if(size <= buf->size)
    cp = buf->buf;

  return cp;
}


189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
204
205
206
207
208
209
210

  if(!bufs) {
    if(size < 0)
      return (char *) NULL;             /* No buffer yet. */

    /* Allocate buffer descriptors for the current thread. */

    if(!(bufs = calloc((size_t) LK_LAST, sizeof *bufs)))

      return (char *) NULL;

    if(pthread_setspecific(thdkey, (void *) bufs)) {
      free(bufs);
      return (char *) NULL;
      }
    }

  return get_buffer(bufs + key, size);
}


static char *
buffer_undef(localkey_t key, long size)







|
>





|
|







191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

  if(!bufs) {
    if(size < 0)
      return (char *) NULL;             /* No buffer yet. */

    /* Allocate buffer descriptors for the current thread. */

    bufs = calloc((size_t) LK_LAST, sizeof *bufs);
    if(!bufs)
      return (char *) NULL;

    if(pthread_setspecific(thdkey, (void *) bufs)) {
      free(bufs);
      return (char *) NULL;
    }
  }

  return get_buffer(bufs + key, size);
}


static char *
buffer_undef(localkey_t key, long size)
269
270
271
272
273
274
275
276
277

278
279

280
281

282
283
284

285
286
287
288
289
290
291
  char * eservname;
  int status;
  int i;

  enodename = (char *) NULL;
  eservname = (char *) NULL;

  if(nodename && nodenamelen)
    if(!(enodename = malloc(nodenamelen)))

      return EAI_MEMORY;


  if(servname && servnamelen)
    if(!(eservname = malloc(servnamelen))) {

      free(enodename);
      return EAI_MEMORY;
      }


  status = getnameinfo(sa, salen, enodename, nodenamelen,
                       eservname, servnamelen, flags);

  if(!status) {
    if(enodename) {
      i = QadrtConvertE2A(nodename, enodename,







|
|
>

|
>
|
|
>


|
>







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
  char * eservname;
  int status;
  int i;

  enodename = (char *) NULL;
  eservname = (char *) NULL;

  if(nodename && nodenamelen) {
    enodename = malloc(nodenamelen);
    if(!enodename)
      return EAI_MEMORY;
  }

  if(servname && servnamelen) {
    eservname = malloc(servnamelen);
    if(!eservname) {
      free(enodename);
      return EAI_MEMORY;
    }
  }

  status = getnameinfo(sa, salen, enodename, nodenamelen,
                       eservname, servnamelen, flags);

  if(!status) {
    if(enodename) {
      i = QadrtConvertE2A(nodename, enodename,
319
320
321
322
323
324
325
326

327
328
329
330
331
332
333
334
335
336

337
338
339
340
341
342
343
344
345
346
347
348
349
350

  enodename = (char *) NULL;
  eservname = (char *) NULL;

  if(nodename) {
    i = strlen(nodename);

    if(!(enodename = malloc(i + 1)))

      return EAI_MEMORY;

    i = QadrtConvertA2E(enodename, nodename, i, i);
    enodename[i] = '\0';
    }

  if(servname) {
    i = strlen(servname);

    if(!(eservname = malloc(i + 1))) {

      free(enodename);
      return EAI_MEMORY;
      }

    QadrtConvertA2E(eservname, servname, i, i);
    eservname[i] = '\0';
    }

  status = getaddrinfo(enodename, eservname, hints, res);
  free(enodename);
  free(eservname);
  return status;
}








|
>




|




|
>


|



|







326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

  enodename = (char *) NULL;
  eservname = (char *) NULL;

  if(nodename) {
    i = strlen(nodename);

    enodename = malloc(i + 1);
    if(!enodename)
      return EAI_MEMORY;

    i = QadrtConvertA2E(enodename, nodename, i, i);
    enodename[i] = '\0';
  }

  if(servname) {
    i = strlen(servname);

    eservname = malloc(i + 1);
    if(!eservname) {
      free(enodename);
      return EAI_MEMORY;
    }

    QadrtConvertA2E(eservname, servname, i, i);
    eservname[i] = '\0';
  }

  status = getaddrinfo(enodename, eservname, hints, res);
  free(enodename);
  free(eservname);
  return status;
}

381
382
383
384
385
386
387
388

389
390
391

392
393
394
395
396
397
398
{
  struct Curl_gsk_descriptor * p;
  gsk_handle h;
  int rc;

  if(!my_env_handle)
    return GSK_OS400_ERROR_INVALID_POINTER;
  if(!(p = (struct Curl_gsk_descriptor *) malloc(sizeof *p)))

    return GSK_INSUFFICIENT_STORAGE;
  p->strlist = (struct gskstrlist *) NULL;
  if((rc = gsk_environment_open(&p->h)) != GSK_OK)

    free(p);
  else
    *my_env_handle = (gsk_handle) p;
  return rc;
}









|
>


|
>







390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
{
  struct Curl_gsk_descriptor * p;
  gsk_handle h;
  int rc;

  if(!my_env_handle)
    return GSK_OS400_ERROR_INVALID_POINTER;
  p = (struct Curl_gsk_descriptor *) malloc(sizeof *p);
  if(!p)
    return GSK_INSUFFICIENT_STORAGE;
  p->strlist = (struct gskstrlist *) NULL;
  rc = gsk_environment_open(&p->h);
  if(rc != GSK_OK)
    free(p);
  else
    *my_env_handle = (gsk_handle) p;
  return rc;
}


406
407
408
409
410
411
412
413

414
415
416

417
418
419
420
421
422
423
  int rc;

  if(!my_env_handle)
    return GSK_INVALID_HANDLE;
  if(!my_session_handle)
    return GSK_OS400_ERROR_INVALID_POINTER;
  h = ((struct Curl_gsk_descriptor *) my_env_handle)->h;
  if(!(p = (struct Curl_gsk_descriptor *) malloc(sizeof *p)))

    return GSK_INSUFFICIENT_STORAGE;
  p->strlist = (struct gskstrlist *) NULL;
  if((rc = gsk_secure_soc_open(h, &p->h)) != GSK_OK)

    free(p);
  else
    *my_session_handle = (gsk_handle) p;
  return rc;
}









|
>


|
>







417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
  int rc;

  if(!my_env_handle)
    return GSK_INVALID_HANDLE;
  if(!my_session_handle)
    return GSK_OS400_ERROR_INVALID_POINTER;
  h = ((struct Curl_gsk_descriptor *) my_env_handle)->h;
  p = (struct Curl_gsk_descriptor *) malloc(sizeof *p);
  if(!p)
    return GSK_INSUFFICIENT_STORAGE;
  p->strlist = (struct gskstrlist *) NULL;
  rc = gsk_secure_soc_open(h, &p->h);
  if(rc != GSK_OK)
    free(p);
  else
    *my_session_handle = (gsk_handle) p;
  return rc;
}


444
445
446
447
448
449
450
451

452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471

472
473
474
475
476
477
478
  int rc;

  if(!my_env_handle)
    return GSK_OS400_ERROR_INVALID_POINTER;
  if(!*my_env_handle)
    return GSK_INVALID_HANDLE;
  p = (struct Curl_gsk_descriptor *) *my_env_handle;
  if((rc = gsk_environment_close(&p->h)) == GSK_OK) {

    gsk_free_handle(p);
    *my_env_handle = (gsk_handle) NULL;
  }
  return rc;
}


int
Curl_gsk_secure_soc_close(gsk_handle * my_session_handle)

{
  struct Curl_gsk_descriptor * p;
  int rc;

  if(!my_session_handle)
    return GSK_OS400_ERROR_INVALID_POINTER;
  if(!*my_session_handle)
    return GSK_INVALID_HANDLE;
  p = (struct Curl_gsk_descriptor *) *my_session_handle;
  if((rc = gsk_secure_soc_close(&p->h)) == GSK_OK) {

    gsk_free_handle(p);
    *my_session_handle = (gsk_handle) NULL;
  }
  return rc;
}









|
>



















|
>







457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
  int rc;

  if(!my_env_handle)
    return GSK_OS400_ERROR_INVALID_POINTER;
  if(!*my_env_handle)
    return GSK_INVALID_HANDLE;
  p = (struct Curl_gsk_descriptor *) *my_env_handle;
  rc = gsk_environment_close(&p->h);
  if(rc == GSK_OK) {
    gsk_free_handle(p);
    *my_env_handle = (gsk_handle) NULL;
  }
  return rc;
}


int
Curl_gsk_secure_soc_close(gsk_handle * my_session_handle)

{
  struct Curl_gsk_descriptor * p;
  int rc;

  if(!my_session_handle)
    return GSK_OS400_ERROR_INVALID_POINTER;
  if(!*my_session_handle)
    return GSK_INVALID_HANDLE;
  p = (struct Curl_gsk_descriptor *) *my_session_handle;
  rc = gsk_secure_soc_close(&p->h);
  if(rc == GSK_OK) {
    gsk_free_handle(p);
    *my_session_handle = (gsk_handle) NULL;
  }
  return rc;
}


516
517
518
519
520
521
522
523

524
525
526
527
528
529
530
531
  if(!buffer)
    return GSK_OS400_ERROR_INVALID_POINTER;
  if(bufSize < 0)
    return GSK_ATTRIBUTE_INVALID_LENGTH;
  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
  if(!bufSize)
    bufSize = strlen(buffer);
  if(!(ebcdicbuf = malloc(bufSize + 1)))

      return GSK_INSUFFICIENT_STORAGE;
  QadrtConvertA2E(ebcdicbuf, buffer, bufSize, bufSize);
  ebcdicbuf[bufSize] = '\0';
  rc = gsk_attribute_set_buffer(p->h, bufID, ebcdicbuf, bufSize);
  free(ebcdicbuf);
  return rc;
}








|
>
|







531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
  if(!buffer)
    return GSK_OS400_ERROR_INVALID_POINTER;
  if(bufSize < 0)
    return GSK_ATTRIBUTE_INVALID_LENGTH;
  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
  if(!bufSize)
    bufSize = strlen(buffer);
  ebcdicbuf = malloc(bufSize + 1);
  if(!ebcdicbuf)
    return GSK_INSUFFICIENT_STORAGE;
  QadrtConvertA2E(ebcdicbuf, buffer, bufSize, bufSize);
  ebcdicbuf[bufSize] = '\0';
  rc = gsk_attribute_set_buffer(p->h, bufID, ebcdicbuf, bufSize);
  free(ebcdicbuf);
  return rc;
}

582
583
584
585
586
587
588
589

590
591

592
593
594
595
596
597
598
  char * asciibuf;
  struct gskstrlist * sp;

  for(sp = p->strlist; sp; sp = sp->next)
    if(sp->ebcdicstr == ebcdicbuf)
      break;
  if(!sp) {
    if(!(sp = (struct gskstrlist *) malloc(sizeof *sp)))

      return GSK_INSUFFICIENT_STORAGE;
    if(!(asciibuf = malloc(bufsize + 1))) {

      free(sp);
      return GSK_INSUFFICIENT_STORAGE;
    }
    QadrtConvertE2A(asciibuf, ebcdicbuf, bufsize, bufsize);
    asciibuf[bufsize] = '\0';
    sp->ebcdicstr = ebcdicbuf;
    sp->asciistr = asciibuf;







|
>

|
>







598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
  char * asciibuf;
  struct gskstrlist * sp;

  for(sp = p->strlist; sp; sp = sp->next)
    if(sp->ebcdicstr == ebcdicbuf)
      break;
  if(!sp) {
    sp = (struct gskstrlist *) malloc(sizeof *sp);
    if(!sp)
      return GSK_INSUFFICIENT_STORAGE;
    asciibuf = malloc(bufsize + 1);
    if(!asciibuf) {
      free(sp);
      return GSK_INSUFFICIENT_STORAGE;
    }
    QadrtConvertE2A(asciibuf, ebcdicbuf, bufsize, bufsize);
    asciibuf[bufsize] = '\0';
    sp->ebcdicstr = ebcdicbuf;
    sp->asciistr = asciibuf;
615
616
617
618
619
620
621
622

623
624

625
626
627
628
629
630
631
  int mylen;

  if(!my_gsk_handle)
    return GSK_INVALID_HANDLE;
  if(!buffer || !bufSize)
    return GSK_OS400_ERROR_INVALID_POINTER;
  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
  if((rc = gsk_attribute_get_buffer(p->h, bufID, &mybuf, &mylen)) != GSK_OK)

    return rc;
  if((rc = cachestring(p, mybuf, mylen, buffer)) == GSK_OK)

    *bufSize = mylen;
  return rc;
}


int
Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,







|
>

|
>







633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
  int mylen;

  if(!my_gsk_handle)
    return GSK_INVALID_HANDLE;
  if(!buffer || !bufSize)
    return GSK_OS400_ERROR_INVALID_POINTER;
  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
  rc = gsk_attribute_get_buffer(p->h, bufID, &mybuf, &mylen);
  if(rc != GSK_OK)
    return rc;
  rc = cachestring(p, mybuf, mylen, buffer);
  if(rc == GSK_OK)
    *bufSize = mylen;
  return rc;
}


int
Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
752
753
754
755
756
757
758
759

760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792

793
794
795
796
797
798
799
800
801
802
803
804

  /* Convert `buf' in place, from EBCDIC to ASCII.
     If error, release the buffer and return -1. Else return 0. */

  i = buf->length;

  if(i) {
    if(!(t = malloc(i))) {

      gss_release_buffer(minor_status, buf);

      if(minor_status)
        *minor_status = ENOMEM;

      return -1;
      }

    QadrtConvertE2A(t, buf->value, i, i);
    memcpy(buf->value, t, i);
    free(t);
    }

  return 0;
}


OM_uint32
Curl_gss_import_name_a(OM_uint32 * minor_status, gss_buffer_t in_name,
                       gss_OID in_name_type, gss_name_t * out_name)

{
  int rc;
  unsigned int i;
  gss_buffer_desc in;

  if(!in_name || !in_name->value || !in_name->length)
    return gss_import_name(minor_status, in_name, in_name_type, out_name);

  memcpy((char *) &in, (char *) in_name, sizeof in);
  i = in.length;

  if(!(in.value = malloc(i + 1))) {

    if(minor_status)
      *minor_status = ENOMEM;

    return GSS_S_FAILURE;
    }

  QadrtConvertA2E(in.value, in_name->value, i, i);
  ((char *) in.value)[i] = '\0';
  rc = gss_import_name(minor_status, &in, in_name_type, out_name);
  free(in.value);
  return rc;
}







|
>






|




|




















|
>




|







772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826

  /* Convert `buf' in place, from EBCDIC to ASCII.
     If error, release the buffer and return -1. Else return 0. */

  i = buf->length;

  if(i) {
    t = malloc(i);
    if(!t) {
      gss_release_buffer(minor_status, buf);

      if(minor_status)
        *minor_status = ENOMEM;

      return -1;
    }

    QadrtConvertE2A(t, buf->value, i, i);
    memcpy(buf->value, t, i);
    free(t);
  }

  return 0;
}


OM_uint32
Curl_gss_import_name_a(OM_uint32 * minor_status, gss_buffer_t in_name,
                       gss_OID in_name_type, gss_name_t * out_name)

{
  int rc;
  unsigned int i;
  gss_buffer_desc in;

  if(!in_name || !in_name->value || !in_name->length)
    return gss_import_name(minor_status, in_name, in_name_type, out_name);

  memcpy((char *) &in, (char *) in_name, sizeof in);
  i = in.length;

  in.value = malloc(i + 1);
  if(!in.value) {
    if(minor_status)
      *minor_status = ENOMEM;

    return GSS_S_FAILURE;
  }

  QadrtConvertA2E(in.value, in_name->value, i, i);
  ((char *) in.value)[i] = '\0';
  rc = gss_import_name(minor_status, &in, in_name_type, out_name);
  free(in.value);
  return rc;
}
845
846
847
848
849
850
851

852
853
854
855
856
857

858
859
860
861
862
863
864
865
866
867
868

869
870
871
872
873
874
875
{
  int rc;
  unsigned int i;
  gss_buffer_desc in;
  gss_buffer_t inp;

  in.value = NULL;


  if((inp = input_token))
    if(inp->length && inp->value) {
      i = inp->length;

      if(!(in.value = malloc(i + 1))) {

        if(minor_status)
          *minor_status = ENOMEM;

        return GSS_S_FAILURE;
        }

      QadrtConvertA2E(in.value, input_token->value, i, i);
      ((char *) in.value)[i] = '\0';
      in.length = i;
      inp = &in;
      }


  rc = gss_init_sec_context(minor_status, cred_handle, context_handle,
                             target_name, mech_type, req_flags, time_req,
                             input_chan_bindings, inp, actual_mech_type,
                             output_token, ret_flags, time_rec);
  free(in.value);








>

|



|
>




|





|
>







867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
{
  int rc;
  unsigned int i;
  gss_buffer_desc in;
  gss_buffer_t inp;

  in.value = NULL;
  inp = input_token;

  if(inp) {
    if(inp->length && inp->value) {
      i = inp->length;

      in.value = malloc(i + 1);
      if(!in.value) {
        if(minor_status)
          *minor_status = ENOMEM;

        return GSS_S_FAILURE;
      }

      QadrtConvertA2E(in.value, input_token->value, i, i);
      ((char *) in.value)[i] = '\0';
      in.length = i;
      inp = &in;
    }
  }

  rc = gss_init_sec_context(minor_status, cred_handle, context_handle,
                             target_name, mech_type, req_flags, time_req,
                             input_chan_bindings, inp, actual_mech_type,
                             output_token, ret_flags, time_rec);
  free(in.value);

928
929
930
931
932
933
934
935

936
937
938
939
940
941
942
  void * result;

  if(!host)
    return (void *) ldap_init(host, port);

  i = strlen(host);

  if(!(ehost = malloc(i + 1)))

    return (void *) NULL;

  QadrtConvertA2E(ehost, host, i, i);
  ehost[i] = '\0';
  result = (void *) ldap_init(ehost, port);
  free(ehost);
  return result;







|
>







953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
  void * result;

  if(!host)
    return (void *) ldap_init(host, port);

  i = strlen(host);

  ehost = malloc(i + 1);
  if(!ehost)
    return (void *) NULL;

  QadrtConvertA2E(ehost, host, i, i);
  ehost[i] = '\0';
  result = (void *) ldap_init(ehost, port);
  free(ehost);
  return result;
953
954
955
956
957
958
959
960

961
962
963
964
965
966
967
968
969
970

971
972
973
974
975
976
977
978
979
980
981
982
983
984

  edn = (char *) NULL;
  epasswd = (char *) NULL;

  if(dn) {
    i = strlen(dn);

    if(!(edn = malloc(i + 1)))

      return LDAP_NO_MEMORY;

    QadrtConvertA2E(edn, dn, i, i);
    edn[i] = '\0';
    }

  if(passwd) {
    i = strlen(passwd);

    if(!(epasswd = malloc(i + 1))) {

      free(edn);
      return LDAP_NO_MEMORY;
      }

    QadrtConvertA2E(epasswd, passwd, i, i);
    epasswd[i] = '\0';
    }

  i = ldap_simple_bind_s(ld, edn, epasswd);
  free(epasswd);
  free(edn);
  return i;
}








|
>




|




|
>


|



|







979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012

  edn = (char *) NULL;
  epasswd = (char *) NULL;

  if(dn) {
    i = strlen(dn);

    edn = malloc(i + 1);
    if(!edn)
      return LDAP_NO_MEMORY;

    QadrtConvertA2E(edn, dn, i, i);
    edn[i] = '\0';
  }

  if(passwd) {
    i = strlen(passwd);

    epasswd = malloc(i + 1);
    if(!epasswd) {
      free(edn);
      return LDAP_NO_MEMORY;
    }

    QadrtConvertA2E(epasswd, passwd, i, i);
    epasswd[i] = '\0';
  }

  i = ldap_simple_bind_s(ld, edn, epasswd);
  free(epasswd);
  free(edn);
  return i;
}

999
1000
1001
1002
1003
1004
1005
1006

1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017

1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029

1030
1031
1032
1033
1034
1035

1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
  efilter = (char *) NULL;
  eattrs = (char * *) NULL;
  status = LDAP_SUCCESS;

  if(base) {
    i = strlen(base);

    if(!(ebase = malloc(i + 1)))

      status = LDAP_NO_MEMORY;
    else {
      QadrtConvertA2E(ebase, base, i, i);
      ebase[i] = '\0';
      }
    }

  if(filter && status == LDAP_SUCCESS) {
    i = strlen(filter);

    if(!(efilter = malloc(i + 1)))

      status = LDAP_NO_MEMORY;
    else {
      QadrtConvertA2E(efilter, filter, i, i);
      efilter[i] = '\0';
      }
    }

  if(attrs && status == LDAP_SUCCESS) {
    for(i = 0; attrs[i++];)
      ;

    if(!(eattrs = calloc(i, sizeof *eattrs)))

      status = LDAP_NO_MEMORY;
    else {
      for(j = 0; attrs[j]; j++) {
        i = strlen(attrs[j]);

        if(!(eattrs[j] = malloc(i + 1))) {

          status = LDAP_NO_MEMORY;
          break;
          }

        QadrtConvertA2E(eattrs[j], attrs[j], i, i);
        eattrs[j][i] = '\0';
        }
      }
    }








|
>




|
|




|
>




|
|





|
>





|
>


|







1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
  efilter = (char *) NULL;
  eattrs = (char * *) NULL;
  status = LDAP_SUCCESS;

  if(base) {
    i = strlen(base);

    ebase = malloc(i + 1);
    if(!ebase)
      status = LDAP_NO_MEMORY;
    else {
      QadrtConvertA2E(ebase, base, i, i);
      ebase[i] = '\0';
    }
  }

  if(filter && status == LDAP_SUCCESS) {
    i = strlen(filter);

    efilter = malloc(i + 1);
    if(!efilter)
      status = LDAP_NO_MEMORY;
    else {
      QadrtConvertA2E(efilter, filter, i, i);
      efilter[i] = '\0';
    }
  }

  if(attrs && status == LDAP_SUCCESS) {
    for(i = 0; attrs[i++];)
      ;

    eattrs = calloc(i, sizeof *eattrs);
    if(!eattrs)
      status = LDAP_NO_MEMORY;
    else {
      for(j = 0; attrs[j]; j++) {
        i = strlen(attrs[j]);

        eattrs[j] = malloc(i + 1);
        if(!eattrs[j]) {
          status = LDAP_NO_MEMORY;
          break;
        }

        QadrtConvertA2E(eattrs[j], attrs[j], i, i);
        eattrs[j][i] = '\0';
        }
      }
    }

1069
1070
1071
1072
1073
1074
1075
1076

1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
  struct berval * * result;

  cp = (char *) NULL;

  if(attr) {
    int i = strlen(attr);

    if(!(cp = malloc(i + 1))) {

      ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL,
                       ldap_err2string(LDAP_NO_MEMORY));
      return (struct berval * *) NULL;
      }

    QadrtConvertA2E(cp, attr, i, i);
    cp[i] = '\0';
    }

  result = ldap_get_values_len(ld, entry, cp);
  free(cp);

  /* Result data are binary in nature, so they haven't been
     converted to EBCDIC. Therefore do not convert. */








|
>



|



|







1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
  struct berval * * result;

  cp = (char *) NULL;

  if(attr) {
    int i = strlen(attr);

    cp = malloc(i + 1);
    if(!cp) {
      ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL,
                       ldap_err2string(LDAP_NO_MEMORY));
      return (struct berval * *) NULL;
    }

    QadrtConvertA2E(cp, attr, i, i);
    cp[i] = '\0';
  }

  result = ldap_get_values_len(ld, entry, cp);
  free(cp);

  /* Result data are binary in nature, so they haven't been
     converted to EBCDIC. Therefore do not convert. */

1112
1113
1114
1115
1116
1117
1118
1119

1120
1121
1122
1123
1124
1125
1126
  cp = ldap_get_dn(ld, entry);

  if(!cp)
    return cp;

  i = strlen(cp);

  if(!(cp2 = malloc(i + 1)))

    return cp2;

  QadrtConvertE2A(cp2, cp, i, i);
  cp2[i] = '\0';

  /* No way to allocate a buffer here, because it will be released by
     ldap_memfree() and ldap_memalloc() does not exist. The solution is to







|
>







1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
  cp = ldap_get_dn(ld, entry);

  if(!cp)
    return cp;

  i = strlen(cp);

  cp2 = malloc(i + 1);
  if(!cp2)
    return cp2;

  QadrtConvertE2A(cp2, cp, i, i);
  cp2[i] = '\0';

  /* No way to allocate a buffer here, because it will be released by
     ldap_memfree() and ldap_memalloc() does not exist. The solution is to
1144
1145
1146
1147
1148
1149
1150
1151

1152
1153
1154
1155
1156
1157
1158
  cp = ldap_first_attribute(ld, entry, berptr);

  if(!cp)
    return cp;

  i = strlen(cp);

  if(!(cp2 = malloc(i + 1)))

    return cp2;

  QadrtConvertE2A(cp2, cp, i, i);
  cp2[i] = '\0';

  /* No way to allocate a buffer here, because it will be released by
     ldap_memfree() and ldap_memalloc() does not exist. The solution is to







|
>







1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
  cp = ldap_first_attribute(ld, entry, berptr);

  if(!cp)
    return cp;

  i = strlen(cp);

  cp2 = malloc(i + 1);
  if(!cp2)
    return cp2;

  QadrtConvertE2A(cp2, cp, i, i);
  cp2[i] = '\0';

  /* No way to allocate a buffer here, because it will be released by
     ldap_memfree() and ldap_memalloc() does not exist. The solution is to
1176
1177
1178
1179
1180
1181
1182
1183

1184
1185
1186
1187
1188
1189
1190
  cp = ldap_next_attribute(ld, entry, berptr);

  if(!cp)
    return cp;

  i = strlen(cp);

  if(!(cp2 = malloc(i + 1)))

    return cp2;

  QadrtConvertE2A(cp2, cp, i, i);
  cp2[i] = '\0';

  /* No way to allocate a buffer here, because it will be released by
     ldap_memfree() and ldap_memalloc() does not exist. The solution is to







|
>







1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
  cp = ldap_next_attribute(ld, entry, berptr);

  if(!cp)
    return cp;

  i = strlen(cp);

  cp2 = malloc(i + 1);
  if(!cp2)
    return cp2;

  QadrtConvertE2A(cp2, cp, i, i);
  cp2[i] = '\0';

  /* No way to allocate a buffer here, because it will be released by
     ldap_memfree() and ldap_memalloc() does not exist. The solution is to
Changes to jni/curl/projects/Windows/VC10/lib/libcurl.vcxproj.
2450
2451
2452
2453
2454
2455
2456

2457
2458
2459
2460
2461
2462
2463
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />







>







2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />
Changes to jni/curl/projects/Windows/VC11/lib/libcurl.vcxproj.
2506
2507
2508
2509
2510
2511
2512

2513
2514
2515
2516
2517
2518
2519
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />







>







2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />
Changes to jni/curl/projects/Windows/VC12/lib/libcurl.vcxproj.
2506
2507
2508
2509
2510
2511
2512

2513
2514
2515
2516
2517
2518
2519
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />







>







2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />
Changes to jni/curl/projects/Windows/VC14/lib/libcurl.vcxproj.
2506
2507
2508
2509
2510
2511
2512

2513
2514
2515
2516
2517
2518
2519
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />







>







2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />
Changes to jni/curl/projects/Windows/VC15/lib/libcurl.vcxproj.
2506
2507
2508
2509
2510
2511
2512

2513
2514
2515
2516
2517
2518
2519
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />

    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />







>







2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
    <ClCompile Include="..\..\..\..\lib\vtls\gtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\mbedtls.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\nss.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\openssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\polarssl_threadlock.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\schannel_verify.c" />
    <ClCompile Include="..\..\..\..\lib\vtls\vtls.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\..\..\..\lib\amigaos.h" />
    <ClInclude Include="..\..\..\..\lib\arpa_telnet.h" />
    <ClInclude Include="..\..\..\..\lib\asyn.h" />
    <ClInclude Include="..\..\..\..\lib\config-win32.h" />
Changes to jni/curl/projects/Windows/VC6/lib/libcurl.dsp.
1249
1250
1251
1252
1253
1254
1255




1256
1257
1258
1259
1260
1261
1262
SOURCE=..\..\..\..\lib\vtls\polarssl_threadlock.c
# End Source File
# Begin Source File

SOURCE=..\..\..\..\lib\vtls\schannel.c
# End Source File
# Begin Source File





SOURCE=..\..\..\..\lib\vtls\vtls.c
# End Source File
# End Group
# Begin Group "Header Files"

# PROP Default_Filter ""







>
>
>
>







1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
SOURCE=..\..\..\..\lib\vtls\polarssl_threadlock.c
# End Source File
# Begin Source File

SOURCE=..\..\..\..\lib\vtls\schannel.c
# End Source File
# Begin Source File

SOURCE=..\..\..\..\lib\vtls\schannel_verify.c
# End Source File
# Begin Source File

SOURCE=..\..\..\..\lib\vtls\vtls.c
# End Source File
# End Group
# Begin Group "Header Files"

# PROP Default_Filter ""
Changes to jni/curl/projects/Windows/VC7.1/lib/libcurl.vcproj.
2001
2002
2003
2004
2005
2006
2007



2008
2009
2010
2011
2012
2013
2014
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\polarssl_threadlock.c">
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel.c">
				</File>



				<File
					RelativePath="..\..\..\..\lib\vtls\vtls.c">
				</File>
			</Filter>
			<Filter
				Name="Header Files"
				Filter="">







>
>
>







2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\polarssl_threadlock.c">
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel.c">
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel_verify.c">
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\vtls.c">
				</File>
			</Filter>
			<Filter
				Name="Header Files"
				Filter="">
Changes to jni/curl/projects/Windows/VC7/lib/libcurl.vcproj.
1855
1856
1857
1858
1859
1860
1861



1862
1863
1864
1865
1866
1867
1868
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\polarssl_threadlock.c">
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel.c">
				</File>



				<File
					RelativePath="..\..\..\..\lib\vtls\vtls.c">
				</File>
			</Filter>
			<Filter
				Name="Header Files"
				Filter="">







>
>
>







1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\polarssl_threadlock.c">
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel.c">
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel_verify.c">
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\vtls.c">
				</File>
			</Filter>
			<Filter
				Name="Header Files"
				Filter="">
Changes to jni/curl/projects/Windows/VC8/lib/libcurl.vcproj.
4602
4603
4604
4605
4606
4607
4608




4609
4610
4611
4612
4613
4614
4615
				<File
					RelativePath="..\..\..\..\lib\vtls\polarssl_threadlock.c"
				>
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel.c"
				>




				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\vtls.c"
				>
				</File>
			</Filter>
			<Filter







>
>
>
>







4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
				<File
					RelativePath="..\..\..\..\lib\vtls\polarssl_threadlock.c"
				>
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel.c"
				>
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel_verify.c"
				>
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\vtls.c"
				>
				</File>
			</Filter>
			<Filter
Changes to jni/curl/projects/Windows/VC9/lib/libcurl.vcproj.
4543
4544
4545
4546
4547
4548
4549




4550
4551
4552
4553
4554
4555
4556
				<File
					RelativePath="..\..\..\..\lib\vtls\polarssl_threadlock.c"
				>
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel.c"
				>




				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\vtls.c"
				>
				</File>
			</Filter>
			<Filter







>
>
>
>







4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
				<File
					RelativePath="..\..\..\..\lib\vtls\polarssl_threadlock.c"
				>
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel.c"
				>
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\schannel_verify.c"
				>
				</File>
				<File
					RelativePath="..\..\..\..\lib\vtls\vtls.c"
				>
				</File>
			</Filter>
			<Filter
Changes to jni/curl/projects/build-openssl.bat.
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
    set VC_VER=12.0
    set VC_DESC=VC12
    set "VC_PATH=Microsoft Visual Studio 12.0\VC"
  ) else if /i "%~1" == "vc14" (
    set VC_VER=14.0
    set VC_DESC=VC14
    set "VC_PATH=Microsoft Visual Studio 14.0\VC"
  ) else if /i "%~1" == "vc15" (
    set VC_VER=15.0
    set VC_DESC=VC15

    rem Determine the VC15 path based on the installed edition in decending
    rem order (Enterprise, then Professional and finally Community)
    if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" (
      set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC"
    ) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" (
      set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC"
    ) else (
      set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"







|
|
|

|







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
    set VC_VER=12.0
    set VC_DESC=VC12
    set "VC_PATH=Microsoft Visual Studio 12.0\VC"
  ) else if /i "%~1" == "vc14" (
    set VC_VER=14.0
    set VC_DESC=VC14
    set "VC_PATH=Microsoft Visual Studio 14.0\VC"
  ) else if /i "%~1" == "vc14.1" (
    set VC_VER=14.1
    set VC_DESC=VC14.1

    rem Determine the VC14.1 path based on the installed edition in descending
    rem order (Enterprise, then Professional and finally Community)
    if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" (
      set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC"
    ) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" (
      set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC"
    ) else (
      set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"
105
106
107
108
109
110
111


















112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128

129
130

131

132
133
134


135

136
137
138
139
140
141
142
143
144



145
146
147



148
149
150
151
152
153
154
    set BUILD_CONFIG=release
  ) else if /i "%~1" == "-?" (
    goto syntax
  ) else if /i "%~1" == "-h" (
    goto syntax
  ) else if /i "%~1" == "-help" (
    goto syntax


















  ) else (
    if not defined START_DIR (
      set START_DIR=%~1%
    ) else (
      goto unknown
    )
  )

  shift & goto parseArgs

:prerequisites
  rem Compiler is a required parameter
  if not defined VC_VER goto syntax

  rem Default the start directory if one isn't specified
  if not defined START_DIR set START_DIR=..\..\openssl


  rem Check we have a program files directory
  if not defined PF goto nopf



  rem Check we have Visual Studio installed
  if not exist "%PF%\%VC_PATH%" goto novc



  rem Check we have Perl in our path

  echo %PATH% | findstr /I /C:"\Perl" 1>nul
  if errorlevel 1 (
    rem It isn't so check we have it installed and set the path if it is
    if exist "%SystemDrive%\Perl" (
      set "PATH=%SystemDrive%\Perl\bin;%PATH%"
    ) else (
      if exist "%SystemDrive%\Perl64" (
        set "PATH=%SystemDrive%\Perl64\bin;%PATH%"
      ) else (



        goto noperl
      )
    )



  )

  rem Check the start directory exists
  if not exist "%START_DIR%" goto noopenssl

  rem Check that OpenSSL is not unsupported version 1.1.0
  if not exist "%START_DIR%\ms\do_ms.bat" goto unsupported







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

















>
|
|
>
|
>

|

>
>
|
>
|
|
|
|
|
|
|
|
|
>
>
>
|
|
|
>
>
>







105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
    set BUILD_CONFIG=release
  ) else if /i "%~1" == "-?" (
    goto syntax
  ) else if /i "%~1" == "-h" (
    goto syntax
  ) else if /i "%~1" == "-help" (
    goto syntax
  ) else if /i "%~1" == "-VSpath" (
	if "%~2" == "" (
		echo.
		echo Error. Please provide VS Path.
		goto error
	) else ( 
		set "ABS_VC_PATH=%~2\VC"
		shift
	)
  ) else if /i "%~1" == "-perlpath" (
    if "%~2" == "" (
		echo.
		echo Error. Please provide Perl root Path.
		goto error
	) else (		
		set "PERL_PATH=%~2"
		shift
	)
  ) else (
    if not defined START_DIR (
      set START_DIR=%~1%
    ) else (
      goto unknown
    )
  )

  shift & goto parseArgs

:prerequisites
  rem Compiler is a required parameter
  if not defined VC_VER goto syntax

  rem Default the start directory if one isn't specified
  if not defined START_DIR set START_DIR=..\..\openssl

  if not defined ABS_VC_PATH ( 
    rem Check we have a program files directory
	if not defined PF goto nopf
	set "ABS_VC_PATH=%PF%\%VC_PATH%"
  )
  
  rem Check we have Visual Studio installed
  if not exist "%ABS_VC_PATH%" goto novc

  
  if not defined PERL_PATH (
	rem Check we have Perl in our path 
	rem using !! below as %% was having \Microsoft was unexecpted error.
	echo !PATH! | findstr /I /C:"\Perl" 1>nul
	if errorlevel 1 (
		rem It isn't so check we have it installed and set the path if it is
		if exist "%SystemDrive%\Perl" (
		set "PATH=%SystemDrive%\Perl\bin;%PATH%"
		) else (
		if exist "%SystemDrive%\Perl64" (
			set "PATH=%SystemDrive%\Perl64\bin;%PATH%"
		) else (



			goto noperl
		)
		)
	)
  ) else (
    set "PATH=%PERL_PATH%\Perl\bin;%PATH%"
  )

  rem Check the start directory exists
  if not exist "%START_DIR%" goto noopenssl

  rem Check that OpenSSL is not unsupported version 1.1.0
  if not exist "%START_DIR%\ms\do_ms.bat" goto unsupported
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
    if "%VC_VER%" == "7.1" goto nox64
    if "%VC_VER%" == "8.0" set VCVARS_PLATFORM=x86_amd64
    if "%VC_VER%" == "9.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
    if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
    if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "15.0" set VCVARS_PLATFORM=amd64
  )

:start
  echo.
  set SAVED_PATH=%CD%

  if "%VC_VER%" == "6.0" (
    call "%PF%\%VC_PATH%\bin\vcvars32"
  ) else if "%VC_VER%" == "7.0" (
    call "%PF%\%VC_PATH%\bin\vcvars32"
  ) else if "%VC_VER%" == "7.1" (
    call "%PF%\%VC_PATH%\bin\vcvars32"
  ) else if "%VC_VER%" == "15.0" (
    call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
  ) else (
    call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
  )

  echo.
  cd %SAVED_PATH%
  cd %START_DIR%
  goto %BUILD_PLATFORM%

:x64
  rem Calculate our output directory
  set OUTDIR=build\Win64\%VC_DESC%
  if not exist %OUTDIR% md %OUTDIR%








|







|

|

|
|
|

|



|
|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
    if "%VC_VER%" == "7.1" goto nox64
    if "%VC_VER%" == "8.0" set VCVARS_PLATFORM=x86_amd64
    if "%VC_VER%" == "9.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
    if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
    if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64
  )

:start
  echo.
  set SAVED_PATH=%CD%

  if "%VC_VER%" == "6.0" (
    call "%ABS_VC_PATH%\bin\vcvars32"
  ) else if "%VC_VER%" == "7.0" (
    call "%ABS_VC_PATH%\bin\vcvars32"
  ) else if "%VC_VER%" == "7.1" (
    call "%ABS_VC_PATH%\bin\vcvars32"
  ) else if "%VC_VER%" == "14.1" (
    call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
  ) else (
    call "%ABS_VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
  )

  echo.
  cd /d %SAVED_PATH%
  if defined START_DIR cd /d %START_DIR%
  goto %BUILD_PLATFORM%

:x64
  rem Calculate our output directory
  set OUTDIR=build\Win64\%VC_DESC%
  if not exist %OUTDIR% md %OUTDIR%

347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381








382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401


402
403
404
405
406


407
408
409
410
411
412
413
  rd tmp32dll /s /q

  goto success

:syntax
  rem Display the help
  echo.
  echo Usage: build-openssl ^<compiler^> [platform] [configuration] [directory]
  echo.
  echo Compiler:
  echo.
  echo vc6       - Use Visual Studio 6
  echo vc7       - Use Visual Studio .NET
  echo vc7.1     - Use Visual Studio .NET 2003
  echo vc8       - Use Visual Studio 2005
  echo vc9       - Use Visual Studio 2008
  echo vc10      - Use Visual Studio 2010
  echo vc11      - Use Visual Studio 2012
  echo vc12      - Use Visual Studio 2013
  echo vc14      - Use Visual Studio 2015
  echo vc15      - Use Visual Studio 2017
  echo.
  echo Platform:
  echo.
  echo x86       - Perform a 32-bit build
  echo x64       - Perform a 64-bit build
  echo.
  echo Configuration:
  echo.
  echo debug     - Perform a debug build
  echo release   - Perform a release build
  echo.
  echo Other:
  echo.
  echo directory - Specifies the OpenSSL source directory








  goto error

:unknown
  echo.
  echo Error: Unknown argument '%1'
  goto error

:nodos
  echo.
  echo Error: Only a Windows NT based Operating System is supported
  goto error

:nopf
  echo.
  echo Error: Cannot obtain the directory for Program Files
  goto error

:novc
  echo.
  echo Error: %VC_DESC% is not installed


  goto error

:noperl
  echo.
  echo Error: Perl is not installed


  goto error

:nox64
  echo.
  echo Error: %VC_DESC% does not support 64-bit builds
  goto error








|












|














>
>
>
>
>
>
>
>




















>
>





>
>







377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
  rd tmp32dll /s /q

  goto success

:syntax
  rem Display the help
  echo.
  echo Usage: build-openssl ^<compiler^> [platform] [configuration] [directory] [-VSpath] ["VSpath"] [-perlpath] ["perlpath"]
  echo.
  echo Compiler:
  echo.
  echo vc6       - Use Visual Studio 6
  echo vc7       - Use Visual Studio .NET
  echo vc7.1     - Use Visual Studio .NET 2003
  echo vc8       - Use Visual Studio 2005
  echo vc9       - Use Visual Studio 2008
  echo vc10      - Use Visual Studio 2010
  echo vc11      - Use Visual Studio 2012
  echo vc12      - Use Visual Studio 2013
  echo vc14      - Use Visual Studio 2015
  echo vc14.1    - Use Visual Studio 2017
  echo.
  echo Platform:
  echo.
  echo x86       - Perform a 32-bit build
  echo x64       - Perform a 64-bit build
  echo.
  echo Configuration:
  echo.
  echo debug     - Perform a debug build
  echo release   - Perform a release build
  echo.
  echo Other:
  echo.
  echo directory - Specifies the OpenSSL source directory
  echo.
  echo -VSpath - Specify the custom VS path if Visual Studio is installed at other location 
  echo           then "C:/<ProgramFiles>/Microsoft Visual Studio[version]
  echo           For e.g. -VSpath "C:\apps\MVS14"
  echo.
  echo -perlpath - Specify the custom perl root path if perl is not located at "C:\Perl" and it is a
  echo             portable copy of perl and not installed on the win system
  echo			   For e.g. -perlpath "D:\strawberry-perl-5.24.3.1-64bit-portable"
  goto error

:unknown
  echo.
  echo Error: Unknown argument '%1'
  goto error

:nodos
  echo.
  echo Error: Only a Windows NT based Operating System is supported
  goto error

:nopf
  echo.
  echo Error: Cannot obtain the directory for Program Files
  goto error

:novc
  echo.
  echo Error: %VC_DESC% is not installed
  echo Error: Please check whether Visual compiler is installed at the path "%ABS_VC_PATH%"
  echo Error: Please provide proper VS Path by using -VSpath
  goto error

:noperl
  echo.
  echo Error: Perl is not installed
  echo Error: Please check whether Perl is installed or it is at location "C:\Perl"
  echo Error: If Perl is portable please provide perl root path by using -perlpath
  goto error

:nox64
  echo.
  echo Error: %VC_DESC% does not support 64-bit builds
  goto error

425
426
427
428
429
430
431
432
433
434
  goto error

:error
  if "%OS%" == "Windows_NT" endlocal
  exit /B 1

:success
  cd %SAVED_PATH%
  endlocal
  exit /B 0







|


467
468
469
470
471
472
473
474
475
476
  goto error

:error
  if "%OS%" == "Windows_NT" endlocal
  exit /B 1

:success
  cd /d %SAVED_PATH%
  endlocal
  exit /B 0
Changes to jni/curl/projects/build-wolfssl.bat.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    set VC_TOOLSET=v120
    set "VC_PATH=Microsoft Visual Studio 12.0\VC"
  ) else if /i "%~1" == "vc14" (
    set VC_VER=14.0
    set VC_DESC=VC14
    set VC_TOOLSET=v140
    set "VC_PATH=Microsoft Visual Studio 14.0\VC"
  ) else if /i "%~1" == "vc15" (
    set VC_VER=15.0
    set VC_DESC=VC15
    set VC_TOOLSET=v141

    rem Determine the VC15 path based on the installed edition in decending
    rem order (Enterprise, then Professional and finally Community)
    if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" (
      set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC"
    ) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" (
      set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC"
    ) else (
      set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"
    )    
  ) else if /i "%~1" == "x86" (
    set BUILD_PLATFORM=x86
  ) else if /i "%~1" == "x64" (
    set BUILD_PLATFORM=x64
  ) else if /i "%~1" == "debug" (
    set BUILD_CONFIG=debug
  ) else if /i "%~1" == "release" (







|
|
|


|







|







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    set VC_TOOLSET=v120
    set "VC_PATH=Microsoft Visual Studio 12.0\VC"
  ) else if /i "%~1" == "vc14" (
    set VC_VER=14.0
    set VC_DESC=VC14
    set VC_TOOLSET=v140
    set "VC_PATH=Microsoft Visual Studio 14.0\VC"
  ) else if /i "%~1" == "vc14.1" (
    set VC_VER=14.1
    set VC_DESC=VC14.1
    set VC_TOOLSET=v141

    rem Determine the VC14.1 path based on the installed edition in descending
    rem order (Enterprise, then Professional and finally Community)
    if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" (
      set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC"
    ) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" (
      set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC"
    ) else (
      set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"
    )
  ) else if /i "%~1" == "x86" (
    set BUILD_PLATFORM=x86
  ) else if /i "%~1" == "x64" (
    set BUILD_PLATFORM=x64
  ) else if /i "%~1" == "debug" (
    set BUILD_CONFIG=debug
  ) else if /i "%~1" == "release" (
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
  if "%BUILD_PLATFORM%" == "x86" (
    set VCVARS_PLATFORM=x86
  ) else if "%BUILD_PLATFORM%" == "x64" (
    if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
    if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "15.0" set VCVARS_PLATFORM=amd64
  )

:start
  echo.
  set SAVED_PATH=%CD%

  if "%VC_VER%" == "15.0" (
    call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
  ) else (
    call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
  )

  echo.
  cd %SAVED_PATH%
  cd %START_DIR%
  goto %BUILD_PLATFORM%

:x64
  rem Calculate our output directory
  set OUTDIR=build\Win64\%VC_DESC%
  if not exist %OUTDIR% md %OUTDIR%








|






|






|
|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
  if "%BUILD_PLATFORM%" == "x86" (
    set VCVARS_PLATFORM=x86
  ) else if "%BUILD_PLATFORM%" == "x64" (
    if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
    if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
    if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64
  )

:start
  echo.
  set SAVED_PATH=%CD%

  if "%VC_VER%" == "14.1" (
    call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
  ) else (
    call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
  )

  echo.
  cd /d %SAVED_PATH%
  if defined START_DIR cd /d %START_DIR%
  goto %BUILD_PLATFORM%

:x64
  rem Calculate our output directory
  set OUTDIR=build\Win64\%VC_DESC%
  if not exist %OUTDIR% md %OUTDIR%

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
  echo.
  echo Compiler:
  echo.
  echo vc10      - Use Visual Studio 2010
  echo vc11      - Use Visual Studio 2012
  echo vc12      - Use Visual Studio 2013
  echo vc14      - Use Visual Studio 2015
  echo vc15      - Use Visual Studio 2017
  echo.
  echo Platform:
  echo.
  echo x86       - Perform a 32-bit build
  echo x64       - Perform a 64-bit build
  echo.
  echo Configuration:







|







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
  echo.
  echo Compiler:
  echo.
  echo vc10      - Use Visual Studio 2010
  echo vc11      - Use Visual Studio 2012
  echo vc12      - Use Visual Studio 2013
  echo vc14      - Use Visual Studio 2015
  echo vc14.1    - Use Visual Studio 2017
  echo.
  echo Platform:
  echo.
  echo x86       - Perform a 32-bit build
  echo x64       - Perform a 64-bit build
  echo.
  echo Configuration:
365
366
367
368
369
370
371
372
373
374
    echo Build complete.
    echo.
    echo The following configurations were built and tested successfully:
    echo.
    echo %SUCCESSFUL_BUILDS%
    echo.
  )
  cd %SAVED_PATH%
  endlocal
  exit /B 0







|


365
366
367
368
369
370
371
372
373
374
    echo Build complete.
    echo.
    echo The following configurations were built and tested successfully:
    echo.
    echo %SUCCESSFUL_BUILDS%
    echo.
  )
  cd /d %SAVED_PATH%
  endlocal
  exit /B 0
Changes to jni/curl/src/tool_cb_dbg.c.
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
        /* if the data is output to a tty and we're sending this debug trace
           to stderr or stdout, we don't display the alert about the data not
           being shown as the data _is_ shown then just not via this
           function */
        if(!config->isatty || ((output != stderr) && (output != stdout))) {
          if(!newl)
            fprintf(output, "%s%s ", timebuf, s_infotype[type]);
          fprintf(output, "[%zd bytes data]\n", size);
          newl = FALSE;
          traced_data = TRUE;
        }
      }
      break;
    default: /* nada */
      newl = FALSE;







|







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
        /* if the data is output to a tty and we're sending this debug trace
           to stderr or stdout, we don't display the alert about the data not
           being shown as the data _is_ shown then just not via this
           function */
        if(!config->isatty || ((output != stderr) && (output != stdout))) {
          if(!newl)
            fprintf(output, "%s%s ", timebuf, s_infotype[type]);
          fprintf(output, "[%zu bytes data]\n", size);
          newl = FALSE;
          traced_data = TRUE;
        }
      }
      break;
    default: /* nada */
      newl = FALSE;
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

  unsigned int width = 0x10;

  if(tracetype == TRACE_ASCII)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s%s, %zd bytes (0x%zx)\n", timebuf, text, size, size);

  for(i = 0; i < size; i += width) {

    fprintf(stream, "%04zx: ", i);

    if(tracetype == TRACE_BIN) {
      /* hex not disabled, show it */







|







225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

  unsigned int width = 0x10;

  if(tracetype == TRACE_ASCII)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s%s, %zu bytes (0x%zx)\n", timebuf, text, size, size);

  for(i = 0; i < size; i += width) {

    fprintf(stream, "%04zx: ", i);

    if(tracetype == TRACE_BIN) {
      /* hex not disabled, show it */
Changes to jni/curl/src/tool_cb_prg.c.
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
      bar->width = (int)num;
    curl_free(colp);
  }

  if(!bar->width) {
    int cols = 0;

#ifdef ANDROID
    cols = 79;
#elif defined(TIOCGSIZE)
    struct ttysize ts;
    if(!ioctl(STDIN_FILENO, TIOCGSIZE, &ts))
      cols = ts.ts_cols;
#elif defined(TIOCGWINSZ)
    struct winsize ts;
    if(!ioctl(STDIN_FILENO, TIOCGWINSZ, &ts))
      cols = ts.ws_col;







|
<
<







196
197
198
199
200
201
202
203


204
205
206
207
208
209
210
      bar->width = (int)num;
    curl_free(colp);
  }

  if(!bar->width) {
    int cols = 0;

#ifdef TIOCGSIZE


    struct ttysize ts;
    if(!ioctl(STDIN_FILENO, TIOCGSIZE, &ts))
      cols = ts.ts_cols;
#elif defined(TIOCGWINSZ)
    struct winsize ts;
    if(!ioctl(STDIN_FILENO, TIOCGWINSZ, &ts))
      cols = ts.ws_col;
Changes to jni/curl/src/tool_cfgable.h.
248
249
250
251
252
253
254

255
256
257
258
259
260
261
  bool suppress_connect_headers;  /* suppress proxy CONNECT response headers
                                     from user callbacks */
  curl_error synthetic_error;     /* if non-zero, it overrides any libcurl
                                     error */
  bool ssh_compression;           /* enable/disable SSH compression */
  long happy_eyeballs_timeout_ms; /* happy eyeballs timeout in milliseconds.
                                     0 is valid. default: CURL_HET_DEFAULT. */

  struct GlobalConfig *global;
  struct OperationConfig *prev;
  struct OperationConfig *next;   /* Always last in the struct */
};

struct GlobalConfig {
  CURL *easy;                     /* Once we have one, we keep it here */







>







248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
  bool suppress_connect_headers;  /* suppress proxy CONNECT response headers
                                     from user callbacks */
  curl_error synthetic_error;     /* if non-zero, it overrides any libcurl
                                     error */
  bool ssh_compression;           /* enable/disable SSH compression */
  long happy_eyeballs_timeout_ms; /* happy eyeballs timeout in milliseconds.
                                     0 is valid. default: CURL_HET_DEFAULT. */
  bool haproxy_protocol;          /* whether to send HAProxy PROXY protocol */
  struct GlobalConfig *global;
  struct OperationConfig *prev;
  struct OperationConfig *next;   /* Always last in the struct */
};

struct GlobalConfig {
  CURL *easy;                     /* Once we have one, we keep it here */
Changes to jni/curl/src/tool_doswin.c.
634
635
636
637
638
639
640

641
642
643
644
645





646

647
648
649
650
651
652
653
 *  5. all directories along %PATH%
 *
 * For WinXP and later search order actually depends on registry value:
 * HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode
 */

CURLcode FindWin32CACert(struct OperationConfig *config,

                         const char *bundle_file)
{
  CURLcode result = CURLE_OK;

  /* search and set cert file only if libcurl supports SSL */





  if(curlinfo->features & CURL_VERSION_SSL) {


    DWORD res_len;
    char buf[PATH_MAX];
    char *ptr = NULL;

    buf[0] = '\0';








>




|
>
>
>
>
>
|
>







634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
 *  5. all directories along %PATH%
 *
 * For WinXP and later search order actually depends on registry value:
 * HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode
 */

CURLcode FindWin32CACert(struct OperationConfig *config,
                         curl_sslbackend backend,
                         const char *bundle_file)
{
  CURLcode result = CURLE_OK;

  /* Search and set cert file only if libcurl supports SSL.
   *
   * If Schannel (WinSSL) is the selected SSL backend then these locations
   * are ignored. We allow setting CA location for schannel only when
   * explicitly specified by the user via CURLOPT_CAINFO / --cacert.
   */
  if((curlinfo->features & CURL_VERSION_SSL) &&
     backend != CURLSSLBACKEND_SCHANNEL) {

    DWORD res_len;
    char buf[PATH_MAX];
    char *ptr = NULL;

    buf[0] = '\0';

Changes to jni/curl/src/tool_doswin.h.
54
55
56
57
58
59
60

61
62
63
64
65
66
67
char **__crt0_glob_function(char *arg);

#endif /* MSDOS && (__DJGPP__ || __GO32__) */

#ifdef WIN32

CURLcode FindWin32CACert(struct OperationConfig *config,

                         const char *bundle_file);

#endif /* WIN32 */

#endif /* MSDOS || WIN32 */

#endif /* HEADER_CURL_TOOL_DOSWIN_H */







>







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
char **__crt0_glob_function(char *arg);

#endif /* MSDOS && (__DJGPP__ || __GO32__) */

#ifdef WIN32

CURLcode FindWin32CACert(struct OperationConfig *config,
                         curl_sslbackend backend,
                         const char *bundle_file);

#endif /* WIN32 */

#endif /* MSDOS || WIN32 */

#endif /* HEADER_CURL_TOOL_DOSWIN_H */
Changes to jni/curl/src/tool_formparse.c.
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
  int fd = -1;
  CURLcode result = CURLE_OK;
  struct_stat sbuf;

  if(strcmp(file, "-"))
    return curl_mime_filedata(part, file);

  sip = (standard_input *) malloc(sizeof *sip);
  if(!sip)
    return CURLE_OUT_OF_MEMORY;

  memset((char *) sip, 0, sizeof *sip);
  set_binmode(stdin);

  /* If stdin is a regular file, do not buffer data but read it when needed. */
  fd = fileno(stdin);
  sip->origin = ftell(stdin);
  if(fd >= 0 && sip->origin >= 0 && !fstat(fd, &sbuf) &&
#ifdef __VMS







|



<







447
448
449
450
451
452
453
454
455
456
457

458
459
460
461
462
463
464
  int fd = -1;
  CURLcode result = CURLE_OK;
  struct_stat sbuf;

  if(strcmp(file, "-"))
    return curl_mime_filedata(part, file);

  sip = (standard_input *) calloc(1, sizeof *sip);
  if(!sip)
    return CURLE_OUT_OF_MEMORY;


  set_binmode(stdin);

  /* If stdin is a regular file, do not buffer data but read it when needed. */
  fd = fileno(stdin);
  sip->origin = ftell(stdin);
  if(fd >= 0 && sip->origin >= 0 && !fstat(fd, &sbuf) &&
#ifdef __VMS
Changes to jni/curl/src/tool_getparam.c.
108
109
110
111
112
113
114

115
116
117
118
119
120
121
  {"*t", "proxy-ntlm",               ARG_BOOL},
  {"*u", "crlf",                     ARG_BOOL},
  {"*v", "stderr",                   ARG_STRING},
  {"*w", "interface",                ARG_STRING},
  {"*x", "krb",                      ARG_STRING},
  {"*x", "krb4",                     ARG_STRING},
         /* 'krb4' is the previous name */

  {"*y", "max-filesize",             ARG_STRING},
  {"*z", "disable-eprt",             ARG_BOOL},
  {"*Z", "eprt",                     ARG_BOOL},
         /* 'eprt' made like this to make --no-eprt and --eprt to work
             although --disable-eprt is the documented option */
  {"*~", "xattr",                    ARG_BOOL},
  {"$a", "ftp-ssl",                  ARG_BOOL},







>







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
  {"*t", "proxy-ntlm",               ARG_BOOL},
  {"*u", "crlf",                     ARG_BOOL},
  {"*v", "stderr",                   ARG_STRING},
  {"*w", "interface",                ARG_STRING},
  {"*x", "krb",                      ARG_STRING},
  {"*x", "krb4",                     ARG_STRING},
         /* 'krb4' is the previous name */
  {"*X", "haproxy-protocol",         ARG_BOOL},
  {"*y", "max-filesize",             ARG_STRING},
  {"*z", "disable-eprt",             ARG_BOOL},
  {"*Z", "eprt",                     ARG_BOOL},
         /* 'eprt' made like this to make --no-eprt and --eprt to work
             although --disable-eprt is the documented option */
  {"*~", "xattr",                    ARG_BOOL},
  {"$a", "ftp-ssl",                  ARG_BOOL},
775
776
777
778
779
780
781



782
783
784
785
786
787
788
      case 'x': /* --krb */
        /* kerberos level string */
        if(curlinfo->features & CURL_VERSION_KERBEROS4)
          GetStr(&config->krblevel, nextarg);
        else
          return PARAM_LIBCURL_DOESNT_SUPPORT;
        break;



      case 'y': /* --max-filesize */
        {
          curl_off_t value;
          ParameterError pe =
            GetSizeParameter(global, nextarg, "max-filesize", &value);

          if(pe != PARAM_OK)







>
>
>







776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
      case 'x': /* --krb */
        /* kerberos level string */
        if(curlinfo->features & CURL_VERSION_KERBEROS4)
          GetStr(&config->krblevel, nextarg);
        else
          return PARAM_LIBCURL_DOESNT_SUPPORT;
        break;
      case 'X': /* --haproxy-protocol */
        config->haproxy_protocol = toggle;
        break;
      case 'y': /* --max-filesize */
        {
          curl_off_t value;
          ParameterError pe =
            GetSizeParameter(global, nextarg, "max-filesize", &value);

          if(pe != PARAM_OK)
Changes to jni/curl/src/tool_help.c.
160
161
162
163
164
165
166


167
168
169
170
171
172
173
   "Put the post data in the URL and use GET"},
  {"-g, --globoff",
   "Disable URL sequences and ranges using {} and []"},
  {"    --happy-eyeballs-timeout-ms",
   "How long to wait in milliseconds for IPv6 before trying IPv4"},
  {"-I, --head",
   "Show document info only"},


  {"-H, --header <header/@file>",
   "Pass custom header(s) to server"},
  {"-h, --help",
   "This help text"},
  {"    --hostpubmd5 <md5>",
   "Acceptable MD5 hash of the host public key"},
  {"-0, --http1.0",







>
>







160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
   "Put the post data in the URL and use GET"},
  {"-g, --globoff",
   "Disable URL sequences and ranges using {} and []"},
  {"    --happy-eyeballs-timeout-ms",
   "How long to wait in milliseconds for IPv6 before trying IPv4"},
  {"-I, --head",
   "Show document info only"},
  {"    --haproxy-protocol",
   "Send HAProxy PROXY protocol header"},
  {"-H, --header <header/@file>",
   "Pass custom header(s) to server"},
  {"-h, --help",
   "This help text"},
  {"    --hostpubmd5 <md5>",
   "Acceptable MD5 hash of the host public key"},
  {"-0, --http1.0",
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
   "Mail to this address"},
  {"-M, --manual",
   "Display the full manual"},
  {"    --max-filesize <bytes>",
   "Maximum file size to download"},
  {"    --max-redirs <num>",
   "Maximum number of redirects allowed"},
  {"-m, --max-time <time>",
   "Maximum time allowed for the transfer"},
  {"    --metalink",
   "Process given URLs as metalink XML file"},
  {"    --negotiate",
   "Use HTTP Negotiate (SPNEGO) authentication"},
  {"-n, --netrc",
   "Must read .netrc for user name and password"},







|







224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
   "Mail to this address"},
  {"-M, --manual",
   "Display the full manual"},
  {"    --max-filesize <bytes>",
   "Maximum file size to download"},
  {"    --max-redirs <num>",
   "Maximum number of redirects allowed"},
  {"-m, --max-time <seconds>",
   "Maximum time allowed for the transfer"},
  {"    --metalink",
   "Process given URLs as metalink XML file"},
  {"    --negotiate",
   "Use HTTP Negotiate (SPNEGO) authentication"},
  {"-n, --netrc",
   "Must read .netrc for user name and password"},
Changes to jni/curl/src/tool_hugehelp.c.

more than 10,000 changes

Changes to jni/curl/src/tool_metalink.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253

#elif defined(USE_NSS)

static int nss_hash_init(void **pctx, SECOidTag hash_alg)
{
  PK11Context *ctx;

  /* we have to initialize NSS if not initialized alraedy */
  if(!NSS_IsInitialized() && !nss_context) {
    static NSSInitParameters params;
    params.length = sizeof params;
    nss_context = NSS_InitContext("", "", "", "", &params, NSS_INIT_READONLY
        | NSS_INIT_NOCERTDB   | NSS_INIT_NOMODDB       | NSS_INIT_FORCEOPEN
        | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD);
  }







|







239
240
241
242
243
244
245
246
247
248
249
250
251
252
253

#elif defined(USE_NSS)

static int nss_hash_init(void **pctx, SECOidTag hash_alg)
{
  PK11Context *ctx;

  /* we have to initialize NSS if not initialized already */
  if(!NSS_IsInitialized() && !nss_context) {
    static NSSInitParameters params;
    params.length = sizeof params;
    nss_context = NSS_InitContext("", "", "", "", &params, NSS_INIT_READONLY
        | NSS_INIT_NOCERTDB   | NSS_INIT_NOMODDB       | NSS_INIT_FORCEOPEN
        | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD);
  }
456
457
458
459
460
461
462





463
464
465
466
467
468
469

static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
{
  win32_crypto_final(ctx, digest, 32);
}

#endif /* CRYPTO LIBS */






const digest_params MD5_DIGEST_PARAMS[] = {
  {
    (Curl_digest_init_func) MD5_Init,
    (Curl_digest_update_func) MD5_Update,
    (Curl_digest_final_func) MD5_Final,
    sizeof(MD5_CTX),







>
>
>
>
>







456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474

static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
{
  win32_crypto_final(ctx, digest, 32);
}

#endif /* CRYPTO LIBS */

/* Disable this picky gcc-8 compiler warning */
#if defined(__GNUC__) && (__GNUC__ >= 8)
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif

const digest_params MD5_DIGEST_PARAMS[] = {
  {
    (Curl_digest_init_func) MD5_Init,
    (Curl_digest_update_func) MD5_Update,
    (Curl_digest_final_func) MD5_Final,
    sizeof(MD5_CTX),
Changes to jni/curl/src/tool_operate.c.
224
225
226
227
228
229
230






















231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272

273
274
275
276

277
278
279
280
281
282
283
   * We support the environment variable thing for non-Windows platforms
   * too. Just for the sake of it.
   */
  capath_from_env = false;
  if(!config->cacert &&
     !config->capath &&
     !config->insecure_ok) {






















    char *env;
    env = curlx_getenv("CURL_CA_BUNDLE");
    if(env) {
      config->cacert = strdup(env);
      if(!config->cacert) {
        curl_free(env);
        helpf(global->errors, "out of memory\n");
        result = CURLE_OUT_OF_MEMORY;
        goto quit_curl;
      }
    }
    else {
      env = curlx_getenv("SSL_CERT_DIR");
      if(env) {
        config->capath = strdup(env);
        if(!config->capath) {
          curl_free(env);
          helpf(global->errors, "out of memory\n");
          result = CURLE_OUT_OF_MEMORY;
          goto quit_curl;
        }
        capath_from_env = true;
      }
      else {
        env = curlx_getenv("SSL_CERT_FILE");
        if(env) {
          config->cacert = strdup(env);
          if(!config->cacert) {
            curl_free(env);
            helpf(global->errors, "out of memory\n");
            result = CURLE_OUT_OF_MEMORY;
            goto quit_curl;
          }
        }
      }
    }

    if(env)
      curl_free(env);
#ifdef WIN32
    else {
      result = FindWin32CACert(config, "curl-ca-bundle.crt");

      if(result)
        goto quit_curl;
    }
#endif

  }

  if(config->postfields) {
    if(config->use_httpget) {
      /* Use the postfields data for a http get */
      httpgetfields = strdup(config->postfields);
      Curl_safefree(config->postfields);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|

|
|
>
|
|
|

>







224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
   * We support the environment variable thing for non-Windows platforms
   * too. Just for the sake of it.
   */
  capath_from_env = false;
  if(!config->cacert &&
     !config->capath &&
     !config->insecure_ok) {
    struct curl_tlssessioninfo *tls_backend_info = NULL;

    /* With the addition of CAINFO support for Schannel, this search could find
     * a certificate bundle that was previously ignored. To maintain backward
     * compatibility, only perform this search if not using Schannel.
     */
    result = curl_easy_getinfo(config->easy,
                               CURLINFO_TLS_SSL_PTR,
                               &tls_backend_info);
    if(result) {
      goto quit_curl;
    }

    /* Set the CA cert locations specified in the environment. For Windows if
     * no environment-specified filename is found then check for CA bundle
     * default filename curl-ca-bundle.crt in the user's PATH.
     *
     * If Schannel (WinSSL) is the selected SSL backend then these locations
     * are ignored. We allow setting CA location for schannel only when
     * explicitly specified by the user via CURLOPT_CAINFO / --cacert.
     */
    if(tls_backend_info->backend != CURLSSLBACKEND_SCHANNEL) {
      char *env;
      env = curlx_getenv("CURL_CA_BUNDLE");
      if(env) {
        config->cacert = strdup(env);
        if(!config->cacert) {
          curl_free(env);
          helpf(global->errors, "out of memory\n");
          result = CURLE_OUT_OF_MEMORY;
          goto quit_curl;
        }
      }
      else {
        env = curlx_getenv("SSL_CERT_DIR");
        if(env) {
          config->capath = strdup(env);
          if(!config->capath) {
            curl_free(env);
            helpf(global->errors, "out of memory\n");
            result = CURLE_OUT_OF_MEMORY;
            goto quit_curl;
          }
          capath_from_env = true;
        }
        else {
          env = curlx_getenv("SSL_CERT_FILE");
          if(env) {
            config->cacert = strdup(env);
            if(!config->cacert) {
              curl_free(env);
              helpf(global->errors, "out of memory\n");
              result = CURLE_OUT_OF_MEMORY;
              goto quit_curl;
            }
          }
        }
      }

      if(env)
        curl_free(env);
#ifdef WIN32
      else {
        result = FindWin32CACert(config, tls_backend_info->backend,
                                 "curl-ca-bundle.crt");
        if(result)
          goto quit_curl;
      }
#endif
    }
  }

  if(config->postfields) {
    if(config->use_httpget) {
      /* Use the postfields data for a http get */
      httpgetfields = strdup(config->postfields);
      Curl_safefree(config->postfields);
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
      }

      if(metalink) {
        /* For Metalink download, we don't use glob. Instead we use
           the number of resources as urlnum. */
        urlnum = count_next_metalink_resource(mlfile);
      }
      else
      if(!config->globoff) {
        /* Unless explicitly shut off, we expand '{...}' and '[...]'
           expressions and return total number of URLs in pattern set */
        result = glob_url(&urls, urlnode->url, &urlnum,
                          global->showerror?global->errors:NULL);
        if(result) {
          Curl_safefree(uploadfile);
          break;







<
|







452
453
454
455
456
457
458

459
460
461
462
463
464
465
466
      }

      if(metalink) {
        /* For Metalink download, we don't use glob. Instead we use
           the number of resources as urlnum. */
        urlnum = count_next_metalink_resource(mlfile);
      }

      else if(!config->globoff) {
        /* Unless explicitly shut off, we expand '{...}' and '[...]'
           expressions and return total number of URLs in pattern set */
        result = glob_url(&urls, urlnode->url, &urlnum,
                          global->showerror?global->errors:NULL);
        if(result) {
          Curl_safefree(uploadfile);
          break;
1441
1442
1443
1444
1445
1446
1447




1448
1449
1450
1451
1452
1453
1454
          my_setopt(curl, CURLOPT_TFTP_NO_OPTIONS, 1L);

        /* new in 7.59.0 */
        if(config->happy_eyeballs_timeout_ms != CURL_HET_DEFAULT)
          my_setopt(curl, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS,
                    config->happy_eyeballs_timeout_ms);





        /* initialize retry vars for loop below */
        retry_sleep_default = (config->retry_delay) ?
          config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */

        retry_numretries = config->req_retry;
        retry_sleep = retry_sleep_default; /* ms */
        retrystart = tvnow();







>
>
>
>







1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
          my_setopt(curl, CURLOPT_TFTP_NO_OPTIONS, 1L);

        /* new in 7.59.0 */
        if(config->happy_eyeballs_timeout_ms != CURL_HET_DEFAULT)
          my_setopt(curl, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS,
                    config->happy_eyeballs_timeout_ms);

        /* new in 7.60.0 */
        if(config->haproxy_protocol)
          my_setopt(curl, CURLOPT_HAPROXYPROTOCOL, 1L);

        /* initialize retry vars for loop below */
        retry_sleep_default = (config->retry_delay) ?
          config->retry_delay*1000L : RETRY_SLEEP_DEFAULT; /* ms */

        retry_numretries = config->req_retry;
        retry_sleep = retry_sleep_default; /* ms */
        retrystart = tvnow();
1562
1563
1564
1565
1566
1567
1568


1569

1570

1571
1572
1573
1574
1575
1576
1577
1578
                   * uploaded something when this was returned.
                   */
                  break;
                }
              }
            } /* if CURLE_OK */
            else if(result) {


              curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);



              if(response/100 == 4)
                /*
                 * This is typically when the FTP server only allows a certain
                 * amount of users and we are not one of them.  All 4xx codes
                 * are transient.
                 */
                retry = RETRY_FTP;
            }







>
>

>

>
|







1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
                   * uploaded something when this was returned.
                   */
                  break;
                }
              }
            } /* if CURLE_OK */
            else if(result) {
              long protocol;

              curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
              curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);

              if((protocol == CURLPROTO_FTP || protocol == CURLPROTO_FTPS) &&
                 response / 100 == 4)
                /*
                 * This is typically when the FTP server only allows a certain
                 * amount of users and we are not one of them.  All 4xx codes
                 * are transient.
                 */
                retry = RETRY_FTP;
            }
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
          mlres = mlres->next;
          if(mlres == NULL)
            /* TODO If metalink_next_res is 1 and mlres is NULL,
             * set res to error code
             */
            break;
        }
        else
        if(urlnum > 1) {
          /* when url globbing, exit loop upon critical error */
          if(is_fatal_error(result))
            break;
        }
        else if(result)
          /* when not url globbing, exit loop upon any error */
          break;







<
|







1853
1854
1855
1856
1857
1858
1859

1860
1861
1862
1863
1864
1865
1866
1867
          mlres = mlres->next;
          if(mlres == NULL)
            /* TODO If metalink_next_res is 1 and mlres is NULL,
             * set res to error code
             */
            break;
        }

        else if(urlnum > 1) {
          /* when url globbing, exit loop upon critical error */
          if(is_fatal_error(result))
            break;
        }
        else if(result)
          /* when not url globbing, exit loop upon any error */
          break;
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
#endif

      /* Perform the main operations */
      if(!result) {
        size_t count = 0;
        struct OperationConfig *operation = config->first;

        /* Get the required aguments for each operation */
        while(!result && operation) {
          result = get_args(operation, count++);

          operation = operation->next;
        }

        /* Set the current operation pointer */







|







1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
#endif

      /* Perform the main operations */
      if(!result) {
        size_t count = 0;
        struct OperationConfig *operation = config->first;

        /* Get the required arguments for each operation */
        while(!result && operation) {
          result = get_args(operation, count++);

          operation = operation->next;
        }

        /* Set the current operation pointer */
Changes to jni/curl/src/tool_urlglob.c.
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
      if(buflen) {
        *buf++ = pat->content.CharRange.ptr_c;
        *buf = '\0';
        buflen--;
      }
      break;
    case UPTNumRange:
      snprintf(buf, buflen, "%0*ld",
               pat->content.NumRange.padlength,
               pat->content.NumRange.ptr_n);
      len = strlen(buf);
      buf += len;
      buflen -= len;
      break;
    default:







|







575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
      if(buflen) {
        *buf++ = pat->content.CharRange.ptr_c;
        *buf = '\0';
        buflen--;
      }
      break;
    case UPTNumRange:
      snprintf(buf, buflen, "%0*lu",
               pat->content.NumRange.padlength,
               pat->content.NumRange.ptr_n);
      len = strlen(buf);
      buf += len;
      buflen -= len;
      break;
    default:
Changes to jni/curl/src/tool_version.h.
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * KIND, either express or implied.
 *
 ***************************************************************************/
#include <curl/curlver.h>

#define CURL_NAME "curl"
#define CURL_COPYRIGHT LIBCURL_COPYRIGHT
#define CURL_VERSION "7.59.0"
#define CURL_VERSION_MAJOR LIBCURL_VERSION_MAJOR
#define CURL_VERSION_MINOR LIBCURL_VERSION_MINOR
#define CURL_VERSION_PATCH LIBCURL_VERSION_PATCH
#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "

#endif /* HEADER_CURL_TOOL_VERSION_H */







|






21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * KIND, either express or implied.
 *
 ***************************************************************************/
#include <curl/curlver.h>

#define CURL_NAME "curl"
#define CURL_COPYRIGHT LIBCURL_COPYRIGHT
#define CURL_VERSION "7.60.0"
#define CURL_VERSION_MAJOR LIBCURL_VERSION_MAJOR
#define CURL_VERSION_MINOR LIBCURL_VERSION_MINOR
#define CURL_VERSION_PATCH LIBCURL_VERSION_PATCH
#define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "

#endif /* HEADER_CURL_TOOL_VERSION_H */
Changes to jni/curl/tests/FILEFORMAT.
227
228
229
230
231
232
233

234
235
236
237
238
239
240
GSS-API
http2
idn
ipv6
Kerberos
large_file
libz

Metalink
NSS
NTLM
OpenSSL
PSL
socks
SPNEGO







>







227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
GSS-API
http2
idn
ipv6
Kerberos
large_file
libz
manual
Metalink
NSS
NTLM
OpenSSL
PSL
socks
SPNEGO
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
variable2=contents2

Set the given environment variables to the specified value before the actual
command is run. They are cleared again after the command has been run.
Variables are first substituted as in the <command> section.
</setenv>

<command [option="no-output/no-include"] [timeout="secs"] [delay="secs"]
         [type="perl"]>
command line to run, there's a bunch of %variables that get replaced
accordingly.

Note that the URL that gets passed to the server actually controls what data
that is returned. The last slash in the URL must be followed by a number. That
number (N) will be used by the test-server to load test case N and return the
data that is defined within the <reply><data></data></reply> section.







|
|







290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
variable2=contents2

Set the given environment variables to the specified value before the actual
command is run. They are cleared again after the command has been run.
Variables are first substituted as in the <command> section.
</setenv>

<command [option="no-output/no-include/force-output"] [timeout="secs"]
         [delay="secs"][type="perl"]>
command line to run, there's a bunch of %variables that get replaced
accordingly.

Note that the URL that gets passed to the server actually controls what data
that is returned. The last slash in the URL must be followed by a number. That
number (N) will be used by the test-server to load test case N and return the
data that is defined within the <reply><data></data></reply> section.
312
313
314
315
316
317
318



319
320
321
322
323
324
325

Set type="perl" to write the test case as a perl script. It implies that
there's no memory debugging and valgrind gets shut off for this test.

Set option="no-output" to prevent the test script to slap on the --output
argument that directs the output to a file. The --output is also not added if
the verify/stdout section is used.




Set option="no-include" to prevent the test script to slap on the --include
argument.

Set timeout="secs" to override default server logs advisor read lock timeout.
This timeout is used by the test harness, once that the command has completed
execution, to wait for the test server to write out server side log files and







>
>
>







313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329

Set type="perl" to write the test case as a perl script. It implies that
there's no memory debugging and valgrind gets shut off for this test.

Set option="no-output" to prevent the test script to slap on the --output
argument that directs the output to a file. The --output is also not added if
the verify/stdout section is used.

Set option="force-output" to make use of --output even when the test is
otherwise written to verify stdout.

Set option="no-include" to prevent the test script to slap on the --include
argument.

Set timeout="secs" to override default server logs advisor read lock timeout.
This timeout is used by the test harness, once that the command has completed
execution, to wait for the test server to write out server side log files and
Changes to jni/curl/tests/certs/Makefile.am.
58
59
60
61
62
63
64
65


















66
67
68
69
70
71
72
73
74
75
76
77
78
79

80
81
82
83
84
85
86
87
88
89
90
91






  Server-localhost0h-sv.crt \
  Server-localhost0h-sv.csr \
  Server-localhost0h-sv.der \
  Server-localhost0h-sv.dhp \
  Server-localhost0h-sv.key \
  Server-localhost0h-sv.pem \
  Server-localhost0h-sv.pub.der \
  Server-localhost0h-sv.pub.pem



















SRPFILES = \
  srp-verifier-conf \
  srp-verifier-db

EXTRA_DIST = $(CERTCONFIGS) $(GENERATEDCERTS) $(SRPFILES)

# Rebuild the certificates

clean-certs:
	cd $(srcdir); rm -f $(GENERATEDCERTS)

build-certs: $(srcdir)/EdelCurlRoot-ca.cacert $(srcdir)/Server-localhost-sv.pem \
	$(srcdir)/Server-localhost.nn-sv.pem $(srcdir)/Server-localhost0h-sv.pem


$(srcdir)/EdelCurlRoot-ca.cacert:
	cd $(srcdir); scripts/genroot.sh EdelCurlRoot

$(srcdir)/Server-localhost-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost EdelCurlRoot

$(srcdir)/Server-localhost.nn-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost.nn EdelCurlRoot

$(srcdir)/Server-localhost0h-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost0h EdelCurlRoot













|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













|
>












>
>
>
>
>
>
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  Server-localhost0h-sv.crt \
  Server-localhost0h-sv.csr \
  Server-localhost0h-sv.der \
  Server-localhost0h-sv.dhp \
  Server-localhost0h-sv.key \
  Server-localhost0h-sv.pem \
  Server-localhost0h-sv.pub.der \
  Server-localhost0h-sv.pub.pem \
  Server-localhost-firstSAN-sv.crl \
  Server-localhost-firstSAN-sv.crt \
  Server-localhost-firstSAN-sv.csr \
  Server-localhost-firstSAN-sv.der \
  Server-localhost-firstSAN-sv.dhp \
  Server-localhost-firstSAN-sv.key \
  Server-localhost-firstSAN-sv.pem \
  Server-localhost-firstSAN-sv.pub.der \
  Server-localhost-firstSAN-sv.pub.pem \
  Server-localhost-lastSAN-sv.crl \
  Server-localhost-lastSAN-sv.crt \
  Server-localhost-lastSAN-sv.csr \
  Server-localhost-lastSAN-sv.der \
  Server-localhost-lastSAN-sv.dhp \
  Server-localhost-lastSAN-sv.key \
  Server-localhost-lastSAN-sv.pem \
  Server-localhost-lastSAN-sv.pub.der \
  Server-localhost-lastSAN-sv.pub.pem

SRPFILES = \
  srp-verifier-conf \
  srp-verifier-db

EXTRA_DIST = $(CERTCONFIGS) $(GENERATEDCERTS) $(SRPFILES)

# Rebuild the certificates

clean-certs:
	cd $(srcdir); rm -f $(GENERATEDCERTS)

build-certs: $(srcdir)/EdelCurlRoot-ca.cacert $(srcdir)/Server-localhost-sv.pem \
	$(srcdir)/Server-localhost.nn-sv.pem $(srcdir)/Server-localhost0h-sv.pem \
	$(srcdir)/Server-localhost-firstSAN-sv.pem $(srcdir)/Server-localhost-lastSAN-sv.pem

$(srcdir)/EdelCurlRoot-ca.cacert:
	cd $(srcdir); scripts/genroot.sh EdelCurlRoot

$(srcdir)/Server-localhost-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost EdelCurlRoot

$(srcdir)/Server-localhost.nn-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost.nn EdelCurlRoot

$(srcdir)/Server-localhost0h-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost0h EdelCurlRoot

$(srcdir)/Server-localhost-firstSAN-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost-firstSAN EdelCurlRoot

$(srcdir)/Server-localhost-lastSAN-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost-firstSAN EdelCurlRoot
Changes to jni/curl/tests/certs/Makefile.in.
459
460
461
462
463
464
465
466


















467
468
469
470
471
472
473
  Server-localhost0h-sv.crt \
  Server-localhost0h-sv.csr \
  Server-localhost0h-sv.der \
  Server-localhost0h-sv.dhp \
  Server-localhost0h-sv.key \
  Server-localhost0h-sv.pem \
  Server-localhost0h-sv.pub.der \
  Server-localhost0h-sv.pub.pem



















SRPFILES = \
  srp-verifier-conf \
  srp-verifier-db

EXTRA_DIST = $(CERTCONFIGS) $(GENERATEDCERTS) $(SRPFILES)
all: all-recursive







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
  Server-localhost0h-sv.crt \
  Server-localhost0h-sv.csr \
  Server-localhost0h-sv.der \
  Server-localhost0h-sv.dhp \
  Server-localhost0h-sv.key \
  Server-localhost0h-sv.pem \
  Server-localhost0h-sv.pub.der \
  Server-localhost0h-sv.pub.pem \
  Server-localhost-firstSAN-sv.crl \
  Server-localhost-firstSAN-sv.crt \
  Server-localhost-firstSAN-sv.csr \
  Server-localhost-firstSAN-sv.der \
  Server-localhost-firstSAN-sv.dhp \
  Server-localhost-firstSAN-sv.key \
  Server-localhost-firstSAN-sv.pem \
  Server-localhost-firstSAN-sv.pub.der \
  Server-localhost-firstSAN-sv.pub.pem \
  Server-localhost-lastSAN-sv.crl \
  Server-localhost-lastSAN-sv.crt \
  Server-localhost-lastSAN-sv.csr \
  Server-localhost-lastSAN-sv.der \
  Server-localhost-lastSAN-sv.dhp \
  Server-localhost-lastSAN-sv.key \
  Server-localhost-lastSAN-sv.pem \
  Server-localhost-lastSAN-sv.pub.der \
  Server-localhost-lastSAN-sv.pub.pem

SRPFILES = \
  srp-verifier-conf \
  srp-verifier-db

EXTRA_DIST = $(CERTCONFIGS) $(GENERATEDCERTS) $(SRPFILES)
all: all-recursive
784
785
786
787
788
789
790
791

792
793
794
795
796
797
798
799
800
801
802
803






804
805
806
807

# Rebuild the certificates

clean-certs:
	cd $(srcdir); rm -f $(GENERATEDCERTS)

build-certs: $(srcdir)/EdelCurlRoot-ca.cacert $(srcdir)/Server-localhost-sv.pem \
	$(srcdir)/Server-localhost.nn-sv.pem $(srcdir)/Server-localhost0h-sv.pem


$(srcdir)/EdelCurlRoot-ca.cacert:
	cd $(srcdir); scripts/genroot.sh EdelCurlRoot

$(srcdir)/Server-localhost-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost EdelCurlRoot

$(srcdir)/Server-localhost.nn-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost.nn EdelCurlRoot

$(srcdir)/Server-localhost0h-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost0h EdelCurlRoot







# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:







|
>












>
>
>
>
>
>




802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832

# Rebuild the certificates

clean-certs:
	cd $(srcdir); rm -f $(GENERATEDCERTS)

build-certs: $(srcdir)/EdelCurlRoot-ca.cacert $(srcdir)/Server-localhost-sv.pem \
	$(srcdir)/Server-localhost.nn-sv.pem $(srcdir)/Server-localhost0h-sv.pem \
	$(srcdir)/Server-localhost-firstSAN-sv.pem $(srcdir)/Server-localhost-lastSAN-sv.pem

$(srcdir)/EdelCurlRoot-ca.cacert:
	cd $(srcdir); scripts/genroot.sh EdelCurlRoot

$(srcdir)/Server-localhost-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost EdelCurlRoot

$(srcdir)/Server-localhost.nn-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost.nn EdelCurlRoot

$(srcdir)/Server-localhost0h-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost0h EdelCurlRoot

$(srcdir)/Server-localhost-firstSAN-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost-firstSAN EdelCurlRoot

$(srcdir)/Server-localhost-lastSAN-sv.pem: $(srcdir)/EdelCurlRoot-ca.cacert
	cd $(srcdir); scripts/genserv.sh Server-localhost-firstSAN EdelCurlRoot

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.crl.


























>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
-----BEGIN X509 CRL-----
MIIB9TCB3gIBATANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJOTjExMC8GA1UE
CgwoRWRlbCBDdXJsIEFyY3RpYyBJbGx1ZGl1bSBSZXNlYXJjaCBDbG91ZDEmMCQG
A1UEAwwdTm9ydGhlcm4gTm93aGVyZSBUcnVzdCBBbmNob3IXDTE2MDgzMDE4MzIx
NVoXDTE2MDkyOTE4MzIxNVowMjAXAgYNZJ8o86IXDTE2MDgzMDE4MzAxNVowFwIG
DWSfO0UqFw0xNjA4MzAxODMyMTVaoA4wDDAKBgNVHRQEAwIBATANBgkqhkiG9w0B
AQUFAAOCAQEAOUlXQDrOURgODds6feyO+87oPHkgTveOiTm8CtSVHObxwkPkHTIg
pivd7iXccgEc8CstcGF9Pk5KLVJrXXxEKgGr69NZNGtHa8xXlYSIh+Vre0Pni3Px
sUAMcsnvGt+cYw/5s/2Wy9u5UVzfJwdxjkxMMp9X648AqeSop229541zGV47M4ox
h0wh2Mj/w/CFUKw0ijVgVWff5DhKXVaLPCXdh7hhgXcsYUZ4W3G/iOL/jd+Ji88o
OmZvoP+MOco6or13rz178bGB1mS626z7EU/HNgP8sn25TyQwwopr9uW6H7VvRMaI
6uwWvihKgoGCRVSVwYEfX+oOLadfJqdHdg==
-----END X509 CRL-----
Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.crt.
































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 14725819352362 (0xd649f3b452a)
    Signature Algorithm: sha1WithRSAEncryption
        Issuer:
            countryName               = NN
            organizationName          = Edel Curl Arctic Illudium Research Cloud
            commonName                = Northern Nowhere Trust Anchor
        Validity
            Not Before: Aug 30 18:32:15 2016 GMT
            Not After : Nov 16 18:32:15 2024 GMT
        Subject:
            countryName               = NN
            organizationName          = Edel Curl Arctic Illudium Research Cloud
            commonName                = localhost.nn
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (1024 bit)
                Modulus:
                    00:c5:87:2e:fb:f5:88:8a:39:4c:62:88:9f:fb:4a:
                    02:1c:27:92:9d:0b:65:a2:70:1f:d1:b7:de:c8:1d:
                    87:28:4b:9c:4b:cc:f6:f6:7c:83:1f:2d:76:be:41:
                    29:5e:31:fa:23:0c:2d:7d:cb:38:c2:8b:54:8f:fc:
                    6a:50:6d:c7:d7:af:72:fb:3b:a1:a7:4d:c4:1b:d2:
                    0d:75:7c:92:62:97:48:c4:e8:12:c0:00:33:66:0e:
                    28:17:0f:5c:36:d6:50:70:ec:c8:9f:a2:ae:b9:eb:
                    eb:19:05:f0:53:83:42:2a:ae:40:1f:fa:fb:7a:b7:
                    86:4c:ab:6b:28:0b:2f:7f:81
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Alternative Name: 
                DNS:localhost, DNS:localhost1, DNS:localhost2
            X509v3 Key Usage: 
                Digital Signature, Key Encipherment, Key Agreement
            X509v3 Extended Key Usage: 
                TLS Web Server Authentication
            X509v3 Subject Key Identifier: 
                2C:4D:DD:54:88:59:3F:A4:34:9C:E3:56:FF:95:0F:E2:CE:51:20:95
            X509v3 Authority Key Identifier: 
                keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE

            X509v3 Basic Constraints: 
                CA:FALSE
    Signature Algorithm: sha1WithRSAEncryption
         77:cd:d2:17:91:a6:4b:70:de:79:6a:20:82:a3:56:a3:d0:6a:
         ba:f7:7d:6f:00:69:d2:06:06:0b:da:cd:49:9d:36:fd:d0:cc:
         bd:8a:dc:e1:d6:89:c9:23:02:8a:19:2d:14:ca:c6:06:87:66:
         c7:f4:32:37:95:0d:f1:a7:1c:a1:fe:43:4f:3b:03:03:e2:1a:
         c6:fc:91:d5:0d:a0:7e:82:60:14:31:2f:6d:b8:f4:57:98:8d:
         04:74:a3:82:28:6d:1c:b4:de:1a:70:bd:fe:73:ac:b7:96:ec:
         7c:9b:6d:64:c6:f8:67:39:c7:ea:f4:aa:48:26:b8:14:85:f0:
         00:ab:8f:bd:1a:95:e2:a7:63:92:35:1e:37:04:c2:70:2c:1c:
         56:95:b1:83:70:8c:99:88:1c:8a:6f:7a:a2:0d:84:dd:4f:0e:
         3e:8b:fb:31:cf:ae:ee:b0:e4:f6:c1:8d:d1:98:a9:8d:17:1f:
         5d:5a:79:e8:7c:97:ab:40:bc:aa:7e:c4:0b:19:30:ad:18:aa:
         9c:9b:eb:3f:35:d3:86:9c:3a:cc:e6:9a:2c:47:d1:bb:36:6e:
         f2:c5:d4:e3:0c:5b:c6:eb:30:e6:0d:3a:4b:3a:a3:6b:62:93:
         8b:6a:59:1f:48:66:2e:d9:70:14:b6:aa:4f:d1:3b:38:5e:e6:
         79:7f:b7:00
-----BEGIN CERTIFICATE-----
MIIDWjCCAkKgAwIBAgIGDWSfO0UqMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
Fw0xNjA4MzAxODMyMTVaFw0yNDExMTYxODMyMTVaMFcxCzAJBgNVBAYTAk5OMTEw
LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
MRUwEwYDVQQDDAxsb2NhbGhvc3Qubm4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
AoGBAMWHLvv1iIo5TGKIn/tKAhwnkp0LZaJwH9G33sgdhyhLnEvM9vZ8gx8tdr5B
KV4x+iMMLX3LOMKLVI/8alBtx9evcvs7oadNxBvSDXV8kmKXSMToEsAAM2YOKBcP
XDbWUHDsyJ+irrnr6xkF8FODQiquQB/6+3q3hkyraygLL3+BAgMBAAGjgZ4wgZsw
LAYDVR0RBCUwI4IJbG9jYWxob3N0ggpsb2NhbGhvc3Qxggpsb2NhbGhvc3QyMAsG
A1UdDwQEAwIDqDATBgNVHSUEDDAKBggrBgEFBQcDATAdBgNVHQ4EFgQULE3dVIhZ
P6Q0nONW/5UP4s5RIJUwHwYDVR0jBBgwFoAUEsq6S0YEp3WKLOgOVJS8EmWme84w
CQYDVR0TBAIwADANBgkqhkiG9w0BAQUFAAOCAQEAd83SF5GmS3DeeWoggqNWo9Bq
uvd9bwBp0gYGC9rNSZ02/dDMvYrc4daJySMCihktFMrGBodmx/QyN5UN8accof5D
TzsDA+IaxvyR1Q2gfoJgFDEvbbj0V5iNBHSjgihtHLTeGnC9/nOst5bsfJttZMb4
ZznH6vSqSCa4FIXwAKuPvRqV4qdjkjUeNwTCcCwcVpWxg3CMmYgcim96og2E3U8O
Pov7Mc+u7rDk9sGN0ZipjRcfXVp56HyXq0C8qn7ECxkwrRiqnJvrPzXThpw6zOaa
LEfRuzZu8sXU4wxbxusw5g06Szqja2KTi2pZH0hmLtlwFLaqT9E7OF7meX+3AA==
-----END CERTIFICATE-----
Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.csr.






















>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
-----BEGIN CERTIFICATE REQUEST-----
MIIBlzCCAQACAQAwVzELMAkGA1UEBhMCTk4xMTAvBgNVBAoMKEVkZWwgQ3VybCBB
cmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQxFTATBgNVBAMMDGxvY2FsaG9z
dC5ubjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxYcu+/WIijlMYoif+0oC
HCeSnQtlonAf0bfeyB2HKEucS8z29nyDHy12vkEpXjH6Iwwtfcs4wotUj/xqUG3H
169y+zuhp03EG9INdXySYpdIxOgSwAAzZg4oFw9cNtZQcOzIn6KuuevrGQXwU4NC
Kq5AH/r7ereGTKtrKAsvf4ECAwEAAaAAMA0GCSqGSIb3DQEBCwUAA4GBADlhAYRy
2heMP/fGllGXW/uAEm2q6ubWhqgd3/5d+06LjTIs57qT/nwbr79e1PxholGWM+Zb
/NGKZ4geZK0mJT/gnaJCyUsrjdp2KIEw9zmBoZyypJd/5Fhe1tzX0xwG40+3np9K
orpp7wcILLeMho8+I4mNEzOJHidxy/9uia5U
-----END CERTIFICATE REQUEST-----
Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.der.

cannot compute difference between binary files

Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.dhp.
Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.key.






























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQDFhy779YiKOUxiiJ/7SgIcJ5KdC2WicB/Rt97IHYcoS5xLzPb2
fIMfLXa+QSleMfojDC19yzjCi1SP/GpQbcfXr3L7O6GnTcQb0g11fJJil0jE6BLA
ADNmDigXD1w21lBw7Mifoq656+sZBfBTg0IqrkAf+vt6t4ZMq2soCy9/gQIDAQAB
AoGAUjKXErJyR1LgvoAsUt3RUvYExOVhPd963kKtqojfHZ2ZRNHeU2QtDGRW7YUg
OdqCRONkatyOmiZw4hogA6graJKiqKLvM/F4qRoLsxH9T/cSOIl9QjZVkUd1HV/Z
iJluibPTewVyfoYzkq48GN+QIi//msYKBjI5Q2Yybn4WrgECQQDk/mDp4sAvuLXL
NxaQKuDZA5TxU2u8GTItFqOoHneVFSJLE4O3kr7wh47O817mnljZfskZwVXBYx6R
VbXsy8ZJAkEA3NLRFh8cR03CN+eYPi33JrUVRSrn8eAB5MNOaOdO4mT0pTAzfVfe
g6rMDnK2n7WZzwf6YmvRVyppW2/kQjyPeQJAXoa3ILTuWoSn3owN71MT3+E/oWKr
LUlFUiFvSx3QhSTlNBKJI8UatpVumPUTbqVczeMtRkltidfNrXaxE1+GqQJAW9WU
vMVtZj3xUnyPNPS6vy85zE0ertmBEBklJ71icgaYM4aLM0pysIE8YZnVVzAX6iCg
QYQjSEPMEwnCfMVgyQJAcWnk6HPLbJmUt+ZGGAcqzfycR6jMKFnm4st2Ld6JuDT2
h2lb40Uma9gO+aXLIf+K9prCxb+7nR1M3qLwV4krkQ==
-----END RSA PRIVATE KEY-----
Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.pem.
















































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
extensions = x509v3
[ x509v3 ]
subjectAltName = DNS:localhost,DNS:localhost1,DNS:localhost2
keyUsage	= keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
basicConstraints = CA:false
[ req ]
default_bits                    = 1024
distinguished_name              = req_DN
default_md			= sha256
string_mask			= utf8only
[ req_DN ]
countryName                     = "Country Name is Northern Nowhere"
countryName_value            = NN
organizationName              = "Organization Name"
organizationName_value     = Edel Curl Arctic Illudium Research Cloud
commonName                      = "Common Name"
commonName_value              = localhost.nn

[something]
# The key
# the certificate
# some dhparam
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQDFhy779YiKOUxiiJ/7SgIcJ5KdC2WicB/Rt97IHYcoS5xLzPb2
fIMfLXa+QSleMfojDC19yzjCi1SP/GpQbcfXr3L7O6GnTcQb0g11fJJil0jE6BLA
ADNmDigXD1w21lBw7Mifoq656+sZBfBTg0IqrkAf+vt6t4ZMq2soCy9/gQIDAQAB
AoGAUjKXErJyR1LgvoAsUt3RUvYExOVhPd963kKtqojfHZ2ZRNHeU2QtDGRW7YUg
OdqCRONkatyOmiZw4hogA6graJKiqKLvM/F4qRoLsxH9T/cSOIl9QjZVkUd1HV/Z
iJluibPTewVyfoYzkq48GN+QIi//msYKBjI5Q2Yybn4WrgECQQDk/mDp4sAvuLXL
NxaQKuDZA5TxU2u8GTItFqOoHneVFSJLE4O3kr7wh47O817mnljZfskZwVXBYx6R
VbXsy8ZJAkEA3NLRFh8cR03CN+eYPi33JrUVRSrn8eAB5MNOaOdO4mT0pTAzfVfe
g6rMDnK2n7WZzwf6YmvRVyppW2/kQjyPeQJAXoa3ILTuWoSn3owN71MT3+E/oWKr
LUlFUiFvSx3QhSTlNBKJI8UatpVumPUTbqVczeMtRkltidfNrXaxE1+GqQJAW9WU
vMVtZj3xUnyPNPS6vy85zE0ertmBEBklJ71icgaYM4aLM0pysIE8YZnVVzAX6iCg
QYQjSEPMEwnCfMVgyQJAcWnk6HPLbJmUt+ZGGAcqzfycR6jMKFnm4st2Ld6JuDT2
h2lb40Uma9gO+aXLIf+K9prCxb+7nR1M3qLwV4krkQ==
-----END RSA PRIVATE KEY-----
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 14725819352362 (0xd649f3b452a)
    Signature Algorithm: sha1WithRSAEncryption
        Issuer:
            countryName               = NN
            organizationName          = Edel Curl Arctic Illudium Research Cloud
            commonName                = Northern Nowhere Trust Anchor
        Validity
            Not Before: Aug 30 18:32:15 2016 GMT
            Not After : Nov 16 18:32:15 2024 GMT
        Subject:
            countryName               = NN
            organizationName          = Edel Curl Arctic Illudium Research Cloud
            commonName                = localhost.nn
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (1024 bit)
                Modulus:
                    00:c5:87:2e:fb:f5:88:8a:39:4c:62:88:9f:fb:4a:
                    02:1c:27:92:9d:0b:65:a2:70:1f:d1:b7:de:c8:1d:
                    87:28:4b:9c:4b:cc:f6:f6:7c:83:1f:2d:76:be:41:
                    29:5e:31:fa:23:0c:2d:7d:cb:38:c2:8b:54:8f:fc:
                    6a:50:6d:c7:d7:af:72:fb:3b:a1:a7:4d:c4:1b:d2:
                    0d:75:7c:92:62:97:48:c4:e8:12:c0:00:33:66:0e:
                    28:17:0f:5c:36:d6:50:70:ec:c8:9f:a2:ae:b9:eb:
                    eb:19:05:f0:53:83:42:2a:ae:40:1f:fa:fb:7a:b7:
                    86:4c:ab:6b:28:0b:2f:7f:81
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Alternative Name: 
                DNS:localhost, DNS:localhost1, DNS:localhost2
            X509v3 Key Usage: 
                Digital Signature, Key Encipherment, Key Agreement
            X509v3 Extended Key Usage: 
                TLS Web Server Authentication
            X509v3 Subject Key Identifier: 
                2C:4D:DD:54:88:59:3F:A4:34:9C:E3:56:FF:95:0F:E2:CE:51:20:95
            X509v3 Authority Key Identifier: 
                keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE

            X509v3 Basic Constraints: 
                CA:FALSE
    Signature Algorithm: sha1WithRSAEncryption
         77:cd:d2:17:91:a6:4b:70:de:79:6a:20:82:a3:56:a3:d0:6a:
         ba:f7:7d:6f:00:69:d2:06:06:0b:da:cd:49:9d:36:fd:d0:cc:
         bd:8a:dc:e1:d6:89:c9:23:02:8a:19:2d:14:ca:c6:06:87:66:
         c7:f4:32:37:95:0d:f1:a7:1c:a1:fe:43:4f:3b:03:03:e2:1a:
         c6:fc:91:d5:0d:a0:7e:82:60:14:31:2f:6d:b8:f4:57:98:8d:
         04:74:a3:82:28:6d:1c:b4:de:1a:70:bd:fe:73:ac:b7:96:ec:
         7c:9b:6d:64:c6:f8:67:39:c7:ea:f4:aa:48:26:b8:14:85:f0:
         00:ab:8f:bd:1a:95:e2:a7:63:92:35:1e:37:04:c2:70:2c:1c:
         56:95:b1:83:70:8c:99:88:1c:8a:6f:7a:a2:0d:84:dd:4f:0e:
         3e:8b:fb:31:cf:ae:ee:b0:e4:f6:c1:8d:d1:98:a9:8d:17:1f:
         5d:5a:79:e8:7c:97:ab:40:bc:aa:7e:c4:0b:19:30:ad:18:aa:
         9c:9b:eb:3f:35:d3:86:9c:3a:cc:e6:9a:2c:47:d1:bb:36:6e:
         f2:c5:d4:e3:0c:5b:c6:eb:30:e6:0d:3a:4b:3a:a3:6b:62:93:
         8b:6a:59:1f:48:66:2e:d9:70:14:b6:aa:4f:d1:3b:38:5e:e6:
         79:7f:b7:00
-----BEGIN CERTIFICATE-----
MIIDWjCCAkKgAwIBAgIGDWSfO0UqMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
Fw0xNjA4MzAxODMyMTVaFw0yNDExMTYxODMyMTVaMFcxCzAJBgNVBAYTAk5OMTEw
LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
MRUwEwYDVQQDDAxsb2NhbGhvc3Qubm4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
AoGBAMWHLvv1iIo5TGKIn/tKAhwnkp0LZaJwH9G33sgdhyhLnEvM9vZ8gx8tdr5B
KV4x+iMMLX3LOMKLVI/8alBtx9evcvs7oadNxBvSDXV8kmKXSMToEsAAM2YOKBcP
XDbWUHDsyJ+irrnr6xkF8FODQiquQB/6+3q3hkyraygLL3+BAgMBAAGjgZ4wgZsw
LAYDVR0RBCUwI4IJbG9jYWxob3N0ggpsb2NhbGhvc3Qxggpsb2NhbGhvc3QyMAsG
A1UdDwQEAwIDqDATBgNVHSUEDDAKBggrBgEFBQcDATAdBgNVHQ4EFgQULE3dVIhZ
P6Q0nONW/5UP4s5RIJUwHwYDVR0jBBgwFoAUEsq6S0YEp3WKLOgOVJS8EmWme84w
CQYDVR0TBAIwADANBgkqhkiG9w0BAQUFAAOCAQEAd83SF5GmS3DeeWoggqNWo9Bq
uvd9bwBp0gYGC9rNSZ02/dDMvYrc4daJySMCihktFMrGBodmx/QyN5UN8accof5D
TzsDA+IaxvyR1Q2gfoJgFDEvbbj0V5iNBHSjgihtHLTeGnC9/nOst5bsfJttZMb4
ZznH6vSqSCa4FIXwAKuPvRqV4qdjkjUeNwTCcCwcVpWxg3CMmYgcim96og2E3U8O
Pov7Mc+u7rDk9sGN0ZipjRcfXVp56HyXq0C8qn7ECxkwrRiqnJvrPzXThpw6zOaa
LEfRuzZu8sXU4wxbxusw5g06Szqja2KTi2pZH0hmLtlwFLaqT9E7OF7meX+3AA==
-----END CERTIFICATE-----
Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.pub.der.

cannot compute difference between binary files

Added jni/curl/tests/certs/Server-localhost-firstSAN-sv.pub.pem.












>
>
>
>
>
>
1
2
3
4
5
6
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFhy779YiKOUxiiJ/7SgIcJ5Kd
C2WicB/Rt97IHYcoS5xLzPb2fIMfLXa+QSleMfojDC19yzjCi1SP/GpQbcfXr3L7
O6GnTcQb0g11fJJil0jE6BLAADNmDigXD1w21lBw7Mifoq656+sZBfBTg0IqrkAf
+vt6t4ZMq2soCy9/gQIDAQAB
-----END PUBLIC KEY-----
Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.crl.




























>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-----BEGIN X509 CRL-----
MIICDjCB9wIBATANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJOTjExMC8GA1UE
CgwoRWRlbCBDdXJsIEFyY3RpYyBJbGx1ZGl1bSBSZXNlYXJjaCBDbG91ZDEmMCQG
A1UEAwwdTm9ydGhlcm4gTm93aGVyZSBUcnVzdCBBbmNob3IXDTE2MDgzMDE4MzI1
N1oXDTE2MDkyOTE4MzI1N1owSzAXAgYNZJ8o86IXDTE2MDgzMDE4MzAxNVowFwIG
DWSfO0UqFw0xNjA4MzAxODMyMTVaMBcCBg1kn0GuixcNMTYwODMwMTgzMjU3WqAO
MAwwCgYDVR0UBAMCAQEwDQYJKoZIhvcNAQEFBQADggEBAE0v3zGBeKKuODAUugh7
l6bJi7Cs0CDhuBJ8wCpwL5XRGwWhYChJtEXWFUKLBhMarIPYKEv3f3rd8gtFII/8
wmnxoTL6eXZNL+FpHkZJ+blsHi73G7xzpB6kdFHIxI4tixwiUCe85u6WIRWkIEBs
kyPPAgbnosF37umQfEaBrweVy+EztrYw8jgd0oDBybQp25p7Noa0N4uDoDInuOgP
A7Q1Zf0ndWjrlEQtjMAUdA6blGKlb8BjMPtX50mbXuXctLeICns8TVUSQSiKU+oR
1QTgbkl+AfdaFlfNAum4a42bCLyeBQ/O31NydZbCE8o2q9PqPepAkL9dXhMLiK/a
tjA=
-----END X509 CRL-----
Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.crt.
































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 14725819772555 (0xd649f41ae8b)
    Signature Algorithm: sha1WithRSAEncryption
        Issuer:
            countryName               = NN
            organizationName          = Edel Curl Arctic Illudium Research Cloud
            commonName                = Northern Nowhere Trust Anchor
        Validity
            Not Before: Aug 30 18:32:57 2016 GMT
            Not After : Nov 16 18:32:57 2024 GMT
        Subject:
            countryName               = NN
            organizationName          = Edel Curl Arctic Illudium Research Cloud
            commonName                = localhost.nn
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (1024 bit)
                Modulus:
                    00:a3:2a:75:d7:bf:75:41:40:be:42:b8:b9:00:28:
                    f1:45:29:55:bc:36:ca:a6:b7:86:93:97:25:84:aa:
                    c9:80:ac:41:d9:28:fb:b0:68:4b:5b:ee:bd:94:83:
                    da:2b:f6:cc:cc:11:df:fb:48:e6:e9:d5:97:41:7f:
                    9a:0d:b7:87:96:12:22:41:2a:7f:95:8a:14:d6:6c:
                    4b:34:df:18:29:01:0d:b2:3c:4d:c8:c4:5e:87:fa:
                    9f:aa:ee:a4:73:e9:bb:74:57:85:24:2a:51:e4:43:
                    5c:4b:97:51:52:b9:82:6e:9c:ce:ae:0f:91:45:25:
                    f9:b4:24:66:8e:47:1f:d7:d5
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Alternative Name: 
                DNS:localhost1, DNS:localhost2, DNS:localhost
            X509v3 Key Usage: 
                Digital Signature, Key Encipherment, Key Agreement
            X509v3 Extended Key Usage: 
                TLS Web Server Authentication
            X509v3 Subject Key Identifier: 
                2C:CF:E3:6E:08:F9:CE:9B:98:3B:B3:17:7F:0C:9D:E4:5B:1B:76:8A
            X509v3 Authority Key Identifier: 
                keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE

            X509v3 Basic Constraints: 
                CA:FALSE
    Signature Algorithm: sha1WithRSAEncryption
         2e:3d:c1:a2:a7:e4:70:f8:a8:13:86:c3:af:22:1f:e9:e1:62:
         f4:cf:16:66:a8:3b:70:f6:12:30:be:fe:8e:44:1b:71:b5:c1:
         e0:4b:66:c4:5d:d4:d7:7d:49:43:4a:6d:22:1b:ce:3d:e3:14:
         14:b3:6d:3a:93:39:0c:9b:2c:83:35:1d:7e:7c:29:29:3c:51:
         6b:27:c3:5b:2d:f2:61:18:f8:c7:90:be:3b:68:3f:08:9b:ac:
         68:01:d2:0c:ec:aa:5d:9e:78:b7:8b:84:04:01:b2:08:ef:df:
         0c:f2:29:99:fe:61:d1:65:80:aa:ef:df:8e:28:55:a6:f9:88:
         0c:01:bb:fc:1c:9e:9c:08:8d:c5:34:24:91:c1:ac:71:22:e1:
         12:78:e0:45:d5:e2:39:c4:3c:16:09:80:d0:5b:bc:49:0a:4c:
         a3:5b:e1:36:40:ed:26:6d:8d:a0:d3:4a:3c:86:93:2f:d4:0a:
         3c:72:08:62:d7:66:d0:b3:05:c2:0f:1d:af:3c:65:67:f2:6c:
         76:a5:9c:37:ac:c4:ac:96:b7:e4:c0:ef:a4:5b:28:1e:16:09:
         15:f6:7b:bb:5d:a2:94:9a:df:52:7b:ae:c9:39:f4:18:9e:84:
         57:6c:d3:6d:ae:35:38:8f:8f:9b:0d:df:77:69:ae:25:ec:ce:
         d0:2b:bd:8d
-----BEGIN CERTIFICATE-----
MIIDWjCCAkKgAwIBAgIGDWSfQa6LMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
Fw0xNjA4MzAxODMyNTdaFw0yNDExMTYxODMyNTdaMFcxCzAJBgNVBAYTAk5OMTEw
LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
MRUwEwYDVQQDDAxsb2NhbGhvc3Qubm4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
AoGBAKMqdde/dUFAvkK4uQAo8UUpVbw2yqa3hpOXJYSqyYCsQdko+7BoS1vuvZSD
2iv2zMwR3/tI5unVl0F/mg23h5YSIkEqf5WKFNZsSzTfGCkBDbI8TcjEXof6n6ru
pHPpu3RXhSQqUeRDXEuXUVK5gm6czq4PkUUl+bQkZo5HH9fVAgMBAAGjgZ4wgZsw
LAYDVR0RBCUwI4IKbG9jYWxob3N0MYIKbG9jYWxob3N0MoIJbG9jYWxob3N0MAsG
A1UdDwQEAwIDqDATBgNVHSUEDDAKBggrBgEFBQcDATAdBgNVHQ4EFgQULM/jbgj5
zpuYO7MXfwyd5FsbdoowHwYDVR0jBBgwFoAUEsq6S0YEp3WKLOgOVJS8EmWme84w
CQYDVR0TBAIwADANBgkqhkiG9w0BAQUFAAOCAQEALj3BoqfkcPioE4bDryIf6eFi
9M8WZqg7cPYSML7+jkQbcbXB4EtmxF3U131JQ0ptIhvOPeMUFLNtOpM5DJssgzUd
fnwpKTxRayfDWy3yYRj4x5C+O2g/CJusaAHSDOyqXZ54t4uEBAGyCO/fDPIpmf5h
0WWAqu/fjihVpvmIDAG7/ByenAiNxTQkkcGscSLhEnjgRdXiOcQ8FgmA0Fu8SQpM
o1vhNkDtJm2NoNNKPIaTL9QKPHIIYtdm0LMFwg8drzxlZ/JsdqWcN6zErJa35MDv
pFsoHhYJFfZ7u12ilJrfUnuuyTn0GJ6EV2zTba41OI+Pmw3fd2muJezO0Cu9jQ==
-----END CERTIFICATE-----
Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.csr.






















>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
-----BEGIN CERTIFICATE REQUEST-----
MIIBlzCCAQACAQAwVzELMAkGA1UEBhMCTk4xMTAvBgNVBAoMKEVkZWwgQ3VybCBB
cmN0aWMgSWxsdWRpdW0gUmVzZWFyY2ggQ2xvdWQxFTATBgNVBAMMDGxvY2FsaG9z
dC5ubjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAoyp11791QUC+Qri5ACjx
RSlVvDbKpreGk5clhKrJgKxB2Sj7sGhLW+69lIPaK/bMzBHf+0jm6dWXQX+aDbeH
lhIiQSp/lYoU1mxLNN8YKQENsjxNyMReh/qfqu6kc+m7dFeFJCpR5ENcS5dRUrmC
bpzOrg+RRSX5tCRmjkcf19UCAwEAAaAAMA0GCSqGSIb3DQEBCwUAA4GBACoIAlf0
hSnZJOBBt7FS7iXlNRyKZAD881jhHFux+Gxq3gtbJsP57c+ALZ3MswjjUXW0Iq11
IZLeZQGCAHYp4/GuTHbaq0qo1LjgpTqgQfwEB3BqNGs6yJiST+3risgawFbfqEDY
LCm7rs/yyaOdMjwdwrUMciSv5KtlXZ1VThyt
-----END CERTIFICATE REQUEST-----
Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.der.

cannot compute difference between binary files

Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.dhp.
Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.key.






























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQCjKnXXv3VBQL5CuLkAKPFFKVW8Nsqmt4aTlyWEqsmArEHZKPuw
aEtb7r2Ug9or9szMEd/7SObp1ZdBf5oNt4eWEiJBKn+VihTWbEs03xgpAQ2yPE3I
xF6H+p+q7qRz6bt0V4UkKlHkQ1xLl1FSuYJunM6uD5FFJfm0JGaORx/X1QIDAQAB
AoGAaC2QGDSSNRuVXxx6YnPBuJrvtsB1G4VKU6nJtq8lARb65CCassOkegow2UZm
YnOtxw4SqGqfpOVPMe66+c8Yrd+6zimC7VorxmfhNxqOO34bxzztKKk8Q7c+odl3
+c4aVnFBk2hzuOW4PuJoFfFNQZWmh/XJdKK85X+bkryS/oECQQDTdzwYyDxvrPaw
ZeR5oDleopk5W5QwmBAq4ehtie1oZfhzlNZzPOjnI9I71MRYdCwkesKHL2k6q7cT
jA4sSmx5AkEAxYc6+o8l0/HE8HzypWe/ZfozaY3ccIFzmvcwQorbCvAxDtZ1DbFy
VWLOgM/6gwDIUDF6ckaInaVmiVJl60Y3PQJAZFBOuO7cBJoHWDytuqiwLl1x1EzG
KpsoKD+MU9I3RewBhUrYxEfjsCpFA8716YQKoK9/ckOiZouoyGQLISWY+QJAG5id
AMxm+Ilafk62h61K7DBcZm7PUViEki3erC1CFPEhqXUEvXkBBDTdrNlholPFqI6B
EN4R0BR/ksfUPV598QJAF8jl/8gz8pmAWmqw8tKbWdQeDgisyTHeYlPMxq4fUbLH
mJk05csSX9CTg4eO7NRRwPxODKmPCd88sZZSOuTQmQ==
-----END RSA PRIVATE KEY-----
Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.pem.
















































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
extensions = x509v3
[ x509v3 ]
subjectAltName = DNS:localhost1,DNS:localhost2,DNS:localhost
keyUsage	= keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
basicConstraints = CA:false
[ req ]
default_bits                    = 1024
distinguished_name              = req_DN
default_md			= sha256
string_mask			= utf8only
[ req_DN ]
countryName                     = "Country Name is Northern Nowhere"
countryName_value            = NN
organizationName              = "Organization Name"
organizationName_value     = Edel Curl Arctic Illudium Research Cloud
commonName                      = "Common Name"
commonName_value              = localhost.nn

[something]
# The key
# the certificate
# some dhparam
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQCjKnXXv3VBQL5CuLkAKPFFKVW8Nsqmt4aTlyWEqsmArEHZKPuw
aEtb7r2Ug9or9szMEd/7SObp1ZdBf5oNt4eWEiJBKn+VihTWbEs03xgpAQ2yPE3I
xF6H+p+q7qRz6bt0V4UkKlHkQ1xLl1FSuYJunM6uD5FFJfm0JGaORx/X1QIDAQAB
AoGAaC2QGDSSNRuVXxx6YnPBuJrvtsB1G4VKU6nJtq8lARb65CCassOkegow2UZm
YnOtxw4SqGqfpOVPMe66+c8Yrd+6zimC7VorxmfhNxqOO34bxzztKKk8Q7c+odl3
+c4aVnFBk2hzuOW4PuJoFfFNQZWmh/XJdKK85X+bkryS/oECQQDTdzwYyDxvrPaw
ZeR5oDleopk5W5QwmBAq4ehtie1oZfhzlNZzPOjnI9I71MRYdCwkesKHL2k6q7cT
jA4sSmx5AkEAxYc6+o8l0/HE8HzypWe/ZfozaY3ccIFzmvcwQorbCvAxDtZ1DbFy
VWLOgM/6gwDIUDF6ckaInaVmiVJl60Y3PQJAZFBOuO7cBJoHWDytuqiwLl1x1EzG
KpsoKD+MU9I3RewBhUrYxEfjsCpFA8716YQKoK9/ckOiZouoyGQLISWY+QJAG5id
AMxm+Ilafk62h61K7DBcZm7PUViEki3erC1CFPEhqXUEvXkBBDTdrNlholPFqI6B
EN4R0BR/ksfUPV598QJAF8jl/8gz8pmAWmqw8tKbWdQeDgisyTHeYlPMxq4fUbLH
mJk05csSX9CTg4eO7NRRwPxODKmPCd88sZZSOuTQmQ==
-----END RSA PRIVATE KEY-----
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 14725819772555 (0xd649f41ae8b)
    Signature Algorithm: sha1WithRSAEncryption
        Issuer:
            countryName               = NN
            organizationName          = Edel Curl Arctic Illudium Research Cloud
            commonName                = Northern Nowhere Trust Anchor
        Validity
            Not Before: Aug 30 18:32:57 2016 GMT
            Not After : Nov 16 18:32:57 2024 GMT
        Subject:
            countryName               = NN
            organizationName          = Edel Curl Arctic Illudium Research Cloud
            commonName                = localhost.nn
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (1024 bit)
                Modulus:
                    00:a3:2a:75:d7:bf:75:41:40:be:42:b8:b9:00:28:
                    f1:45:29:55:bc:36:ca:a6:b7:86:93:97:25:84:aa:
                    c9:80:ac:41:d9:28:fb:b0:68:4b:5b:ee:bd:94:83:
                    da:2b:f6:cc:cc:11:df:fb:48:e6:e9:d5:97:41:7f:
                    9a:0d:b7:87:96:12:22:41:2a:7f:95:8a:14:d6:6c:
                    4b:34:df:18:29:01:0d:b2:3c:4d:c8:c4:5e:87:fa:
                    9f:aa:ee:a4:73:e9:bb:74:57:85:24:2a:51:e4:43:
                    5c:4b:97:51:52:b9:82:6e:9c:ce:ae:0f:91:45:25:
                    f9:b4:24:66:8e:47:1f:d7:d5
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Alternative Name: 
                DNS:localhost1, DNS:localhost2, DNS:localhost
            X509v3 Key Usage: 
                Digital Signature, Key Encipherment, Key Agreement
            X509v3 Extended Key Usage: 
                TLS Web Server Authentication
            X509v3 Subject Key Identifier: 
                2C:CF:E3:6E:08:F9:CE:9B:98:3B:B3:17:7F:0C:9D:E4:5B:1B:76:8A
            X509v3 Authority Key Identifier: 
                keyid:12:CA:BA:4B:46:04:A7:75:8A:2C:E8:0E:54:94:BC:12:65:A6:7B:CE

            X509v3 Basic Constraints: 
                CA:FALSE
    Signature Algorithm: sha1WithRSAEncryption
         2e:3d:c1:a2:a7:e4:70:f8:a8:13:86:c3:af:22:1f:e9:e1:62:
         f4:cf:16:66:a8:3b:70:f6:12:30:be:fe:8e:44:1b:71:b5:c1:
         e0:4b:66:c4:5d:d4:d7:7d:49:43:4a:6d:22:1b:ce:3d:e3:14:
         14:b3:6d:3a:93:39:0c:9b:2c:83:35:1d:7e:7c:29:29:3c:51:
         6b:27:c3:5b:2d:f2:61:18:f8:c7:90:be:3b:68:3f:08:9b:ac:
         68:01:d2:0c:ec:aa:5d:9e:78:b7:8b:84:04:01:b2:08:ef:df:
         0c:f2:29:99:fe:61:d1:65:80:aa:ef:df:8e:28:55:a6:f9:88:
         0c:01:bb:fc:1c:9e:9c:08:8d:c5:34:24:91:c1:ac:71:22:e1:
         12:78:e0:45:d5:e2:39:c4:3c:16:09:80:d0:5b:bc:49:0a:4c:
         a3:5b:e1:36:40:ed:26:6d:8d:a0:d3:4a:3c:86:93:2f:d4:0a:
         3c:72:08:62:d7:66:d0:b3:05:c2:0f:1d:af:3c:65:67:f2:6c:
         76:a5:9c:37:ac:c4:ac:96:b7:e4:c0:ef:a4:5b:28:1e:16:09:
         15:f6:7b:bb:5d:a2:94:9a:df:52:7b:ae:c9:39:f4:18:9e:84:
         57:6c:d3:6d:ae:35:38:8f:8f:9b:0d:df:77:69:ae:25:ec:ce:
         d0:2b:bd:8d
-----BEGIN CERTIFICATE-----
MIIDWjCCAkKgAwIBAgIGDWSfQa6LMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNVBAYT
Ak5OMTEwLwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNo
IENsb3VkMSYwJAYDVQQDDB1Ob3J0aGVybiBOb3doZXJlIFRydXN0IEFuY2hvcjAe
Fw0xNjA4MzAxODMyNTdaFw0yNDExMTYxODMyNTdaMFcxCzAJBgNVBAYTAk5OMTEw
LwYDVQQKDChFZGVsIEN1cmwgQXJjdGljIElsbHVkaXVtIFJlc2VhcmNoIENsb3Vk
MRUwEwYDVQQDDAxsb2NhbGhvc3Qubm4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
AoGBAKMqdde/dUFAvkK4uQAo8UUpVbw2yqa3hpOXJYSqyYCsQdko+7BoS1vuvZSD
2iv2zMwR3/tI5unVl0F/mg23h5YSIkEqf5WKFNZsSzTfGCkBDbI8TcjEXof6n6ru
pHPpu3RXhSQqUeRDXEuXUVK5gm6czq4PkUUl+bQkZo5HH9fVAgMBAAGjgZ4wgZsw
LAYDVR0RBCUwI4IKbG9jYWxob3N0MYIKbG9jYWxob3N0MoIJbG9jYWxob3N0MAsG
A1UdDwQEAwIDqDATBgNVHSUEDDAKBggrBgEFBQcDATAdBgNVHQ4EFgQULM/jbgj5
zpuYO7MXfwyd5FsbdoowHwYDVR0jBBgwFoAUEsq6S0YEp3WKLOgOVJS8EmWme84w
CQYDVR0TBAIwADANBgkqhkiG9w0BAQUFAAOCAQEALj3BoqfkcPioE4bDryIf6eFi
9M8WZqg7cPYSML7+jkQbcbXB4EtmxF3U131JQ0ptIhvOPeMUFLNtOpM5DJssgzUd
fnwpKTxRayfDWy3yYRj4x5C+O2g/CJusaAHSDOyqXZ54t4uEBAGyCO/fDPIpmf5h
0WWAqu/fjihVpvmIDAG7/ByenAiNxTQkkcGscSLhEnjgRdXiOcQ8FgmA0Fu8SQpM
o1vhNkDtJm2NoNNKPIaTL9QKPHIIYtdm0LMFwg8drzxlZ/JsdqWcN6zErJa35MDv
pFsoHhYJFfZ7u12ilJrfUnuuyTn0GJ6EV2zTba41OI+Pmw3fd2muJezO0Cu9jQ==
-----END CERTIFICATE-----
Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.pub.der.

cannot compute difference between binary files

Added jni/curl/tests/certs/Server-localhost-lastSAN-sv.pub.pem.












>
>
>
>
>
>
1
2
3
4
5
6
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCjKnXXv3VBQL5CuLkAKPFFKVW8
Nsqmt4aTlyWEqsmArEHZKPuwaEtb7r2Ug9or9szMEd/7SObp1ZdBf5oNt4eWEiJB
Kn+VihTWbEs03xgpAQ2yPE3IxF6H+p+q7qRz6bt0V4UkKlHkQ1xLl1FSuYJunM6u
D5FFJfm0JGaORx/X1QIDAQAB
-----END PUBLIC KEY-----
Changes to jni/curl/tests/data/Makefile.in.
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
test1096 test1097 test1098 test1099 test1100 test1101 test1102 test1103 \
test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \
test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
test1144 test1145 test1146 test1147 test1148 test1149 test1150 test1151 \
test1152 test1153 test1154 \
\
test1160 test1161 test1162 test1163 \
test1170 test1171 \
test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
test1216 test1217 test1218 test1219 \
test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \
test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \
test1236 test1237 test1238 test1239 test1240 test1241 test1242 test1243 \







|

|







466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
test1096 test1097 test1098 test1099 test1100 test1101 test1102 test1103 \
test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \
test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
test1144 test1145 test1146 test1147 test1148 test1149 test1150 test1151 \
test1152 test1153 test1154 test1155 \
\
test1160 test1161 test1162 test1163 test1164 \
test1170 test1171 \
test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
test1216 test1217 test1218 test1219 \
test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \
test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \
test1236 test1237 test1238 test1239 test1240 test1241 test1242 test1243 \
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522

523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540


541
542
543
544
545
546
547
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test1408 test1409 test1410 test1411 test1412 test1413 test1414 test1415 \
test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \
test1424 test1425 test1426 test1427 \
test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \
test1436 test1437 test1438 test1439 test1440 test1441 test1442 test1443 \
test1444 test1445 test1446 test1447 test1448 test1449 test1450 test1451 \
test1452 test1453 test1454 \
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
test1516 test1517 \
\
test1520 test1521 \
\
test1525 test1526 test1527 test1528 test1529 test1530 test1531 test1532 \
test1533 test1534 test1535 test1536 test1537 test1538 \
test1540 \
test1550 test1551 test1552 test1553 test1554 test1555 test1556 \
test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \

\
test1700 test1701 test1702 \
\
test1800 test1801 \
\
test1900 test1901 test1902 test1903 test1904 \
\
test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
test2032 test2033 test2034 test2035 test2036 test2037 test2038 test2039 \
test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
test2048 test2049 test2050 test2051 test2052 test2053 test2054 test2055 \
test2056 test2057 test2058 test2059 test2060 test2061 test2062 test2063 \
test2064 test2065 test2066 test2067 test2068 test2069 \
\
test2070 test2071 test2072 test2073




# TESTCASES are taken from Makefile.inc
EXTRA_DIST = $(TESTCASES) DISABLED CMakeLists.txt
all: all-am

.SUFFIXES:







|











>

















|
>
>







504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test1408 test1409 test1410 test1411 test1412 test1413 test1414 test1415 \
test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \
test1424 test1425 test1426 test1427 \
test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \
test1436 test1437 test1438 test1439 test1440 test1441 test1442 test1443 \
test1444 test1445 test1446 test1447 test1448 test1449 test1450 test1451 \
test1452 test1453 test1454 test1455 test1456 \
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
test1516 test1517 \
\
test1520 test1521 \
\
test1525 test1526 test1527 test1528 test1529 test1530 test1531 test1532 \
test1533 test1534 test1535 test1536 test1537 test1538 \
test1540 \
test1550 test1551 test1552 test1553 test1554 test1555 test1556 \
test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
test1608 \
\
test1700 test1701 test1702 \
\
test1800 test1801 \
\
test1900 test1901 test1902 test1903 test1904 \
\
test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
test2032 test2033 test2034 test2035 test2036 test2037 test2038 test2039 \
test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
test2048 test2049 test2050 test2051 test2052 test2053 test2054 test2055 \
test2056 test2057 test2058 test2059 test2060 test2061 test2062 test2063 \
test2064 test2065 test2066 test2067 test2068 test2069 \
\
test2070 test2071 test2072 test2073 \
\
test3000 test3001


# TESTCASES are taken from Makefile.inc
EXTRA_DIST = $(TESTCASES) DISABLED CMakeLists.txt
all: all-am

.SUFFIXES:
Changes to jni/curl/tests/data/Makefile.inc.
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
test1096 test1097 test1098 test1099 test1100 test1101 test1102 test1103 \
test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \
test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
test1144 test1145 test1146 test1147 test1148 test1149 test1150 test1151 \
test1152 test1153 test1154 \
\
test1160 test1161 test1162 test1163 \
test1170 test1171 \
test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
test1216 test1217 test1218 test1219 \
test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \
test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \
test1236 test1237 test1238 test1239 test1240 test1241 test1242 test1243 \







|

|







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
test1096 test1097 test1098 test1099 test1100 test1101 test1102 test1103 \
test1104 test1105 test1106 test1107 test1108 test1109 test1110 test1111 \
test1112 test1113 test1114 test1115 test1116 test1117 test1118 test1119 \
test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
test1144 test1145 test1146 test1147 test1148 test1149 test1150 test1151 \
test1152 test1153 test1154 test1155 \
\
test1160 test1161 test1162 test1163 test1164 \
test1170 test1171 \
test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
test1216 test1217 test1218 test1219 \
test1220 test1221 test1222 test1223 test1224 test1225 test1226 test1227 \
test1228 test1229 test1230 test1231 test1232 test1233 test1234 test1235 \
test1236 test1237 test1238 test1239 test1240 test1241 test1242 test1243 \
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179

180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197


test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test1408 test1409 test1410 test1411 test1412 test1413 test1414 test1415 \
test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \
test1424 test1425 test1426 test1427 \
test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \
test1436 test1437 test1438 test1439 test1440 test1441 test1442 test1443 \
test1444 test1445 test1446 test1447 test1448 test1449 test1450 test1451 \
test1452 test1453 test1454 \
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
test1516 test1517 \
\
test1520 test1521 \
\
test1525 test1526 test1527 test1528 test1529 test1530 test1531 test1532 \
test1533 test1534 test1535 test1536 test1537 test1538 \
test1540 \
test1550 test1551 test1552 test1553 test1554 test1555 test1556 \
test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \

\
test1700 test1701 test1702 \
\
test1800 test1801 \
\
test1900 test1901 test1902 test1903 test1904 \
\
test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
test2032 test2033 test2034 test2035 test2036 test2037 test2038 test2039 \
test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
test2048 test2049 test2050 test2051 test2052 test2053 test2054 test2055 \
test2056 test2057 test2058 test2059 test2060 test2061 test2062 test2063 \
test2064 test2065 test2066 test2067 test2068 test2069 \
\
test2070 test2071 test2072 test2073









|











>

















|
>
>
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
test1408 test1409 test1410 test1411 test1412 test1413 test1414 test1415 \
test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \
test1424 test1425 test1426 test1427 \
test1428 test1429 test1430 test1431 test1432 test1433 test1434 test1435 \
test1436 test1437 test1438 test1439 test1440 test1441 test1442 test1443 \
test1444 test1445 test1446 test1447 test1448 test1449 test1450 test1451 \
test1452 test1453 test1454 test1455 test1456 \
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
test1516 test1517 \
\
test1520 test1521 \
\
test1525 test1526 test1527 test1528 test1529 test1530 test1531 test1532 \
test1533 test1534 test1535 test1536 test1537 test1538 \
test1540 \
test1550 test1551 test1552 test1553 test1554 test1555 test1556 \
test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
test1608 \
\
test1700 test1701 test1702 \
\
test1800 test1801 \
\
test1900 test1901 test1902 test1903 test1904 \
\
test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \
test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \
test2016 test2017 test2018 test2019 test2020 test2021 test2022 test2023 \
test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \
test2032 test2033 test2034 test2035 test2036 test2037 test2038 test2039 \
test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
test2048 test2049 test2050 test2051 test2052 test2053 test2054 test2055 \
test2056 test2057 test2058 test2059 test2060 test2061 test2062 test2063 \
test2064 test2065 test2066 test2067 test2068 test2069 \
\
test2070 test2071 test2072 test2073 \
\
test3000 test3001
Changes to jni/curl/tests/data/test1026.
9
10
11
12
13
14
15



16
17
18
19
20
21
22
# Server-side
<reply>
</reply>

#
# Client-side
<client>



<server>
none
</server>
 <name>
curl --manual 
 </name>
 <command>







>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Server-side
<reply>
</reply>

#
# Client-side
<client>
<features>
manual
</features>
<server>
none
</server>
 <name>
curl --manual 
 </name>
 <command>
Changes to jni/curl/tests/data/test1108.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<testcase>
<info>
<keywords>
FTP
PASV
RETR
PRET
</keywords>
</info>
# Server-side
<reply>

<servercmd>
REPLY PRET 550 unkown command
</servercmd>
</reply>

# Client-side
<client>
<server>
ftp













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<testcase>
<info>
<keywords>
FTP
PASV
RETR
PRET
</keywords>
</info>
# Server-side
<reply>

<servercmd>
REPLY PRET 550 unknown command
</servercmd>
</reply>

# Client-side
<client>
<server>
ftp
Changes to jni/curl/tests/data/test1136.
52
53
54
55
56
57
58
59
60
61
62
63
64
# Verify data after the test has been "shot"
<verify>
<file name="log/jar1136.txt" mode="text">
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

.www.example.ck	TRUE	/	FALSE	0	test2	allowed2
.www.ck	TRUE	/	FALSE	0	test4	allowed4
.z-1.compute-1.amazonaws.com	TRUE	/	FALSE	0	test5	forbidden5
</file>
</verify>
</testcase>







|
|




52
53
54
55
56
57
58
59
60
61
62
63
64
# Verify data after the test has been "shot"
<verify>
<file name="log/jar1136.txt" mode="text">
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

.www.ck	TRUE	/	FALSE	0	test4	allowed4
.www.example.ck	TRUE	/	FALSE	0	test2	allowed2
.z-1.compute-1.amazonaws.com	TRUE	/	FALSE	0	test5	forbidden5
</file>
</verify>
</testcase>
Changes to jni/curl/tests/data/test1148.
33
34
35
36
37
38
39




40
41
42
43
44
45
46
47
48
49
50
51
52


53



54
55
56
57
</server>
 <name>
progress-bar
 </name>
 <command>
http://%HOSTIP:%HTTPPORT/1148 -# --stderr log/stderrlog1148
</command>




</client>

#
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /1148 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*

</protocol>


<file name="log/stderrlog1148">



 ######################################################################## 100.0%
</file>
</verify>
</testcase>







>
>
>
>













>
>

>
>
>
|
|


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
</server>
 <name>
progress-bar
 </name>
 <command>
http://%HOSTIP:%HTTPPORT/1148 -# --stderr log/stderrlog1148
</command>
<setenv>
LC_ALL=
LC_NUMERIC=en_US.UTF-8
</setenv>
</client>

#
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /1148 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*

</protocol>
# This allows the last 4 letters of the bar to get updated without it
# matters. We're mostly checking the width of it anyway.
<file name="log/stderrlog1148">
 bar 100.0%
</file>
<stripfile>
s/####################################################################..../bar/
</stripfile>
</verify>
</testcase>
Added jni/curl/tests/data/test1155.












































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<testcase>
<info>
<keywords>
HTTP
HTTP GET
cookies
</keywords>
</info>

# Server-side
<reply>

<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 0
Set-Cookie: domain=value;secure;path=/

</data>
</reply>

# Client-side
<client>
<server>
http
</server>
 <name>
HTTP cookie with parameter word as name
 </name>
 <command>
http://%HOSTIP:%HTTPPORT/1155 -c log/cookies1155.txt
</command>
</client>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /1155 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*

</protocol>
<file name="log/cookies1155.txt">
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

127.0.0.1	FALSE	/	TRUE	0	domain	value
</file>
</verify>
</testcase>
Added jni/curl/tests/data/test1164.








































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<testcase>
<info>
<keywords>
HTTP
HTTP GET
</keywords>
</info>

#
# Server-side
<reply>
# perl -e 'print "swsclose" . "\0" x 200;' | base64
# 'swsclose' is there to force server to close after send
<data nocheck="yes" base64="yes">
c3dzY2xvc2UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</data>
</reply>

#
# Client-side
<client>
<server>
http
</server>
 <name>
HTTP/0.9 GET and all zeroes
 </name>
 <command option="force-output">
http://%HOSTIP:%HTTPPORT/1164 -w '%{size_download}\n'
</command>
</client>

#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /1164 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*

</protocol>
<stdout>
208
</stdout>
</verify>
</testcase>
Changes to jni/curl/tests/data/test1208.
1
2
3
4
5
6
7

8
9
10
11
12
13
14
<testcase>
<info>
<keywords>
FTP
PORT
RETR
NODATACONN150

</keywords>
</info>
# Server-side
<reply>
<data nocheck="yes">
some bytes
</data>







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<testcase>
<info>
<keywords>
FTP
PORT
RETR
NODATACONN150
flaky
</keywords>
</info>
# Server-side
<reply>
<data nocheck="yes">
some bytes
</data>
Changes to jni/curl/tests/data/test1209.
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<verify>
<strippart>
s/^EPRT \|1\|(.*)/EPRT \|1\|/
</strippart>

# The protocol part does not include QUIT simply because the error is
# CURLE_OPERATION_TIMEDOUT (28) which is a generic timeout error without
# specificly saying for which connection it concerns, and for timeouts libcurl
# marks the control channel as "invalid". As this test case times out for the
# data connection it could still use the control channel.
<protocol>
USER anonymous
PASS ftp@example.com
PWD
EPRT |1|







|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<verify>
<strippart>
s/^EPRT \|1\|(.*)/EPRT \|1\|/
</strippart>

# The protocol part does not include QUIT simply because the error is
# CURLE_OPERATION_TIMEDOUT (28) which is a generic timeout error without
# specifically saying for which connection it concerns, and for timeouts libcurl
# marks the control channel as "invalid". As this test case times out for the
# data connection it could still use the control channel.
<protocol>
USER anonymous
PASS ftp@example.com
PWD
EPRT |1|
Added jni/curl/tests/data/test1455.
















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<testcase>
<info>
<keywords>
HTTP
HTTP GET
</keywords>
</info>

#
# Server-side
<reply name="1455">
<data nocheck=yes>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: barkbark

-foo-
</data>
</reply>

#
# Client-side
<client>
<server>
http
</server>
<name>
HTTP GET when PROXY Protocol enabled
</name>
<command>
http://%HOSTIP:%HTTPPORT/1455 --haproxy-protocol --local-port 37756
</command>
</client>

#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
PROXY TCP4 %CLIENTIP %HOSTIP 37756 %HTTPPORT
GET /1455 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*

</protocol>
</verify>
</testcase>
Added jni/curl/tests/data/test1456.






















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<testcase>
<info>
<keywords>
HTTP
HTTP GET
IPv6
</keywords>
</info>
#
# Server-side
<reply>
<data nocheck=yes>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
ETag: "21025-dc7-39462498"
Accept-Ranges: bytes
Content-Length: 6
Connection: close
Content-Type: text/html
Funny-head: yesyes

-foo-
</data>
</reply>

#
# Client-side
<client>
<features>
ipv6
</features>
<server>
http-ipv6
</server>
 <name>
HTTP-IPv6 GET with PROXY protocol
 </name>
 <command>
-g "http://%HOST6IP:%HTTP6PORT/1456" --local-port 44444 --haproxy-protocol
</command>
</client>

#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:
</strip>
<protocol>
PROXY TCP6 ::1 ::1 44444 %HTTP6PORT
GET /1456 HTTP/1.1
Host: %HOST6IP:%HTTP6PORT
Accept: */*

</protocol>
</verify>
</testcase>
Changes to jni/curl/tests/data/test155.
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

This is not the real page either!
</data1001>

# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
<data1002>
HTTP/1.1 200 Type-3 Recevied and all Things are fine swsclose
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 32

Finally, this is the real page!
</data1002>








|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

This is not the real page either!
</data1001>

# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
<data1002>
HTTP/1.1 200 Type-3 Received and all Things are fine swsclose
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 32

Finally, this is the real page!
</data1002>

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

HTTP/1.1 401 Type-1 received, send back type-2
Server: Microsoft-IIS/5.0
Content-Length: 34
Content-Type: text/html; charset=iso-8859-1
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==

HTTP/1.1 200 Type-3 Recevied and all Things are fine swsclose
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 32

Finally, this is the real page!
</datacheck>








|







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

HTTP/1.1 401 Type-1 received, send back type-2
Server: Microsoft-IIS/5.0
Content-Length: 34
Content-Type: text/html; charset=iso-8859-1
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==

HTTP/1.1 200 Type-3 Received and all Things are fine swsclose
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 32

Finally, this is the real page!
</datacheck>

Added jni/curl/tests/data/test1608.




















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<testcase>
<info>
<keywords>
unittest
curlopt_dns_shuffle_addresses
</keywords>
</info>

#
# Client-side
<client>
<server>
none
</server>
<features>
unittest
</features>
 <name>
verify DNS shuffling
 </name>
<tool>
unit1608
</tool>
</client>

</testcase>
Changes to jni/curl/tests/data/test2072.
1
2
3
4
5
6
7
8







9
10
11
12
13
14
15
16
17
18
19
20
21



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<testcase>
<info>
<keywords>
FILE
</keywords>
</info>

<reply>







</reply>

# Client-side
<client>
<server>
file
</server>
<name>
file:// with SMB path
</name>
<command>
file:////bad-host%PWD/log/test1145.txt
</command>



<file name="log/test1145.txt">
foo
   bar
bar
   foo
moo
</file>
</client>

# Verify data after the test has been "shot"
<verify>
# CURLE_URL_MALFORMAT is error code 3
<errorcode>
3
</errorcode>
</verify>
</testcase>








>
>
>
>
>
>
>








|


|

>
>
>
|










<
<
<
<


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42




43
44
<testcase>
<info>
<keywords>
FILE
</keywords>
</info>

<reply>
<data>
foo
   bar
bar
   foo
moo
</data>
</reply>

# Client-side
<client>
<server>
file
</server>
<name>
file:// with unix path resolution behavior for the case of extra slashes
</name>
<command>
file:////%PWD/log/test2072.txt
</command>
<precheck>
perl -e "print 'Test requires a unix system' if ( $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'dos');"
</precheck>
<file name="log/test2072.txt">
foo
   bar
bar
   foo
moo
</file>
</client>

# Verify data after the test has been "shot"
<verify>




</verify>
</testcase>
Added jni/curl/tests/data/test3000.


















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<testcase>
<info>
<keywords>
HTTPS
HTTP GET
PEM certificate
</keywords>
</info>

#
# Server-side
<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Length: 7

MooMoo
</data>
</reply>

#
# Client-side
<client>
<features>
SSL
</features>
<server>
https Server-localhost-firstSAN-sv.pem
</server>
<name>
HTTPS GET to localhost, first subject alt name matches, CN does not match
</name>
<command>
--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/3000
</command>
# Ensure that we're running on localhost because we're checking the host name
<precheck>
perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
</precheck>
</client>

#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /3000 HTTP/1.1
Host: localhost:%HTTPSPORT
Accept: */*

</protocol>
</verify>
</testcase>
Added jni/curl/tests/data/test3001.


















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<testcase>
<info>
<keywords>
HTTPS
HTTP GET
PEM certificate
</keywords>
</info>

#
# Server-side
<reply>
<data>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Length: 7

MooMoo
</data>
</reply>

#
# Client-side
<client>
<features>
SSL
</features>
<server>
https Server-localhost-lastSAN-sv.pem
</server>
<name>
HTTPS GET to localhost, last subject alt name matches, CN does not match
</name>
<command>
--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt https://localhost:%HTTPSPORT/3001
</command>
# Ensure that we're running on localhost because we're checking the host name
<precheck>
perl -e "print 'Test requires default test server host' if ( '%HOSTIP' ne '127.0.0.1' );"
</precheck>
</client>

#
# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /3001 HTTP/1.1
Host: localhost:%HTTPSPORT
Accept: */*

</protocol>
</verify>
</testcase>
Changes to jni/curl/tests/data/test46.
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

87
88
89

# Client-side
<client>
<server>
http
</server>
 <name>
HTTP, get cookies and store in cookie jar
 </name>
# Explicitly set the time zone to a known good one, in case the user is
# using one of the 'right' zones that take into account leap seconds
# which causes the cookie expiry times to be different from what we expect.
<setenv>
TZ=GMT
</setenv>
 <command>
%HOSTIP:%HTTPPORT/want/46 -c log/jar46 -b log/injar46
</command>
<file name="log/injar46">
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This is generated by libcurl!  Do not edit.

www.fake.come	FALSE	/	FALSE	2022144953	cookiecliente	si
www.loser.com	FALSE	/	FALSE	2139150993	UID	99
%HOSTIP	FALSE	/	FALSE	1739150993	mooo	indeed
#HttpOnly_%HOSTIP	FALSE	/want	FALSE	1739150993	mooo2	indeed2
%HOSTIP	FALSE	/want	FALSE	0	empty	
</file>
</client>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /want/46 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Cookie: empty=; mooo2=indeed2; mooo=indeed

</protocol>
<file name="log/jar46" mode="text">
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

www.fake.come	FALSE	/	FALSE	2022144953	cookiecliente	si
www.loser.com	FALSE	/	FALSE	2139150993	UID	99
%HOSTIP	FALSE	/	FALSE	1739150993	mooo	indeed
#HttpOnly_%HOSTIP	FALSE	/want	FALSE	1739150993	mooo2	indeed2
%HOSTIP	FALSE	/want	FALSE	0	empty	
%HOSTIP	FALSE	/	FALSE	2054030187	ckyPersistent	permanent
%HOSTIP	FALSE	/	FALSE	0	ckySession	temporary
%HOSTIP	FALSE	/	FALSE	0	ASPSESSIONIDQGGQQSJJ	GKNBDIFAAOFDPDAIEAKDIBKE
%HOSTIP	FALSE	/	FALSE	0	justaname	
%HOSTIP	FALSE	/want/	FALSE	0	simplyhuge	zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

</file>
</verify>
</testcase>







|








|








|
|
|










|










<
|
|
|
|
|
|
|
|
>



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

78
79
80
81
82
83
84
85
86
87
88
89

# Client-side
<client>
<server>
http
</server>
 <name>
HTTP with bad domain name, get cookies and store in cookie jar
 </name>
# Explicitly set the time zone to a known good one, in case the user is
# using one of the 'right' zones that take into account leap seconds
# which causes the cookie expiry times to be different from what we expect.
<setenv>
TZ=GMT
</setenv>
 <command>
domain..tld:%HTTPPORT/want/46 --resolve domain..tld:%HTTPPORT:%HOSTIP -c log/jar46 -b log/injar46
</command>
<file name="log/injar46">
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This is generated by libcurl!  Do not edit.

www.fake.come	FALSE	/	FALSE	2022144953	cookiecliente	si
www.loser.com	FALSE	/	FALSE	2139150993	UID	99
domain..tld	FALSE	/	FALSE	1739150993	mooo	indeed
#HttpOnly_domain..tld	FALSE	/want	FALSE	1739150993	mooo2	indeed2
domain..tld	FALSE	/want	FALSE	0	empty	
</file>
</client>

# Verify data after the test has been "shot"
<verify>
<strip>
^User-Agent:.*
</strip>
<protocol>
GET /want/46 HTTP/1.1
Host: domain..tld:%HTTPPORT
Accept: */*
Cookie: empty=; mooo2=indeed2; mooo=indeed

</protocol>
<file name="log/jar46" mode="text">
# Netscape HTTP Cookie File
# https://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

www.fake.come	FALSE	/	FALSE	2022144953	cookiecliente	si

domain..tld	FALSE	/	FALSE	1739150993	mooo	indeed
#HttpOnly_domain..tld	FALSE	/want	FALSE	1739150993	mooo2	indeed2
domain..tld	FALSE	/want	FALSE	0	empty	
domain..tld	FALSE	/	FALSE	2054030187	ckyPersistent	permanent
domain..tld	FALSE	/	FALSE	0	ckySession	temporary
domain..tld	FALSE	/	FALSE	0	ASPSESSIONIDQGGQQSJJ	GKNBDIFAAOFDPDAIEAKDIBKE
domain..tld	FALSE	/	FALSE	0	justaname	
domain..tld	FALSE	/want/	FALSE	0	simplyhuge	zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
www.loser.com	FALSE	/	FALSE	2139150993	UID	99
</file>
</verify>
</testcase>
Changes to jni/curl/tests/libtest/lib1502.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
36
37
38
39
40
41
42

43
44
45
46
47
48
49
#include "memdebug.h"

#define TEST_HANG_TIMEOUT 60 * 1000

int test(char *URL)
{
  CURL *easy = NULL;

  CURLM *multi = NULL;
  int still_running;
  int res = 0;

  char redirect[160];

  /* DNS cache injection */







>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "memdebug.h"

#define TEST_HANG_TIMEOUT 60 * 1000

int test(char *URL)
{
  CURL *easy = NULL;
  CURL *dup;
  CURLM *multi = NULL;
  int still_running;
  int res = 0;

  char redirect[160];

  /* DNS cache injection */
67
68
69
70
71
72
73









74
75
76
77
78
79
80
  }

  easy_init(easy);

  easy_setopt(easy, CURLOPT_URL, URL);
  easy_setopt(easy, CURLOPT_HEADER, 1L);
  easy_setopt(easy, CURLOPT_RESOLVE, dns_cache_list);










  multi_init(multi);

  multi_add_handle(multi, easy);

  multi_perform(multi, &still_running);








>
>
>
>
>
>
>
>
>







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
  }

  easy_init(easy);

  easy_setopt(easy, CURLOPT_URL, URL);
  easy_setopt(easy, CURLOPT_HEADER, 1L);
  easy_setopt(easy, CURLOPT_RESOLVE, dns_cache_list);

  dup = curl_easy_duphandle(easy);
  if(dup) {
    curl_easy_cleanup(easy);
    easy = dup;
  }
  else {
    return CURLE_OUT_OF_MEMORY;
  }

  multi_init(multi);

  multi_add_handle(multi, easy);

  multi_perform(multi, &still_running);

Changes to jni/curl/tests/libtest/lib1509.c.
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
            "with code %d (%s)\n",
            __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
    res = TEST_ERR_MAJOR_BAD;
    goto test_cleanup;
  }

  printf("header length is ........: %lu\n", headerSize);
  printf("header length should be..: %lu\n", realHeaderSize);

test_cleanup:

  curl_easy_cleanup(curl);
  curl_global_cleanup();








|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    fprintf(stderr, "%s:%d curl_easy_getinfo() failed, "
            "with code %d (%s)\n",
            __FILE__, __LINE__, (int)code, curl_easy_strerror(code));
    res = TEST_ERR_MAJOR_BAD;
    goto test_cleanup;
  }

  printf("header length is ........: %ld\n", headerSize);
  printf("header length should be..: %lu\n", realHeaderSize);

test_cleanup:

  curl_easy_cleanup(curl);
  curl_global_cleanup();

Changes to jni/curl/tests/libtest/lib1521.c.
2383
2384
2385
2386
2387
2388
2389
























2390
2391
2392
2393
2394
2395
2396
    err("RESOLVER_START_FUNCTION", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, &object);
  if(UNEX(res)) {
    err("RESOLVER_START_DATA", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, NULL);
  if(UNEX(res)) {
    err("RESOLVER_START_DATA", res, __LINE__); goto test_cleanup; }
























  res = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &charp);
  if(UNEX(res)) {
    geterr("EFFECTIVE_URL", res, __LINE__); goto test_cleanup; }
  res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &val);
  if(UNEX(res)) {
    geterr("RESPONSE_CODE", res, __LINE__); goto test_cleanup; }
  res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &dval);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
    err("RESOLVER_START_FUNCTION", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, &object);
  if(UNEX(res)) {
    err("RESOLVER_START_DATA", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_RESOLVER_START_DATA, NULL);
  if(UNEX(res)) {
    err("RESOLVER_START_DATA", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_HAPROXYPROTOCOL, 0L);
  if(UNEX(res)) {
    err("HAPROXYPROTOCOL", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_HAPROXYPROTOCOL, 22L);
  if(UNEX(res)) {
    err("HAPROXYPROTOCOL", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_HAPROXYPROTOCOL, LO);
  if(UNEX(res)) {
    err("HAPROXYPROTOCOL", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_HAPROXYPROTOCOL, HI);
  if(UNEX(res)) {
    err("HAPROXYPROTOCOL", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_DNS_SHUFFLE_ADDRESSES, 0L);
  if(UNEX(res)) {
    err("DNS_SHUFFLE_ADDRESSES", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_DNS_SHUFFLE_ADDRESSES, 22L);
  if(UNEX(res)) {
    err("DNS_SHUFFLE_ADDRESSES", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_DNS_SHUFFLE_ADDRESSES, LO);
  if(UNEX(res)) {
    err("DNS_SHUFFLE_ADDRESSES", res, __LINE__); goto test_cleanup; }
  res = curl_easy_setopt(curl, CURLOPT_DNS_SHUFFLE_ADDRESSES, HI);
  if(UNEX(res)) {
    err("DNS_SHUFFLE_ADDRESSES", res, __LINE__); goto test_cleanup; }
  res = curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &charp);
  if(UNEX(res)) {
    geterr("EFFECTIVE_URL", res, __LINE__); goto test_cleanup; }
  res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &val);
  if(UNEX(res)) {
    geterr("RESPONSE_CODE", res, __LINE__); goto test_cleanup; }
  res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &dval);
Changes to jni/curl/tests/libtest/lib1535.c.
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  if(res) {
    fprintf(stderr, "%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
            __FILE__, __LINE__, res, curl_easy_strerror(res));
    goto test_cleanup;
  }
  if(protocol != CURLPROTO_HTTP) {
    fprintf(stderr, "%s:%d protocol of http resource is incorrect; "
            "expected %ld but is %ld\n",
            __FILE__, __LINE__, CURLPROTO_HTTP, protocol);
    res = CURLE_HTTP_RETURNED_ERROR;
    goto test_cleanup;
  }

  /* Test that a protocol is properly initialized on curl_easy_duphandle.
  */







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  if(res) {
    fprintf(stderr, "%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
            __FILE__, __LINE__, res, curl_easy_strerror(res));
    goto test_cleanup;
  }
  if(protocol != CURLPROTO_HTTP) {
    fprintf(stderr, "%s:%d protocol of http resource is incorrect; "
            "expected %d but is %ld\n",
            __FILE__, __LINE__, CURLPROTO_HTTP, protocol);
    res = CURLE_HTTP_RETURNED_ERROR;
    goto test_cleanup;
  }

  /* Test that a protocol is properly initialized on curl_easy_duphandle.
  */
Changes to jni/curl/tests/libtest/lib1536.c.
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    fprintf(stderr, "%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
            __FILE__, __LINE__, res, curl_easy_strerror(res));
    goto test_cleanup;
  }
  if(memcmp(scheme, "HTTP", 5) != 0) {
    fprintf(stderr, "%s:%d scheme of http resource is incorrect; "
            "expected 'HTTP' but is %s\n",
            __FILE__, __LINE__, CURLPROTO_HTTP,
            (scheme == NULL ? "NULL" : "invalid"));
    res = CURLE_HTTP_RETURNED_ERROR;
    goto test_cleanup;
  }

  /* Test that a scheme is properly initialized on curl_easy_duphandle.
  */







|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    fprintf(stderr, "%s:%d curl_easy_getinfo() failed with code %d (%s)\n",
            __FILE__, __LINE__, res, curl_easy_strerror(res));
    goto test_cleanup;
  }
  if(memcmp(scheme, "HTTP", 5) != 0) {
    fprintf(stderr, "%s:%d scheme of http resource is incorrect; "
            "expected 'HTTP' but is %s\n",
            __FILE__, __LINE__,
            (scheme == NULL ? "NULL" : "invalid"));
    res = CURLE_HTTP_RETURNED_ERROR;
    goto test_cleanup;
  }

  /* Test that a scheme is properly initialized on curl_easy_duphandle.
  */
Changes to jni/curl/tests/libtest/lib517.c.
43
44
45
46
47
48
49

50
51
52
53
54
55
56
  {"1994 Nov 6", 784080000 },
  {"06-Nov-94", 784080000 },
  {"Sun Nov 6 94", 784080000 },
  {"1994.Nov.6", 784080000 },
  {"Sun/Nov/6/94/GMT", 784080000 },
  {"Sun, 06 Nov 1994 08:49:37 CET", 784108177 },
  {"06 Nov 1994 08:49:37 EST", 784129777 },

  {"Sun, 12 Sep 2004 15:05:58 -0700", 1095026758 },
  {"Sat, 11 Sep 2004 21:32:11 +0200", 1094931131 },
  {"20040912 15:05:58 -0700", 1095026758 },
  {"20040911 +0200", 1094853600 },
  {"Thu, 01-Jan-1970 00:59:59 GMT", 3599 },
  {"Thu, 01-Jan-1970 01:00:00 GMT", 3600 },
  {"Sat, 15-Apr-17 21:01:22 GMT", 1492290082 },







>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  {"1994 Nov 6", 784080000 },
  {"06-Nov-94", 784080000 },
  {"Sun Nov 6 94", 784080000 },
  {"1994.Nov.6", 784080000 },
  {"Sun/Nov/6/94/GMT", 784080000 },
  {"Sun, 06 Nov 1994 08:49:37 CET", 784108177 },
  {"06 Nov 1994 08:49:37 EST", 784129777 },
  {"Sun, 06 Nov 1994 08:49:37 UT", 784111777 },
  {"Sun, 12 Sep 2004 15:05:58 -0700", 1095026758 },
  {"Sat, 11 Sep 2004 21:32:11 +0200", 1094931131 },
  {"20040912 15:05:58 -0700", 1095026758 },
  {"20040911 +0200", 1094853600 },
  {"Thu, 01-Jan-1970 00:59:59 GMT", 3599 },
  {"Thu, 01-Jan-1970 01:00:00 GMT", 3600 },
  {"Sat, 15-Apr-17 21:01:22 GMT", 1492290082 },
Changes to jni/curl/tests/libtest/lib552.c.
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s, %d bytes (0x%x)\n", text, (int)size, (int)size);

  for(i = 0; i<size; i += width) {

    fprintf(stream, "%04x: ", (int)i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stream, "%02x ", ptr[i + c]);
        else







|



|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s, %zu bytes (0x%zx)\n", text, size, size);

  for(i = 0; i<size; i += width) {

    fprintf(stream, "%04zx: ", i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stream, "%02x ", ptr[i + c]);
        else
jni/curl/tests/libtest/mk-lib1521.pl became executable.
Changes to jni/curl/tests/libtest/stub_gssapi.c.
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
      default:
        return GSS_S_FAILURE;
    }

    if(status_string->value)
      status_string->length = strlen(status_string->value);
    else
       return GSS_S_FAILURE;
  }

  return GSS_S_COMPLETE;
}

/* Stubs returning error */








|







320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
      default:
        return GSS_S_FAILURE;
    }

    if(status_string->value)
      status_string->length = strlen(status_string->value);
    else
      return GSS_S_FAILURE;
  }

  return GSS_S_COMPLETE;
}

/* Stubs returning error */

Changes to jni/curl/tests/libtest/testtrace.c.
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s%s, %d bytes (0x%x)\n", timebuf, text,
          (int)size, (int)size);

  for(i = 0; i < size; i += width) {

    fprintf(stream, "%04x: ", (int)i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stream, "%02x ", ptr[i + c]);
        else







|
|



|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

  unsigned int width = 0x10;

  if(nohex)
    /* without the hex output, we can fit more on screen */
    width = 0x40;

  fprintf(stream, "%s%s, %zu bytes (0x%zx)\n", timebuf, text,
          size, size);

  for(i = 0; i < size; i += width) {

    fprintf(stream, "%04zx: ", i);

    if(!nohex) {
      /* hex not disabled, show it */
      for(c = 0; c < width; c++)
        if(i + c < size)
          fprintf(stream, "%02x ", ptr[i + c]);
        else
jni/curl/tests/nroff-scan.pl became executable.
Changes to jni/curl/tests/runtests.1.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH runtests.pl 1 "May 05, 2017" "Curl 7.59.0" "runtests"

.SH NAME
runtests.pl \- run one or more test cases
.SH SYNOPSIS
.B runtests.pl [options] [test number] [!test number] [key word] [!key word]
.SH DESCRIPTION
\fIruntests.pl\fP runs one, several or all the existing test cases in curl's







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH runtests.pl 1 "May 05, 2017" "Curl 7.60.0" "runtests"

.SH NAME
runtests.pl \- run one or more test cases
.SH SYNOPSIS
.B runtests.pl [options] [test number] [!test number] [key word] [!key word]
.SH DESCRIPTION
\fIruntests.pl\fP runs one, several or all the existing test cases in curl's
Changes to jni/curl/tests/runtests.pl.
231
232
233
234
235
236
237

238
239
240
241
242
243
244
my $has_http2;      # set if libcurl is built with HTTP2 support
my $has_crypto;     # set if libcurl is built with cryptographic support
my $has_cares;      # set if built with c-ares
my $has_threadedres;# set if built with threaded resolver
my $has_psl;        # set if libcurl is built with PSL support
my $has_ldpreload;  # set if curl is built for systems supporting LD_PRELOAD
my $has_multissl;   # set if curl is build with MultiSSL support


# this version is decided by the particular nghttp2 library that is being used
my $h2cver = "h2c";

my $has_openssl;    # built with a lib using an OpenSSL-like API
my $has_gnutls;     # built with GnuTLS
my $has_nss;        # built with NSS







>







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
my $has_http2;      # set if libcurl is built with HTTP2 support
my $has_crypto;     # set if libcurl is built with cryptographic support
my $has_cares;      # set if built with c-ares
my $has_threadedres;# set if built with threaded resolver
my $has_psl;        # set if libcurl is built with PSL support
my $has_ldpreload;  # set if curl is built for systems supporting LD_PRELOAD
my $has_multissl;   # set if curl is build with MultiSSL support
my $has_manual;     # set if curl is built with built-in manual

# this version is decided by the particular nghttp2 library that is being used
my $h2cver = "h2c";

my $has_openssl;    # built with a lib using an OpenSSL-like API
my $has_gnutls;     # built with GnuTLS
my $has_nss;        # built with NSS
3028
3029
3030
3031
3032
3033
3034











3035
3036
3037
3038
3039
3040
3041
        $http_unix = 1 if($sws[0] =~ /unix/);
    }

    if(!$has_memory_tracking && $torture) {
        die "can't run torture tests since curl was built without ".
            "TrackMemory feature (--enable-curldebug)";
    }












    $has_shared = `sh $CURLCONFIG --built-shared`;
    chomp $has_shared;

    my $hostname=join(' ', runclientoutput("hostname"));
    my $hosttype=join(' ', runclientoutput("uname -a"));








>
>
>
>
>
>
>
>
>
>
>







3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
        $http_unix = 1 if($sws[0] =~ /unix/);
    }

    if(!$has_memory_tracking && $torture) {
        die "can't run torture tests since curl was built without ".
            "TrackMemory feature (--enable-curldebug)";
    }

    open(M, "$CURL -M 2>&1|");
    while(my $s = <M>) {
        if($s =~ /built-in manual was disabled at build-time/) {
            $has_manual = 0;
            last;
        }
        $has_manual = 1;
        last;
    }
    close(M);

    $has_shared = `sh $CURLCONFIG --built-shared`;
    chomp $has_shared;

    my $hostname=join(' ', runclientoutput("hostname"));
    my $hosttype=join(' ', runclientoutput("uname -a"));

3467
3468
3469
3470
3471
3472
3473





3474
3475
3476
3477
3478
3479
3480
                    next;
                }
            }
            elsif($1 eq "PSL") {
                if($has_psl) {
                    next;
                }





            }
            elsif($1 eq "socks") {
                next;
            }
            elsif($1 eq "unix-sockets") {
                next if $has_unix;
            }







>
>
>
>
>







3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
                    next;
                }
            }
            elsif($1 eq "PSL") {
                if($has_psl) {
                    next;
                }
            }
            elsif($1 eq "manual") {
                if($has_manual) {
                    next;
                }
            }
            elsif($1 eq "socks") {
                next;
            }
            elsif($1 eq "unix-sockets") {
                next if $has_unix;
            }
3905
3906
3907
3908
3909
3910
3911
3912

3913
3914
3915
3916
3917
3918
3919

    my %cmdhash = getpartattr("client", "command");

    my $out="";

    if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
        #We may slap on --output!
        if (!@validstdout) {

            $out=" --output $CURLOUT ";
        }
    }

    my $serverlogslocktimeout = $defserverlogslocktimeout;
    if($cmdhash{'timeout'}) {
        # test is allowed to override default server logs lock timeout







|
>







3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937

    my %cmdhash = getpartattr("client", "command");

    my $out="";

    if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
        #We may slap on --output!
        if (!@validstdout ||
                ($cmdhash{'option'} && $cmdhash{'option'} =~ /force-output/)) {
            $out=" --output $CURLOUT ";
        }
    }

    my $serverlogslocktimeout = $defserverlogslocktimeout;
    if($cmdhash{'timeout'}) {
        # test is allowed to override default server logs lock timeout
Changes to jni/curl/tests/server/fake_ntlm.c.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "curlx.h" /* from the private lib dir */
#include "getpart.h"
#include "util.h"

/* include memdebug.h last */
#include "memdebug.h"

#define LOGFILE "log/fake_ntlm%d.log"

const char *serverlogfile;

/*
 * Returns an allocated buffer with printable representation of input
 * buffer contents or returns NULL on out of memory condition.
 */







|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "curlx.h" /* from the private lib dir */
#include "getpart.h"
#include "util.h"

/* include memdebug.h last */
#include "memdebug.h"

#define LOGFILE "log/fake_ntlm%ld.log"

const char *serverlogfile;

/*
 * Returns an allocated buffer with printable representation of input
 * buffer contents or returns NULL on out of memory condition.
 */
Changes to jni/curl/tests/server/sockfilt.c.
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
  waitevent = CreateEvent(NULL, TRUE, FALSE, NULL);
  if(!waitevent) {
    errno = ENOMEM;
    return -1;
  }

  /* allocate internal array for the internal data */
  data = malloc(nfds * sizeof(struct select_ws_data));
  if(data == NULL) {
    errno = ENOMEM;
    return -1;
  }

  /* allocate internal array for the internal event handles */
  handles = malloc(nfds * sizeof(HANDLE));
  if(handles == NULL) {
    free(data);
    errno = ENOMEM;
    return -1;
  }

  /* clear internal arrays */
  memset(data, 0, nfds * sizeof(struct select_ws_data));
  memset(handles, 0, nfds * sizeof(HANDLE));

  /* loop over the handles in the input descriptor sets */
  for(fds = 0; fds < nfds; fds++) {
    networkevents = 0;
    handles[nfd] = 0;

    if(FD_ISSET(fds, readfds))
      networkevents |= FD_READ|FD_ACCEPT|FD_CLOSE;







|






|






<
<
<
<







723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743




744
745
746
747
748
749
750
  waitevent = CreateEvent(NULL, TRUE, FALSE, NULL);
  if(!waitevent) {
    errno = ENOMEM;
    return -1;
  }

  /* allocate internal array for the internal data */
  data = calloc(nfds, sizeof(struct select_ws_data));
  if(data == NULL) {
    errno = ENOMEM;
    return -1;
  }

  /* allocate internal array for the internal event handles */
  handles = calloc(nfds, sizeof(HANDLE));
  if(handles == NULL) {
    free(data);
    errno = ENOMEM;
    return -1;
  }





  /* loop over the handles in the input descriptor sets */
  for(fds = 0; fds < nfds; fds++) {
    networkevents = 0;
    handles[nfd] = 0;

    if(FD_ISSET(fds, readfds))
      networkevents |= FD_READ|FD_ACCEPT|FD_CLOSE;
Changes to jni/curl/tests/testcurl.1.
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH testcurl.pl 1 "October 22, 2016" "Curl 7.59.0" "testcurl"

.SH NAME
testcurl.pl \- (automatically) test curl
.SH SYNOPSIS
.B testcurl.pl [options] [dir] > output
.SH DESCRIPTION
\fItestcurl.pl\fP is the master script to use for automatic testing of curl







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.\" * furnished to do so, under the terms of the COPYING file.
.\" *
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
.\" * KIND, either express or implied.
.\" *
.\" **************************************************************************
.\"
.TH testcurl.pl 1 "October 22, 2016" "Curl 7.60.0" "testcurl"

.SH NAME
testcurl.pl \- (automatically) test curl
.SH SYNOPSIS
.B testcurl.pl [options] [dir] > output
.SH DESCRIPTION
\fItestcurl.pl\fP is the master script to use for automatic testing of curl
Changes to jni/curl/tests/testcurl.pl.
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

# testcurl.pl is the master script to use for automatic testing of curl
# directly off its source repository.
# This is written for the purpose of being run from a crontab job or similar
# at a regular interval. The output is suitable to be mailed to
# curl-autocompile@haxx.se to be dealt with automatically (make sure the
# subject includes the word "autobuild" as the mail gets silently discarded
# otherwise).  The most current build status (with a resonable backlog) will
# be published on the curl site, at https://curl.haxx.se/auto/

# USAGE:
# testcurl.pl [options] [curl-daily-name] > output

# Options:
#







|







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

# testcurl.pl is the master script to use for automatic testing of curl
# directly off its source repository.
# This is written for the purpose of being run from a crontab job or similar
# at a regular interval. The output is suitable to be mailed to
# curl-autocompile@haxx.se to be dealt with automatically (make sure the
# subject includes the word "autobuild" as the mail gets silently discarded
# otherwise).  The most current build status (with a reasonable backlog) will
# be published on the curl site, at https://curl.haxx.se/auto/

# USAGE:
# testcurl.pl [options] [curl-daily-name] > output

# Options:
#
Changes to jni/curl/tests/unit/Makefile.in.
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
	unit1303$(EXEEXT) unit1304$(EXEEXT) unit1305$(EXEEXT) \
	unit1307$(EXEEXT) unit1308$(EXEEXT) unit1309$(EXEEXT) \
	unit1323$(EXEEXT) unit1330$(EXEEXT) unit1394$(EXEEXT) \
	unit1395$(EXEEXT) unit1396$(EXEEXT) unit1397$(EXEEXT) \
	unit1398$(EXEEXT) unit1399$(EXEEXT) unit1600$(EXEEXT) \
	unit1601$(EXEEXT) unit1602$(EXEEXT) unit1603$(EXEEXT) \
	unit1604$(EXEEXT) unit1605$(EXEEXT) unit1606$(EXEEXT) \
	unit1607$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am__objects_1 = ../libtest/unit1300-first.$(OBJEXT)
am_unit1300_OBJECTS = unit1300-unit1300.$(OBJEXT) $(am__objects_1)
unit1300_OBJECTS = $(am_unit1300_OBJECTS)
unit1300_LDADD = $(LDADD)
unit1300_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \







|







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
	unit1303$(EXEEXT) unit1304$(EXEEXT) unit1305$(EXEEXT) \
	unit1307$(EXEEXT) unit1308$(EXEEXT) unit1309$(EXEEXT) \
	unit1323$(EXEEXT) unit1330$(EXEEXT) unit1394$(EXEEXT) \
	unit1395$(EXEEXT) unit1396$(EXEEXT) unit1397$(EXEEXT) \
	unit1398$(EXEEXT) unit1399$(EXEEXT) unit1600$(EXEEXT) \
	unit1601$(EXEEXT) unit1602$(EXEEXT) unit1603$(EXEEXT) \
	unit1604$(EXEEXT) unit1605$(EXEEXT) unit1606$(EXEEXT) \
	unit1607$(EXEEXT) unit1608$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am__objects_1 = ../libtest/unit1300-first.$(OBJEXT)
am_unit1300_OBJECTS = unit1300-unit1300.$(OBJEXT) $(am__objects_1)
unit1300_OBJECTS = $(am_unit1300_OBJECTS)
unit1300_LDADD = $(LDADD)
unit1300_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
280
281
282
283
284
285
286






287
288
289
290
291
292
293
	$(top_builddir)/lib/libcurlu.la
am__objects_25 = ../libtest/unit1607-first.$(OBJEXT)
am_unit1607_OBJECTS = unit1607-unit1607.$(OBJEXT) $(am__objects_25)
unit1607_OBJECTS = $(am_unit1607_OBJECTS)
unit1607_LDADD = $(LDADD)
unit1607_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
	$(top_builddir)/lib/libcurlu.la






AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;







>
>
>
>
>
>







280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
	$(top_builddir)/lib/libcurlu.la
am__objects_25 = ../libtest/unit1607-first.$(OBJEXT)
am_unit1607_OBJECTS = unit1607-unit1607.$(OBJEXT) $(am__objects_25)
unit1607_OBJECTS = $(am_unit1607_OBJECTS)
unit1607_LDADD = $(LDADD)
unit1607_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
	$(top_builddir)/lib/libcurlu.la
am__objects_26 = ../libtest/unit1608-first.$(OBJEXT)
am_unit1608_OBJECTS = unit1608-unit1608.$(OBJEXT) $(am__objects_26)
unit1608_OBJECTS = $(am_unit1608_OBJECTS)
unit1608_LDADD = $(LDADD)
unit1608_DEPENDENCIES = $(top_builddir)/src/libcurltool.la \
	$(top_builddir)/lib/libcurlu.la
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
	$(unit1303_SOURCES) $(unit1304_SOURCES) $(unit1305_SOURCES) \
	$(unit1307_SOURCES) $(unit1308_SOURCES) $(unit1309_SOURCES) \
	$(unit1323_SOURCES) $(unit1330_SOURCES) $(unit1394_SOURCES) \
	$(unit1395_SOURCES) $(unit1396_SOURCES) $(unit1397_SOURCES) \
	$(unit1398_SOURCES) $(unit1399_SOURCES) $(unit1600_SOURCES) \
	$(unit1601_SOURCES) $(unit1602_SOURCES) $(unit1603_SOURCES) \
	$(unit1604_SOURCES) $(unit1605_SOURCES) $(unit1606_SOURCES) \
	$(unit1607_SOURCES)
DIST_SOURCES = $(unit1300_SOURCES) $(unit1301_SOURCES) \
	$(unit1302_SOURCES) $(unit1303_SOURCES) $(unit1304_SOURCES) \
	$(unit1305_SOURCES) $(unit1307_SOURCES) $(unit1308_SOURCES) \
	$(unit1309_SOURCES) $(unit1323_SOURCES) $(unit1330_SOURCES) \
	$(unit1394_SOURCES) $(unit1395_SOURCES) $(unit1396_SOURCES) \
	$(unit1397_SOURCES) $(unit1398_SOURCES) $(unit1399_SOURCES) \
	$(unit1600_SOURCES) $(unit1601_SOURCES) $(unit1602_SOURCES) \
	$(unit1603_SOURCES) $(unit1604_SOURCES) $(unit1605_SOURCES) \
	$(unit1606_SOURCES) $(unit1607_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,







|








|







328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
	$(unit1303_SOURCES) $(unit1304_SOURCES) $(unit1305_SOURCES) \
	$(unit1307_SOURCES) $(unit1308_SOURCES) $(unit1309_SOURCES) \
	$(unit1323_SOURCES) $(unit1330_SOURCES) $(unit1394_SOURCES) \
	$(unit1395_SOURCES) $(unit1396_SOURCES) $(unit1397_SOURCES) \
	$(unit1398_SOURCES) $(unit1399_SOURCES) $(unit1600_SOURCES) \
	$(unit1601_SOURCES) $(unit1602_SOURCES) $(unit1603_SOURCES) \
	$(unit1604_SOURCES) $(unit1605_SOURCES) $(unit1606_SOURCES) \
	$(unit1607_SOURCES) $(unit1608_SOURCES)
DIST_SOURCES = $(unit1300_SOURCES) $(unit1301_SOURCES) \
	$(unit1302_SOURCES) $(unit1303_SOURCES) $(unit1304_SOURCES) \
	$(unit1305_SOURCES) $(unit1307_SOURCES) $(unit1308_SOURCES) \
	$(unit1309_SOURCES) $(unit1323_SOURCES) $(unit1330_SOURCES) \
	$(unit1394_SOURCES) $(unit1395_SOURCES) $(unit1396_SOURCES) \
	$(unit1397_SOURCES) $(unit1398_SOURCES) $(unit1399_SOURCES) \
	$(unit1600_SOURCES) $(unit1601_SOURCES) $(unit1602_SOURCES) \
	$(unit1603_SOURCES) $(unit1604_SOURCES) $(unit1605_SOURCES) \
	$(unit1606_SOURCES) $(unit1607_SOURCES) $(unit1608_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
628
629
630
631
632
633
634
635

636
637
638
639
640
641
642


# These are all unit test programs
UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307	\
 unit1308 unit1309 unit1323 \
 unit1330 unit1394 unit1395 unit1396 unit1397 unit1398	\
 unit1399	\
 unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606 unit1607


unit1300_SOURCES = unit1300.c $(UNITFILES)
unit1300_CPPFLAGS = $(AM_CPPFLAGS)
unit1301_SOURCES = unit1301.c $(UNITFILES)
unit1301_CPPFLAGS = $(AM_CPPFLAGS)
unit1302_SOURCES = unit1302.c $(UNITFILES)
unit1302_CPPFLAGS = $(AM_CPPFLAGS)







|
>







634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649


# These are all unit test programs
UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307	\
 unit1308 unit1309 unit1323 \
 unit1330 unit1394 unit1395 unit1396 unit1397 unit1398	\
 unit1399	\
 unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606 unit1607 \
 unit1608

unit1300_SOURCES = unit1300.c $(UNITFILES)
unit1300_CPPFLAGS = $(AM_CPPFLAGS)
unit1301_SOURCES = unit1301.c $(UNITFILES)
unit1301_CPPFLAGS = $(AM_CPPFLAGS)
unit1302_SOURCES = unit1302.c $(UNITFILES)
unit1302_CPPFLAGS = $(AM_CPPFLAGS)
683
684
685
686
687
688
689


690
691
692
693
694
695
696
unit1604_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
unit1605_SOURCES = unit1605.c $(UNITFILES)
unit1605_CPPFLAGS = $(AM_CPPFLAGS)
unit1606_SOURCES = unit1606.c $(UNITFILES)
unit1606_CPPFLAGS = $(AM_CPPFLAGS)
unit1607_SOURCES = unit1607.c $(UNITFILES)
unit1607_CPPFLAGS = $(AM_CPPFLAGS)


all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \







>
>







690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
unit1604_CPPFLAGS = $(AM_CPPFLAGS) $(LIBMETALINK_CPPFLAGS)
unit1605_SOURCES = unit1605.c $(UNITFILES)
unit1605_CPPFLAGS = $(AM_CPPFLAGS)
unit1606_SOURCES = unit1606.c $(UNITFILES)
unit1606_CPPFLAGS = $(AM_CPPFLAGS)
unit1607_SOURCES = unit1607.c $(UNITFILES)
unit1607_CPPFLAGS = $(AM_CPPFLAGS)
unit1608_SOURCES = unit1608.c $(UNITFILES)
unit1608_CPPFLAGS = $(AM_CPPFLAGS)
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
882
883
884
885
886
887
888






889
890
891
892
893
894
895
	$(AM_V_CCLD)$(LINK) $(unit1606_OBJECTS) $(unit1606_LDADD) $(LIBS)
../libtest/unit1607-first.$(OBJEXT): ../libtest/$(am__dirstamp) \
	../libtest/$(DEPDIR)/$(am__dirstamp)

unit1607$(EXEEXT): $(unit1607_OBJECTS) $(unit1607_DEPENDENCIES) $(EXTRA_unit1607_DEPENDENCIES) 
	@rm -f unit1607$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(unit1607_OBJECTS) $(unit1607_LDADD) $(LIBS)







mostlyclean-compile:
	-rm -f *.$(OBJEXT)
	-rm -f ../libtest/*.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c







>
>
>
>
>
>







891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
	$(AM_V_CCLD)$(LINK) $(unit1606_OBJECTS) $(unit1606_LDADD) $(LIBS)
../libtest/unit1607-first.$(OBJEXT): ../libtest/$(am__dirstamp) \
	../libtest/$(DEPDIR)/$(am__dirstamp)

unit1607$(EXEEXT): $(unit1607_OBJECTS) $(unit1607_DEPENDENCIES) $(EXTRA_unit1607_DEPENDENCIES) 
	@rm -f unit1607$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(unit1607_OBJECTS) $(unit1607_LDADD) $(LIBS)
../libtest/unit1608-first.$(OBJEXT): ../libtest/$(am__dirstamp) \
	../libtest/$(DEPDIR)/$(am__dirstamp)

unit1608$(EXEEXT): $(unit1608_OBJECTS) $(unit1608_DEPENDENCIES) $(EXTRA_unit1608_DEPENDENCIES) 
	@rm -f unit1608$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(unit1608_OBJECTS) $(unit1608_LDADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)
	-rm -f ../libtest/*.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c
915
916
917
918
919
920
921

922
923
924
925
926
927
928
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1601-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1602-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1603-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1604-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1605-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1606-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1607-first.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1300-unit1300.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1301-unit1301.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1302-unit1302.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1303-unit1303.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1304-unit1304.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1305-unit1305.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1307-unit1307.Po@am__quote@







>







930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1601-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1602-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1603-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1604-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1605-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1606-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1607-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@../libtest/$(DEPDIR)/unit1608-first.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1300-unit1300.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1301-unit1301.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1302-unit1302.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1303-unit1303.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1304-unit1304.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1305-unit1305.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1307-unit1307.Po@am__quote@
940
941
942
943
944
945
946

947
948
949
950
951
952
953
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1601-unit1601.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1602-unit1602.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1603-unit1603.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1604-unit1604.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1605-unit1605.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1606-unit1606.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1607-unit1607.Po@am__quote@


.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@







>







956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1601-unit1601.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1602-unit1602.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1603-unit1603.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1604-unit1604.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1605-unit1605.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1606-unit1606.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1607-unit1607.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit1608-unit1608.Po@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1665
1666
1667
1668
1669
1670
1671




























1672
1673
1674
1675
1676
1677
1678
../libtest/unit1607-first.obj: ../libtest/first.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1607_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1607-first.obj -MD -MP -MF ../libtest/$(DEPDIR)/unit1607-first.Tpo -c -o ../libtest/unit1607-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1607-first.Tpo ../libtest/$(DEPDIR)/unit1607-first.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1607-first.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1607_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1607-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`





























mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
../libtest/unit1607-first.obj: ../libtest/first.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1607_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1607-first.obj -MD -MP -MF ../libtest/$(DEPDIR)/unit1607-first.Tpo -c -o ../libtest/unit1607-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1607-first.Tpo ../libtest/$(DEPDIR)/unit1607-first.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1607-first.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1607_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1607-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`

unit1608-unit1608.o: unit1608.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1608_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1608-unit1608.o -MD -MP -MF $(DEPDIR)/unit1608-unit1608.Tpo -c -o unit1608-unit1608.o `test -f 'unit1608.c' || echo '$(srcdir)/'`unit1608.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/unit1608-unit1608.Tpo $(DEPDIR)/unit1608-unit1608.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='unit1608.c' object='unit1608-unit1608.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1608_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1608-unit1608.o `test -f 'unit1608.c' || echo '$(srcdir)/'`unit1608.c

unit1608-unit1608.obj: unit1608.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1608_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT unit1608-unit1608.obj -MD -MP -MF $(DEPDIR)/unit1608-unit1608.Tpo -c -o unit1608-unit1608.obj `if test -f 'unit1608.c'; then $(CYGPATH_W) 'unit1608.c'; else $(CYGPATH_W) '$(srcdir)/unit1608.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/unit1608-unit1608.Tpo $(DEPDIR)/unit1608-unit1608.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='unit1608.c' object='unit1608-unit1608.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1608_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unit1608-unit1608.obj `if test -f 'unit1608.c'; then $(CYGPATH_W) 'unit1608.c'; else $(CYGPATH_W) '$(srcdir)/unit1608.c'; fi`

../libtest/unit1608-first.o: ../libtest/first.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1608_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1608-first.o -MD -MP -MF ../libtest/$(DEPDIR)/unit1608-first.Tpo -c -o ../libtest/unit1608-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1608-first.Tpo ../libtest/$(DEPDIR)/unit1608-first.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1608-first.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1608_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1608-first.o `test -f '../libtest/first.c' || echo '$(srcdir)/'`../libtest/first.c

../libtest/unit1608-first.obj: ../libtest/first.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1608_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ../libtest/unit1608-first.obj -MD -MP -MF ../libtest/$(DEPDIR)/unit1608-first.Tpo -c -o ../libtest/unit1608-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) ../libtest/$(DEPDIR)/unit1608-first.Tpo ../libtest/$(DEPDIR)/unit1608-first.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='../libtest/first.c' object='../libtest/unit1608-first.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(unit1608_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ../libtest/unit1608-first.obj `if test -f '../libtest/first.c'; then $(CYGPATH_W) '../libtest/first.c'; else $(CYGPATH_W) '$(srcdir)/../libtest/first.c'; fi`

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
Changes to jni/curl/tests/unit/Makefile.inc.
1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
# these files are used in every single unit test program

UNITFILES = curlcheck.h \
 ../libtest/test.h \
 ../libtest/first.c

# These are all unit test programs
UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307	\
 unit1308 unit1309 unit1323 \
 unit1330 unit1394 unit1395 unit1396 unit1397 unit1398	\
 unit1399	\
 unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606 unit1607


unit1300_SOURCES = unit1300.c $(UNITFILES)
unit1300_CPPFLAGS = $(AM_CPPFLAGS)

unit1301_SOURCES = unit1301.c $(UNITFILES)
unit1301_CPPFLAGS = $(AM_CPPFLAGS)












|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# these files are used in every single unit test program

UNITFILES = curlcheck.h \
 ../libtest/test.h \
 ../libtest/first.c

# These are all unit test programs
UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307	\
 unit1308 unit1309 unit1323 \
 unit1330 unit1394 unit1395 unit1396 unit1397 unit1398	\
 unit1399	\
 unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606 unit1607 \
 unit1608

unit1300_SOURCES = unit1300.c $(UNITFILES)
unit1300_CPPFLAGS = $(AM_CPPFLAGS)

unit1301_SOURCES = unit1301.c $(UNITFILES)
unit1301_CPPFLAGS = $(AM_CPPFLAGS)

84
85
86
87
88
89
90



unit1605_CPPFLAGS = $(AM_CPPFLAGS)

unit1606_SOURCES = unit1606.c $(UNITFILES)
unit1606_CPPFLAGS = $(AM_CPPFLAGS)

unit1607_SOURCES = unit1607.c $(UNITFILES)
unit1607_CPPFLAGS = $(AM_CPPFLAGS)










>
>
>
85
86
87
88
89
90
91
92
93
94
unit1605_CPPFLAGS = $(AM_CPPFLAGS)

unit1606_SOURCES = unit1606.c $(UNITFILES)
unit1606_CPPFLAGS = $(AM_CPPFLAGS)

unit1607_SOURCES = unit1607.c $(UNITFILES)
unit1607_CPPFLAGS = $(AM_CPPFLAGS)

unit1608_SOURCES = unit1608.c $(UNITFILES)
unit1608_CPPFLAGS = $(AM_CPPFLAGS)
Changes to jni/curl/tests/unit/unit1309.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2011, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
UNITTEST_START

/* number of nodes to add to the splay tree */
#define NUM_NODES 50

  struct Curl_tree *root, *removed;
  struct Curl_tree nodes[NUM_NODES*3];

  int rc;
  int i, j;
  struct curltime tv_now = {0, 0};
  root = NULL;              /* the empty tree */

  /* add nodes */
  for(i = 0; i < NUM_NODES; i++) {
    struct curltime key;
    size_t payload;

    key.tv_sec = 0;
    key.tv_usec = (541*i)%1023;
    payload = (size_t) key.tv_usec;

    /* for simplicity */
    nodes[i].payload = CURLX_INTEGER_TO_POINTER_CAST(payload);
    root = Curl_splayinsert(key, root, &nodes[i]);
  }

  puts("Result:");
  splayprint(root, 0, 1);

  for(i = 0; i < NUM_NODES; i++) {
    int rem = (i + 7)%NUM_NODES;
    printf("Tree look:\n");
    splayprint(root, 0, 1);
    printf("remove pointer %d, payload %ld\n", rem,
           CURLX_POINTER_TO_INTEGER_CAST(nodes[rem].payload));
    rc = Curl_splayremovebyaddr(root, &nodes[rem], &root);
    if(rc) {
      /* failed! */
      printf("remove %d failed!\n", rem);
      fail("remove");
    }
  }

  fail_unless(root == NULL, "tree not empty after removing all nodes");

  /* rebuild tree */
  for(i = 0; i < NUM_NODES; i++) {
    struct curltime key;

    key.tv_sec = 0;
    key.tv_usec = (541*i)%1023;

    /* add some nodes with the same key */
    for(j = 0; j <= i % 3; j++) {
      size_t payload = key.tv_usec*10 + j;
      /* for simplicity */
      nodes[i * 3 + j].payload = CURLX_INTEGER_TO_POINTER_CAST(payload);
      root = Curl_splayinsert(key, root, &nodes[i * 3 + j]);
    }
  }

  removed = NULL;
  for(i = 0; i <= 1100; i += 100) {
    printf("Removing nodes not larger than %d\n", i);
    tv_now.tv_usec = i;
    root = Curl_splaygetbest(tv_now, root, &removed);
    while(removed != NULL) {
      printf("removed payload %ld[%ld]\n",
             CURLX_POINTER_TO_INTEGER_CAST(removed->payload) / 10,
             CURLX_POINTER_TO_INTEGER_CAST(removed->payload) % 10);
      root = Curl_splaygetbest(tv_now, root, &removed);
    }
  }

  fail_unless(root == NULL, "tree not empty when it should be");

UNITTEST_STOP











>








<



|
<
<
|










|
|



















|
<
|










|
|
|







<
<
<
<
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

85
86
87
88


89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142




UNITTEST_START

/* number of nodes to add to the splay tree */
#define NUM_NODES 50

  struct Curl_tree *root, *removed;
  struct Curl_tree nodes[NUM_NODES*3];
  size_t storage[NUM_NODES*3];
  int rc;
  int i, j;
  struct curltime tv_now = {0, 0};
  root = NULL;              /* the empty tree */

  /* add nodes */
  for(i = 0; i < NUM_NODES; i++) {
    struct curltime key;


    key.tv_sec = 0;
    key.tv_usec = (541*i)%1023;
    storage[i] = key.tv_usec;


    nodes[i].payload = &storage[i];
    root = Curl_splayinsert(key, root, &nodes[i]);
  }

  puts("Result:");
  splayprint(root, 0, 1);

  for(i = 0; i < NUM_NODES; i++) {
    int rem = (i + 7)%NUM_NODES;
    printf("Tree look:\n");
    splayprint(root, 0, 1);
    printf("remove pointer %d, payload %zu\n", rem,
           *(size_t *)nodes[rem].payload);
    rc = Curl_splayremovebyaddr(root, &nodes[rem], &root);
    if(rc) {
      /* failed! */
      printf("remove %d failed!\n", rem);
      fail("remove");
    }
  }

  fail_unless(root == NULL, "tree not empty after removing all nodes");

  /* rebuild tree */
  for(i = 0; i < NUM_NODES; i++) {
    struct curltime key;

    key.tv_sec = 0;
    key.tv_usec = (541*i)%1023;

    /* add some nodes with the same key */
    for(j = 0; j <= i % 3; j++) {
      storage[i * 3 + j] = key.tv_usec*10 + j;

      nodes[i * 3 + j].payload = &storage[i * 3 + j];
      root = Curl_splayinsert(key, root, &nodes[i * 3 + j]);
    }
  }

  removed = NULL;
  for(i = 0; i <= 1100; i += 100) {
    printf("Removing nodes not larger than %d\n", i);
    tv_now.tv_usec = i;
    root = Curl_splaygetbest(tv_now, root, &removed);
    while(removed != NULL) {
      printf("removed payload %zu[%zu]\n",
             (*(size_t *)removed->payload) / 10,
             (*(size_t *)removed->payload) % 10);
      root = Curl_splaygetbest(tv_now, root, &removed);
    }
  }

  fail_unless(root == NULL, "tree not empty when it should be");

UNITTEST_STOP




Changes to jni/curl/tests/unit/unit1395.c.
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
  };

  for(i = 0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
    char *out = Curl_dedotdotify(pairs[i].input);
    abort_unless(out != NULL, "returned NULL!");

    if(strcmp(out, pairs[i].output)) {
      fprintf(stderr, "Test %d: '%s' gave '%s' instead of '%s'\n",
              i, pairs[i].input, out, pairs[i].output);
      fail("Test case output mismatched");
      fails++;
    }
    else
      fprintf(stderr, "Test %d: OK\n", i);
    free(out);
  }

  fail_if(fails, "output mismatched");

UNITTEST_STOP







|





|






75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
  };

  for(i = 0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
    char *out = Curl_dedotdotify(pairs[i].input);
    abort_unless(out != NULL, "returned NULL!");

    if(strcmp(out, pairs[i].output)) {
      fprintf(stderr, "Test %u: '%s' gave '%s' instead of '%s'\n",
              i, pairs[i].input, out, pairs[i].output);
      fail("Test case output mismatched");
      fails++;
    }
    else
      fprintf(stderr, "Test %u: OK\n", i);
    free(out);
  }

  fail_if(fails, "output mismatched");

UNITTEST_STOP
Added jni/curl/tests/unit/unit1608.c.












































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.haxx.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 ***************************************************************************/
#include "curlcheck.h"

#include "hostip.h"

#define NUM_ADDRS 8
static struct Curl_addrinfo addrs[NUM_ADDRS];

static CURLcode unit_setup(void)
{
  int i;
  for(i = 0; i < NUM_ADDRS - 1; i++) {
    addrs[i].ai_next = &addrs[i + 1];
  }

  return CURLE_OK;
}

static void unit_stop(void)
{

}

UNITTEST_START
{
  int i;
  CURLcode code;
  struct Curl_addrinfo* addrhead = addrs;

  struct Curl_easy *easy = curl_easy_init();
  abort_unless(easy, "out of memory");

  code = curl_easy_setopt(easy, CURLOPT_DNS_SHUFFLE_ADDRESSES, 1L);
  abort_unless(code == CURLE_OK, "curl_easy_setopt failed");

  /* Shuffle repeatedly and make sure that the list changes */
  for(i = 0; i < 10; i++) {
    if(CURLE_OK != Curl_shuffle_addr(easy, &addrhead))
      break;
    if(addrhead != addrs)
      break;
  }

  curl_easy_cleanup(easy);

  abort_unless(addrhead != addrs, "addresses are not being reordered");

  return 0;
}
UNITTEST_STOP
Changes to jni/curl/winbuild/BUILD.WINDOWS.txt.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
   strongly recommended.

   VC++ is also part of the Windows Platform SDK. You do not have to install
   the full Visual Studio or Visual C++ if all you want is to build curl.

   The latest Platform SDK can be downloaded freely from:

    https://msdn.microsoft.com/en-us/windows/bb980924

   If you are building with VC6 then you will also need the February 2003
   Edition of the Platform SDK which can be downloaded from:

    https://www.microsoft.com/en-us/download/details.aspx?id=12261

   If you wish to support zlib, openssl, c-ares, ssh2, you will have to download







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
   strongly recommended.

   VC++ is also part of the Windows Platform SDK. You do not have to install
   the full Visual Studio or Visual C++ if all you want is to build curl.

   The latest Platform SDK can be downloaded freely from:

    https://developer.microsoft.com/en-us/windows/downloads/sdk-archive

   If you are building with VC6 then you will also need the February 2003
   Edition of the Platform SDK which can be downloaded from:

    https://www.microsoft.com/en-us/download/details.aspx?id=12261

   If you wish to support zlib, openssl, c-ares, ssh2, you will have to download
40
41
42
43
44
45
46
47
48
49



50
51



52

53


54
55

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87







88
89
90
91
92
93
94
 When you check out code git and build it, as opposed from a released source
 code archive, you need to first run the "buildconf.bat" batch file (present
 in the source code root directory) to set things up.

Building with Visual C++
========================

Open a Visual Studio Command prompt or the SDK CMD shell.

    Using the CMD Shell:



     choose the right environment via the setenv command (see setenv /?)
     for the full list of options. setenv /xp /x86 /release for example.





    Using the Visual Studio command prompt Shell:


     Everything is already pre-configured by calling one of the command
     prompt.


Once you are in the console, go to the winbuild directory in the Curl
sources:
    cd curl-src\winbuild

Then you can call nmake /f Makefile.vc with the desired options (see below).
The builds will be in the top src directory, builds\ directory, in
a directory named using the options given to the nmake call.

nmake /f Makefile.vc mode=<static or dll> <options>

where <options> is one or many of:
  VC=<6,7,8,9,10,11,12,14,15>  - VC versions
  WITH_DEVEL=<path>            - Paths for the development files (SSL, zlib, etc.)
                                 Defaults to sibbling directory deps: ../deps
                                 Libraries can be fetched at http://windows.php.net/downloads/php-sdk/deps/
                                 Uncompress them into the deps folder.
  WITH_SSL=<dll or static>     - Enable OpenSSL support, DLL or static
  WITH_NGHTTP2=<dll or static> - Enable HTTP/2 support, DLL or static
  WITH_MBEDTLS=<dll or static> - Enable mbedTLS support, DLL or static
  WITH_CARES=<dll or static>   - Enable c-ares support, DLL or static
  WITH_ZLIB=<dll or static>    - Enable zlib support, DLL or static
  WITH_SSH2=<dll or static>    - Enable libSSH2 support, DLL or static
  ENABLE_SSPI=<yes or no>      - Enable SSPI support, defaults to yes
  ENABLE_IPV6=<yes or no>      - Enable IPv6, defaults to yes
  ENABLE_IDN=<yes or no>       - Enable use of Windows IDN APIs, defaults to yes
                                 Requires Windows Vista or later, or installation from:
                                 https://www.microsoft.com/downloads/details.aspx?FamilyID=AD6158D7-DDBA-416A-9109-07607425A815
  ENABLE_WINSSL=<yes or no>    - Enable native Windows SSL support, defaults to yes
  GEN_PDB=<yes or no>          - Generate Program Database (debug symbols for release build)
  DEBUG=<yes or no>            - Debug builds
  MACHINE=<x86 or x64>         - Target architecture (default is x86)








Static linking of Microsoft's C RunTime (CRT):
==============================================
If you are using mode=static nmake will create and link to the static build of
libcurl but *not* the static CRT. If you must you can force nmake to link in
the static CRT by passing RTLIBCFG=static. Typically you shouldn't use that
option, and nmake will default to the DLL CRT. RTLIBCFG is rarely used and







|

|
>
>
>
|
|
>
>
>

>
|
>
>
|
|
>












|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
|
|
|
>
>
>
>
>
>
>







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
 When you check out code git and build it, as opposed from a released source
 code archive, you need to first run the "buildconf.bat" batch file (present
 in the source code root directory) to set things up.

Building with Visual C++
========================

Open a Visual Studio Command prompt:

     Using the 'Developer Command Prompt for VS <version>' menu entry:
       where version is the Visual Studio version. The developer prompt at default
       uses the x86 mode. It is required to call Vcvarsall.bat to setup the prompt
       for the machine type you want, using Vcvarsall.bat.
       This type of command prompt may not exist in all Visual Studio versions.

       For more information, check:
         https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs
         https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line

     Using the 'VS <version> <platform> <type> Command Prompt' menu entry:
       where version is the Visual Studio version, platform is e.g. x64
       and type Native of Cross platform build.  This type of command prompt
       may not exist in all Visual Studio versions.

       See also:
         https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx

Once you are in the console, go to the winbuild directory in the Curl
sources:
    cd curl-src\winbuild

Then you can call nmake /f Makefile.vc with the desired options (see below).
The builds will be in the top src directory, builds\ directory, in
a directory named using the options given to the nmake call.

nmake /f Makefile.vc mode=<static or dll> <options>

where <options> is one or many of:
  VC=<6,7,8,9,10,11,12,14,15>    - VC versions
  WITH_DEVEL=<path>              - Paths for the development files (SSL, zlib, etc.)
                                   Defaults to sibbling directory deps: ../deps
                                   Libraries can be fetched at http://windows.php.net/downloads/php-sdk/deps/
                                   Uncompress them into the deps folder.
  WITH_SSL=<dll or static>       - Enable OpenSSL support, DLL or static
  WITH_NGHTTP2=<dll or static>   - Enable HTTP/2 support, DLL or static
  WITH_MBEDTLS=<dll or static>   - Enable mbedTLS support, DLL or static
  WITH_CARES=<dll or static>     - Enable c-ares support, DLL or static
  WITH_ZLIB=<dll or static>      - Enable zlib support, DLL or static
  WITH_SSH2=<dll or static>      - Enable libSSH2 support, DLL or static
  ENABLE_SSPI=<yes or no>        - Enable SSPI support, defaults to yes
  ENABLE_IPV6=<yes or no>        - Enable IPv6, defaults to yes
  ENABLE_IDN=<yes or no>         - Enable use of Windows IDN APIs, defaults to yes
                                   Requires Windows Vista or later

  ENABLE_WINSSL=<yes or no>      - Enable native Windows SSL support, defaults to yes
  GEN_PDB=<yes or no>            - Generate Program Database (debug symbols for release build)
  DEBUG=<yes or no>              - Debug builds
  MACHINE=<x86 or x64>           - Target architecture (default is x86)
  CARES_PATH=<path to cares>     - Custom path for c-ares
  MBEDTLS_PATH=<path to mbedTLS> - Custom path for mbedTLS
  NGHTTP2_PATH=<path to HTTP/2>  - Custom path for nghttp2
  SSH2_PATH=<path to libSSH2>    - Custom path for libSSH2
  SSL_PATH=<path to OpenSSL>     - Custom path for OpenSSL
  ZLIB_PATH=<path to zlib>       - Custom path for zlib


Static linking of Microsoft's C RunTime (CRT):
==============================================
If you are using mode=static nmake will create and link to the static build of
libcurl but *not* the static CRT. If you must you can force nmake to link in
the static CRT by passing RTLIBCFG=static. Typically you shouldn't use that
option, and nmake will default to the DLL CRT. RTLIBCFG is rarely used and
Changes to jni/curl/winbuild/Makefile.vc.
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59






60
61
62
63
64
65
66

#######################
# Usage
#

!MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options>
!MESSAGE where <options> is one or many of:
!MESSAGE   VC=<6,7,8,9,10,11,12,14,15>  - VC versions
!MESSAGE   WITH_DEVEL=<path>            - Paths for the development files (SSL, zlib, etc.)
!MESSAGE                                  Defaults to sibbling directory deps: ../deps
!MESSAGE                                  Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/
!MESSAGE                                  Uncompress them into the deps folder.
!MESSAGE   WITH_SSL=<dll or static>     - Enable OpenSSL support, DLL or static
!MESSAGE   WITH_NGHTTP2=<dll or static> - Enable HTTP/2 support, DLL or static
!MESSAGE   WITH_CARES=<dll or static>   - Enable c-ares support, DLL or static
!MESSAGE   WITH_ZLIB=<dll or static>    - Enable zlib support, DLL or static
!MESSAGE   WITH_SSH2=<dll or static>    - Enable libSSH2 support, DLL or static
!MESSAGE   WITH_MBEDTLS=<dll or static> - Enable mbedTLS support, DLL or static
!MESSAGE   ENABLE_IDN=<yes or no>       - Enable use of Windows IDN APIs, defaults to yes
!MESSAGE                                  Requires Windows Vista or later, or installation from:
!MESSAGE                                  https://www.microsoft.com/en-us/download/details.aspx?id=734
!MESSAGE   ENABLE_IPV6=<yes or no>      - Enable IPv6, defaults to yes
!MESSAGE   ENABLE_SSPI=<yes or no>      - Enable SSPI support, defaults to yes
!MESSAGE   ENABLE_WINSSL=<yes or no>    - Enable native Windows SSL support, defaults to yes
!MESSAGE   GEN_PDB=<yes or no>          - Generate Program Database (debug symbols for release build)
!MESSAGE   DEBUG=<yes or no>            - Debug builds
!MESSAGE   MACHINE=<x86 or x64>         - Target architecture (default x64 on AMD64, x86 on others)






!ERROR please choose a valid mode

!ENDIF

!INCLUDE "../lib/Makefile.inc"
LIBCURL_OBJS=$(CSOURCES:.c=.obj)








|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
|
|
|
|
|
>
>
>
>
>
>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

#######################
# Usage
#

!MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options>
!MESSAGE where <options> is one or many of:
!MESSAGE   VC=<6,7,8,9,10,11,12,14,15>    - VC versions
!MESSAGE   WITH_DEVEL=<path>              - Paths for the development files (SSL, zlib, etc.)
!MESSAGE                                    Defaults to sibbling directory deps: ../deps
!MESSAGE                                    Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/
!MESSAGE                                    Uncompress them into the deps folder.
!MESSAGE   WITH_SSL=<dll or static>       - Enable OpenSSL support, DLL or static
!MESSAGE   WITH_NGHTTP2=<dll or static>   - Enable HTTP/2 support, DLL or static
!MESSAGE   WITH_CARES=<dll or static>     - Enable c-ares support, DLL or static
!MESSAGE   WITH_ZLIB=<dll or static>      - Enable zlib support, DLL or static
!MESSAGE   WITH_SSH2=<dll or static>      - Enable libSSH2 support, DLL or static
!MESSAGE   WITH_MBEDTLS=<dll or static>   - Enable mbedTLS support, DLL or static
!MESSAGE   ENABLE_IDN=<yes or no>         - Enable use of Windows IDN APIs, defaults to yes
!MESSAGE                                    Requires Windows Vista or later

!MESSAGE   ENABLE_IPV6=<yes or no>        - Enable IPv6, defaults to yes
!MESSAGE   ENABLE_SSPI=<yes or no>        - Enable SSPI support, defaults to yes
!MESSAGE   ENABLE_WINSSL=<yes or no>      - Enable native Windows SSL support, defaults to yes
!MESSAGE   GEN_PDB=<yes or no>            - Generate Program Database (debug symbols for release build)
!MESSAGE   DEBUG=<yes or no>              - Debug builds
!MESSAGE   MACHINE=<x86 or x64>           - Target architecture (default x64 on AMD64, x86 on others)
!MESSAGE   CARES_PATH=<path to cares>     - Custom path for c-ares
!MESSAGE   MBEDTLS_PATH=<path to mbedTLS> - Custom path for mbedTLS
!MESSAGE   NGHTTP2_PATH=<path to HTTP/2>  - Custom path for nghttp2
!MESSAGE   SSH2_PATH=<path to libSSH2>    - Custom path for libSSH2
!MESSAGE   SSL_PATH=<path to OpenSSL>     - Custom path for OpenSSL
!MESSAGE   ZLIB_PATH=<path to zlib>       - Custom path for zlib
!ERROR please choose a valid mode

!ENDIF

!INCLUDE "../lib/Makefile.inc"
LIBCURL_OBJS=$(CSOURCES:.c=.obj)

266
267
268
269
270
271
272



	@SET WITH_NGHTTP2=$(WITH_NGHTTP2)

	@$(MAKE) /NOLOGO /F MakefileBuild.vc

copy_from_lib:
	echo copying .c...
	FOR %%i IN ($(CURLX_CFILES:/=\)) DO copy %%i ..\src\










>
>
>
271
272
273
274
275
276
277
278
279
280
	@SET WITH_NGHTTP2=$(WITH_NGHTTP2)

	@$(MAKE) /NOLOGO /F MakefileBuild.vc

copy_from_lib:
	echo copying .c...
	FOR %%i IN ($(CURLX_CFILES:/=\)) DO copy %%i ..\src\

clean:
	$(MAKE) /NOLOGO /F MakefileBuild.vc $@
Changes to jni/curl/winbuild/MakefileBuild.vc.
66
67
68
69
70
71
72





73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

117


118

119








120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145










146
147
148
149
150
151
152
153










154
155
156
157
158
159
160









161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181










182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211









212
213
214
215
216
217




218


219
220
221
222
223
224
225
226
227
228
229
230
231
232
CC_NODEBUG  = $(CC) /O2 /DNDEBUG
CC_DEBUG    = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
CFLAGS      = /I. /I ../lib /I../include /nologo /W4 /wd4127 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
!ENDIF

LFLAGS     = /nologo /machine:$(MACHINE)
LNKDLL     = link.exe /DLL





LNKLIB     = link.exe /lib

CFLAGS_PDB = /Zi
LFLAGS_PDB = /incremental:no /opt:ref,icf /DEBUG

CFLAGS_LIBCURL_STATIC  = /DCURL_STATICLIB

WIN_LIBS    = ws2_32.lib wldap32.lib advapi32.lib

BASE_NAME              = libcurl
BASE_NAME_DEBUG        = $(BASE_NAME)_debug
BASE_NAME_STATIC       = $(BASE_NAME)_a
BASE_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC)_debug

LIB_NAME_STATIC        = $(BASE_NAME_STATIC).lib
LIB_NAME_STATIC_DEBUG  = $(BASE_NAME_STATIC_DEBUG).lib
LIB_NAME_DLL           = $(BASE_NAME).dll
LIB_NAME_IMP           = $(BASE_NAME).lib
LIB_NAME_DLL_DEBUG     = $(BASE_NAME_DEBUG).dll
LIB_NAME_IMP_DEBUG     = $(BASE_NAME_DEBUG).lib

PDB_NAME_STATIC        = $(BASE_NAME_STATIC).pdb
PDB_NAME_STATIC_DEBUG  = $(BASE_NAME_STATIC_DEBUG).pdb
PDB_NAME_DLL           = $(BASE_NAME).pdb
PDB_NAME_DLL_DEBUG     = $(BASE_NAME_DEBUG).pdb

# CURL Command section
PROGRAM_NAME = curl.exe
CURL_CFLAGS   =  /I../lib /I../include /nologo /W4 /EHsc /DWIN32 /FD /c
CURL_LFLAGS   = /nologo /out:$(DIRDIST)\bin\$(PROGRAM_NAME) /subsystem:console /machine:$(MACHINE)
CURL_RESFLAGS = /i../include

#############################################################
## Nothing more to do below this line!
LIBCURL_SRC_DIR = ..\lib
CURL_SRC_DIR = ..\src

!IFNDEF WITH_DEVEL
WITH_DEVEL          = ../../deps
!ENDIF
DEVEL_INCLUDE  = $(WITH_DEVEL)/include
DEVEL_LIB      = $(WITH_DEVEL)/lib
DEVEL_BIN      = $(WITH_DEVEL)/bin


CFLAGS         = $(CFLAGS) /I"$(DEVEL_INCLUDE)"


LFLAGS         = $(LFLAGS) "/LIBPATH:$(DEVEL_LIB)"











!IF "$(WITH_SSL)"=="dll"
!IF EXISTS("$(DEVEL_LIB)\libssl.lib")
SSL_LIBS     = libssl.lib libcrypto.lib
!ELSE
SSL_LIBS     = libeay32.lib ssleay32.lib
!ENDIF
USE_SSL      = true
SSL          = dll
!ELSEIF "$(WITH_SSL)"=="static"
!IF EXISTS("$(DEVEL_LIB)\libssl.lib")
SSL_LIBS     = libssl.lib libcrypto.lib gdi32.lib user32.lib crypt32.lib
!ELSE
SSL_LIBS     = libeay32.lib ssleay32.lib gdi32.lib user32.lib crypt32.lib
!ENDIF
USE_SSL      = true
SSL          = static
!ENDIF

!IFDEF USE_SSL
SSL_CFLAGS   = /DUSE_OPENSSL /I"$(DEVEL_INCLUDE)/openssl"
!IF EXISTS("$(DEVEL_INCLUDE)\openssl\is_boringssl.h")
SSL_CFLAGS   = $(SSL_CFLAGS) /DHAVE_BORINGSSL
!ENDIF
!ENDIF











!IF "$(WITH_NGHTTP2)"=="dll"
NGHTTP2_CFLAGS   = /DUSE_NGHTTP2
NGHTTP2_LIBS     = nghttp2.lib
!ELSEIF "$(WITH_NGHTTP2)"=="static"
NGHTTP2_CFLAGS   = /DUSE_NGHTTP2 /DNGHTTP2_STATICLIB
NGHTTP2_LIBS     = nghttp2_static.lib
!ENDIF











!IF "$(WITH_MBEDTLS)"=="dll" || "$(WITH_MBEDTLS)"=="static"
USE_MBEDTLS    = true
MBEDTLS        = $(WITH_MBEDTLS)
MBEDTLS_CFLAGS = /DUSE_MBEDTLS
MBEDTLS_LIBS   = mbedtls.lib mbedcrypto.lib mbedx509.lib
!ENDIF











!IF "$(WITH_CARES)"=="dll"
!IF "$(DEBUG)"=="yes"
CARES_LIBS     = caresd.lib
!ELSE
CARES_LIBS     = cares.lib
!ENDIF
USE_CARES      = true
CARES          = dll
!ELSEIF "$(WITH_CARES)"=="static"
!IF "$(DEBUG)"=="yes"
CARES_LIBS     = libcaresd.lib
!ELSE
CARES_LIBS     = libcares.lib
!ENDIF
USE_CARES      = true
CARES          = static
!ENDIF

!IFDEF USE_CARES
CARES_CFLAGS   = /DUSE_ARES /I"$(DEVEL_INCLUDE)/cares"










!ENDIF

# Depending on how zlib is built the libraries have different names, we 
# try to handle them all. 
!IF "$(WITH_ZLIB)"=="dll"
!IF EXISTS("$(DEVEL_LIB)\zlibwapi.lib")
ZLIB_LIBS = zlibwapi.lib
!ELSEIF EXISTS("$(DEVEL_LIB)\zdll.lib")
ZLIB_LIBS   = zdll.lib
!ELSE
ZLIB_LIBS   = zlib.lib
!ENDIF
USE_ZLIB    = true
ZLIB        = dll
!ELSEIF "$(WITH_ZLIB)"=="static"
!IF EXISTS("$(DEVEL_LIB)\zlibstat.lib")
ZLIB_LIBS   = zlibstat.lib
!ELSEIF EXISTS("$(DEVEL_LIB)\zlib.lib")
ZLIB_LIBS   = zlib.lib
!ELSE
ZLIB_LIBS   = zlib_a.lib
!ENDIF
USE_ZLIB    = true
ZLIB        = static
!ENDIF

!IFDEF USE_ZLIB
ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ
!ENDIF











!IF "$(WITH_SSH2)"=="dll"
SSH2_LIBS   = libssh2.lib
USE_SSH2    = true
SSH2        = dll
!ELSEIF "$(WITH_SSH2)"=="static"




SSH2_LIBS   = libssh2_a.lib user32.lib


USE_SSH2    = true
SSH2        = static
!ENDIF

!IFDEF USE_SSH2
SSH2_CFLAGS = /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /DUSE_LIBSSH2
SSH2_CFLAGS = $(SSH2_CFLAGS) /I$(WITH_DEVEL)/include/libssh2
!ENDIF


!IFNDEF USE_IDN
USE_IDN   = true
!ELSEIF "$(USE_IDN)"=="yes"
USE_IDN   = true







>
>
>
>
>
|






|



















|
|
|








|

|
|
<

>
|
>
>
|
>

>
>
>
>
>
>
>
>

|
|





|
|
<
|
<
<

<
<



|
|




>
>
>
>
>
>
>
>
>
>

|


|



>
>
>
>
>
>
>
>
>
>



|



>
>
>
>
>
>
>
>
>




















|
>
>
>
>
>
>
>
>
>
>





|

|







|

|









|


>
>
>
>
>
>
>
>
>






>
>
>
>
|
>
>






|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

146


147


148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
CC_NODEBUG  = $(CC) /O2 /DNDEBUG
CC_DEBUG    = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
CFLAGS      = /I. /I ../lib /I../include /nologo /W4 /wd4127 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
!ENDIF

LFLAGS     = /nologo /machine:$(MACHINE)
LNKDLL     = link.exe /DLL
# Use lib.exe instead of link.exe as link.exe /lib has the following bad habits:
# - optimizing options like /opt:ref raises warnings (at least in Visual Studio 2015)
# - all (including Windows) dependencies are aggregated (as static parts) 
# - link.exe /lib is not documented (anymore) at MSDN
# Instead of id: just create an archive, that contains all objects
LNKLIB     = lib.exe

CFLAGS_PDB = /Zi
LFLAGS_PDB = /incremental:no /opt:ref,icf /DEBUG

CFLAGS_LIBCURL_STATIC  = /DCURL_STATICLIB

WIN_LIBS    = ws2_32.lib wldap32.lib advapi32.lib crypt32.lib

BASE_NAME              = libcurl
BASE_NAME_DEBUG        = $(BASE_NAME)_debug
BASE_NAME_STATIC       = $(BASE_NAME)_a
BASE_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC)_debug

LIB_NAME_STATIC        = $(BASE_NAME_STATIC).lib
LIB_NAME_STATIC_DEBUG  = $(BASE_NAME_STATIC_DEBUG).lib
LIB_NAME_DLL           = $(BASE_NAME).dll
LIB_NAME_IMP           = $(BASE_NAME).lib
LIB_NAME_DLL_DEBUG     = $(BASE_NAME_DEBUG).dll
LIB_NAME_IMP_DEBUG     = $(BASE_NAME_DEBUG).lib

PDB_NAME_STATIC        = $(BASE_NAME_STATIC).pdb
PDB_NAME_STATIC_DEBUG  = $(BASE_NAME_STATIC_DEBUG).pdb
PDB_NAME_DLL           = $(BASE_NAME).pdb
PDB_NAME_DLL_DEBUG     = $(BASE_NAME_DEBUG).pdb

# CURL Command section
PROGRAM_NAME  = curl.exe
CURL_CFLAGS   = /I../lib /I../include /nologo /W4 /EHsc /DWIN32 /FD /c
CURL_LFLAGS   = /out:$(DIRDIST)\bin\$(PROGRAM_NAME) /subsystem:console $(LFLAGS)
CURL_RESFLAGS = /i../include

#############################################################
## Nothing more to do below this line!
LIBCURL_SRC_DIR = ..\lib
CURL_SRC_DIR = ..\src

!IFNDEF WITH_DEVEL
WITH_DEVEL   = ../../deps
!ENDIF
DEVEL_INCLUDE= $(WITH_DEVEL)/include
DEVEL_LIB    = $(WITH_DEVEL)/lib


!IF EXISTS("$(DEVEL_INCLUDE)")
CFLAGS       = $(CFLAGS) /I"$(DEVEL_INCLUDE)"
!ENDIF
!IF EXISTS("$(DEVEL_LIB)")
LFLAGS       = $(LFLAGS) "/LIBPATH:$(DEVEL_LIB)"
!ENDIF

!IFDEF SSL_PATH
SSL_INC_DIR  = $(SSL_PATH)\include
SSL_LIB_DIR  = $(SSL_PATH)\lib
SSL_LFLAGS   = $(SSL_LFLAGS) "/LIBPATH:$(SSL_LIB_DIR)"
!ELSE
SSL_INC_DIR=$(DEVEL_INCLUDE)\openssl
SSL_LIB_DIR=$(DEVEL_LIB)
!ENDIF

!IF "$(WITH_SSL)"=="dll" || "$(WITH_SSL)"=="static"
!IF EXISTS("$(SSL_LIB_DIR)\libssl.lib")
SSL_LIBS     = libssl.lib libcrypto.lib
!ELSE
SSL_LIBS     = libeay32.lib ssleay32.lib
!ENDIF
USE_SSL      = true
SSL          = $(WITH_SSL)
!IF "$(WITH_SSL)"=="static"

WIN_LIBS     = $(WIN_LIBS) gdi32.lib user32.lib crypt32.lib


!ENDIF


!ENDIF

!IFDEF USE_SSL
SSL_CFLAGS   = /DUSE_OPENSSL /I"$(SSL_INC_DIR)"
!IF EXISTS("$(SSL_INC_DIR)\is_boringssl.h")
SSL_CFLAGS   = $(SSL_CFLAGS) /DHAVE_BORINGSSL
!ENDIF
!ENDIF


!IFDEF NGHTTP2_PATH
NGHTTP2_INC_DIR  = $(NGHTTP2_PATH)\include
NGHTTP2_LIB_DIR  = $(NGHTTP2_PATH)\lib
NGHTTP2_LFLAGS   = $(NGHTTP2_LFLAGS) "/LIBPATH:$(NGHTTP2_LIB_DIR)"
!ELSE
NGHTTP2_INC_DIR  = $(DEVEL_INCLUDE)
NGHTTP2_LIB_DIR  = $(DEVEL_LIB)
!ENDIF

!IF "$(WITH_NGHTTP2)"=="dll"
NGHTTP2_CFLAGS   = /DUSE_NGHTTP2 /I"$(NGHTTP2_INC_DIR)"
NGHTTP2_LIBS     = nghttp2.lib
!ELSEIF "$(WITH_NGHTTP2)"=="static"
NGHTTP2_CFLAGS   = /DUSE_NGHTTP2 /DNGHTTP2_STATICLIB /I"$(NGHTTP2_INC_DIR)"
NGHTTP2_LIBS     = nghttp2_static.lib
!ENDIF


!IFDEF MBEDTLS_PATH
MBEDTLS_INC_DIR  = $(MBEDTLS_PATH)\include
MBEDTLS_LIB_DIR  = $(MBEDTLS_PATH)\lib
MBEDTLS_LFLAGS   = $(MBEDTLS_LFLAGS) "/LIBPATH:$(MBEDTLS_LIB_DIR)"
!ELSE
MBEDTLS_INC_DIR  = $(DEVEL_INCLUDE)
MBEDTLS_LIB_DIR  = $(DEVEL_LIB)
!ENDIF

!IF "$(WITH_MBEDTLS)"=="dll" || "$(WITH_MBEDTLS)"=="static"
USE_MBEDTLS    = true
MBEDTLS        = $(WITH_MBEDTLS)
MBEDTLS_CFLAGS = /DUSE_MBEDTLS /I"$(MBEDTLS_INC_DIR)"
MBEDTLS_LIBS   = mbedtls.lib mbedcrypto.lib mbedx509.lib
!ENDIF


!IFDEF CARES_PATH
CARES_INC_DIR  = $(CARES_PATH)\include
CARES_LIB_DIR  = $(CARES_PATH)\lib
CARES_LFLAGS   = $(CARES_LFLAGS) "/LIBPATH:$(CARES_LIB_DIR)"
!ELSE
CARES_INC_DIR  = $(DEVEL_INCLUDE)/cares
CARES_LIB_DIR  = $(DEVEL_LIB)
!ENDIF

!IF "$(WITH_CARES)"=="dll"
!IF "$(DEBUG)"=="yes"
CARES_LIBS     = caresd.lib
!ELSE
CARES_LIBS     = cares.lib
!ENDIF
USE_CARES      = true
CARES          = dll
!ELSEIF "$(WITH_CARES)"=="static"
!IF "$(DEBUG)"=="yes"
CARES_LIBS     = libcaresd.lib
!ELSE
CARES_LIBS     = libcares.lib
!ENDIF
USE_CARES      = true
CARES          = static
!ENDIF

!IFDEF USE_CARES
CARES_CFLAGS   = /DUSE_ARES /I"$(CARES_INC_DIR)"
!ENDIF


!IFDEF ZLIB_PATH
ZLIB_INC_DIR = $(ZLIB_PATH)\include
ZLIB_LIB_DIR = $(ZLIB_PATH)\lib
ZLIB_LFLAGS  = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
!ELSE
ZLIB_INC_DIR = $(DEVEL_INCLUDE)
ZLIB_LIB_DIR = $(DEVEL_LIB)
!ENDIF

# Depending on how zlib is built the libraries have different names, we 
# try to handle them all. 
!IF "$(WITH_ZLIB)"=="dll"
!IF EXISTS("$(ZLIB_LIB_DIR)\zlibwapi.lib")
ZLIB_LIBS = zlibwapi.lib
!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zdll.lib")
ZLIB_LIBS   = zdll.lib
!ELSE
ZLIB_LIBS   = zlib.lib
!ENDIF
USE_ZLIB    = true
ZLIB        = dll
!ELSEIF "$(WITH_ZLIB)"=="static"
!IF EXISTS("$(ZLIB_LIB_DIR)\zlibstat.lib")
ZLIB_LIBS   = zlibstat.lib
!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zlib.lib")
ZLIB_LIBS   = zlib.lib
!ELSE
ZLIB_LIBS   = zlib_a.lib
!ENDIF
USE_ZLIB    = true
ZLIB        = static
!ENDIF

!IFDEF USE_ZLIB
ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I"$(ZLIB_INC_DIR)"
!ENDIF


!IFDEF SSH2_PATH
SSH2_INC_DIR= $(SSH2_PATH)\include
SSH2_LIB_DIR= $(SSH2_PATH)\lib
SSH2_LFLAGS = $(SSH2_LFLAGS) "/LIBPATH:$(SSH2_LIB_DIR)"
!ELSE
SSH2_LIB_DIR= $(DEVEL_LIB)
SSH2_INC_DIR= $(DEVEL_INCLUDE)/libssh2
!ENDIF

!IF "$(WITH_SSH2)"=="dll"
SSH2_LIBS   = libssh2.lib
USE_SSH2    = true
SSH2        = dll
!ELSEIF "$(WITH_SSH2)"=="static"
# libssh2 NMakefile on Windows at default creates a static library without _a suffix
!IF EXISTS("$(SSH2_LIB_DIR)\libssh2.lib")
SSH2_LIBS   = libssh2.lib
!ELSE
SSH2_LIBS   = libssh2_a.lib
!ENDIF
WIN_LIBS     = $(WIN_LIBS) user32.lib
USE_SSH2    = true
SSH2        = static
!ENDIF

!IFDEF USE_SSH2
SSH2_CFLAGS = /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /DUSE_LIBSSH2
SSH2_CFLAGS = $(SSH2_CFLAGS) /I$(SSH2_INC_DIR)
!ENDIF


!IFNDEF USE_IDN
USE_IDN   = true
!ELSEIF "$(USE_IDN)"=="yes"
USE_IDN   = true
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
RC_FLAGS = /dDEBUGBUILD=0 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
CURL_CC       = $(CC_NODEBUG) $(RTLIB)
CURL_RC_FLAGS = /i../include /dDEBUGBUILD=0 /Fo $@ $(CURL_SRC_DIR)\curl.rc
!ENDIF

!IF "$(AS_DLL)" == "true"

LNK       = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
!IF "$(DEBUG)"=="yes"
TARGET    = $(LIB_NAME_DLL_DEBUG)
LNK       = $(LNK) /DEBUG /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
PDB       = $(PDB_NAME_DLL_DEBUG)
CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
!ELSE
TARGET    = $(LIB_NAME_DLL)







|







391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
RC_FLAGS = /dDEBUGBUILD=0 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
CURL_CC       = $(CC_NODEBUG) $(RTLIB)
CURL_RC_FLAGS = /i../include /dDEBUGBUILD=0 /Fo $@ $(CURL_SRC_DIR)\curl.rc
!ENDIF

!IF "$(AS_DLL)" == "true"

LNK       = $(LNKDLL) $(LFLAGS) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
!IF "$(DEBUG)"=="yes"
TARGET    = $(LIB_NAME_DLL_DEBUG)
LNK       = $(LNK) /DEBUG /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
PDB       = $(PDB_NAME_DLL_DEBUG)
CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
!ELSE
TARGET    = $(LIB_NAME_DLL)
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
!IF "$(DEBUG)"=="yes"
TARGET   = $(LIB_NAME_STATIC_DEBUG)
PDB      = $(PDB_NAME_STATIC_DEBUG)
!ELSE
TARGET   = $(LIB_NAME_STATIC)
PDB      = $(PDB_NAME_STATIC)
!ENDIF
LNK      = $(LNKLIB) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
CURL_CC  = $(CURL_CC) $(CFLAGS_LIBCURL_STATIC)

# AS_DLL
!ENDIF

!IF "$(USE_SSL)"=="true"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS)







|







415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
!IF "$(DEBUG)"=="yes"
TARGET   = $(LIB_NAME_STATIC_DEBUG)
PDB      = $(PDB_NAME_STATIC_DEBUG)
!ELSE
TARGET   = $(LIB_NAME_STATIC)
PDB      = $(PDB_NAME_STATIC)
!ENDIF
LNK      = $(LNKLIB) /out:$(LIB_DIROBJ)\$(TARGET)
CURL_CC  = $(CURL_CC) $(CFLAGS_LIBCURL_STATIC)

# AS_DLL
!ENDIF

!IF "$(USE_SSL)"=="true"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\

#
# curl.exe
#
CURL_LINK = link.exe /incremental:no /libpath:"$(DIRDIST)\lib"

#!IF "$(CFG)" == "release-ssh2-ssl-dll-zlib"
#TARGET   = $(LIB_NAME_STATIC)
#LNK      = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBS)  $(SSH2LIBS) $(SSL_LFLAGS) $(ZLIB_LFLAGS) $(LFLAGSSSH) /out:$(LIB_DIROBJ)\$(TARGET)
#CC       = $(CCNODBG) $(RTLIB) $(SSL_CFLAGS) $(ZLIB_CFLAGS) $(CFLAGSLIB)  $(SSH2_CFLAGS)
#CFGSET   = TRUE
#!ENDIF

#######################
# Only the clean target can be used if a config was not provided.
#
!IF "$(CFGSET)" == "FALSE"
clean:
	@-erase /s *.dll 2> NUL
	@-erase /s *.exp 2> NUL
	@-erase /s *.idb 2> NUL
	@-erase /s *.lib 2> NUL
	@-erase /s *.obj 2> NUL
	@-erase /s *.pch 2> NUL
	@-erase /s *.pdb 2> NUL
	@-erase /s *.res 2> NUL
!ELSE
# A mode was provided, so the library can be built.
#
!include CURL_OBJS.inc
!include LIBCURL_OBJS.inc

!IF "$(AS_DLL)" == "true"
LIB_OBJS = $(LIBCURL_OBJS) $(RESOURCE)







<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<







477
478
479
480
481
482
483










484










485
486
487
488
489
490
491
DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\

#
# curl.exe
#
CURL_LINK = link.exe /incremental:no /libpath:"$(DIRDIST)\lib"











!IF "$(CFGSET)" != "FALSE"










# A mode was provided, so the library can be built.
#
!include CURL_OBJS.inc
!include LIBCURL_OBJS.inc

!IF "$(AS_DLL)" == "true"
LIB_OBJS = $(LIBCURL_OBJS) $(RESOURCE)
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
	@echo Using SSPI: $(USE_SSPI)
	@echo Using WinSSL: $(USE_WINSSL)
	@echo CFLAGS:     $(CFLAGS)
	@echo LFLAGS:     $(LFLAGS)
	@echo GenPDB:     $(GEN_PDB)
	@echo Debug:      $(DEBUG)
	@echo Machine:    $(MACHINE)
	$(LNK) $(LFLAGS) $(LIB_OBJS)
	@echo Copying libs...
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL)       $(DIRDIST)\bin\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC)    $(DIRDIST)\lib\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) $(DIRDIST)\bin\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) $(DIRDIST)\lib\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP)       $(DIRDIST)\lib\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) $(DIRDIST)\lib >nul 2<&1







|







513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
	@echo Using SSPI: $(USE_SSPI)
	@echo Using WinSSL: $(USE_WINSSL)
	@echo CFLAGS:     $(CFLAGS)
	@echo LFLAGS:     $(LFLAGS)
	@echo GenPDB:     $(GEN_PDB)
	@echo Debug:      $(DEBUG)
	@echo Machine:    $(MACHINE)
	$(LNK) $(LIB_OBJS)
	@echo Copying libs...
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL)       $(DIRDIST)\bin\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC)    $(DIRDIST)\lib\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) $(DIRDIST)\bin\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) $(DIRDIST)\lib\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP)       $(DIRDIST)\lib\ /y >nul 2<&1
	@if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) copy $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) $(DIRDIST)\lib >nul 2<&1
559
560
561
562
563
564
565














	$(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/warnless.c
$(CURL_DIROBJ)\curl_ctype.obj: ../lib/curl_ctype.c
	$(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/curl_ctype.c
$(CURL_DIROBJ)\curl.res: $(CURL_SRC_DIR)\curl.rc
	rc $(CURL_RC_FLAGS)

!ENDIF  # End of case where a config was provided.





















>
>
>
>
>
>
>
>
>
>
>
>
>
>
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
	$(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/warnless.c
$(CURL_DIROBJ)\curl_ctype.obj: ../lib/curl_ctype.c
	$(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/curl_ctype.c
$(CURL_DIROBJ)\curl.res: $(CURL_SRC_DIR)\curl.rc
	rc $(CURL_RC_FLAGS)

!ENDIF  # End of case where a config was provided.

clean:
	@-erase /s *.dll 2> NUL
	@-erase /s *.exp 2> NUL
	@-erase /s *.idb 2> NUL
	@-erase /s *.lib 2> NUL
	@-erase /s *.obj 2> NUL
	@-erase /s *.pch 2> NUL
	@-erase /s *.pdb 2> NUL
	@-erase /s *.res 2> NUL
	@if exist $(LIB_DIROBJ) rd /s/q $(LIB_DIROBJ)
	@if exist $(CURL_DIROBJ)rd /s/q $(CURL_DIROBJ)
	@if exist $(DIRDIST) rd /s/q $(DIRDIST)