Skip to content

Commit

Permalink
Update/fix Windows build
Browse files Browse the repository at this point in the history
Update build system to use latest debian-bookworm.
Updates:
 - nsis-3.09
 - scons-3.1.2

Change-Id: Ie766d23935b02b7c701f4db8a174ee506337b459
  • Loading branch information
grke committed Sep 26, 2023
1 parent 5ce44cd commit 0de49dd
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
6 changes: 4 additions & 2 deletions src/md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ void md5_free(
if(!md5 || !*md5)
return;
if ((*md5)->ctx)
{
EVP_MD_CTX_free((*md5)->ctx);
free_v((void **)md5);
#ifdef UTEST
alloc_count--;
free_count++;
#endif
}
free_v((void **)md5);
*md5=NULL;
}

Expand Down
8 changes: 6 additions & 2 deletions src/win32/installer/DumpLog.nsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
!define LVM_GETITEMCOUNT 0x1004
!define LVM_GETITEMTEXT 0x102D
!ifndef LVM_GETITEMCOUNT
!define LVM_GETITEMCOUNT 0x1004
!endif
!ifndef LVM_GETITEMTEXT
!define LVM_GETITEMTEXT 0x102D
!endif

Function DumpLog
Exch $5
Expand Down
2 changes: 1 addition & 1 deletion test/test_windows64
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
path="$PWD"
build="$path/build"
target="$path/target"
ssh_opts="-o StrictHostKeyChecking=no"
ssh_opts="-o StrictHostKeyChecking=no -o PubkeyAcceptedKeyTypes=+ssh-rsa"

fail()
{
Expand Down
2 changes: 1 addition & 1 deletion test/vms_ids
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
debianid=i-08745efd411822cf0
debianid=i-078ea0a3ef31b3e36
windowsid=i-c021071c
freebsdid=i-001d6cd861651a6c1
netbsdid=i-60db8bbf
2 changes: 1 addition & 1 deletion test/vms_main
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ssh $ssh_opts "$host" "tar -xvf $tarfile -C burp --strip-components=1"

function docker_run()
{
ssh $ssh_opts "$host" "docker run --name burp --rm -v ~/burp:/burp -v ~/.ssh:/root/.ssh --expose 4998-4999 -p 4998:4998 -p 4999:4999 -w /burp burp-cross-tools $@"
ssh $ssh_opts "$host" "docker run --name burp --rm -v ~/burp:/burp -v ~/.ssh:/root/.ssh --expose 4998-4999 -p 4998:4998 -p 4999:4999 -w /burp fortmap/burp-cross-tools:3.1.6c $@"
}

docker_run "./configure --prefix=/usr --sysconfdir=/etc/burp --localstatedir=/var --with-coverage"
Expand Down
17 changes: 3 additions & 14 deletions utest/test_fzp.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,16 @@ static struct sdata sd[] = {
{ 20 } // It is OK to seek beyond the end of a file.
};

static int fzp_gzopen_old_zlib_seek_hack=0;

static void seek_checks(
struct fzp *(*open_func)(const char *, const char *),
struct sdata *d)
{
struct fzp *fzp;

fail_unless((fzp=open_func(file, "rb"))!=NULL);
if(fzp_gzopen_old_zlib_seek_hack && d->pos > (off_t)strlen(content))
{
fail_unless(fzp_seek(fzp, d->pos, SEEK_SET)==-1);
}
else
{
fail_unless(!fzp_seek(fzp, d->pos, SEEK_SET));
fail_unless(fzp_tell(fzp)==d->pos);
fail_unless(!fzp_eof(fzp));
}
fail_unless(!fzp_seek(fzp, d->pos, SEEK_SET));
fail_unless(fzp_tell(fzp)==d->pos);
fail_unless(!fzp_eof(fzp));
fail_unless(!fzp_close(&fzp));
fail_unless(fzp==NULL);
}
Expand Down Expand Up @@ -179,8 +170,6 @@ END_TEST

START_TEST(test_fzp_gzseek)
{
if(version_to_long(ZLIB_VERSION) <= version_to_long("1.2.3"))
fzp_gzopen_old_zlib_seek_hack=1;
do_seek_tests(fzp_gzopen);
}
END_TEST
Expand Down
3 changes: 3 additions & 0 deletions utest/test_handy_extra.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ static void tear_down(void)

START_TEST(test_enc_setup_no_password)
{
alloc_counters_reset();
fail_unless(enc_setup(1 /*encrypt*/, NULL, 1, /*salt*/0)==NULL);
tear_down();
}
Expand All @@ -20,6 +21,8 @@ START_TEST(test_enc_setup_ok)
uint64_t salt=12389123;
EVP_CIPHER_CTX *ctx;
int key_deriv=ENCRYPTION_KEY_DERIVED_AES_CBC_256;

alloc_counters_reset();
fail_unless((ctx=enc_setup(1 /*encrypt*/, "somepass", key_deriv, salt))!=NULL);
EVP_CIPHER_CTX_cleanup(ctx);
EVP_CIPHER_CTX_free(ctx);
Expand Down
2 changes: 2 additions & 0 deletions utest/test_md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ START_TEST(test_md5)
{
uint8_t checksum[MD5_DIGEST_LENGTH];
struct md5 *md5;

alloc_counters_reset();
fail_unless((md5=md5_alloc(__func__))!=NULL);
fail_unless(md5_init(md5));

Expand Down

0 comments on commit 0de49dd

Please sign in to comment.