-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEWS
5491 lines (3430 loc) · 181 KB
/
NEWS
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
Changelog for the libssh2 project. Generated with git2news.pl
Version 1.8.0 (25 Oct 2016)
Daniel Stenberg (25 Oct 2016)
- RELEASE-NOTES: adjusted for 1.8.0
Kamil Dudka (20 Oct 2016)
- Revert "aes: the init function fails when OpenSSL has AES support"
This partially reverts commit f4f2298ef3635acd031cc2ee0e71026cdcda5864
because it caused the compatibility code to call initialization routines
redundantly, leading to memory leakage with OpenSSL 1.1 and broken curl
test-suite in Fedora:
88 bytes in 1 blocks are definitely lost in loss record 5 of 8
at 0x4C2DB8D: malloc (vg_replace_malloc.c:299)
by 0x72C607D: CRYPTO_zalloc (mem.c:100)
by 0x72A2480: EVP_CIPHER_meth_new (cmeth_lib.c:18)
by 0x4E5A550: make_ctr_evp.isra.0 (openssl.c:407)
by 0x4E5A8E8: _libssh2_init_aes_ctr (openssl.c:471)
by 0x4E5BB5A: libssh2_init (global.c:49)
Daniel Stenberg (19 Oct 2016)
- [Charles Collicutt brought this change]
libssh2_wait_socket: Fix comparison with api_timeout to use milliseconds (#134)
Fixes #74
- [Charles Collicutt brought this change]
Set err_msg on _libssh2_wait_socket errors (#135)
- Revert "travis: Test mbedtls too"
This reverts commit 3e6de50a24815e72ec5597947f1831f6083b7da8.
Travis doesn't seem to support the mbedtls-dev package
- maketgz: support "only" to only update version number locally
and fix the date output locale
- configure: make the --with-* options override the OpenSSL default
... previously it would default to OpenSSL even with the --with-[crypto]
options used unless you specificly disabled OpenSSL. Now, enabling another
backend will automatically disable OpenSSL if the other one is found.
- [Keno Fischer brought this change]
docs: Add documentation on new cmake/configure options
- [Keno Fischer brought this change]
configure: Add support for building with mbedtls
- [wildart brought this change]
travis: Test mbedtls too
- [wildart brought this change]
crypto: add support for the mbedTLS backend
Closes #132
- [wildart brought this change]
cmake: Add CLEAR_MEMORY option, analogously to that for autoconf
- README.md: fix link typo
- README: markdown version to look nicer on github
Viktor Szakats (5 Sep 2016)
- [Taylor Holberton brought this change]
openssl: add OpenSSL 1.1.0 compatibility
Daniel Stenberg (4 Sep 2016)
- [Antenore Gatta brought this change]
tests: HAVE_NETINET_IN_H was not defined correctly (#127)
Fixes #125
- SECURITY: fix web site typo
- SECURITY: security process
GitHub (14 Aug 2016)
- [Alexander Lamaison brought this change]
Basic dockerised test suite.
This introduces a test suite for libssh2. It runs OpenSSH in a Docker
container because that works well on Windows (via docker-machine) as
well as Linux. Presumably it works on Mac too with docker-machine, but
I've not tested that.
Because the test suite is docker-machine aware, you can also run it
against a cloud provider, for more realistic network testing, by setting
your cloud provider as your active docker machine. The Appveyor CI setup
in this commit does that because Appveyor doesn't support docker
locally.
Kamil Dudka (3 Aug 2016)
- [Viktor Szakats brought this change]
misc.c: Delete unused static variables
Closes #114
Daniel Stenberg (9 Apr 2016)
- [Will Cosgrove brought this change]
Merge pull request #103 from willco007/patch-2
Fix for security issue CVE-2016-0787
Alexander Lamaison (2 Apr 2016)
- [Zenju brought this change]
Fix MSVC 14 compilation errors
For _MSC_VER == 1900 these macros are not needed and create problems:
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1925): warning C4005: 'snprintf': macro redefinition (compiling source file libssh2-files\src\mac.c)
1> \win32\libssh2_config.h(27): note: see previous definition of 'snprintf' (compiling source file libssh2-files\src\mac.c)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1927): fatal error C1189: #error: Macro definition of snprintf conflicts with Standard Library function declaration (compiling source file libssh2-files\src\mac.c)
Daniel Stenberg (26 Mar 2016)
- [Brad Harder brought this change]
_libssh2_channel_open: speeling error fixed in channel error message
Alexander Lamaison (15 Mar 2016)
- Link with crypt32.lib on Windows.
Makes linking with static OpenSSL work again. Although it's not
required for dynamic OpenSSL, it does no harm.
Fixes #98.
- [Craig A. Berry brought this change]
Tweak VMS help file building.
Primarily this is handling cases where top-level files moved into
the docs/ directory. I also corrected a typo and removed the
claim that libssh2 is public domain.
- [Craig A. Berry brought this change]
Build with standard stat structure on VMS.
This gets us large file support, is available on any VMS release
in the last decade and more, and gives stat other modern features
such as 64-bit ino_t.
- [Craig A. Berry brought this change]
Update vms/libssh2_config.h.
VMS does have stdlib.h, gettimeofday(), and OpenSSL. The latter
is appropriate to hard-wire in the configuration because it's
installed by default as part of the base operating system and
there is currently no libgcrypt port.
- [Craig A. Berry brought this change]
VMS can't use %zd for off_t format.
%z is a C99-ism that VMS doesn't currently have; even though the
compiler is C99-compliant, the library isn't quite. The off_t used
for the st_size element of the stat can be 32-bit or 64-bit, so
detect what we've got and pick a format accordingly.
- [Craig A. Berry brought this change]
Normalize line endings in libssh2_sftp_get_channel.3.
Somehow it got Windows-style CRLF endings so convert to just LF,
for consistency as well as not to confuse tools that will regard
the \r as content (e.g. the OpenVMS help librarian).
Dan Fandrich (29 Feb 2016)
- libgcrypt: Fixed a NULL pointer dereference on OOM
Daniel Stenberg (24 Feb 2016)
- [Viktor Szakats brought this change]
url updates, HTTP => HTTPS
Closes #87
Dan Fandrich (23 Feb 2016)
- RELEASE-NOTES: removed some duplicated names
Version 1.7.0 (23 Feb 2016)
Daniel Stenberg (23 Feb 2016)
- web: the site is now HTTPS
- RELEASE-NOTES: 1.7.0 release
- diffie_hellman_sha256: convert bytes to bits
As otherwise we get far too small numbers.
Reported-by: Andreas Schneider
CVE-2016-0787
Alexander Lamaison (18 Feb 2016)
- Allow CI failures with VS 2008 x64.
Appveyor doesn't support this combination.
Daniel Stenberg (16 Feb 2016)
- [Viktor Szakats brought this change]
GNUmakefile: list system libs after user libs
Otherwise some referenced WinSock functions will fail to
resolve when linking against LibreSSL 2.3.x static libraries
with mingw.
Closes #80
- [Viktor Szakats brought this change]
openssl: apply new HAVE_OPAQUE_STRUCTS macro
Closes #81
- [Viktor Szakats brought this change]
openssl: fix LibreSSL support after OpenSSL 1.1.0-pre1/2 support
Alexander Lamaison (14 Feb 2016)
- sftp.h: Fix non-C90 type.
uint64_t does not exist in C90. Use libssh2_uint64_t instead.
- Exclude sshd tests from AppVeyor.
They fail complaining that sshd wasn't invoked with an absolute path.
- Test on more versions of Visual Studio.
- Fix Appveyor builds.
Daniel Stenberg (14 Feb 2016)
- [Viktor Szakats brought this change]
openssl: add OpenSSL 1.1.0-pre3-dev compatibility
by using API instead of accessing an internal structure.
Closes #83
- RELEASE-NOTES: synced with 996b04ececdf
- include/libssh2.h: next version is 1.7.0
- configure: build "silent" if possible
- sftp: re-indented some minor stuff
- [Jakob Egger brought this change]
sftp.c: ensure minimum read packet size
For optimum performance we need to ensure we don't request tiny packets.
- [Jakob Egger brought this change]
sftp.c: Explicit return values & sanity checks
- [Jakob Egger brought this change]
sftp.c: Check Read Packet File Offset
This commit adds a simple check to see if the offset of the read
request matches the expected file offset.
We could try to recover, from this condition at some point in the future.
Right now it is better to return an error instead of corrupted data.
- [Jakob Egger brought this change]
sftp.c: Don't return EAGAIN if data was written to buffer
- [Jakob Egger brought this change]
sftp.c: Send at least one read request before reading
This commit ensures that we have sent at least one read request before
we try to read data in sftp_read().
Otherwise sftp_read() would return 0 bytes (indicating EOF) if the
socket is not ready for writing.
- [Jakob Egger brought this change]
sftp.c: stop reading when buffer is full
Since we can only store data from a single chunk in filep,
we have to stop receiving data as soon as the buffer is full.
This adresses the following bug report:
https://github.com/libssh2/libssh2/issues/50
Salvador Fandiño (21 Jan 2016)
- agent_disconnect_unix: unset the agent fd after closing it
"agent_disconnect_unix", called by "libssh2_agent_disconnect", was
leaving the file descriptor in the agent structure unchanged. Later,
"libssh2_agent_free" would call again "libssh2_agent_disconnect" under
the hood and it would try to close again the same file descriptor. In
most cases that resulted in just a harmless error, but it is also
possible that the file descriptor had been reused between the two
calls resulting in the closing of an unrelated file descriptor.
This patch sets agent->fd to LIBSSH2_INVALID_SOCKET avoiding that
issue.
Signed-off-by: Salvador Fandiño <sfandino@yahoo.com>
Daniel Stenberg (18 Jan 2016)
- [Patrick Monnerat brought this change]
os400qc3: support encrypted private keys
PKCS#8 EncryptedPrivateKeyinfo structures are recognized and decoded to get
values accepted by the Qc3 crypto library.
- [Patrick Monnerat brought this change]
os400qc3: New PKCS#5 decoder
The Qc3 library is not able to handle PKCS#8 EncryptedPrivateKeyInfo structures
by itself. It is only capable of decrypting the (encrypted) PrivateKeyInfo
part, providing a key encryption key and an encryption algorithm are given.
Since the encryption key and algorithm description part in a PKCS#8
EncryptedPrivateKeyInfo is a PKCS#5 structure, such a decoder is needed to
get the derived key method and hash, as well as encryption algorith and
initialisation vector.
- [Patrick Monnerat brought this change]
os400qc3: force continuous update on non-final hash/hmac computation
- [Patrick Monnerat brought this change]
os400qc3: Be sure hmac keys have a minimum length
The Qc3 library requires a minimum key length depending on the target
hash algorithm. Append binary zeroes to the given key if not long enough.
This matches RFC 2104 specifications.
- [Patrick Monnerat brought this change]
os400qc3: Slave descriptor for key encryption key
The Qc3 library requires the key encryption key to exist as long as
the encrypted key is used. Its descriptor token is then kept as an
"encrypted key slave" for recursive release.
- [Patrick Monnerat brought this change]
os400qc3.c: comment PEM/DER decoding
- [Patrick Monnerat brought this change]
os400qc3.c: improve ASN.1 header byte checks
- [Patrick Monnerat brought this change]
os400qc3.c: improve OID matching
- [Patrick Monnerat brought this change]
os400: os400qc3.c: replace malloc by LIBSSH2_ALLOC or alloca where possible
- [Patrick Monnerat brought this change]
os400: asn1_new_from_bytes(): use data from a single element only
- [Patrick Monnerat brought this change]
os400: fix an ILE/RPG prototype
- [Patrick Monnerat brought this change]
os400: implement character encoding conversion support
- [Patrick Monnerat brought this change]
os400: do not miss some external prototypes
Build procedure extproto() did not strip braces from header files, thus
possibly prepended them to true prototypes. This prevented the prototype to
be recognized as such.
The solution implemented here is to map braces to semicolons, effectively
considering them as potential prototype delimiters.
- [Patrick Monnerat brought this change]
os400: Really add specific README
- [Patrick Monnerat brought this change]
os400: Add specific README and include new files in dist tarball
- [Patrick Monnerat brought this change]
os400: add compilation scripts
- [Patrick Monnerat brought this change]
os400: include files for ILE/RPG
In addition, file os400/macros.h declares all procedures originally
defined as macros. It must not be used for real inclusion and is only
intended to be used as a `database' for macro wrapping procedures generation.
- [Patrick Monnerat brought this change]
os400: add supplementary header files/wrappers. Define configuration.
- [Patrick Monnerat brought this change]
Protect callback function calls from macro substitution
Some structure fields holding callback addresses have the same name as the
underlying system function (connect, send, recv). Set parentheses around
their reference to suppress a possible macro substitution.
Use a macro for connect() on OS/400 to resolve a const/nonconst parameter
problem.
- [Patrick Monnerat brought this change]
Add interface for OS/400 crypto library QC3
- [Patrick Monnerat brought this change]
misc: include stdarg.h for debug code
- [Patrick Monnerat brought this change]
Document crypto library interface
- [Patrick Monnerat brought this change]
Feature an optional crypto-specific macro to rsa sign a data fragment vector
OS/400 crypto library is unable to sign a precomputed SHA1 hash: however
it does support a procedure that hashes data fragments and rsa signs.
If defined, the new macro _libssh2_rsa_sha1_signv() implements this function
and disables use of _libssh2_rsa_sha1_sign().
The function described above requires that the struct iovec unused slacks are
cleared: for this reason, macro libssh2_prepare_iovec() has been introduced.
It should be defined as empty for crypto backends that are not sensitive
to struct iovec unused slack values.
- [Patrick Monnerat brought this change]
Fold long lines in include files
- [Viktor Szakats brought this change]
kex.c: fix indentation
Closes #71
- [Viktor Szakats brought this change]
add OpenSSL-1.1.0-pre2 compatibility
Closes #70
- [Viktor Szakats brought this change]
add OpenSSL 1.1.0-pre1 compatibility
* close https://github.com/libssh2/libssh2/issues/69
* sync a declaration with the rest of similar ones
* handle EVP_MD_CTX_new() returning NULL with OpenSSL 1.1.0
* fix potential memory leak with OpenSSL 1.1.0 in
_libssh2_*_init() functions, when EVP_MD_CTX_new() succeeds,
but EVP_DigestInit() fails.
Marc Hoersken (22 Dec 2015)
- wincng.c: fixed _libssh2_wincng_hash_final return value
_libssh2_wincng_hash_final was returning the internal BCRYPT
status code instead of a valid libssh2 return value (0 or -1).
This also means that _libssh2_wincng_hash never returned 0.
- wincng.c: fixed possible memory leak in _libssh2_wincng_hash
If _libssh2_wincng_hash_update failed _libssh2_wincng_hash_final
would never have been called before.
Reported by Zenju.
Kamil Dudka (15 Dec 2015)
- [Paul Howarth brought this change]
libssh2.pc.in: fix the output of pkg-config --libs
... such that it does not include LDFLAGS used to build libssh2 itself.
There was a similar fix in the curl project long time ago:
https://github.com/bagder/curl/commit/curl-7_19_7-56-g4c8adc8
Bug: https://bugzilla.redhat.com/1279966
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Marc Hoersken (6 Dec 2015)
- hostkey.c: align code path of ssh_rsa_init to ssh_dss_init
- hostkey.c: fix invalid memory access if libssh2_dsa_new fails
Reported by dimmaq, fixes #66
Daniel Stenberg (3 Nov 2015)
- [Will Cosgrove brought this change]
gcrypt: define libssh2_sha256_ctx
Looks like it didn't make it into the latest commit for whatever reason.
Closes #58
- [Salvador Fandino brought this change]
libssh2_session_set_last_error: Add function
Net::SSH2, the Perl wrapping module for libssh2 implements several features*
on top of libssh2 that can fail and so need some mechanism to report the error
condition to the user.
Until now, besides the error state maintained internally by libssh2, another
error state was maintained at the Perl level for every session object and then
additional logic was used to merge both error states. That is a maintenance
nighmare, and actually there is no way to do it correctly and consistently.
In order to allow the high level language to add new features to the library
but still rely in its error reporting features the new function
libssh2_session_set_last_error (that just exposses _libssh2_error_flags) is
introduced.
*) For instance, connecting to a remote SSH service giving the hostname and
port.
Signed-off-by: Salvador Fandino <sfandino@yahoo.com>
Signed-off-by: Salvador Fandiño <sfandino@yahoo.com>
- [Salvador Fandino brought this change]
_libssh2_error: Support allocating the error message
Before this patch "_libssh2_error" required the error message to be a
static string.
This patch adds a new function "_libssh2_error_flags" accepting an
additional "flags" argument and specifically the flag
"LIBSSH2_ERR_FLAG_DUP" indicating that the passed string must be
duplicated into the heap.
Then, the method "_libssh2_error" has been rewritten to use that new
function under the hood.
Signed-off-by: Salvador Fandino <sfandino@yahoo.com>
Signed-off-by: Salvador Fandiño <sfandino@yahoo.com>
- [Will Cosgrove brought this change]
added engine.h include to fix warning
- [sune brought this change]
kex.c: removed dupe entry from libssh2_kex_methods[]
Closes #51
- [Salvador Fandiño brought this change]
userauth: Fix off by one error when reading public key file
After reading the public key from file the size was incorrectly
decremented by one.
This was usually a harmless error as the last character on the public
key file is an unimportant EOL. But if due to some error the public key
file is empty, the public key size becomes (uint)(0 - 1), resulting in
an unrecoverable out of memory error later.
Signed-off-by: Salvador Fandi??o <sfandino-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
- [Salvador Fandino brought this change]
channel: Detect bad usage of libssh2_channel_process_startup
A common novice programmer error (at least among those using the
wrapping Perl module Net::SSH2), is to try to reuse channels.
This patchs detects that incorrect usage and fails with a
LIBSSH2_ERROR_BAD_USE error instead of hanging.
Signed-off-by: Salvador Fandino <sfandino-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
- [Will Cosgrove brought this change]
kex: Added diffie-hellman-group-exchange-sha256 support
... and fixed HMAC_Init depricated usage
Closes #48
Alexander Lamaison (21 Sep 2015)
- Prefixed new #defines to prevent collisions.
Other libraries might have their own USE_WIN32_*FILES.
- [keith-daigle brought this change]
Update examples/scp.c to fix bug where large files on win32 would cause got to wrap and go negative
- [David Byron brought this change]
add libssh2_scp_recv2 to support large (> 2GB) files on windows
Daniel Stenberg (17 Sep 2015)
- [sune brought this change]
WinCNG: support for SHA256/512 HMAC
Closes #47
- [brian m. carlson brought this change]
Add support for HMAC-SHA-256 and HMAC-SHA-512.
Implement support for these algorithms and wire them up to the libgcrypt
and OpenSSL backends. Increase the maximum MAC buffer size to 64 bytes
to prevent buffer overflows. Prefer HMAC-SHA-256 over HMAC-SHA-512, and
that over HMAC-SHA-1, as OpenSSH does.
Closes #40
- [Zenju brought this change]
kex: free server host key before allocating it (again)
Fixes a memory leak when Synology server requests key exchange
Closes #43
- [Viktor Szakats brought this change]
GNUmakefile: up OpenSSL version
closes #23
- [Viktor Szakats brought this change]
GNUmakefile: add -m64 CFLAGS when targeting mingw64, add -m32/-m64 to LDFLAGS
libssh2 equivalent of curl patch https://github.com/bagder/curl/commit/d21b66835f2af781a3c2a685abc92ef9f0cd86be
This allows to build for the non-default target when using a multi-target mingw distro.
Also bump default OpenSSL dependency path to 1.0.2c.
- [Viktor Szakats brought this change]
GNUmakefile: add support for LIBSSH2_LDFLAG_EXTRAS
It is similar to existing LIBSSH2_CFLAG_EXTRAS, but for
extra linker options.
Also delete some line/file ending whitespace.
closes #27
- [nasacj brought this change]
hostkey.c: Fix compiling error when OPENSSL_NO_MD5 is defined
Closes #32
- [Mizunashi Mana brought this change]
openssl.h: adjust the rsa/dsa includes
... to work when built without DSA support.
Closes #36
Alexander Lamaison (26 Jul 2015)
- Let CMake build work as a subproject.
Patch contributed by JasonHaslam.
- Fix builds with Visual Studio 2015.
VS2015 moved stdio functions to the header files as inline function. That means check_function_exists can't detect them because it doesn't use header files - just does a link check. Instead we need to use check_symbol_exists with the correct headers.
Kamil Dudka (2 Jul 2015)
- cmake: include CMake files in the release tarballs
Despite we announced the CMake support in libssh2-1.6.0 release notes,
the files required by the CMake build system were not included in the
release tarballs. Hence, the only way to use CMake for build was the
upstream git repository.
This commit makes CMake actually supported in the release tarballs.
- tests/mansyntax.sh: fix 'make distcheck' with recent autotools
Do not create symbolic links off the build directory. Recent autotools
verify that out-of-source build works even if the source directory tree
is not writable.
- openssl: fix memleak in _libssh2_dsa_sha1_verify()
Daniel Stenberg (12 Jun 2015)
- openssl: make libssh2_sha1 return error code
- use the internal prefix _libssh2_ for non-exported functions
- removed libssh2_md5() since it wasn't used
Reported-by: Kamil Dudka
- [LarsNordin-LNdata brought this change]
SFTP: Increase speed and datasize in SFTP read
The function sftp_read never return more then 2000 bytes (as it should
when I asked Daniel). I increased the MAX_SFTP_READ_SIZE to 30000 but
didn't get the same speed as a sftp read in SecureSSH. I analyzed the
code and found that a return always was dona when a chunk has been read.
I changed it to a sliding buffer and worked on all available chunks. I
got an increase in speed and non of the test I have done has failed
(both local net and over Internet). Please review and test. I think
30000 is still not the optimal MAX_SFTP_READ_SIZE, my next goal is to
make an API to enable changing this value (The SecureSSH sftp_read has
more complete filled packages when comparing the network traffic)
- bump: start working on 1.6.1
Version 1.6.0 (5 Jun 2015)
Daniel Stenberg (5 Jun 2015)
- RELEASE-NOTES: synced with 858930cae5c6a
Marc Hoersken (19 May 2015)
- wincng.c: fixed indentation
- [sbredahl brought this change]
wincng.c: fixed memleak in (block) cipher destructor
Alexander Lamaison (6 May 2015)
- [Jakob Egger brought this change]
libssh2_channel_open: more detailed error message
The error message returned by libssh2_channel_open in case of a server side channel open failure is now more detailed and includes the four standard error conditions in RFC 4254.
- [Hannes Domani brought this change]
kex: fix libgcrypt memory leaks of bignum
Fixes #168.
Marc Hoersken (3 Apr 2015)
- configure.ac: check for SecureZeroMemory for clear memory feature
- Revert "wincng.c: fix clear memory feature compilation with mingw"
This reverts commit 2d2744efdd0497b72b3e1ff6e732aa4c0037fc43.
Autobuilds show that this did not solve the issue.
And it seems like RtlFillMemory is defined to memset,
which would be optimized out by some compilers.
- wincng.c: fix clear memory feature compilation with mingw
Alexander Lamaison (1 Apr 2015)
- [LarsNordin-LNdata brought this change]
Enable use of OpenSSL that doesn't have DSA.
Added #if LIBSSH2_DSA for all DSA functions.
- [LarsNordin-LNdata brought this change]
Use correct no-blowfish #define with OpenSSL.
The OpenSSL define is OPENSSL_NO_BF, not OPENSSL_NO_BLOWFISH.
Marc Hoersken (25 Mar 2015)
- configure: error if explicitly enabled clear-memory is not supported
This takes 22bd8d81d8fab956085e2079bf8c29872455ce59 and
b8289b625e291bbb785ed4add31f4759241067f3 into account,
but still makes it enabled by default if it is supported
and error out in case it is unsupported and was requested.
Daniel Stenberg (25 Mar 2015)
- configure: make clear-memory default but only WARN if backend unsupported
... instead of previous ERROR.
Marc Hoersken (24 Mar 2015)
- wincng.h: fix warning about computed return value not being used
- nonblocking examples: fix warning about unused tvdiff on Mac OS X
Daniel Stenberg (24 Mar 2015)
- openssl: fix compiler warnings
- cofigure: fix --disable-clear-memory check
Marc Hoersken (23 Mar 2015)
- scp.c: improved command length calculation
Reduced number of calls to strlen, because shell_quotearg already
returns the length of the resulting string (e.q. quoted path)
which we can add to the existing and known cmd_len.
Removed obsolete call to memset again, because we can put a final
NULL-byte at the end of the string using the calculated length.
- scp.c: improved and streamlined formatting
- scp.c: fix that scp_recv may transmit not initialised memory
- scp.c: fix that scp_send may transmit not initialised memory
Fixes ticket 244. Thanks Torsten.
- kex: do not ignore failure of libssh2_sha1_init()
Based upon 43b730ce56f010e9d33573fcb020df49798c1ed8.
Fixes ticket 290. Thanks for the suggestion, mstrsn.
- wincng.h: fix return code of libssh2_md5_init()
- openssl.c: fix possible segfault in case EVP_DigestInit fails
- wincng.c: fix possible use of uninitialized variables
- wincng.c: fix unused argument warning if clear memory is not enabled
- wincng: Added explicit clear memory feature to WinCNG backend
This re-introduces the original feature proposed during
the development of the WinCNG crypto backend. It still needs
to be added to libssh2 itself and probably other backends.
Memory is cleared using the function SecureZeroMemory which is
available on Windows systems, just like the WinCNG backend.
- wincng.c: fixed mixed line-endings
- wincng.c: fixed use of invalid parameter types in a8d14c5dcf
- wincng.c: only try to load keys corresponding to the algorithm
- wincng.c: moved PEM headers into definitions
- wincng.h: fixed invalid parameter name
- wincng: fixed mismatch with declarations in crypto.h
- userauth.c: fixed warning C6001: using uninitialized sig and sig_len
- pem.c: fixed warning C6269: possible incorrect order of operations
- wincng: add support for authentication keys to be passed in memory
Based upon 18cfec8336e and daa2dfa2db.
- pem.c: add _libssh2_pem_parse_memory to parse PEM from memory
Requirement to implement 18cfec8336e for Libgcrypt and WinCNG.
- pem.c: fix copy and paste mistake from 55d030089b8
- userauth.c: fix another possible dereference of a null pointer
- userauth.c: fix possible dereference of a null pointer
- pem.c: reduce number of calls to strlen in readline
Alexander Lamaison (17 Mar 2015)
- [Will Cosgrove brought this change]
Initialise HMAC_CTX in more places.
Missed a couple more places we init ctx to avoid openssl threading crash.
- Build build breakage in WinCNG backend caused when adding libssh2_userauth_publickey_frommemory.
The new feature isn't implemented for the WinCNG backend currently, but the WinCNG backend didn't contain any implementation of the required backend functions - even ones that returns an error. That caused link errors.
This change fixes the problem by providing an implementation of the backend functions that returns an error.
- Fix breakage in WinCNG backend caused by introducing libssh2_hmac_ctx_init.
The macro was defined to nothing for the libgcrypt backend, but not for WinCNG. This brings the latter into line with the former.
Daniel Stenberg (15 Mar 2015)
- userauth_publickey_frommemory.3: add AVAILABILITY
... it will be added in 1.6.0
- libssh2: next version will be called 1.6.0
... since we just added a new function.
- docs: add libssh2_userauth_publickey_frommemory.3 to dist
The function and man page were added in commit 18cfec8336e
- [Jakob Egger brought this change]
direct_tcpip: Fixed channel write
There were 3 bugs in this loop:
1) Started from beginning after partial writes
2) Aborted when 0 bytes were sent
3) Ignored LIBSSH2_ERROR_EAGAIN
See also:
https://trac.libssh2.org/ticket/281
https://trac.libssh2.org/ticket/293
Alexander Lamaison (15 Mar 2015)
- [Will Cosgrove brought this change]
Must init HMAC_CTX before using it.
Must init ctx before using it or openssl will reuse the hmac which is not thread safe and causes a crash.
Added libssh2_hmac_ctx_init macro.
- Add continuous integration configurations.
Linux-based CI is done by Travis CI. Windows-based CI is done by Appveyor.
- [David Calavera brought this change]
Allow authentication keys to be passed in memory.
All credits go to Joe Turpin, I'm just reaplying and cleaning his patch:
http://www.libssh2.org/mail/libssh2-devel-archive-2012-01/0015.shtml
* Use an unimplemented error for extracting keys from memory with libgcrypt.
Daniel Stenberg (14 Mar 2015)
- docs: include the renamed INSTALL* files in dist
Alexander Lamaison (13 Mar 2015)
- Prevent collisions between CMake and Autotools in examples/ and tests/.
- Avoid clash between CMake build and Autotools.
Autotools expects a configuration template file at src/libssh2_config.h.in, which buildconf generates. But the CMake build system has its CMake-specific version of the file at this path. This means that, if you don't run buildconf, the Autotools build will fail because it configured the wrong header template.
See https://github.com/libssh2/libssh2/pull/8.
- Merge pull request #8 from alamaison/cmake
CMake build system.
- CMake build system.
Tested:
- Windows:
- Visual C++ 2005/2008/2010/2012/2013/MinGW-w64
- static/shared
- 32/64-bit
- OpenSSL/WinCNG
- Without zlib
- Linux:
- GCC 4.6.3/Clang 3.4