Skip to content

Commit

Permalink
Dan Fandrich patch:
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bagder committed Mar 14, 2007
1 parent 689c394 commit 75ceed5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int init (LIBSSH2_SESSION *session,
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;
(void)session;
Expand All @@ -117,7 +117,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes128_cbc = {
16, /* secret length -- 16*8 == 128bit */
0, /* flags */
&init,
&crypt,
&encrypt,
&dtor,
_libssh2_cipher_aes128
};
Expand All @@ -129,7 +129,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes192_cbc = {
24, /* secret length -- 24*8 == 192bit */
0, /* flags */
&init,
&crypt,
&encrypt,
&dtor,
_libssh2_cipher_aes192
};
Expand All @@ -141,7 +141,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_aes256_cbc = {
32, /* secret length -- 32*8 == 256bit */
0, /* flags */
&init,
&crypt,
&encrypt,
&dtor,
_libssh2_cipher_aes256
};
Expand All @@ -154,7 +154,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_rijndael_cbc_lysator_liu_se = {
32, /* secret length -- 32*8 == 256bit */
0, /* flags */
&init,
&crypt,
&encrypt,
&dtor,
_libssh2_cipher_aes256
};
Expand All @@ -168,7 +168,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_blowfish_cbc = {
16, /* secret length */
0, /* flags */
&init,
&crypt,
&encrypt,
&dtor,
_libssh2_cipher_blowfish
};
Expand All @@ -182,7 +182,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_arcfour = {
16, /* secret length */
0, /* flags */
&init,
&crypt,
&encrypt,
&dtor,
_libssh2_cipher_arcfour
};
Expand All @@ -196,7 +196,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_cast128_cbc = {
16, /* secret length */
0, /* flags */
&init,
&crypt,
&encrypt,
&dtor,
_libssh2_cipher_cast5
};
Expand All @@ -210,7 +210,7 @@ static LIBSSH2_CRYPT_METHOD libssh2_crypt_method_3des_cbc = {
24, /* secret length */
0, /* flags */
&init,
&crypt,
&encrypt,
&dtor,
_libssh2_cipher_3des
};
Expand Down
4 changes: 4 additions & 0 deletions src/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
#include "libssh2_priv.h"
#include <string.h>

#ifndef EVP_MAX_BLOCK_LENGTH
#define EVP_MAX_BLOCK_LENGTH 32
#endif

int _libssh2_rsa_new(libssh2_rsa_ctx **rsa,
const unsigned char *edata,
unsigned long elen,
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
AM_LDFLAGS = -no-install
LDADD = ../src/libssh2.la

ctests = simple$(EXEEXT)
ctests = simple
TESTS = $(ctests)
check_PROGRAMS = $(ctests)

0 comments on commit 75ceed5

Please sign in to comment.