mirror of
				https://github.com/libssh2/libssh2.git
				synced 2025-11-03 22:13:11 +03:00 
			
		
		
		
	Dan Fandrich patch:
1 - let libssh2 compile with OpenSSL 0.9.6b. This is due to 'crypt' is found in one of its header files and EVP_MAX_BLOCK_LENGTH not being found. 2 - The EXEEXT patch is because automake 1.7 doesn't support it, and recent automakes add it automatically
This commit is contained in:
		
							
								
								
									
										18
									
								
								src/crypt.c
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								src/crypt.c
									
									
									
									
									
								
							@@ -90,7 +90,7 @@ static int init (LIBSSH2_SESSION *session,
 | 
				
			|||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int crypt(LIBSSH2_SESSION *session, unsigned char *block, void **abstract)
 | 
					static int encrypt(LIBSSH2_SESSION *session, unsigned char *block, void **abstract)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct crypt_ctx *cctx = *(struct crypt_ctx **)abstract;
 | 
						struct crypt_ctx *cctx = *(struct crypt_ctx **)abstract;
 | 
				
			||||||
	(void)session;
 | 
						(void)session;
 | 
				
			||||||
@@ -117,7 +117,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes128_cbc = {
 | 
				
			|||||||
	16, /* secret length -- 16*8 == 128bit */
 | 
						16, /* secret length -- 16*8 == 128bit */
 | 
				
			||||||
	0, /* flags */
 | 
						0, /* flags */
 | 
				
			||||||
	&init,
 | 
						&init,
 | 
				
			||||||
	&crypt,
 | 
						&encrypt,
 | 
				
			||||||
	&dtor,
 | 
						&dtor,
 | 
				
			||||||
	_libssh2_cipher_aes128
 | 
						_libssh2_cipher_aes128
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -129,7 +129,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes192_cbc = {
 | 
				
			|||||||
	24, /* secret length -- 24*8 == 192bit */
 | 
						24, /* secret length -- 24*8 == 192bit */
 | 
				
			||||||
	0, /* flags */
 | 
						0, /* flags */
 | 
				
			||||||
	&init,
 | 
						&init,
 | 
				
			||||||
	&crypt,
 | 
						&encrypt,
 | 
				
			||||||
	&dtor,
 | 
						&dtor,
 | 
				
			||||||
	_libssh2_cipher_aes192
 | 
						_libssh2_cipher_aes192
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -141,7 +141,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes256_cbc = {
 | 
				
			|||||||
	32, /* secret length -- 32*8 == 256bit */
 | 
						32, /* secret length -- 32*8 == 256bit */
 | 
				
			||||||
	0, /* flags */
 | 
						0, /* flags */
 | 
				
			||||||
	&init,
 | 
						&init,
 | 
				
			||||||
	&crypt,
 | 
						&encrypt,
 | 
				
			||||||
	&dtor,
 | 
						&dtor,
 | 
				
			||||||
	_libssh2_cipher_aes256
 | 
						_libssh2_cipher_aes256
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -154,7 +154,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_rijndael_cbc_lysator_liu_se = {
 | 
				
			|||||||
	32, /* secret length -- 32*8 == 256bit */
 | 
						32, /* secret length -- 32*8 == 256bit */
 | 
				
			||||||
	0, /* flags */
 | 
						0, /* flags */
 | 
				
			||||||
	&init,
 | 
						&init,
 | 
				
			||||||
	&crypt,
 | 
						&encrypt,
 | 
				
			||||||
	&dtor,
 | 
						&dtor,
 | 
				
			||||||
	_libssh2_cipher_aes256
 | 
						_libssh2_cipher_aes256
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -168,7 +168,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_blowfish_cbc = {
 | 
				
			|||||||
	16, /* secret length */
 | 
						16, /* secret length */
 | 
				
			||||||
	0, /* flags */
 | 
						0, /* flags */
 | 
				
			||||||
	&init,
 | 
						&init,
 | 
				
			||||||
	&crypt,
 | 
						&encrypt,
 | 
				
			||||||
	&dtor,
 | 
						&dtor,
 | 
				
			||||||
	_libssh2_cipher_blowfish
 | 
						_libssh2_cipher_blowfish
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -182,7 +182,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_arcfour = {
 | 
				
			|||||||
	16, /* secret length */
 | 
						16, /* secret length */
 | 
				
			||||||
	0, /* flags */
 | 
						0, /* flags */
 | 
				
			||||||
	&init,
 | 
						&init,
 | 
				
			||||||
	&crypt,
 | 
						&encrypt,
 | 
				
			||||||
	&dtor,
 | 
						&dtor,
 | 
				
			||||||
	_libssh2_cipher_arcfour
 | 
						_libssh2_cipher_arcfour
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -196,7 +196,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_cast128_cbc = {
 | 
				
			|||||||
	16, /* secret length */
 | 
						16, /* secret length */
 | 
				
			||||||
	0, /* flags */
 | 
						0, /* flags */
 | 
				
			||||||
	&init,
 | 
						&init,
 | 
				
			||||||
	&crypt,
 | 
						&encrypt,
 | 
				
			||||||
	&dtor,
 | 
						&dtor,
 | 
				
			||||||
	_libssh2_cipher_cast5
 | 
						_libssh2_cipher_cast5
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -210,7 +210,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_3des_cbc = {
 | 
				
			|||||||
	24, /* secret length */
 | 
						24, /* secret length */
 | 
				
			||||||
	0, /* flags */
 | 
						0, /* flags */
 | 
				
			||||||
	&init,
 | 
						&init,
 | 
				
			||||||
	&crypt,
 | 
						&encrypt,
 | 
				
			||||||
	&dtor,
 | 
						&dtor,
 | 
				
			||||||
	_libssh2_cipher_3des
 | 
						_libssh2_cipher_3des
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,6 +39,10 @@
 | 
				
			|||||||
#include "libssh2_priv.h"
 | 
					#include "libssh2_priv.h"
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef EVP_MAX_BLOCK_LENGTH
 | 
				
			||||||
 | 
					#define EVP_MAX_BLOCK_LENGTH 32
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int _libssh2_rsa_new(libssh2_rsa_ctx **rsa,
 | 
					int _libssh2_rsa_new(libssh2_rsa_ctx **rsa,
 | 
				
			||||||
		     const unsigned char *edata,
 | 
							     const unsigned char *edata,
 | 
				
			||||||
		     unsigned long elen,
 | 
							     unsigned long elen,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
 | 
				
			|||||||
AM_LDFLAGS = -no-install
 | 
					AM_LDFLAGS = -no-install
 | 
				
			||||||
LDADD = ../src/libssh2.la
 | 
					LDADD = ../src/libssh2.la
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ctests = simple$(EXEEXT)
 | 
					ctests = simple
 | 
				
			||||||
TESTS = $(ctests)	
 | 
					TESTS = $(ctests)	
 | 
				
			||||||
check_PROGRAMS = $(ctests)
 | 
					check_PROGRAMS = $(ctests)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user