1
1
/* Copyright (c) 2004-2009, Sara Golemon <[email protected] >
2
- * Copyright (c) 2009-2015 Daniel Stenberg
2
+ * Copyright (c) 2009-2021 Daniel Stenberg
3
3
* Copyright (c) 2010 Simon Josefsson <[email protected] >
4
4
* All rights reserved.
5
5
*
40
40
#ifndef LIBSSH2_H
41
41
#define LIBSSH2_H 1
42
42
43
- #define LIBSSH2_COPYRIGHT "2004-2019 The libssh2 project and its contributors."
43
+ #define LIBSSH2_COPYRIGHT "2004-2021 The libssh2 project and its contributors."
44
44
45
45
/* We use underscore instead of dash when appending DEV in dev versions just
46
46
to make the BANNER define (used by src/session.c) be a valid SSH
47
47
banner. Release versions have no appended strings and may of course not
48
48
have dashes either. */
49
- #define LIBSSH2_VERSION "1.10.0 "
49
+ #define LIBSSH2_VERSION "1.10.1_DEV "
50
50
51
51
/* The numeric version number is also available "in parts" by using these
52
52
defines: */
53
- #define LIBSSH2_VERSION_MAJOR 1
54
- #define LIBSSH2_VERSION_MINOR 10
55
- #define LIBSSH2_VERSION_PATCH 0
53
+ #define LIBSSH2_VERSION_MAJOR 1
54
+ #define LIBSSH2_VERSION_MINOR 10
55
+ #define LIBSSH2_VERSION_PATCH 1
56
56
57
57
/* This is the numeric version of the libssh2 version number, meant for easier
58
58
parsing and comparions by programs. The LIBSSH2_VERSION_NUM define will
69
69
and it is always a greater number in a more recent release. It makes
70
70
comparisons with greater than and less than work.
71
71
*/
72
- #define LIBSSH2_VERSION_NUM 0x010a00
72
+ #define LIBSSH2_VERSION_NUM 0x010a01
73
73
74
74
/*
75
75
* This is the date and time when the full source package was created. The
80
80
*
81
81
* "Mon Feb 12 11:35:33 UTC 2007"
82
82
*/
83
- #define LIBSSH2_TIMESTAMP "Sun 29 Aug 2021 08:37:50 PM UTC "
83
+ #define LIBSSH2_TIMESTAMP "DEV "
84
84
85
85
#ifndef RC_INVOKED
86
86
@@ -100,7 +100,7 @@ extern "C" {
100
100
/* Allow alternate API prefix from CFLAGS or calling app */
101
101
#ifndef LIBSSH2_API
102
102
# ifdef LIBSSH2_WIN32
103
- # ifdef _WINDLL
103
+ # if defined( _WINDLL ) || defined( libssh2_EXPORTS )
104
104
# ifdef LIBSSH2_LIBRARY
105
105
# define LIBSSH2_API __declspec(dllexport)
106
106
# else
@@ -272,8 +272,8 @@ typedef off_t libssh2_struct_stat_size;
272
272
273
273
typedef struct _LIBSSH2_USERAUTH_KBDINT_PROMPT
274
274
{
275
- char * text ;
276
- unsigned int length ;
275
+ unsigned char * text ;
276
+ size_t length ;
277
277
unsigned char echo ;
278
278
} LIBSSH2_USERAUTH_KBDINT_PROMPT ;
279
279
@@ -356,6 +356,7 @@ typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE
356
356
#define LIBSSH2_METHOD_COMP_SC 7
357
357
#define LIBSSH2_METHOD_LANG_CS 8
358
358
#define LIBSSH2_METHOD_LANG_SC 9
359
+ #define LIBSSH2_METHOD_SIGN_ALGO 10
359
360
360
361
/* flags */
361
362
#define LIBSSH2_FLAG_SIGPIPE 1
@@ -506,6 +507,8 @@ typedef struct _LIBSSH2_POLLFD {
506
507
#define LIBSSH2_ERROR_CHANNEL_WINDOW_FULL -47
507
508
#define LIBSSH2_ERROR_KEYFILE_AUTH_FAILED -48
508
509
#define LIBSSH2_ERROR_RANDGEN -49
510
+ #define LIBSSH2_ERROR_MISSING_USERAUTH_BANNER -50
511
+ #define LIBSSH2_ERROR_ALGO_UNSUPPORTED -51
509
512
510
513
/* this is a define to provide the old (<= 1.2.7) name */
511
514
#define LIBSSH2_ERROR_BANNER_NONE LIBSSH2_ERROR_BANNER_RECV
@@ -614,6 +617,8 @@ LIBSSH2_API const char *libssh2_session_banner_get(LIBSSH2_SESSION *session);
614
617
LIBSSH2_API char * libssh2_userauth_list (LIBSSH2_SESSION * session ,
615
618
const char * username ,
616
619
unsigned int username_len );
620
+ LIBSSH2_API int libssh2_userauth_banner (LIBSSH2_SESSION * session ,
621
+ char * * banner );
617
622
LIBSSH2_API int libssh2_userauth_authenticated (LIBSSH2_SESSION * session );
618
623
619
624
LIBSSH2_API int
@@ -939,8 +944,21 @@ LIBSSH2_API int libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest,
939
944
LIBSSH2_API
940
945
const char * libssh2_version (int req_version_num );
941
946
947
+ typedef enum {
948
+ libssh2_no_crypto = 0 ,
949
+ libssh2_openssl ,
950
+ libssh2_gcrypt ,
951
+ libssh2_mbedtls ,
952
+ libssh2_wincng
953
+ } libssh2_crypto_engine_t ;
954
+
955
+ LIBSSH2_API
956
+ libssh2_crypto_engine_t libssh2_crypto_engine (void );
957
+
942
958
#define HAVE_LIBSSH2_KNOWNHOST_API 0x010101 /* since 1.1.1 */
943
959
#define HAVE_LIBSSH2_VERSION_API 0x010100 /* libssh2_version since 1.1 */
960
+ #define HAVE_LIBSSH2_CRYPTOENGINE_API 0x011100 /* libssh2_crypto_engine
961
+ since 1.11 */
944
962
945
963
struct libssh2_knownhost {
946
964
unsigned int magic ; /* magic stored by the library */
0 commit comments