mirror of
https://github.com/nmap/nmap.git
synced 2026-02-12 16:36:34 +00:00
Update libssh2 to 1.11.1
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#ifndef __LIBSSH2_CRYPTO_H
|
||||
#define __LIBSSH2_CRYPTO_H
|
||||
/* Copyright (C) 2009, 2010 Simon Josefsson
|
||||
* Copyright (C) 2006, 2007 The Written Word, Inc. All rights reserved.
|
||||
* Copyright (C) 2010-2019 Daniel Stenberg
|
||||
#ifndef LIBSSH2_CRYPTO_H
|
||||
#define LIBSSH2_CRYPTO_H
|
||||
/* Copyright (C) Simon Josefsson
|
||||
* Copyright (C) The Written Word, Inc.
|
||||
* Copyright (C) Daniel Stenberg
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms,
|
||||
* with or without modification, are permitted provided
|
||||
@@ -36,6 +37,8 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
* OF SUCH DAMAGE.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#if defined(LIBSSH2_OPENSSL) || defined(LIBSSH2_WOLFSSL)
|
||||
@@ -52,70 +55,26 @@
|
||||
#error "no cryptography backend selected"
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_MD5
|
||||
#undef LIBSSH2_MD5
|
||||
#define LIBSSH2_MD5 0
|
||||
/* return: success = 1, error = 0 */
|
||||
int _libssh2_hmac_ctx_init(libssh2_hmac_ctx *ctx);
|
||||
#if LIBSSH2_MD5
|
||||
int _libssh2_hmac_md5_init(libssh2_hmac_ctx *ctx,
|
||||
void *key, size_t keylen);
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_HMAC_RIPEMD
|
||||
#undef LIBSSH2_HMAC_RIPEMD
|
||||
#define LIBSSH2_HMAC_RIPEMD 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_DSA
|
||||
#undef LIBSSH2_DSA
|
||||
#define LIBSSH2_DSA 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_RSA
|
||||
#undef LIBSSH2_RSA
|
||||
#define LIBSSH2_RSA 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_RSA_SHA1
|
||||
#undef LIBSSH2_RSA_SHA1
|
||||
#define LIBSSH2_RSA_SHA1 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_ECDSA
|
||||
#undef LIBSSH2_ECDSA
|
||||
#define LIBSSH2_ECDSA 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_ED25519
|
||||
#undef LIBSSH2_ED25519
|
||||
#define LIBSSH2_ED25519 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_AES_CTR
|
||||
#undef LIBSSH2_AES_CTR
|
||||
#define LIBSSH2_AES_CTR 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_AES_CBC
|
||||
#undef LIBSSH2_AES_CBC
|
||||
#define LIBSSH2_AES_CBC 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_BLOWFISH
|
||||
#undef LIBSSH2_BLOWFISH
|
||||
#define LIBSSH2_BLOWFISH 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_RC4
|
||||
#undef LIBSSH2_RC4
|
||||
#define LIBSSH2_RC4 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_CAST
|
||||
#undef LIBSSH2_CAST
|
||||
#define LIBSSH2_CAST 0
|
||||
#endif
|
||||
|
||||
#ifdef LIBSSH2_NO_3DES
|
||||
#undef LIBSSH2_3DES
|
||||
#define LIBSSH2_3DES 0
|
||||
#if LIBSSH2_HMAC_RIPEMD
|
||||
int _libssh2_hmac_ripemd160_init(libssh2_hmac_ctx *ctx,
|
||||
void *key, size_t keylen);
|
||||
#endif
|
||||
int _libssh2_hmac_sha1_init(libssh2_hmac_ctx *ctx,
|
||||
void *key, size_t keylen);
|
||||
int _libssh2_hmac_sha256_init(libssh2_hmac_ctx *ctx,
|
||||
void *key, size_t keylen);
|
||||
int _libssh2_hmac_sha512_init(libssh2_hmac_ctx *ctx,
|
||||
void *key, size_t keylen);
|
||||
int _libssh2_hmac_update(libssh2_hmac_ctx *ctx,
|
||||
const void *data, size_t datalen);
|
||||
int _libssh2_hmac_final(libssh2_hmac_ctx *ctx, void *data);
|
||||
void _libssh2_hmac_cleanup(libssh2_hmac_ctx *ctx);
|
||||
|
||||
#define LIBSSH2_ED25519_KEY_LEN 32
|
||||
#define LIBSSH2_ED25519_PRIVATE_KEY_LEN 64
|
||||
@@ -143,16 +102,16 @@ int _libssh2_rsa_new_private(libssh2_rsa_ctx ** rsa,
|
||||
const char *filename,
|
||||
unsigned const char *passphrase);
|
||||
#if LIBSSH2_RSA_SHA1
|
||||
int _libssh2_rsa_sha1_verify(libssh2_rsa_ctx * rsa,
|
||||
const unsigned char *sig,
|
||||
size_t sig_len,
|
||||
const unsigned char *m, size_t m_len);
|
||||
int _libssh2_rsa_sha1_sign(LIBSSH2_SESSION * session,
|
||||
libssh2_rsa_ctx * rsactx,
|
||||
const unsigned char *hash,
|
||||
size_t hash_len,
|
||||
unsigned char **signature,
|
||||
size_t *signature_len);
|
||||
int _libssh2_rsa_sha1_verify(libssh2_rsa_ctx * rsa,
|
||||
const unsigned char *sig,
|
||||
size_t sig_len,
|
||||
const unsigned char *m, size_t m_len);
|
||||
#endif
|
||||
#if LIBSSH2_RSA_SHA2
|
||||
int _libssh2_rsa_sha2_sign(LIBSSH2_SESSION * session,
|
||||
@@ -194,7 +153,7 @@ int _libssh2_dsa_sha1_verify(libssh2_dsa_ctx * dsactx,
|
||||
const unsigned char *m, size_t m_len);
|
||||
int _libssh2_dsa_sha1_sign(libssh2_dsa_ctx * dsactx,
|
||||
const unsigned char *hash,
|
||||
unsigned long hash_len, unsigned char *sig);
|
||||
size_t hash_len, unsigned char *sig);
|
||||
int _libssh2_dsa_new_private_frommemory(libssh2_dsa_ctx ** dsa,
|
||||
LIBSSH2_SESSION * session,
|
||||
const char *filedata,
|
||||
@@ -245,7 +204,7 @@ _libssh2_ecdh_gen_k(_libssh2_bn **k, _libssh2_ec_key *private_key,
|
||||
|
||||
int
|
||||
_libssh2_ecdsa_sign(LIBSSH2_SESSION *session, libssh2_ecdsa_ctx *ec_ctx,
|
||||
const unsigned char *hash, unsigned long hash_len,
|
||||
const unsigned char *hash, size_t hash_len,
|
||||
unsigned char **signature, size_t *signature_len);
|
||||
|
||||
int _libssh2_ecdsa_new_private_frommemory(libssh2_ecdsa_ctx ** ec_ctx,
|
||||
@@ -395,4 +354,4 @@ _libssh2_supported_key_sign_algorithms(LIBSSH2_SESSION *session,
|
||||
unsigned char *key_method,
|
||||
size_t key_method_len);
|
||||
|
||||
#endif /* __LIBSSH2_CRYPTO_H */
|
||||
#endif /* LIBSSH2_CRYPTO_H */
|
||||
|
||||
Reference in New Issue
Block a user